Description Usage Arguments Value References Examples
Get data from Openaddresses
1 |
x |
(character) URL for an openaddresses dataset, or an object of class openadd |
overwrite |
(logical) Will only overwrite existing path
if |
... |
Pass on curl options to |
a tibble (a data.frame), with attributes for original url and path on disk
https://openaddresses.io/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
(out1 <- oa_get("http://data.openaddresses.io/runs/142103/at/tirol.zip"))
(out2 <-
oa_get("http://data.openaddresses.io/runs/142676/ca/bc/victoria.zip"))
# from a openadd class object
oa_get(as_openadd(country="us", state="nv", city="las_vegas"))
# combine data sets
(alldat <- oa_combine(out1, out2))
# Map data
if (!requireNamespace("leaflet")) {
install.packages("leaflet")
}
library(leaflet)
small <- out2[[1]][1:5000,]
leaflet(small) %>%
addTiles() %>%
addCircles(lat = ~LAT, lng = ~LON,
popup = unname(apply(small[, c('NUMBER', 'STREET')], 1,
paste, collapse = " ")))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.