ANALYSIS TOOL BOX

5 functions

Geospatial Analysis

Geographic data analysis, shapefiles, and mapping.

Functions

Visualize and analyze geographic data — distance calculations, clustering, spatial statistics, and choropleth maps.

Overview

The geospatial module builds on geopandas, scikit-learn, and folium to simplify distance analysis, spatial pattern detection, and map creation.

Key capabilities:

  • Great-circle (Haversine) distance between every pair of points (CalculateHaversineDistance)
  • Nearest-neighbor matching against a reference set of points of interest (FindNearestPointOfInterest)
  • Density-based clustering of geographic points with DBSCAN (ConductClusterAnalysis)
  • Local spatial autocorrelation (Local Moran's I) to find hotspots, coldspots, and outliers (ConductSpatialAutocorrelation)
  • Choropleth maps resolved directly from free-text place names — countries, U.S. states/counties, ZIP codes, or subnational divisions (CreateChoroplethMapFromNames)
  • Interactive maps via Folium
  • Census TIGER shapefile retrieval (see also: FetchUSShapefile in Data Collection)

Use cases

  • Ranking how far apart field sites, sensors, or incidents are from one another
  • Flagging observations that fall suspiciously far from any known facility or checkpoint
  • Identifying periodic gathering points, disease clusters, or high-activity zones
  • Detecting statistically significant geographic hotspots, coldspots, and outliers
  • Turning name-based OSINT reporting (news articles, sanctions lists, incident logs) into mappable intelligence products
  • Visualizing crime, disease, or economic indicators by county or state
  • Joining tabular data to Census geographies for reporting
  • Public health mapping