Description Usage Arguments Value Functions Examples
Get GPS (lon, lat) from address
1 2 3 4 5 |
data |
data.frame contains address variable. |
addr_var |
Character. Name of address variable. |
source |
API source |
parallel |
Parallel connection |
n_cpu |
|
rate |
Connection rate per second |
use_tor |
Boolean. Default TRUE. Use tor or not. |
addr |
Address string |
GPS data.table
add_geocode
: Add GIS columns to data.frame.
geocode
: Get GPS from address vector
1 2 3 4 5 6 7 8 9 10 11 12 | library(data.table)
library(magrittr)
dt <- data.table(addrs = c("<e5><8f><b0><e5><8c><97><e5><b8><82><e4><b8><ad><e6><ad><a3><e5><8d><80><e7><be><85><e6><96><af><e7><a6><8f><e8><b7><af><e4><b8><80><e6><ae><b5><ef><bc><92><e8><99><9f>",
"<e5><8f><b0><e5><8c><97><e5><b8><82><e4><b8><ad><e6><ad><a3><e5><8d><80><e8><b2><b4><e9><99><bd><e8><a1><97><e4><b8><80><e6><ae><b5><ef><bc><91><ef><bc><92><ef><bc><90><e8><99><9f>"),
X = c(3, 2))
out <- dt %>% add_geocode(addr_var = "addrs", use_tor = FALSE)
out
addr <- c("<e5><8f><b0><e5><8c><97><e5><b8><82><e4><b8><ad><e6><ad><a3><e5><8d><80><e7><be><85><e6><96><af><e7><a6><8f><e8><b7><af><e4><b8><80><e6><ae><b5><ef><bc><92><e8><99><9f>",
"<e5><8f><b0><e5><8c><97><e5><b8><82><e4><b8><ad><e6><ad><a3><e5><8d><80><e8><b2><b4><e9><99><bd><e8><a1><97><e4><b8><80><e6><ae><b5><ef><bc><91><ef><bc><92><ef><bc><90><e8><99><9f>")
geocode(addr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.