Export number of nodes for a specific date


With some help I created the following script to export the number of gas stations per NUTS 3 region in Germany.

[out:csv( "de:regionalschluessel", name, total, nodes, ways, relations )];

//All NUTS 3 regions in Germany

// Count the fuel stations in each area
  // Collect all Nodes, Ways and Relations wth amenity=fuel in the current area
  ( node(area.regio)[amenity=fuel];
  make count "de:regionalschluessel" = regio.set(t[ "de:regionalschluessel"]),
             name = regio.set(t["name"]),
             total = count(nodes) + count(ways) + count(relations),
             nodes = count(nodes),
             ways = count(ways),
             relations = count(relations);

Now, I thought about exporting this data for different years. I found the following article about filtering for time stamps.

Can anyone help me and tell me how to put this option in my existing code? So i can just switch the date and export data for different years.

Thank you!

7 posts - 2 participants

Read full topic

Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/export-number-of-nodes-for-a-specific-date/104787