Skip to contents

This function provides a handy way of filtering a cppRnet data set for specific secondary tags. It will return a data set to which will be added new columns based on the specific secondary keys and values that are looked for.

Usage

filter_sec(data, keys, cores = 1)

Arguments

data

a cppRnet data set, with an attrs column.

keys

either a vector of valid key parameters, or a named list where names correspond to keys and attributes are vectors of matching values.

cores

number of cores to parallelise the computation

Examples


test_file <- system.file(package = 'cppRnet','extdata','map.osm')
data <- cppRnet::extract_data(test_file)
#> → Using main keys `amenity`,`shop`,`tourism`.


keys <- list("cuisine"=c("pizza","japanese")
            ,"takeaway"=c("yes"))

data_filtered <- cppRnet::filter_sec(data,keys)
#>  Searching for exact key~value matches.