Last data update: 2014.03.03

R: Coverts latitude and longitude coordinates to statistical...
coordinates2statisticsR Documentation

Coverts latitude and longitude coordinates to statistical measures about that location.

Description

A function to return characteristics like population density, elevation, climate, ethnic makeup, and other statistics for points all around the world at a 1km-squared or finer resolution.

Usage

coordinates2statistics(latitude, longitude, statistic, session=getCurlHandle())

Arguments

latitude

The latitude (numeric) of the point you wish to reference.

longitude

The longitude (numeric) of the point you wish to reference.

statistic

The name of the statistic you want, eg "population_density" - see the DSTK docs for a full list.

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

Returns a data.frame containing

value

A number or array of numbers representing the value at this point.

description

A human-readable description of what the value means.

source

Where the data originally came from.

units

Optional - what units the value is measured in.

index

Optional - if the value is actually an enumerated string (ie for the land cover type) this is the numerical index.

proportion_of

If the value is proportional (eg the percentage of residents who are below the poverty level) this gives the name of the statistic that it's a proportion of.

Author(s)

Ryan Elmore

References

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

See Also

getURL, getCurlHandle

Examples

	## Not run: 
		coordinates2statistics(37.769456, -122.429128, 'population_density')
	
## End(Not run)

Results