Raspberry Pi - Data Visualization

About: A candle loses nothing of its light when lighting another

In this project, we will learn how to visualize data from Raspberry Pi using Plotly Platform which communicate information clearly via the statistical graphics, plots, and selected charts.

It’s a quite quick project and can be used either on its own or part of something bigger (Check it Out >> Integrated Weather Station).

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: RaspberryPi Setup

Run these command in Raspberry Pi terminal to install necessary program :

sudo apt-get install python-dev
sudo apt-get install python-pip
sudo pip install rpi.gpio
sudo pip install plotly

Step 2: RaspberryPi Programming

  1. Change some code ('your_plotly_username' and 'your_apkey') depend on yours*,
  2. Run the Module ( sudo python basic-line.py) ,
  3. After a few minutes, check your filewell on Plotly, and you will see your data graph!
import plotly.plotly as py

py.sign_in('your_plotly_username', 'your_api_key')
import plotly.graph_objs as go
trace0 = go.Scatter(
x = [1, 2, 3, 4],
y = [10, 15, 13, 17]
trace1 = go.Scatter(
x = [1, 2, 3, 4],
y = [16, 5, 11, 9]
data = [trace0, trace1]
plot_url = py.plot(data, filename='basic-line')

*Sign up to get your username, api_key, and stream_token

Step 3: Enjoy!

After making sure that everything works smoothly, you can take this project into bigger project (check it out >> Integrated Weather Station)!

Power through batteries or a plug and you’re good to go!

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest