Last active
November 6, 2017 00:11
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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