Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/technologiestiftung/flusshygiene-berlin-prediction-merge

Predicting water quality in Berlin
https://github.com/technologiestiftung/flusshygiene-berlin-prediction-merge

citylab-berlin open-data water-quality

Last synced: about 2 months ago
JSON representation

Predicting water quality in Berlin

Awesome Lists containing this project

README

        

![](https://img.shields.io/badge/Built%20with%20%E2%9D%A4%EF%B8%8F-at%20Technologiestiftung%20Berlin-blue)

# flusshygiene-berlin-prediction-merge

This script collects the current predictions and merges them with stats from the Lageso. The combined datasets are uploaded to an S3 bucket for easy access.

## States

Two digits (besides 10) with prediction.
Even numbers (besides 10) with algae.

| State-ID | Color | Algae | Prediction | Sign |
| :------- | :---------------------------------------- | :---- | :--------- | :------ |
| 1 | Green | 0 | 0 | Check |
| 11 | Green | 0 | 1 | Check\* |
| 2 | Green | 1 | 0 | A |
| 12 | Green | 1 | 1 | A\* |
| 3 | Orange | 0 | 0 | ! |
| 13 | Orange | 0 | 1 | !\* |
| 4 | Orange | 1 | 0 | A |
| 14 | Orange | 1 | 1 | A\* |
| 5 | Red | 0 | 0 | X |
| 15 | Red | 0 | 1 | X\* |
| 6 | Red | 1 | 0 | A |
| 16 | Red | 1 | 1 | A\* |
| 7 | | | | |
| 8 | Grey | 1 | 0 | A |
| 9 | Grey | 0 | 0 | k.A. |
| 10 | Orange | 0 | 0 | k.A. |

## Lageso vs. prediction

Even though there are lots of states, the ruling of states is rather simple:

IF _prediction_ is "mangelhaft" AND _lageso_ is better than "mangelhaft" THEN turn color to "orange" and keep the **algae** setting from _lageso_.

This means, if _lageso_ is worse than _prediction_, keep _lageso_. And always keep algae settings. Predictions can only turn a green into an Orange, red can only be flagged by _lageso_.

## Config.json

For each bathing spot with predictions we have three **IDs**. Those three **IDs** help merge the _Lageso's_ system, the _prediction_ system and the old _website's_ system. At some point the latter could be replace by either the prediction IDs or the lageso IDs.

```json
{
"predictions":[
[PREDICTION_ID, LAGESO_ID, OLD_WEB_ID]
]
}
```

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Fabian MorΓ³n Zirfas

πŸ’» πŸ“–

Sebastian Meier

πŸ’» πŸ“–

Lucas Vogel

πŸ“–

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## Credits

### Partners network






















### Developed in the project






### Supported by