pudl.output.censusdp1tract#

Functions for reading data out of the Census DP1 SQLite Database.

Module Contents#

Functions#

get_layer(→ geopandas.GeoDataFrame)

Select one layer from the Census DP1 database.

Attributes#

pudl.output.censusdp1tract.logger[source]#
pudl.output.censusdp1tract.get_layer(layer: Literal[state, county, tract], pudl_settings=None, ds=None) geopandas.GeoDataFrame[source]#

Select one layer from the Census DP1 database.

Uses information within the Census DP1 database to set the coordinate reference system and to identify the column containing the geometry. The geometry column is renamed to “geom” as that’s the default withing Geopandas. No other column names or types are altered.

Parameters:
  • layer (str) – Which set of geometries to read, must be one of “state”, “county”, or “tract”.

  • pudl_settings (dict or None) – A dictionary of PUDL settings, including paths to various resources like the Census DP1 SQLite database. If None, the user defaults are used.

Returns:

geopandas.GeoDataFrame