Skip to content
R wrapper for PDOK location server (uRos unconf project)
HTML R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data
design
docs
examples
inst
man
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
NEWS.md
README.Rmd
README.md
appveyor.yml
nlgeocoder.Rproj

README.md

CRAN_Status_Badge travis build Build status

nlgeocoder

Installation

You can install nlgeocoder from CRAN with

install.packages("nlgeocoder")

Development version (use at own risk!) can be installed from github with:

# install.packages("devtools")
devtools::install_github("uRos2018/nlgeocoder")

Example

Geocoding nl addresses

library(nlgeocoder)
address <- nl_geocode( c("Henri Faasdreef 312", "Leidschenveen"))
address[c("weergavenaam")] # this is a sf object
#> Simple feature collection with 2 features and 1 field
#> geometry type:  POINT
#> dimension:      XY
#> bbox:           xmin: 4.40042 ymin: 52.06465 xmax: 4.400575 ymax: 52.06593
#> epsg (SRID):    4326
#> proj4string:    +proj=longlat +datum=WGS84 +no_defs
#>                                weergavenaam              centroide_ll
#> 1 Henri Faasdreef 312, 2492JP 's-Gravenhage  POINT (4.40042 52.06593)
#> 2  Laan van Leidschenveen 20, 's-Gravenhage POINT (4.400575 52.06465)
colnames(address)
#>  [1] "bron"                   "woonplaatscode"        
#>  [3] "type"                   "woonplaatsnaam"        
#>  [5] "wijkcode"               "huis_nlt"              
#>  [7] "openbareruimtetype"     "buurtnaam"             
#>  [9] "gemeentecode"           "weergavenaam"          
#> [11] "straatnaam_verkort"     "id"                    
#> [13] "gekoppeld_perceel"      "gemeentenaam"          
#> [15] "buurtcode"              "wijknaam"              
#> [17] "identificatie"          "openbareruimte_id"     
#> [19] "waterschapsnaam"        "provinciecode"         
#> [21] "postcode"               "provincienaam"         
#> [23] "nummeraanduiding_id"    "waterschapscode"       
#> [25] "adresseerbaarobject_id" "huisnummer"            
#> [27] "provincieafkorting"     "centroide_rd"          
#> [29] "straatnaam"             "score"                 
#> [31] "centroide_ll"

Suggestions

## basic example code
adres <- nl_suggest("Dam, Amsterdam")
head(adres$response$docs, 2)
#>   type            weergavenaam                                   id
#> 1  weg          Dam, Amsterdam weg-ab6df5babb15e466f3699b5d2c22e110
#> 2  weg Damloperspad, Amsterdam weg-c57e61425c421a206015596b41c92259
#>      score
#> 1 21.69954
#> 2 14.83534

lookup

obj <- nl_lookup("weg-ab6df5babb15e466f3699b5d2c22e110")
names(obj)
#>  [1] "bron"               "identificatie"      "openbareruimte_id" 
#>  [4] "provinciecode"      "woonplaatscode"     "type"              
#>  [7] "woonplaatsnaam"     "provincienaam"      "nwb_id"            
#> [10] "centroide_ll"       "openbareruimtetype" "gemeentecode"      
#> [13] "weergavenaam"       "provincieafkorting" "centroide_rd"      
#> [16] "straatnaam_verkort" "id"                 "straatnaam"        
#> [19] "gemeentenaam"
You can’t perform that action at this time.