osm_other_tags_list {osmclass}R Documentation

Generate a List from the 'other_tags' Column in OSM PBF Data

Description

Generate a List from the 'other_tags' Column in OSM PBF Data

Usage

osm_other_tags_list(x, values = FALSE, split = "\",\"|\"=>\"", ...)

Arguments

x

character. The 'other_tags' column of an imported osm.pbf file.

values

logical. TRUE also includes the values of tags.

split

character. Pattern passed to strsplit to split up x.

...

further arguments to strsplit.

Value

a list of tags as character vectors, or a nested list of tags and values if values = TRUE.

See Also

osmclass-package

Examples

# 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]


[Package osmclass version 0.1.3 Index]