Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
boundaryStats: Hotfix adding admin_level
Browse files Browse the repository at this point in the history
We need this to filter the data on the map.
  • Loading branch information
tordans committed Nov 29, 2023
1 parent 706a5e1 commit 3adb0bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/analysis/boundaryStats.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ SELECT
osm_id,
geom,
region,
admin_level,
jsonb_object_agg(CONCAT(category, '_km'), len) AS bikelanes_category
FROM (
SELECT
boundaries.osm_id AS osm_id,
boundaries.geom AS geom,
boundaries.tags ->> 'name' AS region,
boundaries.tags ->> 'admin_level' AS admin_level,
_bikelanesQuantized.tags ->> 'category' AS category,
round(sum(_bikelanesQuantized.len) / 1000, 1) AS len
FROM
Expand All @@ -65,7 +67,8 @@ GROUP BY
GROUP BY
osm_id,
geom,
region;
region,
admin_level;

DROP TABLE _bikelanesQuantized;

Expand Down

0 comments on commit 3adb0bd

Please sign in to comment.