Escolar Documentos
Profissional Documentos
Cultura Documentos
1 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
Table of Contents
Lab 1: Using the IBM dashDB Cloud Data Warehouse Service to analyze data .......... 3
1.
2.
3.
2 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
2.
Make sure you're in the Dashboard tab (if not click on the Dashboard link at the top of the page
to take you there)
3.
Click on CREATE AN APP within the Cloud Foundry Apps box across the top of the page
4.
3 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
5.
6.
We will select the boiler plate Internet Of the Things Foundation Starter
7.
4 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
Lets add a new service to the app, from the app overview click on ADD A SERVICE OR API
9.
Scroll down to the Data & Analytics category and click on the icon for the dashDB service.
Give it a service name and then click USE. The application must Restage again.
5 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
Click on the dashDB service of your Bluemix application then on the Launch icon to launch the
console of the service instance you just created in another tab.
2.
From the dashDB console click the Load menu from the left side menu and then Load from
Desktop
3.
Select the Browse Files button, navigate to and select the patientdataV5.csv file from the Lab 1
folder on the desktop.
If you dont have or cant find the patientdataV5.csv then please ask your friendly instructor to help.
6 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
4.
Leave all other options as they are and click on the Load File button (lower right). The data file
will be loaded into the dashDB warehouse resulting in something like the below.
5.
Review your heart patient medical data and select the Next button (lower right)
6.
We now need to define the name of the table holding the imported patient information. Select the
Table name field and rename the table patientdata and hit the Finished button (lower right).
7.
You data should have been successfully imported into the patientdata table
8.
Take a note of your dashDB schema name which you will require for the next part of our exercise.
7 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
From the dashDB console select Analytics from the left side menu and then the option R Scripts.
2.
Select the Import button and then the Import from local file system option.
3.
In the dialog box that appears click on the Choose File button, navigate to and select the
piechart.r script located within the Lab 1 folder and select the OK button.
8 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
If you dont have or cant find the piechart.r script then please ask your friendly instructor to help.
Your screen should look something like the below:
4.
What you see here is the content of the R script that is going to produce a visualization of the
patient heart data. However prior to running this script we need to change one element.
5.
At the end of the previous section you noted the name of your automatically generated dashDB
schema name. Goto the R script and change the DASH013335 value to that of your schema as
shown below.
9 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
6.
The R Script will now run and all being well, with no errors resulting in a pdf document icon appearing as shown below:
7.
This pdf document is the output of the script containing the pie chart for the patient heart data.
Single click on pdf document icon to view the results of the script.
The pie chart shows the number of heart patients, from the patient data, who have already suffered heart
10 / 11
Lab 1 : Using the IBM dashDB Cloud Data Warehouse Service to Analyze Data
failures. A simple example but illustrates the process required to run R analytics against data stored in your
dashDB warehouse.
Congratulations!
Youve successfully completed Lab 1 where you explored the dashDB warehouse service and how to run
some simple analytics in R to discover how many patients have suffered from heart failure.
11 / 11