A friend asked me recently about how to create a map with points on it using little more than the data in a spreadsheet.
This wasn’t the first time I’d considered this problem, but I’ve never found a tool to make it simple to have a map that auto-updates when its source spreadsheet changes. Until now. After asking some friends on the internet, I was informed that National Map, a website from Australia which is built using Terria, should do the job nicely.
I’ve just determined that similar can be done on the Terria website, without the NationalMap branding, but with slightly reduced features.
- Create a Google Sheet that includes columns called ’lon’ and ’lat’, and store the longitude and latitude of each row’s data point in these columns. The expected datum is WGS84
- In Google Sheets, go to File -> Share -> Publish to web
- In the resulting dialogue box, on the Link tab, select the Sheet you’d like to visualise, and set the format to CSV
- Click Publish
- Copy the resulting Share URL
- Head over to either NationalMap or Terria
- At the top of the left-hand panel, click the Upload or “Load local/web data” button
- In the dialogue box, select “Add Web Data”
- Specify the file format as CSV, and paste in the Google Sheets URL you copied earlier, before clicking Add
- Click Done in the corner of the dialogue box
- Click the Share/Print button on the top-right of the page, and copy the URL there
- Share that URL with anyone would like to show your map
In NationalMap, you can also click the kebab menu button beside the data on the left pane, and select Edit Style, to change how your data looks on the map, but I’ve not played with this feature much, so using it is left as an exercise to the reader.
If you’re more interested in hosting your own map (e.g. on GitHub Pages) using the contents of a Google Sheet, check out Steve Bennett’s Community map template. At time of writing, it hasn’t been updated since mid-2021 but it’s probably simple enough (especially if you know Vue.js) to update/adapt.