Description Usage Arguments Details Value Examples
Given a character vector of IP addresses (v4 or v6) and/or domain names,
this function will return a data.table
of geolocated values with
the columns mapped to the ip-api.com
's successful response fields
(see: http://ip-api.com/docs/api:returned_values for more info).
1 |
.progress |
show a progress bar? (useful if geolocating many entities) |
entites |
character vector of items to geolocate |
A small delay is introducted to each geolocation call to help avoid having
your IP address being banned by the ip-api.com
servers.
If there is an error in the http
transaction, a warning will be
generated and the lookup response will be populated with NA
s.
Similarly, if there is a geocoding failure, the response for that query will
also be populated with NA
s
data.table
of responses
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
resp <- geolocate(c(NA, "10.0.1.1", "", "72.33.67.89", "dds.ec", " ",
"search.twitter.com"))
resp[,c(9,4,7,8),with=F]
query countryCode lon org
## 1: 50.252.233.22 US -69.9739 Comcast Cable
## 2: 10.0.1.1 NA NA NA
## 3: 50.252.233.22 US -69.9739 Comcast Cable
## 4: 72.33.67.89 US -89.4012 University of Wisconsin Madison
## 5: 162.243.111.4 US -73.9865 Digital Ocean
## 6: 50.252.233.22 US -69.9739 Comcast Cable
## 7: 199.59.148.11 US -122.3933 Twitter
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.