Package 'us.census.geoheader'

Title: US 2010 Census SF2 Geographic Header Summary Levels 010-050
Description: A simple interface to the Geographic Header information from the "2010 US Census Summary File 2". The entire Summary File 2 is described at <https://catalog.data.gov/dataset/census-2000-summary-file-2-sf2>, but note that this package only provides access to parts of the geographic header ('geoheader') of the file. In particular, only the first 101 columns of the geoheader are included and, more importantly, only rows with summary levels (SUMLEVs) 010 through 050 (nation down through county level) are included. In addition to access to (part of) the geoheader, the package also provides a decode function that takes a column name and value and, for certain columns, returns "the meaning" of that column (i.e., a "SUMLEV" value of 40 means "State"); without a value, the decode function attempts to describe the column itself.
Authors: Greg Minshall [aut, cph, cre], United States Census Bureau [dtc]
Maintainer: Greg Minshall <[email protected]>
License: BSD_2_clause + file LICENSE
Version: 1.0.2
Built: 2025-02-13 04:57:48 UTC
Source: https://github.com/cran/us.census.geoheader

Help Index


(internal) Make Sure a Dataframe Exists

Description

ensure() returns the dataframe (or tibble), reading it in if necessary

Usage

ensure(name)

Arguments

name

Name of the dataframe

Stops in the case of an error

Details

takes the name of the data and the suffix of the backing store for the dataframe and makes sure it is in our private environment.

Value

returns the (possibly retrieved) dataframe.


(internal) Return the Database

Description

(internal) Return the Database

Usage

get.data()

Value

the database (as a tibble and/or dataframe)


(internal) Return the Decode Table

Description

(internal) Return the Decode Table

Usage

get.decode()

Value

the decode table


Return text describing the meaning of a value in a column

Description

uscgh.2010.decode() returns a textual description of a cell

Usage

uscgh.2010.decode(colname, colvalue = "", warnings = TRUE)

Arguments

colname

Name of the column to be described.

colvalue

Value whose description is wanted (\"""\" – the default – to describe, generically, 'colname' itself).

warnings

Whether a '(colname,colvalue)' tuple that is not successfully decoded should produce a warning message. (In any event, the result will be NULL.)

Details

takes as input the name of a column in the Geographic Header file from the 2010 US census, and a value found in that column, and attempts to return a description of the meaning of that value.

Value

A character string describing the 'colname' or '(colname,colvalue)' tuple, if found. If not found, 'NULL' is returned (and, if 'warnings' is 'TRUE', a warning is generated).

See Also

'RShowDoc("a-tour", package="us.census.geoheader")' for a short tour of a few columns of the database

Examples

uscgh.2010.decode('SUMLEV', 40)

Return the 2010 Census SF2 Geographic Header Data

Description

Returns the 2010 Census SF2 geographic header dataset

Usage

uscgh.2010.sf2.geoheader()

Details

'uscgh.2010.dataset' returns the SF2 geographic header data from the 2010 US census

Value

a dataframe (tibble, if the tibble package is available)

See Also

'RShowDoc("a-tour", package="us.census.geoheader")' for a short tour of a few columns of the database

Examples

x <- uscgh.2010.sf2.geoheader()