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 |
ensure() returns the dataframe (or tibble), reading it in if necessary
ensure(name)
ensure(name)
name |
Name of the dataframe Stops in the case of an error |
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.
returns the (possibly retrieved) dataframe.
(internal) Return the Database
get.data()
get.data()
the database (as a tibble and/or dataframe)
(internal) Return the Decode Table
get.decode()
get.decode()
the decode table
uscgh.2010.decode() returns a textual description of a cell
uscgh.2010.decode(colname, colvalue = "", warnings = TRUE)
uscgh.2010.decode(colname, colvalue = "", warnings = TRUE)
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.) |
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.
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).
'RShowDoc("a-tour", package="us.census.geoheader")' for a short tour of a few columns of the database
uscgh.2010.decode('SUMLEV', 40)
uscgh.2010.decode('SUMLEV', 40)
Returns the 2010 Census SF2 geographic header dataset
uscgh.2010.sf2.geoheader()
uscgh.2010.sf2.geoheader()
'uscgh.2010.dataset' returns the SF2 geographic header data from the 2010 US census
a dataframe (tibble, if the tibble package is available)
'RShowDoc("a-tour", package="us.census.geoheader")' for a short tour of a few columns of the database
x <- uscgh.2010.sf2.geoheader()
x <- uscgh.2010.sf2.geoheader()