Skip to content

Instantly share code, notes, and snippets.

@govvin
Last active November 6, 2017 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save govvin/8471545b1f2223fcbbd051b4113a06ae to your computer and use it in GitHub Desktop.
Save govvin/8471545b1f2223fcbbd051b4113a06ae to your computer and use it in GitHub Desktop.
Summary of node count of potentially mis-tagged objects in each Philippine region
/*
OSMph Papercuts issue #11 - https://git.io/vFCea
*/
[out:csv(name, total )];
//All PH regions
area["ISO3166-2"~"^PH.*"][admin_level=3];
// Count the occurunces in each area
foreach->.region(
// Collect tagged objects in the area
( node(area.region)[tourism=artwork];
node(area.region)[tourism=attraction];
node(area.region)[tourism=guest_house];
node(area.region)[tourism=viewpoint];
node(area.region)[historic=castle]);
make count "Pilipinas" = region.set(t[ "Pilipinas"]),
name = region.set(t["name"]),
total = count(nodes);
out;
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment