oa_combine: Combine data helper

Description Usage Arguments Details Value Examples

View source: R/combine.R

Description

Combine data helper

Usage

1

Arguments

...

Data sets, all need to be of class oa

Details

Gives back a single tbl_df, with a subset of columns, currently lon, lat, and address.

This function attempts to combine, but may fail sometimes.

Value

a tibble (a data.frame) of all the inputs combined, with attributes for original urls and paths on disk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
(dat <- oa_list())

out1 <- oa_get(dat$processed[5])
out2 <- oa_get(dat$processed[35])
(alldat <- oa_combine(out1, out2))

out4 <- oa_get(dat$processed[788])
(alldat <- oa_combine(out2, out4))

if (!requireNamespace("leaflet")) {
  install.packages("leaflet")
}
salem <- oa_search(country = "us", state = "or", city = "city_of_salem")
corvallis <- oa_search(country = "us", state = "or",
  city = "city_of_corvallis")
(alldat <- oa_combine(oa_get(salem$url), oa_get(corvallis$url)))
library("leaflet")
leaflet(alldat[sample(seq_len(NROW(alldat)), 1000), ]) %>%
  addTiles() %>%
  addCircles(lat = ~lat, lng = ~lon, popup = ~address)

## End(Not run)

sckott/openadds documentation built on March 20, 2021, 9:53 a.m.