Issue maps

The European Union is piloting what they call “issue maps” – a take on storymaps, but about pressing issues like climate change:


Once you’ve overlaid the data you want on your map and assigned labels to your data points or polygons, you need to export the image as a JPEG.

First, situate your map in the frame as you would like it to appear in your final image.

Screen Shot 2014-10-02 at 8.55.20 AM

Then, click on the “New Print Composer” icon in the toolbar

Screen Shot 2014-10-02 at 8.56.32 AM

You’ll be prompted to enter a title – name your map something that clearly identifies it.

You’ll next be faced with an empty screen:

Screen Shot 2014-10-02 at 8.58.33 AM

Click on the “add new map” tool in the left-hand sidebar

Screen Shot 2014-10-02 at 8.59.26 AM

Then, drag as large a rectangle as possible over the blank canvas.  Your map should appear.

Screen Shot 2014-10-02 at 9.01.06 AM

You can add additional information to this map.  For instance, a legend explaining the color values in your choropleth map.

Click the “add new legend” button, and drag a rectangle where you would like your legend to be.

Screen Shot 2014-10-02 at 9.02.27 AM

After you’ve added your elements, go to the composer menu>export as image

Screen Shot 2014-10-02 at 9.05.55 AM

Save your image as a jpeg file, and upload to the course blog, with your commentary.

QGIS data tutorial

For PA4 you’ll be overlaying data onto a georectified map.  This tutorial shows you how to upload the vector shapefile for Davidson College, how to create your own vector shapefiles, and how to attach non-geographic data to those shapefiles.

Importing the Davidson shapefile

In the description for PA4, you’ll find a link to Davidson shapefiles.  Download them all, and place them in a folder called Davidson.

Open QGIS and add a vector layer:

Screen Shot 2014-10-01 at 2.43.13 PM

Select Davidson_buildings.shp and also upload Davidson_roads.shp

Once you’ve uploaded your shapefile, it should appear in the main area of QGIS.  I’ve projected these shapefiles in WGS84, but check to make sure that the CRS is set properly.

First, right-click on the Davidson shapefile.  Scroll down to Set Layer CRS, and select WGS84.

Screen Shot 2014-10-01 at 2.43.47 PM

Screen Shot 2014-10-01 at 2.44.06 PM

Your map might disappear, but fear not! You also have to set the project CRS to match the layer you just imported.  Right-click on the layer again, and select  “Set Project CRS from Layer”

Screen Shot 2014-10-01 at 2.44.15 PM

If you still don’t see your map, click the check-box next to your layer, go to View>Zoom to Layer.  Your map should appear.

Screen Shot 2014-10-01 at 2.44.32 PM

Overlaying your map

Now that you have a base map, you can overlay your own map.  If you need a refresher in georectifying in QGIS, go back to the QGIS tutorial from earlier in the semester.  You can either input Longitude and Latitude coordinates or, if your map has features that are recognizable today, you can try to match them by hand, as we did with MapTiler.

For instance, if since the Davidson shapefile has Chambers clearly marked, I could insert a reference point in the center of ChambersScreen Shot 2014-10-01 at 3.19.05 PM

But instead of entering longitude and latitude points, I could click on “From map canvas” and estimate the same place in the middle of the Chambers on my base map.

Screen Shot 2014-10-01 at 3.21.03 PM

Once you have georeferenced your map, it should automatically appear on the canvas, on top of the Davidson shapefile.  If it doesn’t check to make sure that all of your maps are using the same CRS.

When you’re finished, you can play with the transparency of your georectified map by double clicking and adjusting the transparency slider bar.  When finished, you should have something like this:

Screen Shot 2014-10-01 at 3.23.42 PM


Adding Data

There are a few ways to overlay data on to your map: adding points, assigning information to shapefiles that someone else created, or assigning information to shapefiles you create.  We’re going to walk through the first and last approaches here – for a refresher on the middle one go back to the choropleth map tutorial.

Adding Points

One way to get data on to your map is simply to upload a spreadsheet that contains some kind of non-geographic data paired with Lat/Long data.

You can use the dorm data linked in PA4, or create your own spreadsheet.  Save as a comma separated file – the file type should be .csv

(If you’re working on a mac, sometimes the .csv files don’t upload properly.  To fix the problem, save your file as “Windows Comma Separated”)

Screen Shot 2014-10-01 at 6.46.19 PM

In QGIS, go to Layer>Add Delimited Text Layer and select your file.

Screen Shot 2014-10-01 at 4.19.45 PM

Set X field to Longitude and Y field to Latitude.  If you don’t see those options in the drop-down menu, make sure that “Number of header lines to discard” is set to 0.

Click OK, and select the appropriate CRS.

Congrats, you’ve now put data on the map!

Double click on the layer name to play around with labels, colors, etc.

Adding polygons

But, say you wanted to do more than just put some points on a map.  Say you wanted to represent the percentage of African-American students in each dorm.  To do that, we need to create some shapes to fill with different colors.

To do that, you need to create a new shapefile layer.

Screen Shot 2014-10-01 at 2.46.07 PM

This is going to be a layer composed of polygons, so select polygon, make sure the CRS is set to WGS 84 and add whatever attributes you think are important.  In this case, you could either hand enter all of the data from the Dorm Data document, or create a linking category, that allows us to merge the dorm data table with our shapefile.  Let’s create a category called BLDGNUM and add it to the attributes list.

Screen Shot 2014-10-01 at 7.00.26 PM

Create a folder and name the shapefile something like dormdata.

Now we can start making some polygons.

Highlight the layer we’re going to be making.  Then right-click and toggle editing.

Now click on the add feature tool.

Screen Shot 2014-10-01 at 7.03.11 PM

Use this tool to define the corners of a shape.  So, for a dorm, click on all of the corners until the red area covers the shape you want.  Then move the cursor inside the red area and right-click.

You’ll be asked to enter information.  This is where we need to make sure that each building has the right code associated with it.  So we would open the dormdata .csv file, and when we traced Belk, for instance, we’d make sure that the BLDGNUM is 4.  Same for the others.  When you are finished making these shapes, toggle editing off.

Screen Shot 2014-10-01 at 7.06.44 PM

Once you’ve created all of the shapefiles for all of the dorms, you can merge data like we did with the U.S. unemployment data.