Tutorial 1 - Meet + greet + Software Installation

Warm up

Introduce yourself to your instructor and friends.

Your tutor will show you how to do the following if you are reluctant to read all the text below. 😁

Section 1: Sign up and Register for Oracle Live SQL?

  1. Open your web browser and go to the Oracle Live SQL website: Oracle Live SQL.

  2. On the Oracle Live SQL homepage, click the Sign In button located at the top right corner of the page.

  3. If you already have an Oracle account, you can simply enter your login credentials (email and password) and click Sign In. If you do not have an Oracle account, click the Create Account link below the Sign In button.

  4. You will be redirected to the Oracle account creation page. Fill out the registration form with the required information:

    • Email Address: Enter a valid email address that you have access to.
    • Password: Create a strong password that meets the specified criteria.
    • Country: Select your country of residence from the dropdown menu.
    • Name: Enter your first and last name.
    • Job Title: (Optional) Enter your job title.
    • Work Phone: (Optional) Enter your work phone number.
    • Company Name: (Optional) Enter your company name.
  5. Review the Oracle Terms of Use and Privacy Policy. If you agree to the terms, check the box indicating your acceptance.

  6. Complete the CAPTCHA to verify you are not a robot.

  7. Click the Create Account button to submit your registration.

  8. After submitting your registration, Oracle will send a verification email to the email address you provided. Check your inbox for an email from Oracle with the subject line “Verify your email address.”

  9. Open the email and click the verification link to confirm your email address. You will be redirected to the Oracle website, and your account will be activated.

  10. Return to the Oracle Live SQL website: Oracle Live SQL.

  11. Click the Sign In button at the top right corner of the page.

  12. Enter your Oracle account credentials (email and password) and click Sign In.

  13. Once signed in, you will be directed to the Oracle Live SQL main interface.

  14. You can now start writing and running SQL and PL/SQL scripts. The interface provides a variety of features, including:

    • Script Editor: Write and execute your SQL scripts.
    • Sample Scripts: Explore and run sample scripts provided by Oracle to learn SQL and PL/SQL concepts.
    • Tutorials: Access educational resources and tutorials to improve your skills.
    • Community Sharing: Share your scripts with the community or explore scripts shared by other users.

Exercises

Go to oracle live and select Start Coding as in the screenshot below.

The database used in this exercise is HR database as in the schema below.

  1. Write a Simple SQL Query:

    • In the Script Editor, write a simple SQL query to select all columns from a table. For example:
    SELECT * FROM table_name;
    • Click the Run button to execute the query and view the results.

  2. Play around with the select statement using HR schema. The tables in HR schema can be accessed via Schema > Choose “Human Resources (HR)” from the dropdown list.


Section 2: Downloading and Installing Power BI Desktop

Power BI Desktop is a powerful data visualization tool that allows you to connect to various data sources, transform data, and create interactive reports. Follow these steps to download and install Power BI Desktop on your computer.

2.1 Downloading Power BI Desktop

  1. Visit the Power BI Website:

  2. Navigate to the Download Page:

    • Click on the Products menu at the top of the page and select Power BI Desktop.
  3. Download the Installer:

    • Click on the Download free button to go to the Microsoft Store page for Power BI Desktop.

    • If you prefer to download the installer directly (instead of through the Microsoft Store), click on the See download or language options link and choose the version suitable for your operating system.

2.2 Installing Power BI Desktop

  1. Run the Installer:

    • If you downloaded Power BI Desktop from the Microsoft Store, it will install automatically after you click the Get button.

    • If you downloaded the installer directly, locate the downloaded file (typically a .msi file) and double-click it to run the installer.

  2. Follow the Installation Prompts:

    • Click Next on the welcome screen.

    • Accept the license agreement and click Next.

    • Choose the installation folder or accept the default path and click Next.

    • Click Install to begin the installation process.

  3. Complete the Installation:

    • Once the installation is complete, click Finish to close the installer.
  4. Launch Power BI Desktop:

    • After installation, you can launch Power BI Desktop from the Start menu (Windows) or by searching for it in your applications.

2.3 Initial Setup and Configuration

  1. Sign In to Power BI:

    • When you first open Power BI Desktop, you may be prompted to sign in. If you have a Power BI account, sign in with your credentials. If not, you can create a new account or skip this step.
  2. Explore the Interface:

    • Familiarize yourself with the Power BI Desktop interface, which includes the following key components:

      • Report View: Where you create and arrange visualizations.

      • Data View: Where you can see your data tables.

      • Model View: Where you can manage relationships between tables.

      • Fields Pane: Displays the tables and fields in your data model.

      • Visualizations Pane: Contains various types of visualizations you can add to your reports.

  3. Connect to Data Sources:

    • Click on Get Data in the Home ribbon to connect to a variety of data sources, such as Excel, SQL Server, web data, and more.

    • Follow the prompts to load your data into Power BI Desktop.

Alternative: MOVE platform!

Section 3: Installing R and RStudio

Installing R

R is a powerful statistical programming language used for data analysis and visualization. Follow these steps to install R on your computer:

  1. Download R:

    • Go to the CRAN R Project website.

    • Click on the link for your operating system (Windows, macOS, or Linux).

    • For Windows: Click on “Download R for Windows” and then click on “base”. Click on the download link to get the installer.

    • For macOS: Click on “Download R for (Mac) OS X”. Choose the appropriate file for your macOS version and download the installer.

    • For Linux: Follow the instructions provided for your specific distribution (Debian, Ubuntu, Fedora, etc.).

  2. Install R:

    • Windows: Run the downloaded .exe file and follow the installation prompts. Accept the default settings unless you have specific requirements.

    • macOS: Open the downloaded .pkg file and follow the installation prompts.

    • Linux: Use the terminal and follow the instructions from the CRAN website to add the R repository and install R via your package manager.

Installing RStudio

RStudio is an integrated development environment (IDE) for R that makes coding in R easier and more efficient. Follow these steps to install RStudio:

  1. Download RStudio:

    • Go to the RStudio website.

    • Click on the “Download” button under RStudio Desktop.

    • Choose the installer for your operating system (Windows, macOS, or Linux).

  2. Install RStudio:

    • Windows: Run the downloaded .exe file and follow the installation prompts.

    • macOS: Open the downloaded .dmg file and drag the RStudio icon to your Applications folder.

    • Linux: Open the terminal and follow the instructions provided on the RStudio website to install RStudio via your package manager or download and install the .deb or .rpm package.

  3. Launch RStudio:

    • After installation, open RStudio. It should automatically detect your R installation. If it doesn’t, you may need to manually configure the path to the R executable in the RStudio settings.

By completing these steps, you will have both R and RStudio installed on your computer, ready for use in data analysis and visualization tasks.


Section 4: Getting Started with R and RStudio

Now that you have installed R and RStudio, it’s time to get familiar with the environment and start coding.

4.1 Exploring the RStudio Interface

RStudio provides a user-friendly interface that integrates various tools for working with R. Here’s a quick overview of the main components:

  1. Source Pane:

    • This is where you write and edit your R scripts. You can open multiple tabs to work on different scripts simultaneously.
  2. Console Pane:

    • The console pane is where you can directly enter R commands and see the output immediately.
  3. Environment/History Pane:

    • The Environment tab shows all the objects (data, variables, functions) currently in your workspace.

    • The History tab keeps a record of all the commands you’ve entered in the console.

  4. Files/Plots/Packages/Help/Viewer Pane:

    • The Files tab lets you navigate your file system.

    • The Plots tab displays plots generated by your R code.

    • The Packages tab allows you to manage R packages.

    • The Help tab provides access to R documentation and help files.

    • The Viewer tab can display web content or documents.

4.2 Running R Code

To run R code in RStudio, you can either type commands directly into the console or write scripts in the source pane. Here’s how to run code in RStudio:

  1. Running Commands in the Console:

    • Type an R command in the console and press Enter to execute it.

    • The output will be displayed below the command.

    • For example, you can type 2 + 3 in the console and press Enter to see the result.

  2. Writing Scripts:

    • To write longer scripts or save your code for later use, open a new script file by clicking on File > New File > R Script.

Exercises

  1. Calculate the following:

    • 5 + 9

    • \(20\times 4\)

    • \(9/2\times 9\)

  2. Run the below in your R console and discuss what is the difference between these three

    • 5 * 3 - 7
    • (5 * 3) - 7
    • 5 * (3 - 7)

Discuss the results, is it as what you expected?

Phew….feel overwhelm?

😓

The whole exercise is just to make sure you successfully installed all necessary software in your pc. Once you get it install, everything will become easier later on. Having trouble? Please consult your tutor asap.