Learn R Programming

rmongodb (version 1.8.0)

zips: zips Dataset

Description

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

Arguments

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.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab