This file contains hidden or 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
| PRIORITY_CODE = c( | |
| WORST = 0, | |
| AVOID_AT_ALL_COSTS = 1, | |
| REACH_DEST = 2, | |
| AVOID_IF_POSSIBLE = 3, | |
| UNCHANGED = 4, | |
| PREFER = 5, | |
| VERY_NICE = 6, | |
| BEST = 7 | |
| ) |
This file contains hidden or 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
| library(jsonlite) | |
| # retrieve all possible node access values which come up at least 10 times | |
| url <- "https://taginfo.openstreetmap.org/api/4/key/values?key=%s&filter=nodes&sortname=count&sortorder=desc&qtype=value&format=json_pretty" | |
| key <- "access" | |
| res <- fromJSON(sprintf(url, key)) | |
| df <- res[["data"]] | |
| # filter out combined and rare values |
OlderNewer