API reference¶
Data Module¶
Storing data¶
geosnap’s data module provides functions for collecting and storing a variety of datasets including U.S. Census data from 1990-2010, LEHD data from any vintage, and external longitudinal databases.
Save census data to the local quilt package storage. |
|
Save census 2000 census block data to the local quilt package storage. |
|
Save census 2010 census block data to the local quilt package storage. |
|
|
Read & store data from Brown’s Longitudinal Tract Database (LTDB). |
|
Read & store data from Geolytics’s Neighborhood Change Database. |
|
Grab data from the LODES FTP server as a pandas DataFrame. |
Accessing Stored Datasets¶
It also provides a storage container (called a “data_store”) that provides access to datasets that have been imported with the functions above
Storage for geosnap data. |
|
|
Census blocks for 2000. |
|
Census blocks for 2010. |
|
Nationwide counties as drawn in 2010. |
|
Metropolitan Statistical Areas as drawn in 2010. |
|
States. |
|
Nationwide Census Tracts as drawn in 1990 (cartographic 500k). |
|
Nationwide Census Tracts as drawn in 2000 (cartographic 500k). |
|
Nationwide Census Tracts as drawn in 2010 (cartographic 500k). |
The Community Class¶
The Community is the central construct in geonap used to hold spatiotemporal neighborhood data. The most common way to interact with geosnap is by instantiating a Community using a constructor method, then using analytical methods upon the community
|
Spatial and tabular data for a collection of “neighborhoods”. |
Community Constructors¶
|
Create a new Community from original vintage US Census data. |
|
Create a new Community from a list of geodataframes. |
|
Create a new Community from Census LEHD/LODES data. |
|
Create a new Community from LTDB data. |
|
Create a new Community from NCDB data. |
Community Analytics¶
|
Create a geodemographic typology by running a cluster analysis on the study area’s neighborhood attributes |
|
Create a spatial geodemographic typology by running a cluster analysis on the metro area’s neighborhood attributes and including a contiguity constraint. |
|
Short summary. |
|
Pairwise sequence analysis to evaluate the distance/dissimilarity between every two neighborhood sequences. |
|
(Spatial) Markov approach to transitional dynamics of neighborhoods. |
Analyze Module¶
Model neighborhood differentiation using multivariate clustering algorithms
|
Create a geodemographic typology by running a cluster analysis on the |
|
Create a spatial geodemographic typology by running a cluster analysis on the metro area’s neighborhood attributes and including a contiguity constraint. |
Clustering algorithms¶
The following algorithms may be passed to geosnap.analyze.cluster or geosnap.analyze.cluster_spatial but they should not be called directly
Classic (aspatial) Clustering¶
|
Clustering with Affinity Propagation. |
|
Clustering with Gaussian Mixture Model |
|
Clustering with Hierarchical DBSCAN |
|
K-Means clustering. |
|
Short summary. |
|
Agglomerative clustering using Ward linkage. |
Spatial Clustering¶
|
AZP clustering algorithm |
|
Max-p clustering algorithm [DAR12] |
|
SKATER spatial clustering algorithm. |
|
Spatially encouraged spectral clustering |
|
Agglomerative clustering using Ward linkage with a spatial connectivity |
Neighborhod Dynamics Methods¶
Model neighborhood change using optimal-matching algorithms or spatial discrete markov chains
|
Local Indicator of Neighborhood Change |
|
Pairwise sequence analysis and sequence clustering. |
|
(Spatial) Markov approach to transitional dynamics of neighborhoods. |
Harmonize Module¶
|
Visualize Module¶
|
Function for index plot of neighborhood sequences within each cluster. |
|
Launch an interactive visualization portal. |