zips: zips Dataset

Description Format Source Examples

Description

A dataset with US zip data provided by mongodb for education.

Format

The _id field holds the zip code as a string.

The city field holds the city.

The state field holds the two letter state abbreviation.

The pop field holds the population.

The loc field holds the location as a latitude longitude pair.

Source

http://media.mongodb.org/zips.json

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# code to create the dataset
library(RJSONIO)

json_file <- "http://media.mongodb.org/zips.json"

rL <- readLines(json_file)

zips <- do.call(rbind,lapply(rL,fromJSON))

save(zips, file="data/zips.rda", compress="xz")

## End(Not run)

jonkatz2/rmongodb documentation built on May 19, 2019, 7:30 p.m.