Tuesday, January 20, 2015

2 Quick and Easy Mapping Tools by Google

Data and maps go hand in hand. Have you ever been working on a project or paper that could benefit from one of those maps that have different places shaded different colors... like, say, an election map? These types of maps (and many others) are a great way to visualize data and add context to your topic. Thanks to the ubiquitous Google Map, creating a map does not necessarily require any specialized skill -just some experience working with a spreadsheet and a bit of familiarity with Google Apps. All things you should have as a UNCG Spartan!
In this post, I'll introduce two tools by Google that allow you to create a map very quickly and easily: Google Sheets and Google Maps.

Google Sheets

I recently found out that Google Sheets have the ability to create a map, and, after spending some time with it, I realized it is just about the easiest tool there is for creating a shaded map of different regions (known as a Choropleth Map). Although somewhat limited, if your data is aggregated by US state or country, you can create a map in minutes. 

How To:

Let's say you have data that is organized by US States. For this example, we'll keep it simple: total population of each state. Your data will need to be in a spreadsheet format (i.e. Excel, Google Sheet) with the location information in one column and corresponding data in a second column. First access Google Sheets via your Google Drive (directions), then you can choose to import your data from an existing file or start with a blank sheet and paste or manually input your data. I recommend placing the location information (state names) in column A and the data you want to map in column B.
Your data should look something like this:
Format your data in two columns.
To create your map, select both the location column and column containing the data you wish to display. Simply click the A column heading, hold the control (or command) button on your keyboard, and click the B column heading. Both columns should be selected now. Alternatively, you could click and hold on the A column header and drag to the B column to select both. Next, click Insert on the menu near the top of the page, then click Chart on the drop down menu. The Chart Editor will pop up on your screen.
In the Chart Editor, there are three tabs near the top left: Start, Chart, and Customize. Go ahead and click on the Chart tab. In the leftmost column, you'll see Map as the third option from the bottom. Click Map, and you'll see two options in the center
column, the topmost is a Regions (or choropleth) map, and the second is a Markers (proportional symbol) map. Click the topmost Regions map, then click the Customize tab. Now, at Regions selection click the drop down menu and choose United States. You can also edit your colors at this point. When you're happy with the colors, click the Insert button.
Your map will now appear on your spreadsheet. Notice that if you hover over different states, a information box appears displaying the total population for the state. To edit or share, click anywhere on the map and you will see a drop down arrow in the top right. Click the arrow, and you'll find options to edit or delete your map, save it as an image, or publish it on the web!

Here is a short video that walks you through creating your map!


Best Uses: Quick map to use as a figure in a paper; reviewing your data; preliminary analysis.
Limitations: Limited interactivity; not very customizable; only countries, states, or city names can be used as locations (cannot geocode addresses, lat-long coordinates);





Google Maps

Google Maps has a feature called My Maps, and if you have a Google account (and your iSpartan mail is a Google account) you can add data points to a simple Google Map. Google Maps is useful when you want to map data that is tied to a point, such as a street address or latitude and longitude coordinates. Let's say you wanted to map all of the hospitals in the state or North Carolina, or add points to a map based on a list of addresses where crimes occurred. Google Maps lets you add these points to a map (a process called geocoding) and then embed your map in a webpage. 

How to:

First, make sure you're logged into either your iSpartan email or another Google account. Once again, your data will need to be in a spreadsheet (Google Sheet or Excel will work here), with location data in one of the columns. This time, I will use freely available data of reported vandalism incidences from the Greensboro Police Department (you can view the data here and copy and paste to your own sheet). The list of incidences contains a brief description and an approximate address where the event occurred. It is important that your location data is all in one column. For example, if you're using addresses, the street number, city, and state should all be in the same cell. Likewise for latitude and longitude: they should be in the same cell separated by a comma. Last, make sure the first row of your sheet contains a descriptive heading for the contents in the column, similar to my example sheet. Once your data is
Click My maps from the maps.google.com search bar.
ready, go to maps.google.com.
 Once you've landed on the Google Maps page, click on the search bar in the top left of the screen and a drop down menu will appear. If you are signed into Google, you will see "My Maps," along with any other recent map searches you've conducted. Click My Maps, and then click Create

A new browser tab will open, and you will see a map with a table of contents menu in the top left (see image). To add your point data to the map, click the Import link under "Untitled Layer." An import
window will open. If your data is saved in an Excel spreadsheet: you can either drag and drop the file into the dashed box, or you can click the select button to navigate to the file on your computer. If your data is in a Google Sheet: click Google Drive at the top, and click on the sheet containing your data. Once you've located the sheet, click the select button at the bottom of the dialogue box. After importing, Another box will pop up asking you to select the column that contains your location information (i.e. address or lat/long).
Select the heading that corresponds to your location column, click Continue, then choose a column to title the points on your map and click Finish.

Now, your points will be placed on the map! Click on any of the points and a callout box will appear containing the information for the point from your spreadsheet. In the top left menu, click All Items, then click the small paint can icon to change the look and feel of your points. You can even color the points based on a common attribute by clicking the Uniform Style link, and selecting a data column to color the points by from the "Group places by" menu. Experiment and play with the different settings in the menu to customize your map. Make sure you give your map a descriptive name by clicking on "Untitled Map" in the menu and renaming it.

The table of contents menu allows for editing and sharing.
To share your map with others, click the Share link in the menu and a share window will pop up that provides a link that you can give to others. If you want to embed the map in a webpage, first change the access rights from private to public, then click Save and Done. Then, in the main menu, click the three vertical dots to the right of the Share link and a menu will appear. Click "Embed in my site" and you can copy and paste the code to insert the map into a webpage.

This video will guide you through the process!


Best uses: Adding location points to a map (geocoding); creating an interactive webmap; sharing mapped data with others online.

Limitations: Google maps are great for sharing, but don't carry over well to static format (like an image to include in a paper). Google has (somewhat fuzzy) limits to the amount of points you can geocode by this method as well.


I hope you will consider how you can integrate some of these simple mapping tools into your data-centered projects! If you have any questions, feel free to email me at p_white@uncg.edu, or use the Ask Us! chat on the library home page.

Happy Mapping,
Phil White