get_geography {RcensusPkg}R Documentation

get_geography

Description

Get the list of geography entities available (state, county, tract, etc) for a specific dataset.

Function produces a data.table of all the geography "name" and "geoLevelDisplay" variables available for a specific dataset and optionally a vintage.

Usage

get_geography(dataset, vintage = NULL)

Arguments

dataset

A required string that sets the acronym name of the data set of interest (e.g. "acs/acs5")

vintage

An optional numeric that sets the year of interest.

Value

A data.table

Examples

library(jsonlite)
library(data.table)
library(httr2)
library(RcensusPkg)
# Get the geographies available for dataset "acs/acs1/profile" with vintage 2019
acs1_profile_geo_dt <- RcensusPkg::get_geography(
  dataset = "acs/acs1/profile",
  vintage = 2019
)


[Package RcensusPkg version 0.1.5 Index]