Saturday, March 30, 2013

Automatic legends in Google Fusion Tables

Jean Yoo found a hidden gem in Google Fusion Tables that I wasn't aware of ... an Automatic Legend.  This will add a legend showing readers how your polygon fills (and I assume points) are styled.

I KNOW it was not there when I started using Fusion Tables. I wonder how long I've been staring at it.

To use it, go to your Change Map Styles window (the same place you define your buckets for the fill) and look at the bottom of the list. There is the Automatic Legend. You can set a title and you can decide in which corner you want the legend. Very handy.

Sunday, March 17, 2013

Mapping project assignment

Your assignment is to use geographic data to write a news story.

Self-select yourselves into groups of three. You must have both grads/undergrads on your team. Write your teams in here by Saturday, March 2nd:

Overview: Use Census or other approved data to analyze a trend, create an online interactive and write a story that includes sources that exemplify or explain the trend. Think of the story as the goal, the interactive as complementary material, and the analysis as a means to get to both.

Some requirements and deadlines:
  • Use Census bureau or other pre-approved data.
  • Budget lines are due by midnight, Saturday, March 2nd. This is a pitch of your story. Include a link or explanation of your data.
    • You can use either QGIS or Google Fusion tables to do analysis on your data, but in the end you’ll need the Fusion Table map. The map should:
    • Use map styles to visually show readers the trend you are writing about
    • Have a well-formatted info window that shows the details about your trend.
    • Include a legend so readers can understand the map
    • Properly source the information.
  • Your blog post should be constructed as a proper news story, and include at least two sources that exemplify or explain the trend you are tracking.
  • This post is due the beginning of class on March 19th.
  • Your team will spend a couple of minutes showing your map and talking about your story during class on March 19th.
You can divide the work of the project in any way you see fit. You will provide a grade and brief explanation of effort for yourself and each teammate (by survey), which will be considered in project grading.

UPDATE: I attached a couple of handouts with common Excel formulas. And some crazy Excel formulas.

Tuesday, March 12, 2013

GIS programs: Quantum GIS

This class period covered from background on GIS theory, projections, shapefiles and more, and served as the introduction to several classes focusing on using Quantum GIS.

(Yes, I know this post needs more detail. For now, it's just links to the presentation and data.)


The files used:

Saturday, March 9, 2013

Clipping shapefiles in QGIS

This next assignment focuses on using QGIS to clip one shapefile with the selection of another, and also to join a shapefile with a .csv data file in QGIS.

Goal: To make a make a map in QGIS that shows ACS data for a zip codes within a particular county. It's fairly complicated, but here are the overall steps:
  • Download shapefiles for the county and the zip codes.
  • Clip the zip codes file to include only those for the county you care about.
  • Download the ACS data and clean it up for your purposes, then save it as a csv file.
  • Create a csvt file to define the columns so QGIS understands them.
  • Join the ACS data to the modified shapefile.
  • Style the map so you can see the variance in desired data.
Now for some detail:


  • Work on the shapefiles first. Download the shapefile for ZIP Code Tabulation Areas for your state. (2010 data is fine). Same for County (and equivalent). You can find them at the Census Bureau's Tiger/Line site.:
  • Open the Counties file and then the Zip Code file. Move the Zips on top so and change the properties of the layer so it is transparent and you can see the counties underneath.
  • Open the Attribute Table for the Counties file and use the search to find your county. (You might want to click the “Show selected Only” box.) Close that attribute window
  • Now your county is selected. You can go to Vector > Geoprocessing Tools > Clip. Remember to cut up, so the Zips are on top. Use only the “selected feature” from the county layer. You’ll need to browse to where you want the file and name it. Do it. Go ahead and add the layer to your workbook.
  • Now you have zip codes for only your county! You can remove the other layers.


  • Go to the American Factfinder.
  • Go to the advanced search. Set your geography to 5-digit Zip code Tabulation area in Texas.
  • Find a table you are interested in. You might stick with ACS-5-year data to have good ZIP code data. I’d allow 2010 Census if you desire. (Geographic mobility is one worth looking at.) Look at the detail page to make sure it has data you are interested in, but ...
  • Download the table from the search results page. It is important to do it there instead of in the detail page.
  • Open up the.metadata.csv file and look at the description of the data. Take note of the column names of the data you want. You’ll want both the EST (Estimate) fields and the MOE (Margin of Error) fields.
  • Open up your “with_ann.csv” file and delete the columns you don’t need.
  • Open up TextEdit and create a text file that describes what each kind of column is in your date. (Refer to this post for more details on CSVT: ). A couple of notes: The ZIP code, GEOid and any other column you will JOIN on need to be “String”. Number columns you want to act on with shading need to be “Integer” or “Real”. Name this file the same as your data, except “.txt”.
  • Find the file on your desktop and right-click on it and do Get Info. Under "Name and Extension" change the file name from .txt to .csvt. When you close it, the computer will ask you if you want to keep .txt or use .csvt. Tell it to use .csvt.


  • Add the CSV file to your QGIS document using Add Vector Layer. Open the properties of the shapefile and use the Join tab to match your fields.
  • Now change the Style of your shapefile to show your colors.
You are done! At least with analysis.

To publish online, you want to do a Save As on the layer and save it as KML to upload to fusion tables.

To print requires a whole different lesson believe it or not.

Publishing a Google Fusion Table Map

The assignment in class was to create a map using the Restaurant score data attached and the publish a blog post about your map.

Here are the very basic steps we talked about in class:

  • Start with a data set with addresses or better yet latitude and longitude.
  • Upload as Fusion Table to Google Drive (under Create > More > Fusion Table)
  • Fill out metadata (or do it later)
  • Check column information (Edit > Change columns)
  • Edit Info Window (Under Map tab)
  • Edit Map Styles (Under Map tab)
  • Share and embed or link to from your personal blog or portfolio. (If you don't have one, it's time to create one!
We've found that Wordpress doesn't take the iframe embed code. Students have taken screenshots of their maps and used that in their posts, and then linked to the published map.