Skip to main content

GeoQA Logo

GeoQA

Geospatial Data Quality Assessment & Interactive Profiling

Profile any geodataset with a single line of code

PyPI Python License CI Docs


🌍 What is GeoQA?

GeoQA is a Python package for automated quality assessment and interactive profiling of geospatial vector data. Think of it as ydata-profiling (formerly pandas-profiling) but purpose-built for geodata.

GeoQA lets you:

  • Profile any vector dataset (Shapefile, GeoJSON, GeoPackage, etc.) with one line of code
  • Validate geometry quality (invalid, empty, duplicate, mixed types)
  • Analyze attribute completeness, statistics, and distributions
  • Visualize data on interactive maps with quality issue highlighting
  • Generate self-contained HTML quality reports
  • Automate QA/QC workflows via CLI or Python API

✨ Key Features

Feature Description
🔍 One-liner Profiling geoqa.profile("data.shp") — instant dataset overview
✅ Geometry Validation OGC-compliant validity checks, empty/null detection, duplicate finding
📊 Attribute Profiling Data types, null analysis, unique values, descriptive statistics
🗺️ Interactive Maps Folium-based maps with issue highlighting and quality coloring
📋 HTML Reports Beautiful, self-contained quality reports with charts and tables
⚡ CLI Interface geoqa profile data.shp — terminal access to all features
🔧 Auto-fix Repair invalid geometries with profile.geometry_results
📐 Spatial Analysis CRS info, extent, area/length statistics, centroid computation

📦 Installation

pip

pip install geoqa

From source (development)

git clone https://github.com/geoqa/geoqa.git
cd geoqa
pip install -e ".[dev]"

Dependencies

GeoQA requires Python 3.9+ and depends on:

  • geopandas — Geospatial data manipulation
  • shapely — Geometry operations and validation
  • folium — Interactive map visualization
  • matplotlib — Static charts
  • pandas / numpy — Data analysis
  • jinja2 — Report template rendering
  • click — CLI framework
  • rich — Terminal formatting

🚀 Quick Start

Python API

import geoqa

# Profile a dataset with one line
profile = geoqa.profile("buildings.shp")

# View summary
profile.summary()
# Output:
# ╭──────────────────────────────────────────╮
# │  GeoQA Profile: buildings                │
# ╰──────────────────────────────────────────╯
# ┌─────────────────┬──────────────┐
# │ Property        │ Value        │
# ├─────────────────┼──────────────┤
# │ Features        │ 12,456       │
# │ Columns         │ 8            │
# │ Geometry Type   │ Polygon      │
# │ CRS             │ EPSG:4326    │
# │ Quality Score   │ 94.2/100     │
# └─────────────────┴──────────────┘

# Interactive map with issue highlighting
profile.show_map()

# Quality check details
checks = profile.quality_checks()
print(checks)

# Generate HTML report
profile.to_html("quality_report.html")

# Attribute statistics
profile.attribute_stats()

# Geometry measurements
profile.geometry_stats()

From a GeoDataFrame

import geopandas as gpd
import geoqa

gdf = gpd.read_file("roads.geojson")
profile = geoqa.profile(gdf, name="City Roads")
profile.summary()

CLI

# Profile a dataset
geoqa profile data.shp

# Generate HTML report
geoqa report data.shp --output report.html

# Run quality checks only
geoqa check data.geojson

# Show interactive map
geoqa show data.gpkg --output map.html

📊 Quality Score

GeoQA computes an overall quality score (0-100) based on:

Component Weight Description
Geometry Validity 40% Percentage of valid geometries (OGC compliance)
Attribute Completeness 30% Percentage of non-null attribute values
CRS Defined 15% Whether a coordinate reference system is set
No Empty Geometries 15% Percentage of non-empty geometries

🗺️ Interactive Visualization

GeoQA creates interactive folium maps with:

  • Auto-reprojection to WGS84 for web display
  • Quality highlighting — invalid geometries in red, valid in blue
  • Interactive tooltips with attribute data
  • Multiple basemaps — OpenStreetMap, CartoDB Light/Dark
  • Layer controls for toggling valid/issue features
# Basic map
profile.show_map()

# Quality-colored map
from geoqa.visualization import MapVisualizer
viz = MapVisualizer(profile.gdf, name="My Data")
quality_map = viz.create_quality_map(profile.geometry_results)

📋 HTML Reports

Generate comprehensive, self-contained HTML reports:

profile.to_html("report.html")

Reports include:

  • Quality score badge with color coding
  • Dataset overview cards (features, columns, geometry type, CRS)
  • Quality checks table with pass/fail/warn indicators
  • Spatial extent information
  • Attribute completeness with visual progress bars
  • Numeric column statistics
  • Geometry type distribution

🧪 Quality Checks

Check Severity Description
Geometry Validity 🔴 High OGC Simple Features compliance
Empty Geometries 🟡 Medium Geometries with no coordinates
Duplicate Geometries 🟡 Medium Identical geometry pairs (WKB comparison)
CRS Defined 🔴 High Coordinate reference system presence
Attribute Completeness Varies Null/missing value analysis
Mixed Geometry Types 🟢 Low Multiple geometry types in one layer

📐 Supported Formats

GeoQA supports all vector formats readable by GeoPandas/Fiona:

  • Shapefile (.shp)
  • GeoJSON (.geojson, .json)
  • GeoPackage (.gpkg)
  • KML (.kml)
  • GML (.gml)
  • CSV with geometry (.csv)
  • File Geodatabase (.gdb)
  • And many more via GDAL/OGR drivers

🏗️ Architecture

geoqa/
├── core.py           # GeoProfile class — main entry point
├── geometry.py       # Geometry validation & quality checks
├── attributes.py     # Attribute profiling & statistics
├── spatial.py        # CRS, extent, area/length analysis
├── visualization.py  # Folium-based interactive maps
├── report.py         # HTML report generation (Jinja2)
├── cli.py            # Click-based CLI interface
└── utils.py          # Utility functions

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

# Clone the repository
git clone https://github.com/geoqa/geoqa.git
cd geoqa

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black geoqa/ tests/
isort geoqa/ tests/

📄 License

This project is licensed under the MIT License.

🙏 Acknowledgments

GeoQA is inspired by the development methodology and open-source philosophy of Dr. Qiusheng Wu and the opengeos community. Key inspirations include:

  • leafmap — One-liner philosophy for geospatial analysis
  • geemap — Interactive mapping patterns
  • ydata-profiling — Data profiling concept

📖 Citation

If you find GeoQA useful in your work, please consider citing:

@software{geoqa2026,
  title = {GeoQA: A Python Package for Geospatial Data Quality Assessment},
  year = {2026},
  url = {https://github.com/geoqa/geoqa},
  license = {MIT}
}

Made with ❤️ for the geospatial community

Metadata

Release files for geoqa 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 geoqa 0.1.0
File Size Uploaded Provenance Actions
geoqa-0.1.0.tar.gz 38.4 kB Without provenance Details for geoqa-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 71.7 kB

Release files / geoqa-0.1.0.tar.gz

Download URL geoqa-0.1.0.tar.gz
Size 38.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ba8ffed29c2837d650fa53db832bd56dce07e39db11cfafa5c16dbad50bfa91f
BLAKE2b-256 checksum
How to use checksums
ff51d16e7a96433f5a01c1416d9fbd38a5176fc72dc3cbf9370b68a920aba54a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.6

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

Download URL geoqa-0.1.0-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e32f620635ce6b83a967320bb099ab7bdc5728145d473c1a07c6c33c9d48d7a4
BLAKE2b-256 checksum
How to use checksums
de69740a8887d5dade53a42e532a7c5b1b9eb9b7386a488c00f5299554a49690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.6

Security for geoqa 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