Book Image

Raspberry Pi Blueprints

Book Image

Raspberry Pi Blueprints

Overview of this book

Table of Contents (17 chapters)
Raspberry Pi Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The weather station web application


To make the data we record from the weather sensors a bit more accessible, we will use a web application written in Python to display the current and historical data recorded from our weather station.

To do this, we will make use of a Python web application framework called Flask (http://flask.pocoo.org/), an application server called Gunicorn (http://gunicorn.org/), and a reverse proxy server called Nginx (http://nginx.org/).

The web application will have two pages, one will show the current weather conditions and the other will show the history of the weather conditions over a given time range. To help visualize the data on both the pages, we will use the Google Charts API (https://developers.google.com/chart/). This is a JavaScript API that allows the creation of interactive charts on a web page.

Deploying the app on the Pi

It's now time to deploy our web application on the Pi. To do this, we will use the Nginx reverse proxy server and the Gunicorn web...