library(OSMtidy) knitr::opts_chunk$set(echo = TRUE, out.height = "75%", out.width = "75%")
data("dlWrangle") dataSummary(dlWrangle)
Use uniqueDescriptors()
to get an overview of the types of descriptors associated with each feature.
uniqueDescriptors <- function(dataWrangle, elements = NULL) { if(is.null(elements)) { elements <- 1:length(dataWrangle$dataWrangled) } subset <- dataWrangle$dataWrangled[elements] names <- sapply(subset, function(x) { x$feature[[1]] }) lapply(subset, function(x) { x %>% as_tibble %>% select(-contains("osm_id"), -contains("geometry"), -contains("feature")) %>% OSMtidy:::.rmCols() %>% as.matrix %>% as.vector %>% unique }) %>% setNames(names) } uniqueDescriptors(dlWrangle, c(1,2,4,5))
Create an initial set of filters using the filters template. Use system.file("extdata", "", package = "OSMtidy")
to locate the template directory.
data("myFilters1") myFilters1
dlFilter1 <- dataFilter(dlWrangle, myFilters1) getwd() dataExport(dlFilter1, "vignette3Filter1")
Check spreadsheet output... Update filters to be more specific...
data("myFilters2") dlFilter2 <- dataFilter(dlWrangle, myFilters2) getwd() dataExport(dlFilter2, "vignette3Filter2")
data("myFilters3") dlFilter3 <- dataFilter(dlWrangle, myFilters3) getwd() myFilters3 dataExport(dlFilter3, "vignette3Filter3")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.