Skip to main content

geo-audit

geo-audit is a command-line tool for auditing raw geospatial datasets before ingestion into spatial analysis, GIS workflows, or machine learning pipelines. It inspects CSV and GeoJSON files in a directory to identify coordinate anomalies, missing spatial metadata, attribute missingness, exact duplicate locations, and cross-dataset bounding box overlaps without modifying source data.

Purpose

Geospatial data collected from field surveys, legacy archives, and third-party GIS exports frequently contains quality defects—such as out-of-range latitude/longitude coordinates, unprojected planar coordinates lacking CRS definitions, silent duplicate coordinates, and missing values across attribute columns. geo-audit runs static health checks across all datasets in a target directory to surface critical defects and risk levels in a single pass.

Installation

Requires Python 3.10 or higher.

git clone https://github.com/souro26/geo-audit
cd geo-audit
pip install -e .

Quick Start

Scan a directory of geospatial files for a human-readable terminal report:

geo-audit data/

Generate machine-readable JSON output for automated pipelines:

geo-audit data/ --format json

Save JSON directly to a file (suppresses terminal progress):

geo-audit data/ --format json --output report.json

Audit Capabilities

  • Geographic Coordinate Validation: Auto-detects latitude/longitude columns (including variants like lat/lon/lng), coerces non-numeric entries, and flags values outside valid ranges ([-90, 90] and [-180, 180]).
  • Planar Coordinate Inspection: Identifies planar coordinate pairs (easting/northing, x/y) and flags missing values. Planar coordinates are reported separately because their Coordinate Reference System (CRS) is unknown.
  • Duplicate Location Detection: Identifies exact duplicate coordinate pairs across records within CSV datasets.
  • Attribute Missingness Profiling: Checks column-level completeness. Attribute columns with missingness exceeding 5% are flagged (WARN at 5-20%, HIGH above 20%). Coordinate columns are excluded from column missingness to prevent duplicate reporting.
  • CRS and Bounding Box Analysis: Extracts declared CRS from GeoJSON datasets and computes spatial bounding boxes for geographic datasets to evaluate spatial coverage and cross-dataset bounding box overlaps.
  • Cross-Dataset Schema Comparison: Identifies normalized column name matches and data type discrepancies across datasets.

Dataset Readiness Levels

Every scanned dataset is assigned an overall readiness status based on the highest severity finding detected:

  • READY: No blocking or moderate issues detected by active checks.
  • REVIEW: Moderate-severity findings detected (e.g., 5-20% missingness, duplicate locations, missing planar coordinates).
  • HIGH RISK: High-severity findings detected (e.g., >20% missing or invalid geographic coordinates, high column missingness).
  • ERROR: Unparseable files or critical dataset structural failure.

Demo Data

The included data/ directory contains synthetic test cases demonstrating common data issues:

File Description Primary Findings
exploration_samples.csv 12 sample points Out-of-range coordinates, missing lat/lon, 41.7% missing notes, duplicate locations
historical_surveys.csv 10 survey points Clean dataset using lat/lon column headers
geology.geojson 5 Point geometries Clean GeoJSON dataset with EPSG:4326
planar_samples.csv 8 sample points Easting/northing planar coordinates with 12.5% missing values

Run the demo against the included data:

geo-audit data/

Scope and Limitations

  • Supported Formats: CSV (.csv) and GeoJSON (.geojson, .json).
  • Duplicate Detection: Performs exact coordinate pair matching; near-duplicate spatial clustering is not performed.
  • Spatial Overlap: Evaluates bounding box intersection; polygon geometry intersections are out of scope.
  • CRS Transformations: Does not attempt automatic CRS inference or coordinate re-projection.

License

MIT

Metadata

Release files for geo-data-audit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geo-data-audit 0.1.0
File Size Uploaded Provenance Actions
geo_data_audit-0.1.0.tar.gz 24.6 kB Without provenance Details for geo_data_audit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geo-data-audit 0.1.0
File Interpreter ABI Platform Actions
geo_data_audit-0.1.0-py3-none-any.whl Python 3 none any Details for geo_data_audit-0.1.0-py3-none-any.whl

Total release size: 50.6 kB

Release files / geo_data_audit-0.1.0.tar.gz

Download URL geo_data_audit-0.1.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
950da7eb32ad8d425f35e70aaac08e54b7c8c4bd278de5c2d3d07641170520cd
BLAKE2b-256 checksum
How to use checksums
633cb5b97a21604f061bf9eaf41e2d1a6ab7cf2274ac1ab9ebc3660afe6fa3fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / geo_data_audit-0.1.0-py3-none-any.whl

Download URL geo_data_audit-0.1.0-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbfdb446ef100d3af729b778aba284cc5a3abaec85e3911e72d94fe392a28a30
BLAKE2b-256 checksum
How to use checksums
c7ad825d3ea433bb4e7101531636a8ef54f60a3ea84f4d672f202ca39ed06663
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for geo-data-audit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page