Nominatim: Difference between revisions
Content added Content deleted
Altilunium (talk | contribs) |
Altilunium (talk | contribs) |
||
Line 84: | Line 84: | ||
library |
library |
||
</pre> |
</pre> |
||
* tibble library -> tribble() |
|||
* tidygeocoder library -> geocode() |
|||
* sf library -> st_as_sf() |
|||
<pre> |
<pre> |
Latest revision as of 07:38, 7 June 2023
Access Nominatim Geocoder by using R
install.packages("tidyverse") package ‘fastmap’ successfully unpacked and MD5 sums checked package ‘bit’ successfully unpacked and MD5 sums checked package ‘ps’ successfully unpacked and MD5 sums checked package ‘sass’ successfully unpacked and MD5 sums checked package ‘base64enc’ successfully unpacked and MD5 sums checked package ‘cachem’ successfully unpacked and MD5 sums checked package ‘rematch’ successfully unpacked and MD5 sums checked package ‘bit64’ successfully unpacked and MD5 sums checked package ‘processx’ successfully unpacked and MD5 sums checked package ‘evaluate’ successfully unpacked and MD5 sums checked package ‘highr’ successfully unpacked and MD5 sums checked package ‘xfun’ successfully unpacked and MD5 sums checked package ‘yaml’ successfully unpacked and MD5 sums checked package ‘bslib’ successfully unpacked and MD5 sums checked package ‘fontawesome’ successfully unpacked and MD5 sums checked package ‘htmltools’ successfully unpacked and MD5 sums checked package ‘jquerylib’ successfully unpacked and MD5 sums checked package ‘tinytex’ successfully unpacked and MD5 sums checked package ‘backports’ successfully unpacked and MD5 sums checked package ‘ellipsis’ successfully unpacked and MD5 sums checked package ‘memoise’ successfully unpacked and MD5 sums checked package ‘blob’ successfully unpacked and MD5 sums checked package ‘data.table’ successfully unpacked and MD5 sums checked package ‘gargle’ successfully unpacked and MD5 sums checked package ‘uuid’ successfully unpacked and MD5 sums checked package ‘cellranger’ successfully unpacked and MD5 sums checked package ‘ids’ successfully unpacked and MD5 sums checked package ‘rematch2’ successfully unpacked and MD5 sums checked package ‘textshaping’ successfully unpacked and MD5 sums checked package ‘clipr’ successfully unpacked and MD5 sums checked package ‘vroom’ successfully unpacked and MD5 sums checked package ‘tzdb’ successfully unpacked and MD5 sums checked package ‘callr’ successfully unpacked and MD5 sums checked package ‘fs’ successfully unpacked and MD5 sums checked package ‘knitr’ successfully unpacked and MD5 sums checked package ‘rmarkdown’ successfully unpacked and MD5 sums checked package ‘broom’ successfully unpacked and MD5 sums checked package ‘conflicted’ successfully unpacked and MD5 sums checked package ‘dbplyr’ successfully unpacked and MD5 sums checked package ‘dtplyr’ successfully unpacked and MD5 sums checked package ‘forcats’ successfully unpacked and MD5 sums checked package ‘googledrive’ successfully unpacked and MD5 sums checked package ‘googlesheets4’ successfully unpacked and MD5 sums checked package ‘haven’ successfully unpacked and MD5 sums checked package ‘modelr’ successfully unpacked and MD5 sums checked package ‘ragg’ successfully unpacked and MD5 sums checked package ‘readr’ successfully unpacked and MD5 sums checked package ‘readxl’ successfully unpacked and MD5 sums checked package ‘reprex’ successfully unpacked and MD5 sums checked package ‘rstudioapi’ successfully unpacked and MD5 sums checked package ‘tidyverse’ successfully unpacked and MD5 sums checked
install.packages('tidygeocoder') package ‘hms’ successfully unpacked and MD5 sums checked package ‘prettyunits’ successfully unpacked and MD5 sums checked package ‘crayon’ successfully unpacked and MD5 sums checked package ‘progress’ successfully unpacked and MD5 sums checked package ‘tidygeocoder’ successfully unpacked and MD5 sums checked
library(tibble) library(sf) Linking to GEOS 3.11.1, GDAL 3.6.2, PROJ 9.1.1; sf_use_s2() is TRUE library(tidygeocoder) library(tidyverse) Attaching core tidyverse packages tidyverse 2.0.0 ✔ dplyr 1.1.2 ✔ purrr 1.0.1 ✔ forcats 1.0.0 ✔ readr 2.1.4 ✔ ggplot2 3.4.2 ✔ stringr 1.5.0 ✔ lubridate 1.9.2 ✔ tidyr 1.3.0 tidyverse_conflicts() ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag() ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors library
- tibble library -> tribble()
- tidygeocoder library -> geocode()
- sf library -> st_as_sf()
adr <- tribble( ~address, "Bekasi", "Bandung", ) geocoded <- adr %>% geocode(address, method="osm") %>% st_as_sf(coords=c("long","lat"), crs = st_crs("EPSG:4326")) print(geocoded) Simple feature collection with 2 features and 1 field Geometry type: POINT Dimension: XY Bounding box: xmin: 106.9945 ymin: -6.921553 xmax: 107.611 ymax: -6.234986 Geodetic CRS: WGS 84 # A tibble: 2 × 2 address geometry * <chr> <POINT [°]> 1 Bekasi (106.9945 -6.234986) 2 Bandung (107.611 -6.921553)