Browsing Articles Written by

Luke

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

Share:

Imagine your own Pima County property tax with this tax calculator

Property Tax By January 23, 2021 Tags: No Comments

Here is a calculator that computes a hypothetical annual tax levy based on Pima County’s current net assessed valuation of $9,140,425,898, and whatever tax rate you choose. Its default rate is 3.992 dollars per $100 of assessed value, which is the Pima County’s primary property tax rate for Fiscal Year 2020/21. Changing the number in the “Tax Rate” box will cause both the “Tax Levy” amount and the “Annual Tax on a $200K Home” amount to change.

This calculator may be useful to anyone interested in figuring out how much of a property tax increase it might take to yield a desired amount of revenue. For example: in order to produce about $50M in revenue at Pima County’s current net assessed valuation, a tax rate of about .5471 would be needed.

 

Share:

Steve Spain’s big primary win

Election Outcome Maps By August 17, 2020 Tags: , No Comments

Outcome of the 2020 Republican primary for Pima County Supervisor District OneAnother story and interactive map I created for the Sentinel, this time about the Republican primary in Pima County Supervisor District One. This is an open seat, but rookie candidate Steve Spain entered the race with the endorsement of Ally Miller, who held the seat for two terms and has a loyal following.

Spain came out on top in 43 of the district’s 58 precincts, and topped the overall vote by 8.6 percent. He will face Democrat Rex Scott in the general election on November 3.

Share:

District breakdown: Arizona’s Congressional District Two

Voter Registration Maps By February 5, 2020 Tags: , , , No Comments

Here is an interactive map showing the distribution of voters by political party in each of the 195 voting precincts that make up Arizona’s Congressional District Two (CD 2), currently held by Rep. Ann Kirkpatrick. According to data from the Pima and Cochise County Recorder’s Offices, 423,554 voters are presently registered in the district.

Democrats hold a voter registration advantage of about 2.4 percent in CD 2. Of its 423,554 voters, 142,640 are Republicans, or about 33.7 percent. 152,890 are Democrats, or about 36.1 percent. The remaining 128,024 voters, the vast majority of which do not state a party affiliation, make up about 30.2 percent.

Share:

Demystifying Pima County’s justice precincts

Voter Registration Maps By February 3, 2020 No Comments

I’ve been asked by a number of people where a good map of Pima County’s justice precincts can be found. These are the political districts that elect justices of the peace and constables. The county’s web-based GIS map viewer, PimaMaps, has a layer for this. But the information in it is sparse, and casual users may find PimaMaps difficult to navigate. So I made a map I hope folks will find more instructive and easier to use.

This is a color-coded “choropleth” map that uses shades of red and blue to indicate voter registration advantage in each precinct.  It is similar to maps I have recently made of Arizona’s congressional and legislative districts. If you hover your mouse over a precinct, the map will display the current justice of the peace and constable serving there, plus detailed information about voter registration in that precinct.

Share:

District breakdown: Pima County Supervisor District One

Voter Registration Maps By January 23, 2020 Tags: , No Comments

Here is an interactive map showing the distribution of voters by political party in each of the 58 voting precincts that make up Pima County’s Supervisor District One, currently held by Supervisor Ally Miller. According to the Pima County Recorder’s website, 143,593 voters are presently registered in the district. According to Pima County’s official election results, about 74 percent of District One voters voted in its last election in 2016, in which Miller, a Republican, defeated Democrat Brian Bickel by a margin of about 8.6 percent.

Republicans hold a voter registration advantage of about five percent in District One. Of its 143,593 voters, 53,975 are Republicans, or about 37.6 percent. 46,808 are Democrats, or about 32.6 percent. The remaining 41,590 voters, the vast majority of which do not state a party affiliation, make up about 29 percent.

Share:

Partisan advantage in Arizona’s legislative districts

Voter Registration Maps By January 21, 2020 Tags: , , No Comments

Here is an interactive map that shows the distribution of political party affiliations in Arizona’s 30 legislative districts. If you hover over a district, the map will display the district number, plus statistics about which voters live in that district. It also shows the current senators and representatives for each district. (Each has one senator and two reps.) You can zoom in on the map for greater detail.

This is a choropleth map, which is to say it uses differences in color to indicate a varying quantity. Democrat-leaning districts are shaded in blue according to their degree of advantage. Republican leaning districts, similarly, are shaded in red.

Republicans hold some degree of advantage in 18 of Arizona’s 30 districts. In these 18 districts, Republicans hold all but one senate seat. Democrat Sean Bowie is the senator for District 18, which leans Republican by 2.7 percent. Democrats hold four house seats in Republican leaning districts: LD 18’s Mitzi Epstein and Jennifer Jermaine,  and LD 16’s Kelli Butler and Aaron Lieberman.

Democrats hold some degree of advantage in 12 of the 30 districts. In these, all senate seats and all house seats are held by Democrats.

Share:

Partisan advantage in Maricopa County’s voting precincts

Voter Registration Maps By October 30, 2018 No Comments

Here is an interactive map that shows the distribution of political party affiliations in Maricopa County’s 748 voting precincts. If you hover your mouse over a county, the map will show that precinct’s name, the percentage it comprises of the Maricopa County electorate, and statistics about its voters and their party affiliations. You can zoom in on the map for greater detail.

The map also displays the city (or town), congressional district, and legislative district for each precinct.

Share:

Partisan advantage in Arizona’s counties

Voter Registration Maps By October 26, 2018 Tags: , No Comments

Here is an interactive map that shows the distribution of political party affiliations in Arizona’s 15 counties. If you hover over a county, the map will show that county’s name, the percentage it comprises of the statewide electorate, and statistics about its voters and their party affiliations. You can zoom in on the map for greater detail.

Republicans hold some degree of advantage in eight of the 15 counties. Of these, Yavapai and Mohave counties are the most heavily Republican. Apache and Santa Cruz counties are the most heavily Democratic.

About 75 percent of Arizona’s population lives in its two largest counties: Maricopa County makes up about 60 percent of the state’s population, and Pima County makes up about another 15 percent. Maricopa leans Republican by 5.14 percent. Pima leans Democrat by 8.39 percent.

The pie chart below shows the share each county makes up of the statewide electorate. If you hover over a slice, the chart will show you the county’s name, its number of registered voters, and its share as a percentage.

Share: