coordinates2statistics: Coverts latitude and longitude coordinates to statistical...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/functions.R

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

1
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

1
2
3
4
	## Not run: 
		coordinates2statistics(37.769456, -122.429128, 'population_density')
	
## End(Not run)

RDSTK documentation built on May 29, 2017, 8:30 p.m.