As of January 2006, there are 60 cities in the contiguous U.S. with population size
larger than 300000. We extracted information of the cities from the data
delivered by maps package. Variables
two identical representations of locations, which can be mutually converted by
a named list containing
a length-60 vector of city names.
a (60\times 2) matrix of latitude and longitude.
a (60\times 3) matrix of cartesian coordinates on the unit sphere.
a length-60 vector of cities' populations.
1 2 3 4 5 6 7 8 9 10 11
## LOAD THE DATA AND WRAP AS RIEMOBJ data(cities) myriem = wrap.sphere(cities$cartesian) ## COMPUTE INTRINSIC/EXTRINSIC MEANS intmean = as.vector(riem.mean(myriem, geometry="intrinsic")$mean) extmean = as.vector(riem.mean(myriem, geometry="extrinsic")$mean) ## CONVERT TO GEOGRAPHIC COORDINATES (Lat/Lon) geo.int = sphere.xyz2geo(intmean) geo.ext = sphere.xyz2geo(extmean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.