Giter VIP home page Giter VIP logo

thrusql's Introduction

thrusql

Docker image to access German emission data from thru.de.

Build:

docker build . -t thru

Run:

docker run -p 3306:3306 -p 80:80 thru

This will open a web server with phpMyAdmin on port 80 and a MySQL / MariaDB server on port 3306 (Username/password: thru/thru).

Example usage:

We want to know who the biggest CO₂ polluter in Germany is:

echo "SELECT facility_id FROM releases WHERE substance_name='Carbon dioxide (CO2)' AND year='2021' ORDER BY annual_load DESC limit 1;"|mysql -u thru -h localhost -P 3306 -p thru

Result:

facility_id
30132

Who is 30132?

echo "SELECT name FROM facilities WHERE id=73799"|mysql -u thru -h localhost -P 3306 -p thru

Result:

name
RWE Power AG - Kraftwerk Neurath

data

The German environmental agency (Umweltbundesamt) publishes emission data about facilities in Germany on the web page thru.de. The data is available in SQLite format. The Dockerfile published here allows converting that data to MySQL and accessing it via SQL commands directly or via phpMyAdmin.

about

This Dockerfile was written by Hanno Böck. You may want to check out my newsletter on industrial decarbonization.

thrusql's People

Contributors

hannob avatar

Stargazers

Stephanie Jauss avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.