I have a question and I can’t find an answer for hours now…
I changed this code to select all regions with NUTS 3 classifications. But in the output CSV it displays the regional keys. Since the filter is for NUTS3 keys starting with “DE” there should be a way to export these keys as well right?
NUTS 3 key Stuttgart: DE111
regional key Stuttgart: 08111 or 081110000000
for other regions it is 09 in the beginning, so 08 doesn’t equal DE and also the last 3 digits differ for some regions.
The ones exported right now are the regional keys and don’t start with “DE”
[out:csv( "de:regionalschluessel", name, total, nodes, ways, relations )][date:"2020-12-31T23:59:59Z"][timeout:20]; //All NUTS 3 regions in Germany area["ref:nuts:3"~"^DE"]; // Count the fuel stations in each area foreach->.regio( // Collect all Nodes, Ways and Relations wth amenity=fuel in the current area ( node(area.regio)[amenity=fuel]; way(area.regio)[amenity=fuel]; rel(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); out; );