Learn R Programming

RDSTK (version 1.1)

ip2coordinates: Finds geographic information related to an IP address.

Description

This function returns geographic information related to one or possibly more IP addresses.

Usage

ip2coordinates(ip, session=getCurlHandle())

Arguments

ip
A string containing a single IP address or multiple, comma-separated IPs.
session
This is the CURLHandle object giving the structure for the options and that will process the command. For curlMultiPerform, this is an object of class code MultiCURLHandle-class.

Value

A data.frame containing
ip.address
IP address of the request
ip.address
Longitude of the IP address' location
country_name
Country of origin
postal_code
Post code
region
State in the US; not sure elsewhere
locality
City in the US; not sure elsewhere
country_code
Two letter country abbreviation
dma_code
Hell if I know
latitude
Latitude of the IP address' location
country_code3
If two digits aren't enough!
area_code
Area code in the US; not sure elsewhere

References

http://www.datasciencetoolkit.org/developerdocs#ip2coordinates

See Also

getURL, getCurlHandle

Examples

Run this code
	## Not run: 
# 		ip2coordinates("134.184.34.17, 48.82.68.161")
# 	## End(Not run)

Run the code above in your browser using DataLab