Browsing Category


Tutorial: using free software to map voter data

GIS, Tutorials By February 6, 2021 Tags: , No Comments

People sometimes ask me what software I use to make maps. For GIS stuff generally, I like to use QGIS, a free and open source program licensed under the GNU General Public License. I try to use GNU software whenever possible. In addition to being free of charge, I think the GNU movement is a force of good in the world of technology.

Most government and corporate GIS professionals use a commercial proprietary program called ArcGIS for their GIS needs. It is the industry standard in America and much of the rest of the developed world. ArcGIS is powerful, feature-rich, and perhaps a better GIS platform for beginners who hope to develop GIS skills they can use in a professional capacity. But it’s an expensive, proprietary product. Worse, ArcGIS runs only on Microsoft Windows, an operating system many (including myself) would prefer not to use.

ArcGIS is made by a California company called Esri. Esri holds the distinction of having developed the shapefile, a core component of GIS. You will come across Esri shapefiles virtually everywhere in your GIS adventures. We will be using Esri shapefiles in this tutorial, but we won’t be using Esri software.

Step One: Install QGIS

For this tutorial I will be using QGIS 3.10 on a MacBook Pro running macOS Sierra 10.12.6. The current version of QGIS is 3.16, but 3.10 is the newest version that will run on my (older) OS. You can find and download the right version of QGIS for your computer here. Once you’ve downloaded it, follow the installation instructions and install it. When you launch it for the first time, QGIS should open up looking something like this.


Step Two: Download the voter precincts shapefile from Pima County and open them in QGIS

Pima County has a geospatial data portal with lots of useful shapefiles. For this project, we’ll be using the “Voter Precincts” shapefile, which can be downloaded here.

Downloading the Voter Precincts shapefile on Pima County's geospatial data portal

Your download will come as a .zip file. When you unzip it, you should see six files with the following extensions: .cpg, .dbf, .prj, .shp, .shx, and .xml. These are the internal components that make up an ESRI shapefile. Don’t worry for now about what these individual files do. QGIS will handle them for you as a single document.

Double-click on the file “Districts_-_Voter_Precincts.shp.” This should cause QGIS to open the file, and should launch the QGIS application if it isn’t already up. You’ll probably get a dialog box asking you to pick a method of converting coordinates between coordinate reference system. The default selection here is fine. Just click OK at the bottom.

Now you should see your shapfile and its features in QGIS’s main window. If for some reason you don’t, try hitting the full zoom button on the toolbar or using <shift-command-F>.

Pima county voting precincts shapefile in QGIS.

This is a good time to start exploring QGIS’s interface and features. Play around with the map and software and try to get a feel for it. Hovering your mouse over any of the buttons will display a description of what that button does. Some important ones to know about:

QGIS "identify features" buttonIdentify features. This button turns your cursor into a selection tool that opens a window displaying the attribute information for whatever geographic feature you click on. It’s an essential tool for exploring shapefiles and the data they contain. Give it a try: just hover over one of the precincts on the map and click.


Pan map. You’ve probably seen this familiar “hand” tool on other programs. It does what you’d expect. Click and hold the button down, and the hand “grabs” the map and can then move it around. A useful navigation tool, especially when you’re zoomed in on something and want to look around without zooming out.

Zoom full. This button is especially useful when you’re lost. QGIS makes it easy to zoom in and out of maps (on a Mac you can do this with the two-finger scrolling motion), and sometimes you zoom so far in or out that you can’t see where you are anymore. Hitting this button should take your zoom level back to a full view of your map and center it in your screen.


Continue to part two


An interactive map of Arizona’s voting precincts

GIS By September 4, 2018 Tags: , , 2 Comments

Here is an interactive map that shows the geographic boundaries of Arizona’s 1,495 voting precincts. If you hover your mouse over a precinct, the map will also display the legislative district, congressional district, and county in which the precinct is located. The map is zoomable, and will zoom automatically if you click your mouse on a precinct,

Each county is responsible for naming its precincts, and different naming conventions are followed from one to the next. The precincts of Cochise, Coconino, Gila, and Maricopa counties have names as opposed to numbers, and do not have corresponding numbers. The counties of Pima and Yuma have only numbers, not names. The counties of Apache, Graham, La Paz, Mohave, Navajo, and Pinal all have both numbers and names.

My hope is this map might serve as a starting point for more interesting maps to come, such as choropleths that show partisan voter distribution, and vote results from past elections. You can view a choropleth map I made last year showing partisan advantage in Pima County’s voting precincts by clicking here.


Exploring Tucson’s neighborhood associations

GIS By August 3, 2017 Tags: , , No Comments

Here is an interactive Leaflet map showing Tucson’s 141 registered neighborhood associations, as indicated by shapefiles obtained from the Pima County GIS library. You should see individual neighborhoods highlight as you move your cursor around the map. If you click on one, the map should zoom to that neighborhood. You can also zoom with your mouse. If you hover your cursor over a neighborhood, the map will display the neighborhood’s name, ward, and other key details.


Homeowners receiving Arizona’s Historic Property Tax Reclassification in Pima County

GIS By February 20, 2017 Tags: , , , , 4 Comments

For its recipients, Arizona’s Historic Property Tax Reclassification is a pretty great deal. Homeowners who qualify get their assessment ratios slashed from 10% to 5%, cutting their property tax bills in half. This map shows the residential properties in Pima County that receive this benefit. If you zoom in and click on an individual parcel, the map should display that property’s street address and parcel number. For a re-sizable window in a separate tab, click here.

For more on what it takes to qualify for the Historic Property Tax Reclassification, and how to apply, click here.


Homeowners versus renters in Pima County

GIS By February 19, 2017 Tags: , , , 2 Comments

This map attempts to visualize Pima County’s respective distributions of residential property that is owner-occupied, and residential property that is not. The latter category consists almost entirely of rental property, but also includes a few other instances of non-owner-occupied property, such as vacation homes, certain group homes, and bed-and-breakfasts. It is represented in orange; the owner occupied property is represented in blue. To view this map in a separate, re-sizable window, click here.

Only residential property is represented on this map. Included in the white areas are public rights-of-way, government property, commercial property, agricultural property, and a number of other non-residential property types. This map distinguishes owner-occupied properties from other types based on their legal class, according to the Pima County Assessor’s records. For more information about legal classes, click here.


A closer look at the 2016 presidential election in Pima County

GIS By February 5, 2017 Tags: , , , , 3 Comments

This map shows each of Pima County’s 248 voting precincts with a shades of blue and red to indicate the respective degrees to which they favored the Democratic or Republican candidate, Hillary Clinton or Donald Trump. You can zoom in for a closer look, and click on any precinct for more detailed information. For a resizable version in a separate window, click here.

Although they were on the ballot, I chose to ignore vote totals for the Libertarian and Green party candidates for the purpose of this map. I also ignored write-in votes, over-voted, and under-voted ballots. None occurred in percentages that exceeded single digits, with the exception of Gary Johnson, who received 42 out of 412 votes—10.19% of the total—in precinct 114.


A GIS tour of Arizona’s golf courses

GIS By February 3, 2017 Tags: , , No Comments

This map shows Arizona’s 353 golf courses. (For a resizable version in a separate window, click here.) If you click on one of them, the map should display the course’s name, number of holes, whether it is public or private, and in some cases, what type of water source it uses. (The source file only contained this data for a limited number of courses.)

The GIS data shown here is provided by the Central Arizona Project, and was obtained via the AZGEO Clearinghouse, an great resource for GIS professionals and enthusiasts.