Geocoding | R Documentation |
The function is used to conduct geocoding via TDX API. The result summary would be shown after geocoding, including number of success, fail of geocoding, as well as number of the duplicated address. Note that if the warning "Reconnect!" is shown after the progress bar, it does not imply that the address cannot be geocoded, but due to the "Request Timeout" error. The function would then automatically reconnect to TDX API.
Geocoding(access_token, address, dtype="text", out=F)
access_token |
Your access token given by TDX platform. This can be derived from the function |
address |
Place the address in vector form. |
dtype |
The class of data, including |
out |
If the result should be exported to the local, please fill in the directory. The default value is FALSE, which does not export the data. Note that the directory must contain ".shp" when exporting simple feature. And the directory must contain ".csv" or ".txt" when exporting text file. |
The output would store the data frame of success geocoding result (DATA$SUCCESS
), and a character with fail geocoding address (DATA$FAIL
).
Some columns definition of success result are listed below.
AdressOriginal | Address filled in. | |
AddressNew | Address retrieved by the API. | |
Maintainer: Chia Jung, Yeh chia-jung.yeh@sydney.edu.au
# The ADDRESS should be typed in Chinese or a vector of Chinese address
address_geocoding=Geocoding(access_token, "ADDRESS")
# show the success geocoding result
address_geocoding$SUCCESS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.