GithubHelp home page GithubHelp logo

empower's Introduction

Empower logo

EMPOWER 2.0

Prototype

A project for the EMPOWER 2.0 initiative, empowering policy makers all over the North Sea Region to become green energy prosumers. Created by Jonah Meijers, Rosa Voogd and Fleur van Son.

Getting started

This project uses Snowpack for bundling, and Netlify for deployment and dev server.

It also requires a valid MongoDB URI in a .env file when developing locally, without the database name attached to it. The MongoDB client will automatically look for a database called "empower" at the provided uri.

$ git clone https://github.com/theonejonahgold/empower
$ cd empower
$ yarn || yarn install || npm install
$ cp .env.example .env
$ echo "MONGO_URI={your_mongodb_uri_here}" > .env

Available commands

$ yarn start   # Starts snowpack dev server
$ yarn dev     # Starts netlify dev server (with serverless functions support)
$ yarn build   # Builds project to build folder
$ yarn process # Runs dataprocessing/index.js

Tech used

Graph examples used

Datasets used

Data Processing

Data processing is done in the dataprocessing folder. Index.js spits out a JSON file that I upload to a dedicated MonoDB atlas database where I can quickly retrieve all the information I need using the serverless functions in the functions folder.

Steps

  1. All CSV files get loaded in, core data is being composed
  2. Quotes get removed from strings where necessary
  3. All subcategories of energy generation (wind, biogas, solar) are combined to the municipalities
  4. Land area use is combined to the municipalities
  5. Total energy generation is combined to the municipalities
  6. Wind and solar projects are combined
  7. Unnecessary keys are removed
  8. Empty strings are changed to zeroes for the following keys:
    • Wind energy generation (CSV files are a doozy sometimes)
    • Lake area
    • Sea area
    • Agriculture area
    • Living area
  9. Location gets added based on other key data points
    • Lake area
    • Sea area
    • Population
  10. Data is written to a file, ready to be uploaded to MongoDB where it's savely stored for use inside the app.

Example municipality

{
  "regio": "Delfzijl",
  "population": 24716,
  "code": 10,
  "codeExtended": "GM0010",
  "households": 11571,
  "regionKind": "Gemeente",
  "municipality": "Delfzijl",
  "totalArea": 22750,
  "livingArea": 598,
  "agricultureArea": 10392,
  "lakeArea": 0,
  "seaArea": 9145,
  "solarEnergyGeneration": 154,
  "windEnergyGeneration": 1046,
  "biogasEnergyGeneration": 0,
  "totalEnergyGeneration": 2075,
  "solarProjects": [
    {
      "nr": 48,
      "gemeente": "Delfzijl",
      "provincie": "Groningen",
      "status": "voorbereiding",
      "realisatiejaar": 2020,
      "dak/grond": "grond",
      "type": "lokale coöperatie",
      "vermogen": 8500,
      "regeling": "onbekend",
    }
  ],
  "windProjects": [
    {
      "nr": 1,
      "gemeente": "Delfzijl",
      "provincie": "Groningen",
      "status": "gerealiseerd",
      "realisatiejaar": 2012,
      "type": "projectcoöperatie",
      "vermogen": 2300,
      "(aan)deelgroterwindpark": "",
    },
    {
      "nr": 2,
      "gemeente": "Delfzijl",
      "provincie": "Groningen",
      "status": "gerealiseerd",
      "realisatiejaar": 2012,
      "type": "projectcoöperatie",
      "vermogen": 2300,
      "(aan)deelgroterwindpark": "",
    }
  ],
  "location": "Coast"
}

empower's People

Contributors

jonahgoldwastaken avatar

Watchers

 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.