cenpy.products.Decennial2010.from_csa

Decennial2010.from_csa(self, csa, variables=None, level='tract', **kwargs)[source]

Query the Census for the given CSA.

CSAstr

description of the CSA. Should be of the form “CSA, state” or “CSA”

CSA_typestr

type of CSA to focus on, Incorporated Place, County Subdivision, or Census Designated Place.

variableslist or str

variable or set of variables to extract from the API. Can include regex columns, which will match to any column in the product. So, [‘P001001’, ‘^P002’] will match to P001001 and any column that starts with P002.

levelstr (default: ‘tract’)

level at which to extract the geographic data. May be limited by some products to only involve tracts. (default: ‘tract’)

return_geometrybool

whether to return the geometries of the queried records. True by default, this will ensure that the return type of from_CSA is a geopandas.GeoDataFrame. If False, then only the records are fetched; none of the records’ geometries are requested from the server. (default: True)

geometry_precisionint

number of decimal CSAs to preserve when getting the geometric information around each observation in level. (default: 2)

strict_withinbool

whether to retain only geometries that are fully within the target CSA.

return_boundsbool

whether to return the boundary of the CSA being queried. (default: False)

reCSA_missingbool

whether to reCSA missing values in the data with numpy.nan, according to the standard missing values used by the ACS. (default: True)

Notes

You should always try to provide a CSA_type. There is a significant amount of vagueness in what is meant by “CSA” that you may not get the match you intend if you do not provide a CSA_type.