I would like to use osmdata and get the other_tags as explicit columns.
Example code:
library(osmextract)
library(osmdata)
itsleeds = oe_get("ITS Leeds")
oe_get_keys(itsleeds)
I am interested in extracting the other_tags col from itsleeds data.
Thank you.
We can use tidyverse methods to split and reshape the 'other_tags' column into two columns -
selectthe column of interest, withseparate_rowsexpand the data by splitting at the,, useseparateto create two columns 'key', 'value' from the 'other_tags', by splitting at the=>and finally remove the double quotes withstr_remove_allin those columns-output