geosnap.data.Community¶
-
class
geosnap.data.
Community
(gdf=None, harmonized=None, **kwargs)[source]¶ Spatial and tabular data for a collection of “neighborhoods”.
A community is a collection of “neighborhoods” represented by spatial boundaries (e.g. census tracts, or blocks in the US), and tabular data which describe the composition of each neighborhood (e.g. data from surveys, sensors, or geocoded misc.). A Community can be large (e.g. a metropolitan region), or small (e.g. a handfull of census tracts) and may have data pertaining to multiple discrete points in time.
- Parameters
- gdfgeopandas.GeoDataFrame
long-form geodataframe that holds spatial and tabular data.
- harmonizedbool
Whether neighborhood boundaries have been harmonized into a set of time-consistent units
- **kwargs
- Attributes
- gdfgeopandas.GeoDataFrame
long-form geodataframe that stores neighborhood-level attributes and geometries for one or more time periods
- harmonizedbool
Whether neighborhood boundaries have been harmonized into consistent units over time
Methods
cluster
(self[, n_clusters, method, …])Create a geodemographic typology by running a cluster analysis on the study area’s neighborhood attributes
cluster_spatial
(self[, n_clusters, …])Create a spatial geodemographic typology by running a cluster analysis on the metro area’s neighborhood attributes and including a contiguity constraint.
from_census
([state_fips, county_fips, …])Create a new Community from original vintage US Census data.
from_geodataframes
([gdfs])Create a new Community from a list of geodataframes.
from_lodes
([state_fips, county_fips, …])Create a new Community from Census LEHD/LODES data.
from_ltdb
([state_fips, county_fips, …])Create a new Community from LTDB data.
from_ncdb
([state_fips, county_fips, …])Create a new Community from NCDB data.
harmonize
(self[, target_year, …])Short summary.
sequence
(self, cluster_col[, seq_clusters, …])Pairwise sequence analysis to evaluate the distance/dissimilarity between every two neighborhood sequences.
transition
(self, cluster_col[, time_var, …])(Spatial) Markov approach to transitional dynamics of neighborhoods.
-
__init__
(self, gdf=None, harmonized=None, **kwargs)[source]¶ Initialize a new Community.
- Parameters
- gdfgeopandas.GeoDataFrame
long-form geodataframe that stores neighborhood-level attributes and geometries for one or more time periods
- harmonizedbool
Whether neighborhood boundaries have been harmonized into consistent units over time
- **kwargskwargs
extra keyword arguments **kwargs.
Methods
__init__
(self[, gdf, harmonized])Initialize a new Community.
cluster
(self[, n_clusters, method, …])Create a geodemographic typology by running a cluster analysis on the study area’s neighborhood attributes
cluster_spatial
(self[, n_clusters, …])Create a spatial geodemographic typology by running a cluster analysis on the metro area’s neighborhood attributes and including a contiguity constraint.
from_census
([state_fips, county_fips, …])Create a new Community from original vintage US Census data.
from_geodataframes
([gdfs])Create a new Community from a list of geodataframes.
from_ltdb
([state_fips, county_fips, …])Create a new Community from LTDB data.
from_ncdb
([state_fips, county_fips, …])Create a new Community from NCDB data.