osm_other_tags_list {osmclass} | R Documentation |
Generate a List from the 'other_tags' Column in OSM PBF Data
osm_other_tags_list(x, values = FALSE, split = "\",\"|\"=>\"", ...)
x |
character. The 'other_tags' column of an imported osm.pbf file. |
values |
logical. |
split |
character. Pattern passed to |
... |
further arguments to |
a list of tags as character vectors, or a nested list of tags and values if values = TRUE
.
# See Examples at ?osmclass for full examples
# Extract 'other_tags' as list
other_tags <- osm_other_tags_list(djibouti_points$other_tags)
other_tags[1:10]
# Count frequency (showing top 10)
sort(table(unlist(other_tags)), decreasing = TRUE)[1:10]
# Also include values
other_tags_values <- osm_other_tags_list(djibouti_points$other_tags, values = TRUE)
other_tags_values[1:10]