Overpass - count popular street names

Hello. I’d like to count popular street names in my part of world.
Street names are distinct in every city, and due to OSM data model one street name can be on multiple ways within city boundaries.

I was thinking about following approach:

  1. Define area to query;
  2. Download all admin_boundary=8 areas (cities) within area from step 1;
  3. For each area from step 2 download all named streets there.

I’d be happy with output in csv format with columns city name and street name for all named streets and cities in area from step 1 as I can count them later in some other tool (perfect would be columns street_name and number of cities with such street.

Here is code I wrote so far (overpass-turbo):

[out:csv(city, street)];
({{geocodeArea: powiat lubelski}};) -> .searchArea;


foreach.cities (
  map_to_area -> .city;
  make stat street=set(t["name"]);
out body;

But I am apparently missing something. Can someone help?

7 posts - 3 participants

Read full topic

Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/overpass-count-popular-street-names/5774