24
Drew University Spatial Data Center Geographic Information Systems Tutorials Drew University Spatial Data Center 1 Brief Introduction to Analyzing the EPA’s Toxic Release Inventory (TRI) Using Quantum GIS Contents Tutorial 1: Finding and Displaying TRI Spatial Data Using Quantum GIS ................................................................... 2 Tutorial 2: Query and Select TRI Spatial Data to Study State-Wide Emissions Quantum GIS ...................... 10 Tutorial 3: Spatial Joins Quantum GIS ................................................................................................................................ 22

Tutorial 3: Spatial Joins – Quantum GIS

Embed Size (px)

Citation preview

Page 1: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 1

Brief Introduction to Analyzing the EPA’s Toxic Release Inventory (TRI) Using Quantum GIS

Contents Tutorial 1: Finding and Displaying TRI Spatial Data Using Quantum GIS ................................................................... 2 Tutorial 2: Query and Select TRI Spatial Data to Study State-Wide Emissions – Quantum GIS ...................... 10 Tutorial 3: Spatial Joins – Quantum GIS ................................................................................................................................ 22

Page 2: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 2

Tutorial 1: Finding and Displaying TRI Spatial Data Using Quantum GIS

This tutorial will introduce you to the following:

Websites where you may search for TRI Data

Identifying spatial data, usable in a GIS

How to download and unzip shapefiles

Adding data to Quantum GIS

Adding basemaps to Quantum GIS

Working with Map Elements in the Print Composer

Saving and exporting your map

Part 1. Browsing for Geospatial Information Geospatial data are becoming ubiquitous. There are many free and good quality data sources that you can begin studying to find spatial data for analysis. The EPA’s Toxic Release Inventory is no exception. From mobiles sites, to web-based queries, to stand-alone software, TRI data may be identified and extracted from several different sources.

Types of Query Systems and Web Access to Toxic Release Inventory (TRI) Data Mobile Tools: myRTK - http://myrtk.epa.gov/info/ Web Browser Mapping Access: TOXMAP - http://toxmap.nlm.nih.gov Web Browser Query Systems: Envirofacts - http://www.epa.gov/envirofw/ TRI Explorer P2 Search Tool Downloadable Software: TRI.NET RSEI TRI-CHIP Raw Data Downloads: Basic Data Files Basic Data Plus Files

The list above, though helpful, is not an exhaustive list. Many other EPA databases, web query tools, and downloadable software packages allow users access to TRI data in conjunction with other datasets. These particular links focus on TRI data as the main dataset. myRTK is the new mobile software that allows users to query TRI sites and study information about the facilities and TRI chemical releases on web-enabled cell phones or tablets. TOXMAP, housed by the National Library of Medicine, allows users to query a map-based website to learn more about TRI releases and changes in the releases. Envirofacts is the main web-based query tool that enables users to query and download TRI data, based on a series of criteria (e.g. year of release, location of releases, type of industry, etc.). Related to Envirofacts, TRI Explorer and the P2 Search tool allow users to examine TRI releases, as well as industry approaches for reducing hazardous chemical emissions.

Page 3: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 3

TRI.NET, RSEI, and TRI-CHIP allow you to download, install, and run software on your computer that gives you substantial flexibility in setting up TRI-based queries and data exports. RSEI, for Risk Screening Environmental Indicators, generates a measure to compare TRI chemical releases and the potential impact of the releases on human health. TRI-CHIP links TRI data with several additional datasets to help users understand the thresholds and limits of TRI chemical releases on health outcomes. Last, the basic data files and basic data plus files contain the full, unfiltered TRI datasets, since the program began. Data are downloadable by year. For mapping, TRI data are also available in formats viewable through a variety of mapping software, such as ArcGIS and Google Earth. Almost all TRI websites and software listed above also have a mapping component, where you can view the specific locations of TRI releases.

Part 2. Identifying Spatial Data Which of the above data sources have spatial data that can be used in a GIS? The answer is all of them. Any dataset created with addresses or geocodes (such as city, state, or latitude and longitude) can be mapped in a GIS. However, converting data from tables or aspatial databases into a mappable GIS format often takes a few steps, which will be discussed in subsequent tutorials. A good place to start, when first working with GIS, is with spatial data that is ready for GIS analysis. Vector data layers are a common GIS data type that stores geometries, or points, lines, and polygons (think cities, roads, and country boundaries) that are spatially referenced (drawn on a spatial coordinate system, like the x and y of longitude and latitude). Vector data are available directly from Envirofacts (http://www.epa.gov/enviro/geo_data.html) and TOXMAP (http://toxmap.nlm.nih.gov/toxmap/facilities/download.do). The data accessible from Envirofacts include the entire EPA facility registry system (FRS), or all the facilities regulated by several EPA programs. The TOXMAP data include only TRI regulated facilities, so this tutorial begins with this site. Open a web browser and navigate to the TOXMAP Downloads site listed above. Part 3. Downloading and Unzipping Shapefiles You have some choices for downloading TRI data from TOXMAP. You can use the web application to select up to 500 search results. Or, you can download all the facilities and release data, or an ESRI shapefile of TRI Facilities. Click to download both the facilities data and the ESRI shapefile for the entire TOXMAP TRI data set. A shapefile is a common spatial data file type that is basically ready to go, once you open it in your GIS software (ArcGIS or QGIS). Make sure that you are saving the file in a location where you can remember. The default location for many web browsers is the Downloads folder. You can also right-click the links, and select “save link as..,” to navigate to a particular location on your computer where you would like to save your file. In the Save As box, you can choose to store data in your Documents folder for example (if you’re using a Windows computer). In this dialog box, you can also click the New Folder button to create a new folder in your Documents to save your GIS files. However you manage your data, note that you will need to find these saved files again later.

Shapefiles are geographic data that are in vector format. Again, they can include basic geometric elements: points, lines, and polygons. All shapefiles are bundled with at least two other file types: .dbf and .shx. The database (.dbf) file contains records and information on each piece of geographic data stored in the shapefile. For example, if the shapefile contains points, geographically referenced, then the database file will contain information about those points, such as the name of the city, maybe the city population, or in the case of the TRI data, the points contain information about each facility, its address, the name of the facility, and so on. The other file is called a .shx file. This file indexes the shapefile with the database file. After you have downloaded the shapefile (called “shapefile”) and the facilities data (called “facilities), you will need to unzip or extract them. Looking in Windows Explorer, or with your web browser’s downloaded files menu, find the files that you downloaded. Right-click shapefile and select to extract it, or “extract all.” Once you’ve extracted it, you will see that the one file you downloaded, actually contains multiple files, some of which were discussed above (see an image of the extracted shapefile below). Once you’ve extract the shapefile folder, also extract the facilities folder.

Page 4: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 4

Now you are ready to look at your data on a map. Part 4. Adding Data to Quantum GIS If you haven’t already, make sure that Quantum GIS is installed on your computer (visit qgis.org to download the software). Navigate to the program and open it. The left side of the screen contains an area called layers, where your data layers will be listed. The right-side of the screen contains the map view, where you can visualize the spatial data. Above and below are various menus and commands for viewing and analyzing spatial data. To add the TOXMAP shapefile that you downloaded, select Layer (from the top menu) > Add vector layer … (you will notice that a button to the left does the same thing).

Page 5: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 5

In the vector layer box, click Browse, and navigate to where you saved the TOXMAP shapefile, previously downloaded. The file that

you want to add is in the “shapefile” folder and it’s called facilities_all.shp, which is a SHP file (not the XML file, though the name is

the same). The source should look something like this:

The map should initially look like the image below. These are all the TRI regulated facilities contained on the TOXMAP website.

Part 5. Adding a Basemap to Quantum GIS A basemap helps provide a context to the point, line, and polygon layers that you might add to your map. The basemap may be a satellite image of earth’s surface, or a road map, for reference. For this example, since vector layers were introduced last, the

Page 6: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 6

following steps introduce raster data. Raster data is the other common spatial data type. Unlike the geometry of the vector data, raster data contain grids of data. Like the common storage method for digital photography, raster data contain rows and columns of individual grid cells or pixels. One numerical value is stored in each pixel. The data may be a visual metric, such as the color of the grid cell, or it may be another type of measurement, such as the estimated temperature or elevation of the grid cell area. A wonderful resource for gridded data is NASA’s Earth Observation website: http://neo.sci.gsfc.nasa.gov/. Navigate to this website and select the top link to “Land” data. Scroll down and find the link to “Blue Marble: Next Generation” data, click on the link. In the Downloads menu, change the File Type to GeoTIFF, and right-click on 0.1 degrees, 3600 x 1000 to save the link to an appropriate location on your computer.

Back in Quantum GIS, start a new project by selecting Project > New (discard the map with the TRI data points). Before you add data to this project, save the project with an appropriate name (e.g. Tutorial 1) in an appropriate place (e.g. GIS_Tutorials folder, or wherever you have stored your data). Now, to add a base map, select Layer > Add raster layer… and navigate to the location where your NASA Blue Marble GeoTIFF file is saved. Your map view should now display the blue marble data. Next, add the EPA TRI locations on top of the blue marble display. As before, select Layer > Add vector layer … and choose the facilities_all.shp file. If you have worked with maps on the web before, a number of the tools to zoom and pan should be familiar to you.

To zoom in to a particular region, click on the magnifying glass with the plus button, and with the mouse, click and hold the mouse button just to the northwest of Washington state, and drag a rectangle to extend to the southeast corner of Florida, so that even Maine is included in the rectangle. When you release the mouse, the map will zoom into the area of the rectangle that you drew.

Page 7: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 7

Now that you have 1) a vector layer (shape file), and 2) a raster layer (an image file), you may begin editing the layout and map

elements of your map.

Part 5. Working with Map Elements in the Layout View

Before you begin, save your project again (Project > Save). To begin editing your map in the print composer, select Project > New

Print Composer. Create a title, such as “EPA Toxic Release Inventory (TRI) Sites,” and click OK. A new window with an empty

view opens. In this view, you may prepare your map to be printed or exported. To add your map to the view, select Layout, Add

Map. Click and hold the mouse from the upper left corner to the lower right corner, thereby drawing a rectangle that covers the page.

When you release the mouse, your map should now appear on the page.

By either selecting Layout > Add Label, or by clicking the Add Label button, click on the map, toward the top. A tiny textbox that

says QGIS appears. On the right of the screen in Item Properties, you can edit the label. Change the text to an appropriate title, such

as “EPA Toxic Release Inventory (TRI) Locations” and change the font to an appropriate size. You will need to manually resize the

box that text is typed into, just drag a corner of the label box to expand the size of it.

To add other map elements, select layout, then choose whatever elements you need: label, legend, arrow, or scale bar, for example.

Add each of these to your map (select the map element, then click on where the element should appear on the map – edit the element

in the menu boxes on the right). For another label, add your name, the date, and the data source that you used. All of the elements

may be modified once you’ve created them. To delete any map element, just select it and push delete on your keyboard. To modify a

map element, click it and edit the menus on the right-side of the screen. In the Item Properties menu, you can change the style and

color of each elements.

Page 8: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 8

Part 6. Saving and Exporting Your Map

Once you have added the map elements, and are satisfied with your map, you should save it. Click Composer > Save Project.

Quantum GIS automatically saves maps in .qgis format. This format stores the arrangement of your map only. If you send your .qgis

file to another person, they will not be able to view it, because they will not have the data that you used, only the arrangement of the

data. To share your map image, it’s easiest to export it.

To export your map, select Composer > Export as image…

Choose a name for your map, then in the drop down menu, select to export the map in .JPG format. This is a file format everyone

with a computer can easily read; it’s also good for transferring information over the web.

To review, in this tutorial you’ve downloaded and unzipped spatial data (both raster and vector data types). You’ve also added spatial

data to a GIS, modified the display of the data, and saved and exported the data display. Good work!

If you stick with the subsequent tutorials, what you will find is that you will be able to create customized maps and spatial data

analysis far beyond the scope of existing web applications and software. You can add your own knowledge, interests and experience

to the study of the EPA’s Toxic Release Inventory.

Page 9: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 9

Here is my example:

Page 10: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 10

Tutorial 2: Query and Select TRI Spatial Data to Study State-Wide Emissions – Quantum GIS

This tutorial will introduce you to the following:

Identifying Attribute Data Sources – Toxic Release Inventory (TRI) facilities and New Jersey County boundaries Adding Spatial References to Vector Data Layers Convert Text or Spreadsheet Data Files to Spatial Data Points Using the Clip Tool – narrowing down national data to data for one state – New Jersey Creating New Fields Querying and Selecting Data Generating New Data Sets from Existing Data Sets

Part 1. Identifying Attribute Data Sources This tutorial will expand on the analysis of data used in the previous tutorial: the Toxic Release Inventory (TRI) data set. To begin, download and unzip the facilities data, listed in the Toxic Release Inventory from TOXMAP: http://toxmap.nlm.nih.gov/toxmap/download/facilities.zip . In addition to this data, this tutorial focuses on the analysis of TRI releases in New Jersey. For data on New Jersey county boundaries, visit the US Census website: http://www.census.gov/geo/maps-data/data/cbf/cbf_counties.html. Choose the Census 2000 tab, and select to download New Jersey data (at this point, if you prefer to study a different state, go ahead and pick a different state). As with the TRI data, save the New Jersey data to a known location on your computer. Once you finish downloading state boundary data, unzip the compressed file (right-click or double click the file, and select extract all). Part 2. Add Spatial References to Vector Data Layers Open Quantum GIS. Using Layer > Add vector layer … browse to the state boundary folder (for NJ 2000 bounds, the title is co34.d00), and select the shapefile (.SHP). When you add the data, you will be asked to select a spatial reference for the data set. You may use any reference, but I recommend, for this exercise, using the World Geodetic System 1984. WGS 1984 is a good choice for working with, because many other data source (like NASA) and applications (like Google Earth) use this coordinate reference system. Type in WGS 84 into the filter, and pick the top WGS, EPSG: 4326 reference. Then, click OK. A map of the county boundaries should then appear in your map view.

Page 11: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 11

Part 3. Convert Text or Spreadsheet Data Files to Spatial Data Points Next, click Layer > Add delimited text layer, browse to the facilities folder and facilities.txt file (downloaded from TOXMAP). The facilities.txt folder contains data on each facility in the Toxic Release Inventory (TRI). In the “Create a Layer from a Delimited Text File” dialog box, select CSV for the File format. Also, for Geometry definition, select “Point Coordinates,” and choose LONGD for the X field, and LATD for the Y field. Check the box the Use spatial index. An image of the box is shown below. Click OK.

There are some errors in the formatting of a few of the data records, of which Quantum GIS notifies you. Close the error box. Next, you will be asked to specify the coordinate reference system. Choose WGS 84 from the “recently used coordinate reference systems” box, and click OK.

Save your work before continuing. Part 3. Clip Data Tool Often when working with large data sets, you will want to narrow down the information that you are analyzing. One way to do this is to use the map tools. For example, instead of working with the TRI facilities for the entire US, you may want to work with only facilities that are located in New Jersey. There are several correct ways to do this, but one way is to use the clip tool. To clip data (like a cookie cutter from a sheet of cookie dough), select Vector (from the top tool menu) > Geoprocessing Tools > Clip. Fill out the dialog box as follows (see image below). This will clip away all facilities that are not located in New Jersey. Make sure that you change the Output shapefile to a location that you can find again. Then, click OK. Choose to add the new layer to the TOC.

Page 12: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 12

Before the layer is added, you will be asked to set the coordinate reference again. Again, use WGS 84. Close the Clip box (it will not close automatically). In the layers menu, you can uncheck the box next to facilities, to reveal the new shapefile that you just created. This shapefile should contain only points that are bounded by the state that you chose.

Already you can begin answering some more complex questions with the analysis that you have done. For example, how many EPA regulated facilities are there in the United States (find the layer that you need, e.g. facilities, right-click on it in the table of contents, and select Open Attribute Table – the total number should be reported at the top of the table)? How many of them are in New Jersey (hint: open the attribute table for the New Jersey TRI shapefile)? With that information, you can find out what percentage of all EPA regulated facilities are located in New Jersey. After you compare New Jersey and national totals, you can either remove or uncheck the layer with the national TRI locations.

Page 13: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 13

Part 4. Creating New Fields, Selecting Data and Analyzing Data Using Queries Existing in the facilities data set are reports of lbs. of toxic releases for each facility, by year, from 1988-2011. But, suppose you would like to find out changes in emissions, over a decade, say from 2000 to 2010, for facilities in New Jersey. You can do that. The following steps will guide you through one way of finding that information.

Step 1. Creating New Fields To create a new field, which will contain information on changes in lbs. of releases from 2000 to 2010, first open the attribute table for TRI facilities in New Jersey (right-click on the layer in the table of contents and select Open Attribute Table, make sure that you are using the New Jersey selection, instead of all national data). In the top-left corner of the table view (shown in the image below), click the first button – Toggle Editing Mode – to start editing.

In the attribute table, the last button on the tool bar allows you to open a field calculator. Press this button. The Field Calculator uses SQL (structured query language) to generate the values for new attributes. Check the box to “Create a new field.” Choose an Output field name, like TOT_CH (for total change). Change the Output field type to Decimal number (real), and Output field width to 10 and precision to 0. Double click on existing fields in the “Fields and Values” Function List, and they will appear in the box below, which defines the new change field that you created. Change is calculated as “TOT_2010” – “TOT_2000” . This will mean that the new value will be positive if toxic releases have increased in that decade, and negative, if they have decreased (see dialog box, below). Click OK.

Page 14: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 14

To see the new field that you generated, scroll all the way to the right in the attributes table. There you will find TOT_CH. Close the attributes table. From the top tool menu, choose Vector > Analysis Tool s > Basic Statistics. Scroll to the bottom of the Target field to find TOT_CH, and click OK (box shown below). This will give you a statistical summary of the field that you made. From the statistical summary, the mean suggests that the total releases have declined for these toxic release facilities. However, there is a catch to working with this data. If you carefully examine the tables, the total releases for many facilities over different years is reported as -1. How can this be? Well, what this really means is that the data are missing or not reported. This could happen when facilities previously reported releases, but no longer have releases to report. Or, where newer companies did not have any releases for previous years in the data set. To make the information that we calculated becomes meaningful, we need to exclude records where the information was missing for either 2000 or 2010. Again, SQL will come in handy. Go ahead and close the basic statistics dialog box.

Page 15: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 15

Step 2. Selecting Data Using Queries

To select records, which were not missing for the years 2000 and 2010, reopen the New Jersey TRI attribute table. The fourth button showing an epsilon and a yellow rectangle lets you set up an expression to select data. Click this button. Fill out the “Select by Expression” dialog box as follows (image below), so that "TOT_2000" > 0 AND "TOT_2010" > 0. Then, click Select.

Page 16: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 16

Close the “Select By Expression” dialog box. Now, only 202 of the original 1530 facilities were selected. Click the second button on the left to save edits. Then click the first button to toggle off editing. Close the attributes table. The selected facilities will be highlighted yellow. Recalculate the basic statistics (Vector > Analysis Tools > Basic Statistics, and change the Target field to TOT_CH).

Interestingly, when examining only the facilities that reported releases in 2000 and 2010, the average facility emissions (shown as Mean), declined during this period, more than calculated previously. Close the Basic statistics box.

Step 3. Analyzing Selected Data From the New Jersey TRI layer, it is possible to make and save a new layer with only the 202 records that had positive releases for both 2000 and 2010. To do this, right-click on the New Jersey TRI layer, and select “Save selection as....” Save the file with a new name and in location that you can remember. Select the box to “Add saved file to map.”

Page 17: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 17

Up to this point, you have conducted some great analysis. Now, the hard part, taking the information that you have created and conveying it in a map. Give it your best try! The following steps are suggestions for visualizing the data, so please feel free to choose your own colors and map design along the way. Part 5. Visualizing Spatial Data Before I begin working on the data visualization, I often think about what I would like the map to look like. With this particular dataset, I would like to call attention to the facilities with the biggest changes: the largest increases and decreases in emissions. I also want to clearly distinguish between increases and decreases, using different colors. To begin, I created two new selections of the New Jersey TRI data – one with TRI increases and one with TRI decreases. Then, I classified the data with different colors and symbols for each selection. The following steps illustrate the process that I used and the outcome of that process. Step 1. Create Two TRI Selections

Page 18: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 18

To separate increases and decreases, I opened attributes table for the NJ TRI 2000-2010 dataset that I created. Then, I select the records where TOT_CH > 0 (using the same selection methods described earlier in this document). Again, right-clicking my data layer, I saved the selection as TRI Increases. I used similar steps to create a data layer with TRI Decreases. Step 2. Change the Symbology for Each Selection By double clicking the data layer for increases, I opened the Layer Properties menu. In this menu, it is possible to change the symbology. On the left-side of the menu, select Style. The dialog box for the style that I used is shown below. There are many options for displaying spatial data. I chose to create graduated symbols for the TOT_CH variable (column). I changed the classes to 3 and the Mode to Natural Breaks (Jenks). To update changes in the mode or classes, click Classify at the bottom of the menu. I selected the colors for each group, and I changed the symbol size by double-clicking on the symbol (circle) next to each value range, keeping the first one at 1, changing the second on to 8, and the third to 15. I also adjusted the layer transparency to 30.

The results were as follows.

Page 19: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 19

I classified the TRI decreases with the same technique.

Page 20: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 20

Then, following the steps introduced in Tutorial 1, I created a new print composer document to display the changes in TRI emission for the state of New Jersey. After adding the map, a title, legend, and data credits, I also edited and updated the layer names and the labels for the symbols. The results are below. Remember, cartography is an art, so consider making the presentation of the toxic release data that works best for you. Also, consider how your audience might interpret your map. I hope that viewing the map below would lead the reader to understand that between 2000 and 2010, many facilities experienced decreases in emissions. A few facilities experienced very large increases in emission and a few experienced very large decreases in the pounds of emission released. There are many other issues not discussed here too – what information do you want to portray in your presentation? Have fun experimenting with the options.

As a personal preference, I really like the red and green colors used here, because red or orange works nicely for a hazard symbol, and I associate greens with a more positive environmental influence (e.g. declines in TRI emissions). However, this map is terrible for someone who is red-green color blind. I also created a blue-orange map, shown below. I could choose other colors as well. Again, it’s always important to consider your audience, and you can adapt the symbols and colors of your maps to help do this.

Page 21: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 21

Page 22: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 22

Tutorial 3: Spatial Joins – Quantum GIS

This tutorial will introduce you to the following:

Spatial Joins – Summarizing and Generalizing Point Data Influencing Visual Presentation of Data Using Different Classification Schemes Trying it on your own!

This tutorial expands on work done in Tutorial 2. Open your Quantum GIS project from Tutorial 2, and continue learning GIS, by working with spatial joins in the following steps. Part 1. Spatial Joins Spatial joins combine information based on the location of two data layers. A common use for spatial joins is to summarize information at a different scale. For example, we have data on TRI releases between 2000 and 2010 for point locations in New Jersey. It might be useful to know the total change in emissions for each county as a whole. A spatial join will help us find this information. To create a spatial join between TRI facilities that have changed in the last decade and New Jersey counties, select Vector (from the top menu) > Data Management Tools > Join attributes by location. Follow the dialog box below, selecting NJ county boundaries as the target vector (it may still be called co_xxx.shp, from last tutorial, but it should be the file that contains counties), and the join vector layer as the state TRI facilities, selected for non-negative toxic release emissions. Summarize the intersecting features using Sum. This will total the total emissions from the facilities for the entire county. Save the output with a name and location that you can remember, and click OK.

Agree to add the new layer to the table of contents, and WGS 84 as the coordinate reference system. Close the “join attributes” dialog box. Then, double click the new layer to change the layer properties.

Page 23: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 23

Part 2. Influencing Visual Presentation of Data Using Different Classification Schemes In the last tutorial, we discussed different visualization techniques for the point data symbols. The following dialog box illustrates a way to visualize the counties, using graduated colors, and the new data obtained from the spatial join.

In this example, graduated symbols were chosen to display the SUMTOT_CH variable, which takes the decade change from 2000-2010 in toxic release emissions, and totals them for each county. Again, negative values indicate an overall decline in emissions for that county. Positive emissions indicate an overall increase in emissions. Classes were changed to 5 and the mode was changed to Natural Breaks (Jenks). The color scheme chosen uses grays (press the “Classify” button to view changes). Then, click OK. What you have created is a thematic map of toxic release emissions, by county, for New Jersey. The spatial join allowed you to summarize point data information from facilities for each county. By updating the legend and map items in the print composer used in Tutorial 2, a new thematic map for TRI releases can be created that includes summary information about releases in each county (see image below).

Page 24: Tutorial 3: Spatial Joins – Quantum GIS

Drew University – Spatial Data Center Geographic Information Systems Tutorials

Drew University – Spatial Data Center 24