geosnap.io.get_lodes¶
- geosnap.io.get_lodes(datastore, state_fips=None, county_fips=None, msa_fips=None, fips=None, boundary=None, years=2015, dataset='wac', version=8)[source]¶
Extract a subset of data from Census LEHD/LODES .
- Parameters:
- datastore
geosnap.DataStore an instantiated DataStore object
- state_fips
listorstr, optional string or list of strings of two-digit fips codes defining states to include in the study area.
- county_fips
listorstr, optional string or list of strings of five-digit fips codes defining counties to include in the study area.
- msa_fips
listorstr, optional string or list of strings of fips codes defining MSAs to include in the study area.
- fips
listorstr, optional string or list of strings of five-digit fips codes defining counties to include in the study area.
- boundary
geopandas.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
- years
listofints, required list of years to include in the study data (the default is 2015).
- dataset
str, 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.
- version
int which version of LODES to query. Options include 5, 7 and 8, which are keyed to census 2000, 2010, and 2020 blocks respectively
- datastore
- Returns:
geopandas.GeoDataFramelong-form geodataframe with ‘year’ column representing each time period