Giter Site home page Giter Site logo

trinkbrunnen-analyse's Introduction

Trinkwasser Analyse (tiptap: https://atiptap.org/)

License

Code (from CorrelAid e.V.), data and map data (from OpenStreetMap) are licensed differently for this project. See LICENSE for details.

Outputs

  1. Analysis of Open Street Maps (OSM) data regarding drinking fountains in Germany.
  • For cities get the number of listed drinking points per 1000 inhabitants
  • Some cities provided official numbers of drinking fountains which can be compared to listed data in OSM
  • Analyse quality of meta data of the received points by comparing it with defined mandatory information Screenshot 2023-07-03 at 17 11 13
  1. Map of drinking fountains in Germany

Screenshot 2023-07-03 at 17 11 30

Quality of Meta Data (German)

Generelle beobachtbare Eigenschaften https://wiki.openstreetmap.org/wiki/Tag:amenity%3Ddrinking_water 

  • Brunnentyp
  • Flasche auffüllbar: [bottle=(yes/no/limited)](https://wiki.openstreetmap.org/wiki/Key:bottle
  • Barrierefreiheit: wheelchair=(yes/no/limited)
  • Frei Zugänglich (also auf öffentlichen Gelände?): access=(yes/no/private…)
  • Beschreibung oder Name -hier ist es sehr hilfreich wenn entweder in einer Beschreibung oder im Namen die Art des Trinkortes genannt wird (z.B. Trinkbrunnen).  Beschreibungen können unter verschiedenen Tags geführt sein. Namen sollen jedoch in der Regel nur vergeben werden, wenn das Objekt wirklich eine offizielle Bezeichnung hat - z.B. Löwenbrunnen 
    • description=*
      • description:de=* (de=Deutsch)
      • description:en=* (en=Englisch)
      • auch genutzte Tags, aber nicht ideal: comment
    • name=*
      • name:en
      • name:de

Sinnvolle Infos, die jedoch zusätzliches Wissen benötigen

Weiter mögliche (nicht schlechte) Tags

  • fee=yes/no
  • drinking_water=yes/no (zur zusätzlichen Versicherung ob es sich um Trinkwasser handelt bzw. als Anfügung zu z.B. Toiletten, wo es trinkwasser gibt, die ertse Funktion jedoch nicht Trinkwasser abzapfen ist)
  • check_ date (wann wurde der Punkt zuletzt überprüft)
  • indoor=yes/no

Setup

Package dependencies

Set up R renv: Installing R Packages

renv brings project-local R dependency management to our project. renv uses a lockfile (renv.lock) to capture the state of your library at some point in time. Based on renv.lock, RStudio should automatically recognize that it’s being needed, thereby downloading and installing the appropriate version of renv into the project library. After this has completed, you can then use renv::restore() to restore the project library locally on your machine. When new packages are used, install.packages() does not install packages globally, it does in an environment only used for our project. You can find this library in renv/library (but it should not be necessary to look at it). If renv fails, you will be presented something in the like of when you first start R after cloning the repo:

renv::restore()
    This project has not yet been activated. Activating this project will ensure the project library is used during restore. Please see ?renv::activate for more details. Would you like to activate this project before restore? [Y/n]:

Follow along with Y and renv::restore() will do its work downloading and installing all dependencies. renv uses a local .Rprofile and renv/activate.R script to handle our project dependencies.

Adding a new package

If you need to add a new package, you can install it as usual (install.packages etc.). Then, to add your package to the renv.lock:

renv::snapshot()

and commit and push your renv.lock.

Other team members can then run renv::restore() to install the added package(s) on their laptop.

Set up Python environment

Python dependencies are managed in a virtualenv. You need to install virtualenv (it might also work with the built-in venv subset).

activate the virtual environment in the Terminal.

source venv/bin/activate

install the packages in rmd/map-fountains-germany.ipynb by:

pip3 install -r requirements.txt

Data

Helper data

You need the following data files in order to run this project:

data/raw
├── anzahl_brunnen.xlsx
└── staedte.xlsx

They are part of the repository.

Data from OSM

Data from OSM are under data/processed. They can be regenerated/updated by running R/get_osm_data.R.

Generate outputs

Outputs are saved in the docs folder so that they can be accessible via GitHub Pages.

Analysis

for the R Markdown analysis (docs/deutschland-drinking-water.html / online analysis), run the following in the R console:

rmarkdown::render(here::here("rmd/analysis-fountains-germany.Rmd"), output_file = here::here("docs/analysis-fountains-germany.html"))

Map

For the map (docs/deutschland-drinking-water.html / online map), activate your Python environment (see above) and run in your terminal:

jupyter execute rmd/map-fountains-germany.ipynb

Limitations

This was an adhoc one-off analysis for atiptap e.V.. Hence, styling was not the priority for this project.

trinkbrunnen-analyse's People

Contributors

pr130 avatar elauckne avatar

Stargazers

Mehmet Korkmaz avatar

Watchers

Johannes J. Mueller 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.