Friday, 5 July 2013

Step 5 - Adding a piechart

So now I have an Arduino project that:
  • Reads the temperature every 5 mins
  • Displays it on an LCD which updates just before every post
  • Posts the temperature to a Google datastore
  • Have created a Google web app using python that displays the results using a html front end

So the website is a bit boring, it 's just a table. Now I want to prettify it using jquery tabs and some of my own css but I also want to display my data graphically.

It was late when I decided to try this and so I literally tried the first example I found which happened to be a piechart. So the Idea was to have a table displaying the last 20 records on one tab and the piechart on the second tab. It wasn't too difficult to get it working however I don't use python much and so getting the correct syntax took a little googling.

Another fairly major issue was the fact that Google App Engine uses a query language called GQL which I believe stands for Google Query Language. This has a similar syntax to normal SQL but again I had to learn how to write (my rather simple queries) in python using examples from Google.
I'll probably refactor this and add to it many times and so don't be alarmed if the code looks terrible.
I want to log my progress.....Actually that might give me a new section to this project -- version control.... hmm I may do that next. If I do that then I'll just link to my project.

It'll be on Github coming soon.

No comments:

Post a Comment