Mapping data from a Google Sheet
a tutorial and demonstration
Data in a table is at the heart of much GIS. In the demonstration below, we walk through using a Google Sheet as our table and plug it in to an ArcGIS Online Map - so that it displays the new or edited data in the table in near real time.
tables are made of rows and columns. Rows are vertical strips or fields of similar data. Usually, each row has a data type. A row may contain text, integers, real numbers, or many other types of infromation. Columns or records are horizontal and represent a single sample, occurrence, or thing. A table can hold a very large number of records.
Enter new data
Create a few new data records, similar to what you see in line 2. The data in the spreadsheet will reset every 30 minutes but is publicly visible until that time.
Map data
Watch the data above appear on the map below. Click the markers to see details about the point. If your tabular data are correctly entered above, it may take up to two minutes to display on the map below. Remember this table and map are publicly available, anyone, anywhere can enter data and it becomes visible to everyone - until the table resets.
Click one of the map markers below. Can you see how the data from the table flows into the marker pop-up? Do you see how the column label also displays in the pop-up? It helps describe the record. The latitude and longitude columns are displayed but they are also used by ArcGIS to place the map marker.
Map Viewer
Create Your Own
- Create the Google Sheet
- At https://drive.google.com, add/create a new sheet
- Add a latitude, longitude, and name column. Add others if you like. Remember a column that uses integer data, can be useful for mapping purposes.
- Name your sheet and be sure it is saved.
- Press the Share button in the upper right. A window will pop-up with the second half titled, "Get Link". Click the hyperlinked "Change". Set it to anyone with the link can edit.
- Press "Copy Link" and press "Done".
- In your storymap, add an "Embed" widget and drop your new link into the widget. This should produce an embedded Google Sheet, similar to what is above.
- Link your Google Sheet to the map
- In your Google Sheet, go to the File menu
- Select "Share" and "Publish to Web".
- Set the pull downs to: "Sheet1" and type: "CSV".
- Copy the link and close the window.
- Login to ArcGIS Online and create a new classic map viewer map.
- Select "Add". Select "Add layer from Web".
- Set the pull-down to CSV and paste your URL.
- When you see you Google Sheet layer in your map, click the three dots to the right of the layer name. Select "Rename" and pick an appropriate title.
- Click the three dots again and select "Refresh Interval". I recommend setting it to 1 minute, however if you have many users or expect to have a large dataset, a slower refresh rate will improve performance of the map.
- Save the map. Press the "Share" button and select "Everyone". Copy the URL presented.
- In your storymap, add a second "Embed" widget and paste your shared map URL. It should appare similar to the map above.
- Save your new storymap and set its sharing to "Everyone".
- Test your storymap in a private or Incognito browser to make sure sharing is correct.
- IMPORTANT: Be sure you understand the above process will let anyone in the world write anything in your Google Sheet. Silliness and naughtiness may ensue. This method is best for small groups or limited time use with a class. After you have collected the data, you can change the Google Sheet sharing to "view only".
More Resources
Some time ago, Charlie Fitzpatrick created the Table Time activity to help teach the importance of thinking about, organizing, and analyzing data in a table. Take a look here!