SlideShare a Scribd company logo
1 of 21
Download to read offline
Line Graph Analysis using R Script for
Intel Edison - IoT Foundation data
Neeraja Ganesan | nganesa@us.ibm.com | @neerajaganesan
Part 1: Sending internal temp. sensor data from Intel Edison to IBM IoT Platform
1. After setting the Edison up, using serial port or Wifi, log into it on command prompt/terminal.Note down INET address of Edison. Eg: Mine is
192.168.1.9, after you connect your device, it will be something else.
2. Download a File transfer client, e.g.: Filezilla
3. Go to your pendrive
4. Look for folder BluemixFiles
5. Inside that download ibm-iot-quickstart on your machine OR go to : https://developer.ibm.com/recipes/tutorials/connect-an-intel-galileo-to-
the-internet-of-things-foundation-connect/ and download ibm-iot-quickstart.zip from step 3. a).
6. Go back to FileZilla dialog and SSH into it. Note that the Edison needs to have a username and password in order for a FileZilla connection
to be established. Configure the setup if necessary.
7. Drag and drop ibm-iot-quickstart from the unzipped download on the left pane into the root folder of Edison on the right pane.
8. Open terminal .. ssh into Edison if it’s not already open.
ssh <uname>@<INET address from Step 1 of the tutorial>
9. cd into ibm-iot-quickstart
10. chmod +x setup.sh
11. Type ./setup.sh. Once you hit enter, you will see some output and the control will eventually return to the prompt. If there is an error in the
command then you will see statements that have “ERR” in them. In that case re-do the process.
12. Edit the javascript file by typing vi ibm-iot-quickstart.js
Scroll to function sendMessage() at the end of the file and make the following changes.
FROM fs.readFile('/sys/class/thermal/thermal_zone0/temp','utf8’,………
TO fs.readFile('/sys/class/thermal/thermal_zone1/temp','utf8',
It should look like this after it is done.
Save this change and return to command prompt.
13. Type node ibm-iot-quickstart.js to execute the application now.
Notice how temperature data starts flowing in. This is the internal temperature of the Edison board. Pause the program immediately by
hitting Ctrl-C OR command-c
Copy your device’s MAC address from the beginning of the output flow. Eg::
14. Open the following link https://quickstart.internetofthings.ibmcloud.com/#/
and paste the MAC address from the previous step into the QuickStart text box and Click “Go”
15. Keeping this tab open, open the terminal/command prompt now and type
node ibm-iot-quickstart.js
again and notice how the graph starts showing real time temperature data in the browser URL
Continue to the next page for Part 2…...
Part 2: Connecting a Grove Temperature Sensor, and fetching data from there, and sending it to Bluemix Cloud
******Connect a temperature sensor to the Edison board at Analog Pin 0, after placing the Base Shield on top of the Edison
16. Open Intel Edison on Terminal/Command Prompt and cd into folder ibm-iot-quickstart, then vi ibm-iot-quickstart.js
Add the following lines on top, before var mqtt is declared:
var groveSensor = require(‘jsupm_grove’);
var temp = new groveSensor.GroveTemp(0);
17. Scroll down to the end of the file and add the following lines of code to display outside temperature:
var celsius = temp.value();
message.d.outsidetemp = celsius; BEFORE the statement console.log(message);
NOTE : The statement should now look like this after making the change, add the line “var celsius = temp.value();” before setting
message.d.outsidetemp = celsius:
Save changes and return to terminal/command prompt.
18. Run program by typing node ibm-iot-quickstart.js
19. Observe changes in quick start URL when you enter the device ID and click Go. Note that the program has to be running on the terminal for
the same.
To connect to NodeRED
20. Login into Bluemix Console after Signing up for it.
Open Bluemix Catalog, and choose Internet of Things Foundation Starter in the Boilerplate, to create it. Enter app name and click Create.
Once the app is running it will look like this:
21. Click on the active URL to open it on a new browser. Click “Go to your NODE-RED flow editor” to open a visual drag and drop page.
Make sure the editor has the following nodes:
1. The blue colored node found under input nodes, called ibmiot. It’s named as
IBM IoT App In.
a. Double click to edit it
b. Enter the device ID from step 13 and click “OK”
2. The green colored debug node found under ‘output’ nodes, called
‘debug’. It’s named as msg.payload.
Connect to the two using a connector.
22. Click the red colored “Deploy” button on the top right corner. Ensure that your program is running in the terminal. Switch to “debug” tab on
nodeRED screen and watch the JSON formatted data, flow in from the device.
Congratulations! You’ve successfully sent data to node RED from the device!!!
Part 3: Creating table in the data base
23. Switch to a new tab and open the app overview page in the Bluemix dashboard page and click “Add a service”.
24. From the catalog page that opens, click dashDB service from Database Management.
25. Enter a name for the service and click “Create”.
26. When prompted to “Restage” the application, click “Ok”.
27. Once the application starts running again, click DashDB service from app overview and click “Launch”.
28. From the left pane click “Tables” and when that opens, click “Add Table”
29. Create a table using SQL statements. Eg: table name is IBM_BLUEMIX:
CREATE TABLE “IBM_BLUEMIX”
(
“TIME” VARCHAR(20),
“TEMP” VARCHAR(5)
);
30. Once the DDL runs successfully, it can be verified by viewing that that table name shows up, in the drop down that shows for existing
tables, under the schema. An auto generated schema is created if no schema is chosen.
If the refresh button near the table name is clicked, column names show up below table name.
Now we populate table with data
31. Go back to the tab that has the nodeRED editor open. It can be opened by clicking the URL on the app overview page and then clicking the
button that says “Go to your Node-RED flow editor”.
32. Drag the “function” node from the left pane and connect it to the Blue colored “IBM IoT App In” node.
33. Double click the function node to open it. Now we’re adding data to extract it from the device. Since we’re expecting to send this data to the
database, we will enter following data in the editor as shown in the image. If desired, name the node at the Name text area. Here it has been
named “FormatDataForDB”
34. Drag the dashDB output node from the pane on the left and connect it to this function, such that the function serves as an input to the
database. dashDB can be found under “storage” heading. Choose the node that has a connector option only to the left(i.e. last node under the
heading). Establish a connector between the newly created function node and dashDB node.
35. Double click the dashDB node, enter the table name, as created in step 7. Under the service drop down, click the name of the dashDB
service as it is named in the app overview page. Remember to bind the service if it you don’t see it.
36. Click “Deploy” to incorporate these changes. Ensure that no error is seen on the Debug tab. If an error is seen then verify the dashDB
connection or javascript syntax.
37. With the program running on the terminal, verify that data is sent to dashDB by launching the service from the dashboard page. Click
“Tables” on the left pane -> Choose appropriate <SCHEMA_NAME> and “<TABLE NAME>” from existing tables -> Click “Browse Data” tab.
When data is loaded, we can be sure of nodeRED sending data to the back end.
Note that TEMP column that you see under heading outsidetemp in nodeRED and terminal. We are recording system time and storing it for a
comprehensive graph.
Part 4: Analyze data using Watson Analytics
38. Refer to step 37. On the top right corner of the table (while browsing data) you will see an option to export this data as CSV.
39. Export it to your machine.
40. Open IBM Watson Analytics and sign up here: http://www.ibm.com/analytics/watson-analytics/us-en/
41. On the welcome page, click on Add.
42. Click on “Drop file or browse” and click on the csv. A block will be created by the same name, on the analytics page. Eg: The CSV that is
uploaded here is “gridcontents.csv”, as is the name of the block.
43. Clicking on the block will open a pop up dialog that has some pre-phrased questions, “Eg: What is the trend of TEMP over TIME”, and a few
others.
44. Clicking on the question will open a page with the graph.
Part 5: Analyze data using Apache Spark
45. Open app on App overview page and click on “Add a service or API”.
46. When the catalog page opens, scroll down to “Data and Analytics” and click on “Apache Spark”. Enter name for the service and let the plan
remain “Personal” by default. Click on Create.
NOTE: Both “Space” and “App” are greyed out. These parameters are fixed since the service is now being bound to this app.
47. Click on the “Restage” button when prompted. The application will now restart with the new service as part of it.
48. On the App Overview page, click on the “Apache Spark” instance that you just created and then click on Notebook.
49. Click on the Data tab on the left and click on “Create a New Connection”. This is used to establish a connection between dashDB database
and the analytics Tool.
TIP: Clicking on Object Storage will help you upload files, like Adding JSON and CSV data.
50. Now enter name for connection (Description is optional). Set service type to “IBM Bluemix” and from the dropdown, choose the service
name of the Instance (dashDB) you created, on step 25. Database is auto populated to BLUDB unless there are other databases. Click on
Create Connection.
51. This new connection will now show up on the page and will be colored green to indicate that it’s active.
52. On the left, pane click on “Analytics” tab.
53. Click on “New Notebook” to create a new notebook into which you’ll be adding Python code.
54. Enter name and description for notebook and click “Create Notebook”. The overview page will now show the newly created notebook.
55. This will now open to a empty workbook with “Python 2.0” as version number on the top right corner
NOTE: In the following step, click run button after typing code in each cell, to execute code. Code is available in pen drive
(“temp_analysis_python.txt”)
Refer to step 56 to see how code is supposed to look
56. Type the following code into your python notebook, cell by cell.
57. In the right pane, you can enable sharing to share this python script.
Part 6: Analyze data graphically using R Scripts
58. In the dashDB tab, on the left pane click “Analysis -> R Scripts”
59. In the new editor that opens click “+” sign to add a new table. Choose “<TABLE_NAME>”, check both columns, TIME and TEMP and click
on Ok. Note that as the schema name is auto generated it will be different.
60. There is a new script that automatically gets loaded in the editor on the right pane. Delete it completely and type the following instead. Click
“Submit” to run the script.
61. You can also save this script by clicking “Save” and naming it. It will show up in the pane on the left under “My Projects” tab.
62. If the “Submit” was successful, a PDF icon will appear instead of the script. Click to open Line Graph. The temperature can be matched with
data in the table.
Part 7: Analyze data using Excel
63. Import CSV data into Excel
64. This data will now open into excel. Perform any statistical function on it, eg: Average of temperature
Congratulations! You’ve successfully analyzed temperature

More Related Content

What's hot

Microsoft Dynamics CRM: Reporting and Dashboards
Microsoft Dynamics CRM: Reporting and DashboardsMicrosoft Dynamics CRM: Reporting and Dashboards
Microsoft Dynamics CRM: Reporting and DashboardsInfinity Info Systems
 
Fomatting Text Tips
Fomatting Text TipsFomatting Text Tips
Fomatting Text TipsEMAINT
 
Tips and Tricks
Tips and TricksTips and Tricks
Tips and TricksEMAINT
 
( 13 ) Office 2007 Coding With Excel And Excel Services
( 13 ) Office 2007   Coding With Excel And Excel Services( 13 ) Office 2007   Coding With Excel And Excel Services
( 13 ) Office 2007 Coding With Excel And Excel ServicesLiquidHub
 
Customizing Forms
Customizing FormsCustomizing Forms
Customizing FormsEMAINT
 
Part 3 editing a wsdl
Part 3 editing a wsdlPart 3 editing a wsdl
Part 3 editing a wsdlkrishmdkk
 
Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...Amit Sharma
 
Work Order Basics
Work Order BasicsWork Order Basics
Work Order BasicsEMAINT
 
Access tips access and sql part 3 practical examples
Access tips  access and sql part 3  practical examplesAccess tips  access and sql part 3  practical examples
Access tips access and sql part 3 practical examplesquest2900
 
Detail Views
Detail ViewsDetail Views
Detail ViewsEMAINT
 
Obiee metadata development
Obiee metadata developmentObiee metadata development
Obiee metadata developmentdils4u
 
Xbrl manual-for-cost-audit-final
Xbrl manual-for-cost-audit-finalXbrl manual-for-cost-audit-final
Xbrl manual-for-cost-audit-finalgrakrishna
 
Generic steps in informatica
Generic steps in informaticaGeneric steps in informatica
Generic steps in informaticaBhuvana Priya
 
Workflow Manager
Workflow ManagerWorkflow Manager
Workflow ManagerEMAINT
 
Oracle Fusion Trees
Oracle Fusion TreesOracle Fusion Trees
Oracle Fusion TreesFeras Ahmad
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentalsAmit Sharma
 
Oracle Fusion Payroll tracing for debugging
Oracle Fusion Payroll tracing for debuggingOracle Fusion Payroll tracing for debugging
Oracle Fusion Payroll tracing for debuggingFeras Ahmad
 

What's hot (19)

Microsoft Dynamics CRM: Reporting and Dashboards
Microsoft Dynamics CRM: Reporting and DashboardsMicrosoft Dynamics CRM: Reporting and Dashboards
Microsoft Dynamics CRM: Reporting and Dashboards
 
Fomatting Text Tips
Fomatting Text TipsFomatting Text Tips
Fomatting Text Tips
 
Tips and Tricks
Tips and TricksTips and Tricks
Tips and Tricks
 
( 13 ) Office 2007 Coding With Excel And Excel Services
( 13 ) Office 2007   Coding With Excel And Excel Services( 13 ) Office 2007   Coding With Excel And Excel Services
( 13 ) Office 2007 Coding With Excel And Excel Services
 
Customizing Forms
Customizing FormsCustomizing Forms
Customizing Forms
 
Part 3 editing a wsdl
Part 3 editing a wsdlPart 3 editing a wsdl
Part 3 editing a wsdl
 
Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...Salesforce interview preparation toolkit formula and validation rules in sale...
Salesforce interview preparation toolkit formula and validation rules in sale...
 
Work Order Basics
Work Order BasicsWork Order Basics
Work Order Basics
 
Access tips access and sql part 3 practical examples
Access tips  access and sql part 3  practical examplesAccess tips  access and sql part 3  practical examples
Access tips access and sql part 3 practical examples
 
Detail Views
Detail ViewsDetail Views
Detail Views
 
Obiee metadata development
Obiee metadata developmentObiee metadata development
Obiee metadata development
 
Xbrl manual-for-cost-audit-final
Xbrl manual-for-cost-audit-finalXbrl manual-for-cost-audit-final
Xbrl manual-for-cost-audit-final
 
Generic steps in informatica
Generic steps in informaticaGeneric steps in informatica
Generic steps in informatica
 
Workflow Manager
Workflow ManagerWorkflow Manager
Workflow Manager
 
Oracle Fusion Trees
Oracle Fusion TreesOracle Fusion Trees
Oracle Fusion Trees
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
 
Oracle Fusion Payroll tracing for debugging
Oracle Fusion Payroll tracing for debuggingOracle Fusion Payroll tracing for debugging
Oracle Fusion Payroll tracing for debugging
 
lecture 5
 lecture 5 lecture 5
lecture 5
 

Viewers also liked

Presentación power point
Presentación power pointPresentación power point
Presentación power pointhaixa08
 
My Portfolio in Educational Technology 2
My Portfolio in Educational Technology 2My Portfolio in Educational Technology 2
My Portfolio in Educational Technology 2Emiechelle Capin
 
Jobarjr sonido 2 1
Jobarjr sonido 2 1Jobarjr sonido 2 1
Jobarjr sonido 2 1JOSEBARRIOSS
 
OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...
OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...
OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...VNG Viatges
 
Administración de empresas
Administración de empresasAdministración de empresas
Administración de empresasAngela Padilla
 
مكتب ترجمه معتمد مدينه نصر
مكتب ترجمه معتمد مدينه نصرمكتب ترجمه معتمد مدينه نصر
مكتب ترجمه معتمد مدينه نصرترجمة معتمدة
 
Web 2.o en la educacion
Web 2.o en la educacionWeb 2.o en la educacion
Web 2.o en la educacionROBERTO FARRO
 
As transformações das primeiras décadas do século xx
As transformações das primeiras décadas do século xxAs transformações das primeiras décadas do século xx
As transformações das primeiras décadas do século xxMónica Lousada
 
SUGGA SERVE SAFE CERTIFICATION!
SUGGA SERVE SAFE CERTIFICATION!SUGGA SERVE SAFE CERTIFICATION!
SUGGA SERVE SAFE CERTIFICATION!Deborah YOUNG
 
教案(第三教節) 投影片
教案(第三教節) 投影片教案(第三教節) 投影片
教案(第三教節) 投影片s0914448
 
Slideshare kristel samudio
Slideshare kristel samudioSlideshare kristel samudio
Slideshare kristel samudioKristel Samudio
 
Ensihoitoseiska 1/2012
Ensihoitoseiska 1/2012Ensihoitoseiska 1/2012
Ensihoitoseiska 1/2012Hoitajat
 
Estrategias para el aprendizaje significativo como para el aprendizaje partic...
Estrategias para el aprendizaje significativo como para el aprendizaje partic...Estrategias para el aprendizaje significativo como para el aprendizaje partic...
Estrategias para el aprendizaje significativo como para el aprendizaje partic...nefkstillo
 

Viewers also liked (20)

OJT Certificate
OJT CertificateOJT Certificate
OJT Certificate
 
Raices cuadradas
Raices cuadradasRaices cuadradas
Raices cuadradas
 
Presentación power point
Presentación power pointPresentación power point
Presentación power point
 
My Portfolio in Educational Technology 2
My Portfolio in Educational Technology 2My Portfolio in Educational Technology 2
My Portfolio in Educational Technology 2
 
Randolph Angelito CV
Randolph Angelito CVRandolph Angelito CV
Randolph Angelito CV
 
Jobarjr sonido 2 1
Jobarjr sonido 2 1Jobarjr sonido 2 1
Jobarjr sonido 2 1
 
OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...
OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...
OFERTA CRUCERO IBEROCRUCEROS 2014 - DESCUENTO POR RESERVA ANTICIPADA MARZO AB...
 
Administración de empresas
Administración de empresasAdministración de empresas
Administración de empresas
 
مكتب ترجمه معتمد مدينه نصر
مكتب ترجمه معتمد مدينه نصرمكتب ترجمه معتمد مدينه نصر
مكتب ترجمه معتمد مدينه نصر
 
Web 2.o en la educacion
Web 2.o en la educacionWeb 2.o en la educacion
Web 2.o en la educacion
 
As transformações das primeiras décadas do século xx
As transformações das primeiras décadas do século xxAs transformações das primeiras décadas do século xx
As transformações das primeiras décadas do século xx
 
certificate
certificatecertificate
certificate
 
SUGGA SERVE SAFE CERTIFICATION!
SUGGA SERVE SAFE CERTIFICATION!SUGGA SERVE SAFE CERTIFICATION!
SUGGA SERVE SAFE CERTIFICATION!
 
教案(第三教節) 投影片
教案(第三教節) 投影片教案(第三教節) 投影片
教案(第三教節) 投影片
 
Apparenza o qualità.
Apparenza o qualità.Apparenza o qualità.
Apparenza o qualità.
 
Slideshare kristel samudio
Slideshare kristel samudioSlideshare kristel samudio
Slideshare kristel samudio
 
2016-05-13 18-35-14
2016-05-13 18-35-142016-05-13 18-35-14
2016-05-13 18-35-14
 
Test1
Test1Test1
Test1
 
Ensihoitoseiska 1/2012
Ensihoitoseiska 1/2012Ensihoitoseiska 1/2012
Ensihoitoseiska 1/2012
 
Estrategias para el aprendizaje significativo como para el aprendizaje partic...
Estrategias para el aprendizaje significativo como para el aprendizaje partic...Estrategias para el aprendizaje significativo como para el aprendizaje partic...
Estrategias para el aprendizaje significativo como para el aprendizaje partic...
 

Similar to Line Graph Analysis using R Script for Intel Edison - IoT Foundation Data - Neeraja Ganesan

Containers Lab
Containers Lab Containers Lab
Containers Lab Dev_Events
 
Once the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxOnce the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxarnit1
 
systems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docxsystems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docxperryk1
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletMitchinson
 
Previous weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docxPrevious weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docxkeilenettie
 
First fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsFirst fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsOregon FIRST Robotics
 
Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10Azharul Islam Shopon
 
Fusion ERP Direct Integration with EPBCS
Fusion ERP Direct Integration with EPBCSFusion ERP Direct Integration with EPBCS
Fusion ERP Direct Integration with EPBCSIbraam Sami
 
Building A Simple Web Service With CXF
Building A Simple Web Service With CXFBuilding A Simple Web Service With CXF
Building A Simple Web Service With CXFCarl Lu
 
Getting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivGetting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivAmit Sharma
 
Getting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivGetting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivAmit Sharma
 
AT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED TutorialAT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED TutorialStefania Kaczmarczyk
 
How to Download IDEA for Windows Based ComputersSelect the dow.docx
How to Download IDEA for Windows Based ComputersSelect the dow.docxHow to Download IDEA for Windows Based ComputersSelect the dow.docx
How to Download IDEA for Windows Based ComputersSelect the dow.docxwellesleyterresa
 
SAP BPC 10.1 NW Master Data loading
SAP BPC 10.1 NW Master Data loading SAP BPC 10.1 NW Master Data loading
SAP BPC 10.1 NW Master Data loading Manoj Kumar
 
Using prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile servicesUsing prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile servicesDavid Voyles
 
Oracle apex hands on lab#2
Oracle apex hands on lab#2Oracle apex hands on lab#2
Oracle apex hands on lab#2Amit Sharma
 

Similar to Line Graph Analysis using R Script for Intel Edison - IoT Foundation Data - Neeraja Ganesan (20)

Containers Lab
Containers Lab Containers Lab
Containers Lab
 
Once the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxOnce the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docx
 
systems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docxsystems labOnce the Application has started up and you are at the .docx
systems labOnce the Application has started up and you are at the .docx
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutlet
 
Homestead Weather workshop
Homestead Weather workshopHomestead Weather workshop
Homestead Weather workshop
 
Previous weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docxPrevious weeks work has been uploaded as well as any other pieces ne.docx
Previous weeks work has been uploaded as well as any other pieces ne.docx
 
First fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsFirst fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboards
 
Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10Installing Process Oracle 10g Database Software on Windows 10
Installing Process Oracle 10g Database Software on Windows 10
 
Fusion ERP Direct Integration with EPBCS
Fusion ERP Direct Integration with EPBCSFusion ERP Direct Integration with EPBCS
Fusion ERP Direct Integration with EPBCS
 
Building A Simple Web Service With CXF
Building A Simple Web Service With CXFBuilding A Simple Web Service With CXF
Building A Simple Web Service With CXF
 
Getting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivGetting started-with-oracle-so a-iv
Getting started-with-oracle-so a-iv
 
Getting started-with-oracle-so a-iv
Getting started-with-oracle-so a-ivGetting started-with-oracle-so a-iv
Getting started-with-oracle-so a-iv
 
AT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED TutorialAT&T Hack Dallas Node-RED Tutorial
AT&T Hack Dallas Node-RED Tutorial
 
How to Download IDEA for Windows Based ComputersSelect the dow.docx
How to Download IDEA for Windows Based ComputersSelect the dow.docxHow to Download IDEA for Windows Based ComputersSelect the dow.docx
How to Download IDEA for Windows Based ComputersSelect the dow.docx
 
DotNetNuke
DotNetNukeDotNetNuke
DotNetNuke
 
zMSC Lab.pdf
zMSC Lab.pdfzMSC Lab.pdf
zMSC Lab.pdf
 
SAP BPC 10.1 NW Master Data loading
SAP BPC 10.1 NW Master Data loading SAP BPC 10.1 NW Master Data loading
SAP BPC 10.1 NW Master Data loading
 
Using prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile servicesUsing prime[31] to connect your unity game to azure mobile services
Using prime[31] to connect your unity game to azure mobile services
 
Oracle apex hands on lab#2
Oracle apex hands on lab#2Oracle apex hands on lab#2
Oracle apex hands on lab#2
 
Vb%20 tutorial
Vb%20 tutorialVb%20 tutorial
Vb%20 tutorial
 

More from WithTheBest

Riccardo Vittoria
Riccardo VittoriaRiccardo Vittoria
Riccardo VittoriaWithTheBest
 
Recreating history in virtual reality
Recreating history in virtual realityRecreating history in virtual reality
Recreating history in virtual realityWithTheBest
 
Engaging and sharing your VR experience
Engaging and sharing your VR experienceEngaging and sharing your VR experience
Engaging and sharing your VR experienceWithTheBest
 
How to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie StudioHow to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie StudioWithTheBest
 
Mixed reality 101
Mixed reality 101 Mixed reality 101
Mixed reality 101 WithTheBest
 
Unlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive TechnologyUnlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive TechnologyWithTheBest
 
Building your own video devices
Building your own video devicesBuilding your own video devices
Building your own video devicesWithTheBest
 
Maximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unityMaximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unityWithTheBest
 
Haptics & amp; null space vr
Haptics & amp; null space vrHaptics & amp; null space vr
Haptics & amp; null space vrWithTheBest
 
How we use vr to break the laws of physics
How we use vr to break the laws of physicsHow we use vr to break the laws of physics
How we use vr to break the laws of physicsWithTheBest
 
The Virtual Self
The Virtual Self The Virtual Self
The Virtual Self WithTheBest
 
You dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helpsYou dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helpsWithTheBest
 
Omnivirt overview
Omnivirt overviewOmnivirt overview
Omnivirt overviewWithTheBest
 
VR Interactions - Jason Jerald
VR Interactions - Jason JeraldVR Interactions - Jason Jerald
VR Interactions - Jason JeraldWithTheBest
 
Japheth Funding your startup - dating the devil
Japheth  Funding your startup - dating the devilJapheth  Funding your startup - dating the devil
Japheth Funding your startup - dating the devilWithTheBest
 
Transported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estateTransported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estateWithTheBest
 
Measuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VRMeasuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VRWithTheBest
 
Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode. Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode. WithTheBest
 
VR, a new technology over 40,000 years old
VR, a new technology over 40,000 years oldVR, a new technology over 40,000 years old
VR, a new technology over 40,000 years oldWithTheBest
 

More from WithTheBest (20)

Riccardo Vittoria
Riccardo VittoriaRiccardo Vittoria
Riccardo Vittoria
 
Recreating history in virtual reality
Recreating history in virtual realityRecreating history in virtual reality
Recreating history in virtual reality
 
Engaging and sharing your VR experience
Engaging and sharing your VR experienceEngaging and sharing your VR experience
Engaging and sharing your VR experience
 
How to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie StudioHow to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie Studio
 
Mixed reality 101
Mixed reality 101 Mixed reality 101
Mixed reality 101
 
Unlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive TechnologyUnlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive Technology
 
Building your own video devices
Building your own video devicesBuilding your own video devices
Building your own video devices
 
Maximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unityMaximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unity
 
Wizdish rovr
Wizdish rovrWizdish rovr
Wizdish rovr
 
Haptics & amp; null space vr
Haptics & amp; null space vrHaptics & amp; null space vr
Haptics & amp; null space vr
 
How we use vr to break the laws of physics
How we use vr to break the laws of physicsHow we use vr to break the laws of physics
How we use vr to break the laws of physics
 
The Virtual Self
The Virtual Self The Virtual Self
The Virtual Self
 
You dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helpsYou dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helps
 
Omnivirt overview
Omnivirt overviewOmnivirt overview
Omnivirt overview
 
VR Interactions - Jason Jerald
VR Interactions - Jason JeraldVR Interactions - Jason Jerald
VR Interactions - Jason Jerald
 
Japheth Funding your startup - dating the devil
Japheth  Funding your startup - dating the devilJapheth  Funding your startup - dating the devil
Japheth Funding your startup - dating the devil
 
Transported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estateTransported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estate
 
Measuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VRMeasuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VR
 
Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode. Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode.
 
VR, a new technology over 40,000 years old
VR, a new technology over 40,000 years oldVR, a new technology over 40,000 years old
VR, a new technology over 40,000 years old
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Line Graph Analysis using R Script for Intel Edison - IoT Foundation Data - Neeraja Ganesan

  • 1. Line Graph Analysis using R Script for Intel Edison - IoT Foundation data Neeraja Ganesan | nganesa@us.ibm.com | @neerajaganesan
  • 2. Part 1: Sending internal temp. sensor data from Intel Edison to IBM IoT Platform 1. After setting the Edison up, using serial port or Wifi, log into it on command prompt/terminal.Note down INET address of Edison. Eg: Mine is 192.168.1.9, after you connect your device, it will be something else. 2. Download a File transfer client, e.g.: Filezilla 3. Go to your pendrive 4. Look for folder BluemixFiles 5. Inside that download ibm-iot-quickstart on your machine OR go to : https://developer.ibm.com/recipes/tutorials/connect-an-intel-galileo-to- the-internet-of-things-foundation-connect/ and download ibm-iot-quickstart.zip from step 3. a). 6. Go back to FileZilla dialog and SSH into it. Note that the Edison needs to have a username and password in order for a FileZilla connection to be established. Configure the setup if necessary. 7. Drag and drop ibm-iot-quickstart from the unzipped download on the left pane into the root folder of Edison on the right pane.
  • 3. 8. Open terminal .. ssh into Edison if it’s not already open. ssh <uname>@<INET address from Step 1 of the tutorial> 9. cd into ibm-iot-quickstart 10. chmod +x setup.sh 11. Type ./setup.sh. Once you hit enter, you will see some output and the control will eventually return to the prompt. If there is an error in the command then you will see statements that have “ERR” in them. In that case re-do the process. 12. Edit the javascript file by typing vi ibm-iot-quickstart.js Scroll to function sendMessage() at the end of the file and make the following changes. FROM fs.readFile('/sys/class/thermal/thermal_zone0/temp','utf8’,……… TO fs.readFile('/sys/class/thermal/thermal_zone1/temp','utf8', It should look like this after it is done. Save this change and return to command prompt. 13. Type node ibm-iot-quickstart.js to execute the application now. Notice how temperature data starts flowing in. This is the internal temperature of the Edison board. Pause the program immediately by hitting Ctrl-C OR command-c Copy your device’s MAC address from the beginning of the output flow. Eg::
  • 4. 14. Open the following link https://quickstart.internetofthings.ibmcloud.com/#/ and paste the MAC address from the previous step into the QuickStart text box and Click “Go” 15. Keeping this tab open, open the terminal/command prompt now and type node ibm-iot-quickstart.js again and notice how the graph starts showing real time temperature data in the browser URL Continue to the next page for Part 2…...
  • 5. Part 2: Connecting a Grove Temperature Sensor, and fetching data from there, and sending it to Bluemix Cloud ******Connect a temperature sensor to the Edison board at Analog Pin 0, after placing the Base Shield on top of the Edison 16. Open Intel Edison on Terminal/Command Prompt and cd into folder ibm-iot-quickstart, then vi ibm-iot-quickstart.js Add the following lines on top, before var mqtt is declared: var groveSensor = require(‘jsupm_grove’); var temp = new groveSensor.GroveTemp(0); 17. Scroll down to the end of the file and add the following lines of code to display outside temperature: var celsius = temp.value(); message.d.outsidetemp = celsius; BEFORE the statement console.log(message); NOTE : The statement should now look like this after making the change, add the line “var celsius = temp.value();” before setting message.d.outsidetemp = celsius:
  • 6. Save changes and return to terminal/command prompt. 18. Run program by typing node ibm-iot-quickstart.js 19. Observe changes in quick start URL when you enter the device ID and click Go. Note that the program has to be running on the terminal for the same. To connect to NodeRED 20. Login into Bluemix Console after Signing up for it. Open Bluemix Catalog, and choose Internet of Things Foundation Starter in the Boilerplate, to create it. Enter app name and click Create. Once the app is running it will look like this:
  • 7. 21. Click on the active URL to open it on a new browser. Click “Go to your NODE-RED flow editor” to open a visual drag and drop page. Make sure the editor has the following nodes: 1. The blue colored node found under input nodes, called ibmiot. It’s named as IBM IoT App In. a. Double click to edit it b. Enter the device ID from step 13 and click “OK” 2. The green colored debug node found under ‘output’ nodes, called ‘debug’. It’s named as msg.payload. Connect to the two using a connector. 22. Click the red colored “Deploy” button on the top right corner. Ensure that your program is running in the terminal. Switch to “debug” tab on nodeRED screen and watch the JSON formatted data, flow in from the device. Congratulations! You’ve successfully sent data to node RED from the device!!!
  • 8. Part 3: Creating table in the data base 23. Switch to a new tab and open the app overview page in the Bluemix dashboard page and click “Add a service”. 24. From the catalog page that opens, click dashDB service from Database Management. 25. Enter a name for the service and click “Create”. 26. When prompted to “Restage” the application, click “Ok”. 27. Once the application starts running again, click DashDB service from app overview and click “Launch”. 28. From the left pane click “Tables” and when that opens, click “Add Table”
  • 9. 29. Create a table using SQL statements. Eg: table name is IBM_BLUEMIX: CREATE TABLE “IBM_BLUEMIX” ( “TIME” VARCHAR(20), “TEMP” VARCHAR(5) ); 30. Once the DDL runs successfully, it can be verified by viewing that that table name shows up, in the drop down that shows for existing tables, under the schema. An auto generated schema is created if no schema is chosen. If the refresh button near the table name is clicked, column names show up below table name. Now we populate table with data 31. Go back to the tab that has the nodeRED editor open. It can be opened by clicking the URL on the app overview page and then clicking the button that says “Go to your Node-RED flow editor”. 32. Drag the “function” node from the left pane and connect it to the Blue colored “IBM IoT App In” node. 33. Double click the function node to open it. Now we’re adding data to extract it from the device. Since we’re expecting to send this data to the database, we will enter following data in the editor as shown in the image. If desired, name the node at the Name text area. Here it has been named “FormatDataForDB”
  • 10. 34. Drag the dashDB output node from the pane on the left and connect it to this function, such that the function serves as an input to the database. dashDB can be found under “storage” heading. Choose the node that has a connector option only to the left(i.e. last node under the heading). Establish a connector between the newly created function node and dashDB node. 35. Double click the dashDB node, enter the table name, as created in step 7. Under the service drop down, click the name of the dashDB service as it is named in the app overview page. Remember to bind the service if it you don’t see it. 36. Click “Deploy” to incorporate these changes. Ensure that no error is seen on the Debug tab. If an error is seen then verify the dashDB connection or javascript syntax. 37. With the program running on the terminal, verify that data is sent to dashDB by launching the service from the dashboard page. Click “Tables” on the left pane -> Choose appropriate <SCHEMA_NAME> and “<TABLE NAME>” from existing tables -> Click “Browse Data” tab. When data is loaded, we can be sure of nodeRED sending data to the back end. Note that TEMP column that you see under heading outsidetemp in nodeRED and terminal. We are recording system time and storing it for a comprehensive graph.
  • 11. Part 4: Analyze data using Watson Analytics 38. Refer to step 37. On the top right corner of the table (while browsing data) you will see an option to export this data as CSV. 39. Export it to your machine. 40. Open IBM Watson Analytics and sign up here: http://www.ibm.com/analytics/watson-analytics/us-en/ 41. On the welcome page, click on Add.
  • 12. 42. Click on “Drop file or browse” and click on the csv. A block will be created by the same name, on the analytics page. Eg: The CSV that is uploaded here is “gridcontents.csv”, as is the name of the block. 43. Clicking on the block will open a pop up dialog that has some pre-phrased questions, “Eg: What is the trend of TEMP over TIME”, and a few others. 44. Clicking on the question will open a page with the graph.
  • 13. Part 5: Analyze data using Apache Spark 45. Open app on App overview page and click on “Add a service or API”. 46. When the catalog page opens, scroll down to “Data and Analytics” and click on “Apache Spark”. Enter name for the service and let the plan remain “Personal” by default. Click on Create. NOTE: Both “Space” and “App” are greyed out. These parameters are fixed since the service is now being bound to this app. 47. Click on the “Restage” button when prompted. The application will now restart with the new service as part of it. 48. On the App Overview page, click on the “Apache Spark” instance that you just created and then click on Notebook.
  • 14. 49. Click on the Data tab on the left and click on “Create a New Connection”. This is used to establish a connection between dashDB database and the analytics Tool. TIP: Clicking on Object Storage will help you upload files, like Adding JSON and CSV data. 50. Now enter name for connection (Description is optional). Set service type to “IBM Bluemix” and from the dropdown, choose the service name of the Instance (dashDB) you created, on step 25. Database is auto populated to BLUDB unless there are other databases. Click on Create Connection. 51. This new connection will now show up on the page and will be colored green to indicate that it’s active.
  • 15. 52. On the left, pane click on “Analytics” tab. 53. Click on “New Notebook” to create a new notebook into which you’ll be adding Python code. 54. Enter name and description for notebook and click “Create Notebook”. The overview page will now show the newly created notebook. 55. This will now open to a empty workbook with “Python 2.0” as version number on the top right corner NOTE: In the following step, click run button after typing code in each cell, to execute code. Code is available in pen drive (“temp_analysis_python.txt”) Refer to step 56 to see how code is supposed to look
  • 16. 56. Type the following code into your python notebook, cell by cell.
  • 17.
  • 18. 57. In the right pane, you can enable sharing to share this python script.
  • 19. Part 6: Analyze data graphically using R Scripts 58. In the dashDB tab, on the left pane click “Analysis -> R Scripts” 59. In the new editor that opens click “+” sign to add a new table. Choose “<TABLE_NAME>”, check both columns, TIME and TEMP and click on Ok. Note that as the schema name is auto generated it will be different. 60. There is a new script that automatically gets loaded in the editor on the right pane. Delete it completely and type the following instead. Click “Submit” to run the script.
  • 20. 61. You can also save this script by clicking “Save” and naming it. It will show up in the pane on the left under “My Projects” tab. 62. If the “Submit” was successful, a PDF icon will appear instead of the script. Click to open Line Graph. The temperature can be matched with data in the table.
  • 21. Part 7: Analyze data using Excel 63. Import CSV data into Excel 64. This data will now open into excel. Perform any statistical function on it, eg: Average of temperature Congratulations! You’ve successfully analyzed temperature