Data cleaning
Turning a messy download into an analysis-ready dataset you can trust.
Everything on Spatial Workflow about data cleaning, in the order that usually works: understand the idea, then run the task, then fix it when it goes wrong. 45 guides in total.
6 learning paths run through this topic — follow one if you would rather work through a route than pick a single guide.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- Spatial Data Quality: The Six Dimensions That Matter spatial data quality dimensions
- Null, Empty, Missing and Invalid: Four Kinds of Broken Geometry empty geometry geopandas
- Topological Coverage: What "Clean" Means for Adjacent Polygons polygon coverage gaps overlaps
- Repair, Reject or Flag? Choosing What Cleaning Should Do gis data cleaning decisions
- Choropleth Classification Explained: Quantiles, Equal Interval and Natural Breaks choropleth classification schemes
- Test Fixtures for GIS Code: Building Spatial Test Data You Can Trust gis test fixtures python
- Spatial Join Cardinality Explained: One-to-One, One-to-Many and What to Do spatial join one to many
- Attribute Join or Spatial Join? Choosing How to Combine Two Layers attribute join vs spatial join
- The Modifiable Areal Unit Problem Explained modifiable areal unit problem
- Spatial Autocorrelation Explained spatial autocorrelation explained
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Remove Null and Empty Geometries in GeoPandas remove null geometries geopandas
- The Python GIS Data Cleaning Checklist: From Raw Download to Analysis-Ready gis data cleaning python
- How to Find and Remove Duplicate Geometries in GeoPandas remove duplicate geometries geopandas
- How to Clean Messy CSV Coordinates into a Reliable GeoDataFrame clean csv coordinates
- How to Standardise and Repair CRS Across a Folder of Files in Python standardise crs across files python
- How to Clean and Normalise Attribute Columns in a GeoDataFrame clean attribute columns geodataframe
- How to Handle Missing and Null Values in Spatial Datasets in Python handle missing values spatial data python
- How to Snap and Align Geometries to Fix Slivers and Gaps in Python snap geometries fix slivers python
- How to Validate a GeoDataFrame Against a Schema Before Analysis validate geodataframe schema python
- How to Build a Repeatable Data-Cleaning Report in GeoPandas data cleaning report geopandas
- How to Split Multipart Geometries into Single Parts in GeoPandas explode multipart geometries geopandas
- How to Fuzzy-Match Place Names When Joining Spatial Data in Python fuzzy match place names python
- How to Find and Remove Spatial Outliers in a Point Dataset remove spatial outliers python
- How to Clean and Standardise Date Columns in Spatial Data clean date columns spatial data python
- How to Explore a Spatial Dataset You Have Never Seen Before explore spatial dataset python
- How to Find and Fix Gaps and Overlaps in a Polygon Coverage fix gaps overlaps polygons python
- How to Merge Near-Duplicate Features in a Spatial Dataset merge near duplicate features python
- How to Clean a Line Network: Dangles, Overshoots and Disconnects clean road network topology python
- How to Standardise Attribute Values Against a Controlled Vocabulary standardise attribute values python
- How to Set, Assign and Convert CRS in GeoPandas (set_crs vs to_crs) set_crs vs to_crs geopandas
- How to Reproject Between Datums Correctly (and Why the Grid File Matters) datum transformation python pyproj
- How to Geocode Addresses in Python geocode addresses python
- How to Clean a GPS Track: Outliers, Duplicates and Jumps clean gps track python
- How to Resample and Interpolate a Track to a Fixed Interval resample gps track python
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
- How to Fix Invalid Geometries in Python (GeoPandas) invalid geometries geopandas
- Why Are My Shapefile Column Names Truncated? How to Fix It shapefile column names truncated
- buffer(0) Does Not Fix My Invalid Geometry: What to Do Instead buffer 0 not fixing geometry
- Garbled Attribute Text and UnicodeDecodeError from a Shapefile: How to Fix Encoding shapefile encoding error python
- GeoPandas to_file() Fails on a Column Type: How to Fix It geopandas to_file field type error
- Rasterio Returns the Wrong Values: NoData, Scaling and dtype Fixes rasterio nodata wrong values
- My Cleaned Layer Has More Rows Than the Original: How to Fix It geopandas more rows after cleaning
- My GeoPandas Choropleth Colours Look Wrong: How to Fix It geopandas choropleth colours wrong
- Geocoding Returns Wrong or Missing Coordinates geocoding wrong coordinates
- My Time Column Sorts or Joins Wrongly spatial time column timezone errors
- My Track Has Impossible Speeds or Teleports track impossible speeds
Learning paths through this topic
A curated route rather than a list — the guides in the order that builds on itself.
-
Finding & Fetching Data
Get the data before you analyse it — from OSM, web services and satellite catalogues.
Open path → -
Spatial Statistics
Measure the pattern instead of eyeballing the map.
Open path → -
Raster Analysis
Read, reproject, clip and summarise raster data in Python.
Open path → -
Making Maps
Turn a GeoDataFrame into a map someone else can read.
Open path → -
GIS Data Cleaning
Turn messy spatial data into analysis-ready datasets.
Open path → -
Movement & Time
Tracks are not points — the order and the clock are the data.
Open path →
Related topics
Subjects that keep coming up alongside this one, most overlap first.