Skip to content

Karmabunny/wscearth

 
 

Repository files navigation

WSC Earth

This project is in aid of the Bridgestone World Solar Challenge.

This is a demonstration of a python3 project which reads from an Influx v3 database using the Influx Python integration and InfluxQL query, and generates a web page using Flask. The web page contains a google map, inserted using the Google Maps API.

This is used to show sample data here: http://telemetry.worldsolarchallenge.org/wscearth/sample/

Build and Run

To build and run locally, you can use docker and the Makefile. You'll need an InfluxDB token to access the database. We use Docker Desktop to make setup easy.

Once you have docker set up, on a Mac, or Linux:

INFLUX_TOKEN=your_influx_token_here GOOGLEMAPS_KEY=your_google_api_key_here make run

and then navigate to http://localhost:5000.

The key files are:

  • src/wscearth/views.py -- The main web app code. This is the most relevant bit to modify to suit your needs.
  • src/wscearth/templates/ -- Contains HTML templates which are used to render web pages.
  • setup.cfg -- Defines how to install the python module.
  • Dockerfile -- Definition of how to build a docker image to run this app.
  • Makefile -- A makefile which contains commands and targets to build and run th e app.
  • README.md -- This README file.
  • .github/ -- Definition of the continuous integration steps.

Deployment

The resulting docker container can be published to a docker repository, and run in any environment that can host docker containers, for example, Kubernetes.

Getting in touch

Please reach out to the BWSC Technical Faculty, or the BWSC community members via the on-line forum linked from the BWSC Web Site. Contributions welcome, via pull request on github.com.

About

Google earth viewer for WSC data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.8%
  • HTML 30.7%
  • Makefile 10.2%
  • Dockerfile 7.3%