From 8dcc5d5067536bf69b165dd871d832d54c774451 Mon Sep 17 00:00:00 2001 From: ff6347 Date: Wed, 11 May 2022 13:44:22 +0200 Subject: [PATCH] fix: typo in badge --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f92de7c..63933d3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -![](https://img.shields.io/badge/Build%20with%20%E2%9D%A4%EF%B8%8F-at%20Technologiesitftung%20Berlin-blue) +![](https://img.shields.io/badge/Built%20with%20%E2%9D%A4%EF%B8%8F-at%20Technologiestiftung%20Berlin-blue) -# Gieß den Kiez Tree data +# Gieß den Kiez Tree data -*This is a script to harvest tree data from a Web Feature Service from Berlins Geodata Portal and integrate it to our Gieß-den-Kiez-database.* +_This is a script to harvest tree data from a Web Feature Service from Berlins Geodata Portal and integrate it to our Gieß-den-Kiez-database._ In the application [Gieß-den-Kiez.de](https://giessdenkiez.de), Berlin's street trees are displayed on a map. The data about the trees comes from Berlin's street and green space offices and is made available as open data via Berlin's Geodata portal, the [FIS-Broker](https://fbinter.stadt-berlin.de/fb/index.jsp). The underlying database, the green space information system (GRIS), is continuously maintained by the administration: Trees not yet recorded and newly planted trees are entered and felled trees are deleted. The data set is then updated in the Geodata portal once a year, always in spring. In order to reflect the current status, the data in Gieß den Kiez is therefore also updated once a year when the new [tree dataset](https://fbinter.stadt-berlin.de/fb/index.jsp?loginkey=zoomStart&mapId=k_wfs_baumbestand@senstadt&bbox=389138,5819243,390887,5820322) is published. @@ -10,10 +10,11 @@ We use these Python scripts to automate this. Using the script `get_data_from_wf ![tree_data_schema](https://user-images.githubusercontent.com/61182572/124777121-44cb3080-df40-11eb-9e49-4cccad77b821.png) -## Inputs +## Inputs - New tree data in GML or GeoJSON format - config.yaml that configurates paths, tablesnames, overwritting, mapping of column names and columns to update + ```yml database: parameter-path: .env @@ -48,7 +49,9 @@ data-schema: - gattung - pflanzjahr ``` + - .env that contains database credentials + ```yml PG_SERVER= PG_PORT= @@ -60,10 +63,13 @@ PG_DB= ## Example Usage To save newest tree data from the FIS-Broker locally run + ```bash python tree_data/get_data_from_wfs.py ``` + To update database run + ```bash python tree_data/main.py ``` @@ -74,7 +80,7 @@ In Gieß den Kiez it is visible which trees are maintained by Berlin's street an 1. Extract only the FIS-Broker-ID'S (gmlids) from the Excel sheet to a csv file 2. Create a new table with this ID's in the database: `CREATE TABLE caretaker_ids(id VARCHAR NOT NULL)` -3. Import ID’s from CSV-Table into the database table +3. Import ID’s from CSV-Table into the database table 4. Delete old caretaker labels from the trees table: `UPDATE trees SET caretaker = NULL` 5. JOIN new caretaker labels to the trees: `UPDATE trees t SET caretaker = 'Bezirk XY' FROM caretaker_ids c WHERE t.gmlid = c.id` 6. Delete the no longer needed table: `DROP TABLE caretaker_ids`