Skip to content

Commit

Permalink
Adjust OSM-based synthetic geolocation fields for micro-regions
Browse files Browse the repository at this point in the history
Field:   district_postcode_city_sensorid
Format:  District, Postcode City (#SensorID)
Example: Regierungsbezirk Darmstadt, 60385 Frankfurt (#76777)

Field:   suburb_postcode_city_sensorid
Format:  Suburb, Postcode City (#SensorID)
Example: Eckenheim, 60435 Frankfurt (#65567)
  • Loading branch information
amotl committed Dec 17, 2022
1 parent afe9da5 commit f28a554
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion luftdatenpumpe/target/rdbms.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,10 @@ def create_views(self):
concat(concat_ws(', ', osm_state, osm_country), ' ', country_code_suffix) AS state_and_country,
concat(concat_ws(', ', osm_city, osm_state, osm_country), ' ', country_code_suffix)
AS city_and_state_and_country,
concat(concat_ws(', ', osm_state_district, osm_postcode, osm_city), ' ', sensor_id_suffix)
concat(osm_state_district, ', ', osm_postcode, ' ', osm_city, ' ', sensor_id_suffix)
AS district_postcode_city_sensorid,
concat(osm_suburb, ', ', osm_postcode, ' ', osm_city, ' ', sensor_id_suffix)
AS suburb_postcode_city_sensorid,
{self.render_fields(conditional_fields_stage2)}
ABS(DATE_PART('day', sensor_last_date - now())) <= 7 AS is_active
Expand Down

0 comments on commit f28a554

Please sign in to comment.