# cities: Data : Populated Cities in the U.S. In Riemann: Learning with Data on Riemannian Manifolds

 cities R Documentation

## Data : Populated Cities in the U.S.

### Description

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 coord and cartesian are two identical representations of locations, which can be mutually converted by sphere.convert.

data(cities)

### Format

a named list containing

names

a length-60 vector of city names.

coord

a (60\times 2) matrix of latitude and longitude.

cartesian

a (60\times 3) matrix of cartesian coordinates on the unit sphere.

population

a length-60 vector of cities' populations.

wrap.sphere

### Examples

## 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)

Riemann documentation built on March 18, 2022, 7:55 p.m.