Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pjullrich/bussigelddaten-koeln
https://github.com/pjullrich/bussigelddaten-koeln
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/pjullrich/bussigelddaten-koeln
- Owner: PJUllrich
- License: mit
- Created: 2022-07-05T19:21:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-08T19:39:32.000Z (over 2 years ago)
- Last Synced: 2024-10-14T06:14:44.398Z (3 months ago)
- Language: Elixir
- Size: 64.7 MB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bussigelddaten Koeln
This repo contains `Bußgelddaten` (Data of parking fines) for Cologne, Germany.
The data was downloaded here: [2020](https://www.offenedaten-koeln.de/dataset/bu%C3%9Fgelddaten-koeln-2020), [2021](https://www.offenedaten-koeln.de/dataset/bu%C3%9Fgelddaten-koeln-2021).
The parking fine codes can be translated to useful names using the `tatbestandskatalog.pdf` [(Download link)](https://www.kba.de/DE/Themen/ZentraleRegister/FAER/BT_KAT_OWI/bkat_owi_09_11_2021.pdf;jsessionid=8FDF614EB006645B36151723681DA346.live21322?__blob=publicationFile&v=3).
## Scripts
There are a few Bash and Elixir scripts in this repo. Here is what they do and how to use them:### Combine all monthly datasets into a single file
This script combines all monthly datasets into a single `Komplett_YEAR.csv` per year.You can run it by first making it executable with
```
chmod 755 ./Scripts/combine_files.sh
```and then running the script with:
```
cd Scripts
./combine_files.sh
```### Import Data into the Database
You can easily import the data into a local Postgres database using `Mix.Tasks.ImportData`.First, make sure that you have a Postgres instance running and it is available at `http://localhost:5432`.
Next, set up the Phoenix application:
```
cd app
mix deps.get
mix ecto.setup
```This will fetch the dependencies and set up a local `bussgelder_dev` database.
Now, you can import the data with:
```
mix import_data bussgelder ../Daten/2020/Komplett_2020.csv
mix import_data bussgelder ../Daten/2021/Komplett_2021.csv
```This will import all data into the database and create indices for all columns.
You can also import all locations with their latitude and longitude with:
```
mix import_data orte ../Daten/Alle-Orte-mit-Lat-Long.csv
```