latest_statistical_data: Return the latest statistical data given the list of...

Description Usage Arguments Value Examples

View source: R/latest_statistical_data.R

Description

Return the latest statistical data given the list of geographical names and the list of the statistical variables.

Usage

1
2
3
4
5
6
latest_statistical_data(
  geo_names,
  location_type = c(NA, "zip", "county", "state", "school"),
  statvars,
  verbose = TRUE
)

Arguments

geo_names

required, vector of string(s) of geographical names

location_type

optional, string indicating the location type of the geographical names. NA by default.

statvars

required, vector of statistical variables. The variable list can be found at https://docs.datacommons.org/statistical_variables.html

verbose

optional, boolean whether the time information should be included in the output. True by default.

Value

A data frame containing the values of each statistical variable per zip code.

Examples

1
2
3
4
5
6
7
zips <- c("94035","94039","94040","94041","94042","94043")
statvars <- c("Count_Person", "Median_Age_Person")
latest_statistical_data(zips, statvars)

states <- c("AR", "CA", "NY", "WA")
statvars <- c("Count_Person", "Median_Age_Person")
latest_statistical_data(states, level="state", statvars)

johardi/commondata-r documentation built on July 7, 2021, 11:24 p.m.