Clean Spreadsheets for Maps
A spreadsheet becomes a map through its columns. One row per place, cell types that survive export, and a decision about blanks settle most of the work. These checks happen in the sheet, before the file is opened for import.
The file has nine columns, two merged header rows, and a latitude column that is half blank.
That file is normal. Someone built it on a shared drive, added a second venue in the same building, and put a title banner above the column names. Making it mappable is mostly deciding what each column is for, then removing what a spreadsheet allows and a map does not.
One row, one place
A map element is a point, a route or an area. Each one needs its own row.
Rows that break the rule are easy to spot once you look: two venues separated by a slash, a row that says "various locations", a totals row at the bottom, blank rows used as spacing, a second header row in the middle. Split or delete them first. If a building holds three tenants, that is three rows with one address and three names.
Merged cells hide a similar problem. A name cell that spans four rows can mean four contacts for one place, or four separate rooms in one venue. Decide which, then unmerge so each row stands alone.
Columns worth having
Eight columns carry most projects. Extra columns do not hurt, and the map reads only the ones you assign.
| Column | Holds | Watch for |
|---|---|---|
| id | A short stable key | Number the rows, hide the column if you like |
| name | The label readers see | Short enough to read at pin size |
| address | Street, city, region, postal code, country | One address per cell |
| lat | Decimal degrees | Empty if you only have an address |
| lon | Decimal degrees | Same |
| category | One word or short phrase | Spelled the same in every row |
| note | Two or three sentences | Becomes the place description |
| day | A date or a day number | Keep one format down the column |
Do not keep one column called Location that mixes addresses, coordinates and venue names. It will be read as a single kind of value and fail on the others.
Types decide whether a row survives
A spreadsheet decides what a cell is when you type into it, and that decision travels badly.
Postal codes take the first hit. Type 02138 and the cell may store 2138. Excel removes leading zeros unless the cells are formatted as Text before the data goes in, and Microsoft documents that fix. Phone numbers lose their plus sign the same way, and so does any code with a leading zero.
Coordinates belong in two numeric columns in decimal degrees. A cell reading 35°40'52"N is text, so a file where half the rows look like that will import with half the points missing. Convert first.
Dates deserve one format for the whole column. 01/05/22 reads as two different days depending on where you live, which is why ISO 8601 uses YYYY-MM-DD and puts the year first. A date inside a note can stay as words.
Identifiers and blanks
Add an id column even when the source has none. When a lookup fails, the id is how you find the row again after three rounds of edits.
Blanks need different decisions. A row with coordinates and no address is ready to map. A row with an address and no coordinates is ready once the address is found. A row with a name and nothing else is a decision: find the address or drop the row. A row with no name needs a label written in before import, because the pin has nothing else to show.
Handle duplicates before any lookup. Several offices in one building are normal. Repeated rows add items to the list waiting on a search and raise the estimate the batch will use, so remove them first and copy one result across.
Before you export
CSV suits a file that one tool will read. XLSX suits a file that people keep editing. Both import, and both break in the same places: a blank row at the top, a column of numbers stored as text, a comma inside an unquoted field. RFC 4180 is short. It explains why that last one matters: a field containing a comma or a line break has to sit inside double quotes.
If your region writes decimals with commas, check whether the export used semicolons between fields. A file that arrives as one long column is almost always a separator mismatch. Open it in a text editor and read the first line.
Keep the original columns and add cleaned ones beside them. When a row turns out wrong, you can compare it with what the source said.
The ten-minute check
Sort by category and count the groups. Sort by address and look for near duplicates. Filter the coordinate columns for blanks and confirm the empty rows are the ones you expected.
Then check the row count. A single import adds at most 1,000 places, routes and areas, and a longer file has to be split.
What the import does with the table
Tasmap reads the headers and a few sample values, then suggests a position source and a few field assignments. The analysis covers up to 64 columns and five values in each, so a very wide table may need setting by hand. Every suggestion can be changed, and none of them changes the file.
The position source is one choice for the whole file: coordinates, an address column, or a place name column. Rows with nothing in the chosen column land in the problem summary and are skipped. If you plan to import by latitude and longitude, fill the missing coordinates first.
A preview shows the table before anything is placed. Address searches spend credits, and the confirm button shows an estimate and your current balance first.
References
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files, IETF. The common CSV definition, including quoting for fields that contain commas or line breaks.
- Format numbers to keep leading zeros in Excel for the web, Microsoft Support. Why 02138 becomes 2138, and how formatting cells as Text prevents it.
- ISO 8601 date and time format, ISO. YYYY-MM-DD, and why 01/05/22 can be read two ways.
Related reading
Clean columns cost less than clean pins. Tasmap shows the table before it draws the map.