Skip to content

Commit

Permalink
Merge branch 'features/#587-update-osm-residential-buildings' into co…
Browse files Browse the repository at this point in the history
…ntinuous-integration/run-everything-over-the-weekend-v2
  • Loading branch information
nesnoj committed Feb 22, 2022
2 parents 77e1e0f + 22f473e commit 0874d34
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/egon/data/datasets/osm_buildings_streets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,26 @@ def preprocessing():
sql_scripts = [
"osm_amenities_shops_preprocessing.sql",
"osm_buildings_filter.sql",
"osm_buildings_filtered_zensus_mapping.sql",
"osm_buildings_residential_zensus_mapping.sql",
"osm_buildings_temp_tables.sql",
]
for script in sql_scripts:
execute_sql_script(script)


def create_buildings_filtered_zensus_mapping():
print("Create census mapping table for filtered buildings...")
execute_sql_script("osm_buildings_filtered_zensus_mapping.sql")


def create_buildings_residential_zensus_mapping():
print("Create census mapping table for residential buildings...")
execute_sql_script("osm_buildings_residential_zensus_mapping.sql")


def create_buildings_temp_tables():
print("Create temp tables for buildings...")
execute_sql_script("osm_buildings_temp_tables.sql")


def extract_buildings_w_amenities():
print("Extracting buildings with amenities...")
execute_sql_script("osm_results_buildings_w_amenities.sql")
Expand Down Expand Up @@ -124,6 +136,11 @@ def __init__(self, dependencies):
dependencies=dependencies,
tasks=(
preprocessing,
{
create_buildings_filtered_zensus_mapping,
create_buildings_residential_zensus_mapping
},
create_buildings_temp_tables,
{
extract_buildings_w_amenities,
extract_buildings_wo_amenities,
Expand Down

0 comments on commit 0874d34

Please sign in to comment.