Skip to main content

Spatial data

How to Map Data From a Spreadsheet or CSV

Most data that belongs on a map starts life in a spreadsheet: one row per region, a column of values. To map it you join those rows to the shapes of the regions on a shared key, then shade each shape by its value. This guide explains the join clearly, shows the small data problems that quietly drop rows, and walks through doing it in the browser with Groundtruth, no GIS install required.

8 min read · Updated August 24, 2026

The idea: a join between rows and shapes

A spreadsheet has one row per region and no geometry. A boundary file has one shape per region and, usually, a name or code for each. A join matches them: for every shape, it finds the spreadsheet row whose key equals the shape's key, and copies the row's numbers onto the shape. After the join, each region carries both its outline and your data, and you can map, filter, and analyse it.

The key is everything

A join is only as good as the column both files share. A stable official code (an ISO country code, a FIPS or GADM code) matches far more reliably than a name, because names differ in spelling, case, punctuation, and language.

Prepare your spreadsheet

  • One header row, then one row per region. No merged cells, no totals row, no blank separator rows.
  • A single clean key column: the region name or, better, an official code that also appears in the boundary file.
  • Numeric columns as numbers. Values like 45,000 or 88% or (1200) still parse in a good tool, but plain numbers are safest.
  • Save as CSV (UTF-8) if you can. It is the most portable format and avoids spreadsheet quirks.

Step by step

Step 1Load the boundaries

Open Groundtruth and drag in a shapefile (.zip) or GeoJSON of your regions. Free global boundaries come from Natural Earth, geoBoundaries, GADM, or your national statistics office.

Step 2Bring in the spreadsheet

Use Join a spreadsheet (CSV) and drop your file. The tool reads it in your browser, so the data never leaves your machine.

Step 3Confirm the key pair

It guesses the matching pair (for example boundary name to CSV County) and shows how many regions will match. Adjust the two dropdowns if the guess is off.

Step 4Join

Every numeric column becomes a mappable variable. Pick one to shade the map, and open the attribute table to check the joined values row by row.

Step 5Handle the unmatched

If some regions did not match, the mismatch is almost always in the key. See the fixes below, correct the spreadsheet, and rejoin.

Why rows go missing, and how to fix it

A join that matches 44 of 47 regions is usually three name mismatches, not a broken tool. The commonest causes:

  • Spelling and diacritics: Nairobi vs NAIROBI, Cote d'Ivoire vs Côte d'Ivoire. Case is usually handled for you, accents and punctuation often are not.
  • Alternate names: Tharaka vs Tharaka-Nithi, Myanmar vs Burma, Congo vs Democratic Republic of the Congo.
  • Hidden whitespace: a trailing space or a non-breaking space makes two identical-looking names unequal.
  • Different granularity: your spreadsheet is by province but the boundaries are by district, so there is no one-to-one match at all.

The durable fix is to join on codes, not names. If both files carry an official code, use it as the key and the name problems disappear. When you only have names, standardise them in the spreadsheet first so they match the boundary file exactly.

After the join: read, analyse, export

  • Map any joined column, and switch classification (quantile, equal interval, Jenks, standard deviation) to see the pattern honestly.
  • Derive new variables from a formula, for example a rate as one column divided by another, computed for every region.
  • Correlate two joined variables or test spatial clustering with Moran's I in the Analyze panel.
  • Export the joined layer as GeoJSON, the map as SVG or PNG, or the whole session as a project file so the join is reproducible.

The join is the step that turns a spreadsheet into geography. Once you have done it once, it takes under a minute. Open Groundtruth, drop your boundaries, then your CSV, and map it.

Frequently asked questions

How do I map data from a spreadsheet?
Load a boundary file (shapefile or GeoJSON) of your regions, then join your spreadsheet to it on a shared key column such as a region name or code. Each numeric column becomes mappable. In Groundtruth this is the Join a spreadsheet (CSV) button, and it runs entirely in your browser.
What column do I join on?
A column that appears in both files and identifies each region uniquely. An official code (ISO, FIPS, GADM) is far more reliable than a name, because names vary in spelling, case, and language.
Why did some regions not match?
Almost always a key mismatch: different spelling, accents, alternate names, hidden whitespace, or a difference in granularity (province data against district shapes). Standardise the key in your spreadsheet or join on codes, then rejoin.
Do I need to upload my data anywhere?
No. Browser-based tools parse the spreadsheet and boundaries locally and join them client-side, so your data stays on your machine.
Can I map an Excel file?
Export the sheet to CSV first (one header row, one row per region), then join the CSV. CSV is the most portable format and avoids spreadsheet-specific quirks.

Bring this into your own research

Research Woven connects your sources, highlights, notes, evidence, and manuscript in one maintained chain, so provenance and citations are computed for you rather than pieced together by hand.

Open Research Woven

Keep reading