geosnap.Community.from_lodes

classmethod Community.from_lodes(state_fips=None, county_fips=None, msa_fips=None, fips=None, boundary=None, years=2015, dataset='wac')[source]

Create a new Community from Census LEHD/LODES data.

Instiantiate a new Community from LODES data. Pass lists of states, counties, or any arbitrary FIPS codes to create a community. All fips code arguments are additive, so geosnap will include the largest unique set. Alternatively, you may provide a boundary to use as a clipping feature.

Parameters
state_fipslist or str, optional

string or list of strings of two-digit fips codes defining states to include in the study area.

county_fipslist or str, optional

string or list of strings of five-digit fips codes defining counties to include in the study area.

msa_fipslist or str, optional

string or list of strings of fips codes defining MSAs to include in the study area.

fipslist or str, optional

string or list of strings of five-digit fips codes defining counties to include in the study area.

boundarygeopandas.GeoDataFrame, optional

geodataframe that defines the total extent of the study area. This will be used to clip tracts lazily by selecting all `GeoDataFrame.representative_point()`s that intersect the boundary gdf

yearslist of ints, required

list of years to include in the study data (the default is 2015).

datasetstr, required

which LODES dataset should be used to create the Community. Options are ‘wac’ for workplace area characteristics or ‘rac’ for residence area characteristics. The default is “wac” for workplace.

Returns
Community

Community with LODES data