Trinkwasser Analyse (tiptap: https://atiptap.org/)
Code (from CorrelAid e.V.), data and map data (from OpenStreetMap) are licensed differently for this project. See LICENSE
for details.
- 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
Generelle beobachtbare Eigenschaften https://wiki.openstreetmap.org/wiki/Tag:amenity%3Ddrinking_water
- Brunnentyp
- fountain=bubbler (Trinkbrunnen, die einen bogenförmigen Strahl ausstoßen)
- fountain=drinking (allgemeiner Trinkwasserbrunnen)
- man_made=water_tap (Wasserhahn mit Trinkwasser)
- zusätzlich ist praktisch zu vermerken ob das Wasser nur über einen Brunnen läuft: button_operated=yes/no
- 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=*
- name=*
- name:en
- name:de
Sinnvolle Infos, die jedoch zusätzliches Wissen benötigen
- Betriebszeit (wann ist der brunnen in betrieb)
- seasonal=(yes/no/spring/summer…): drinking_water:seasonal=(yes/no/summer…)
- opening_hours
- access:conditional=*
- Betreiber: operator=*
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
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.
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.
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
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 are under data/processed
. They can be regenerated/updated by running R/get_osm_data.R
.
Outputs are saved in the docs
folder so that they can be accessible via GitHub Pages.
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"))
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
This was an adhoc one-off analysis for atiptap e.V.. Hence, styling was not the priority for this project.