2008 Nationwide Precinct Map Project - (Mostly) Complete! (user search)
       |           

Welcome, Guest. Please login or register.
Did you miss your activation email?
April 28, 2024, 12:52:39 PM
News: Election Simulator 2.0 Released. Senate/Gubernatorial maps, proportional electoral votes, and more - Read more

  Talk Elections
  General Politics
  Political Geography & Demographics (Moderators: muon2, 100% pro-life no matter what)
  2008 Nationwide Precinct Map Project - (Mostly) Complete! (search mode)
Pages: [1] 2
Author Topic: 2008 Nationwide Precinct Map Project - (Mostly) Complete!  (Read 25916 times)
cinyc
Atlas Icon
*****
Posts: 12,719


« on: January 20, 2015, 08:11:57 PM »
« edited: January 21, 2015, 02:25:38 AM by cinyc »

Are you using the 2000 or 2010 voting district lines for your map?

What I can't figure out is what Dave Gardow uses as a voting district.  If Dave's lines are the same as the Census Bureau's VTDs, coming up with a nationwide map would be as simple as downloading the 2008 or 2010 (depending on which you are using) VTD shapefiles for each state, using MapWindowGIS or a similar mapping program to load all 50 states, and creating a map at whatever zoom level you want.  There might even be a way to do this using Google Maps online so that you could zoom in or out to your heart's content, though I don't have experience in using Google's online mapping app.  

Edited to add: Not all states have VTD shapefiles.  Dave Gardow uses something else in the states that don't have them.

VTDs don't directly match precinct lines, though, so if Dave is using VTDs, I don't know where he got the VTD-level data from.  (On the other hand, it's not necessarily easy to find population data for actual precincts, if he is using precinct maps, though I suppose it can be done through aggregating census blocks).

The Harvard Election Data Archive has aggregated precinct-level results for recent elections and put the spreadsheets online.  The problem, as always, is finding the corresponding precinct maps for each year when trying to map the data.  Harvard's archive has posted some state precinct shapefiles, but not all.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #1 on: January 21, 2015, 02:24:08 AM »
« Edited: January 21, 2015, 05:39:37 PM by cinyc »

Here's an example of what I can do with MapWindow GIS, the .csv files from Dave's Redistricting App, Excel, Open Office, and the shapefiles from the Census Bureau.  Below is a map of the block group level (CA only) and Voting District level (aka 2010 VTD) results in the Southwest.  For simplicity, I'll refer to these areas below as "precincts", but they really aren't the same thing in many states:



Light grey "precincts" cast no votes.  Dark grey "precincts" were ties.  Click on the image for a larger-sized map in our gallery.

No, I didn't individually paint the "precincts" - that would have taken forever, especially in California, where Dave Gardow's results are broken down by Block Group. MapWindow GIS did.

This is a work in progress.  I can add other states when I have time.  Dave's Redistricting App didn't have any election results for Oregon, so I can't add those - and whatever other states he is missing.   I can add whatever county or municipal lines you want, as long as there is a Census shapefile for it.  Census' municipal lines tend to be over-inclusive, though.

Also, since I started with California, the map's projection is based on California, which is fine for a Southwest map, but might make the East Coast look weird. I probably need to reproject the maps to center on Michigan, which seems to be industry standard.
 
Is this what you were looking for?
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #2 on: January 21, 2015, 08:48:03 AM »

That looks great cinyc! Awesome work! And I'm also glad that Homely posted his Albertan example, which is still one of the greatest pieces of mapwork on this site.

Just a quick question, cinyc - judging from how blue most of Utah is, and how red the North Coast of California is, and how blue the central part of California is - is the key correct?

You're right.  I used the Red Racing Horses key instead of the Atlas key.  I'll redo when I have time.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #3 on: January 21, 2015, 08:49:32 AM »

Why does Clark County have so many areas with no votes?

Military bases and mountains.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #4 on: January 21, 2015, 03:16:33 PM »
« Edited: January 21, 2015, 07:51:52 PM by cinyc »

You'll probably get a better map by removing precinct boundaries. At such a small scale, what purpose do they serve?

I would also recommend finding a feature set that includes coastlines so that you can run a clip on the precinct features. This should address the aesthetic concern that homely brought up on the first page.

Of course, to do this right, you'd need either a plotter or (better yet) one of those walls of seamless screens...

I have water features on in California and Utah, the only two states with significant water.  My California water shapefile doesn't include Lake Tahoe.  I must have left it out.  I put the precinct boundaries (but not colors) on top of the water because I think it looks better.  Of course, other people don't agree on that.

Unfortunately, I can't find a way to get rid of the boundaries with the version of MapWindow GIS I am using (an older one because newer versions don't support my color schemes).  Changing width to 0 does nothing.  Changing the lines to dotted is barely noticeable at this scale.  Edited to add: but putting the same shapefile on top of the other one with 100% transparency and line size 0 seems to work for some bizarre reason.  That's counterintuitive.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #5 on: January 21, 2015, 03:33:57 PM »
« Edited: January 21, 2015, 04:10:47 PM by cinyc »

Here are some problems I (thought) I'd run into with the GIS/CSV/shapefile route. The first one is what I already referenced: precinct boundary changes. I know that in my own home state, it's not uncommon for 10 counties to change their boundaries in a given year. Something like 20% of the counties in GA now have different precinct boundaries from 2008. Finding a shapefile for a particular state and at a particular moment in time is challenging; if you're picky, it very well may be impossible (unless they're buried somewhere in Census data). Now, accumulating 50 states' shapefiles down to the precinct-level/VTD for an exact year...unless there is already a national precinct shapefile out there that I'm not aware of, I don't see how it can be done.

Using VTDs and block groups instead of the precinct shapefiles has to be inexact.  I'm not sure how Gardow did it, unless there was some requirement by Census that result data be sent to it when creating VTDs.  I doubt it.

Quote
You must be logged in to read this quote.

The =sumif (or sumifs) function is your friend here.  Make a second sheet with the most descriptive column copied from the shapefile spreadsheets as the first column.  Then write =sumif (Sheet1!$A$2:$A$1000,$A2,Sheet1!C$2:C$1000) in cell B2, where Sheet1! $A$2 etc is the corresponding column for the descriptive data on the results page and $A$1000 is the assumed end of the data.  It's easier to create the function by mousing over the data you want than typing the numbers out, then putting the dollar signs in. C$2 etc is the column with the results data you want.  You can copy and paste this function in cells below and to the right of the cell due to the dollar signs.  It keeps the search area constant, changing only the results column when you paste in cell C2 and the lookup cell when you paste into B3, etc.  The =sumif function only works with results data that are numbers, not text.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #6 on: January 21, 2015, 05:11:31 PM »

Well this is just making me feel dumb, because I can't figure out neither the correct way to use the formula nor how it helps sort it all out. Tongue Comparing my 2012 shapefile data of Georgia alongside the exported data from DRA, however, already shows me that there's going to be problems: there are 105 fewer precincts as of 2012 when compared to DRA's data.

It works by only adding amounts from column C on the data spreadsheet if the GEOID on the shapefile spreadsheet equals the GEOID on the data spreasheet.  Here's an example from my AZ spreadsheet.  First, the data page from Dave Gardow's .csv file:



Next, worksheet from my shapefile spreadsheet with the =sumif function to sort.  I copied Column A directly from the AZ VTD shapefile spreadsheet.  Note the =sumif function in the box:



The data is properly sorted.  You can "prove" this by eyeballing the ultimate results on the map and making sure the precincts look like they are colored right.  For example, blue precincts in South Phoenix would tell you something's wrong.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #7 on: January 21, 2015, 05:41:24 PM »

I replaced the 2008 Southwestern US "precinct" map in the gallery with one that shows county lines instead of "precinct" boundaries and a correct key.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #8 on: January 22, 2015, 01:44:11 AM »

I've added the South Central States, plus Kansas and Missouri.  Here is the updated map (click for a larger view):



I changed the projection to Michigan since the last iteration.

Here is a somewhat closer-up map showing just the South Central states (again, click for a larger view):

Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #9 on: January 22, 2015, 02:36:20 PM »

Very nice! I'm going to get the hang of this sooner or later, but you very well may beat all of us to it. Tongue If possible, though, I'd like to get something functioning in an online, zoomable format.

If MapWindowGIS doesn't crash from having about 125 shapefiles open at once, when all states are added.  Otherwise, I'll have to piece together an image by regions.

I have no experience with Google Fusion tables.  So that's all on you.  I'll be able to send you the necessary shapefiles and spreadsheets when I'm done, though.

Obama didn't win ANY precincts in Jefferson City MO? For a central city - especially a state capital - that's humiliating.

That's not true.  These maps tend to overemphasize rural areas at the expense of urban areas.  You probably just can't see the VTDs Obama won in Jefferson City because they're too small.  See the blown-up map below.  Jefferson City is contained within the centered yellow shape, which straddles two counties (black lines):

Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #10 on: January 24, 2015, 02:02:34 AM »

Nationwide map (Click on image for larger view):



Three states are missing.  Dave's Redistricting App doesn't have data for Oregon or Montana.  I can't find the VTD shapefile for Kentucky.  Should I fill in those states with county data instead of leaving them blank?

I change the projection to Google Mercator, which doesn't bend as much.

Regional close-ups plus Alaska and Hawaii to come.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #11 on: January 24, 2015, 01:00:16 PM »

Three states are missing.  Dave's Redistricting App doesn't have data for Oregon or Montana.  I can't find the VTD shapefile for Kentucky.  Should I fill in those states with county data instead of leaving them blank?

Using a more neutral color (gray?) that doesn't attract the eye so much as white does might be best.

I'm not sure if MapWindowGIS is compatible with layer files (.lyr) or external map servers but ESRI has a few options of varying quality that might serve as a base map. If you were using Desktop 10 I'd recommend light gray canvas.

I don't think MapWindowGIS is compatible with .lyr files.  But I could always add a grey county map layer underneath the other shapefiles so that it shows up only where there is no data. 
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #12 on: January 24, 2015, 06:03:16 PM »

Regional closeups are below.  Since I started with California, I generally split the states along the border of Northern California stretched eastward.  I had to split the Southeast into Mid- and Deep South due to shapefile size.  As usual, click on the image for a larger view. Clockwise from the Northeast:

Northeast:


Mid-South:


Deep South:


South Central:


Southwest:


Northwest:


Upper Midwest:


Great Lakes:


I can zoom into any map level, so I can make maps of cities or metro areas by request.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #13 on: January 24, 2015, 06:28:51 PM »

Do you have a full size image of the map available for viewing/download? Like, zooming into metro areas within one image?

Not yet.  It's not even one shapefile for MapWindowGIS purposes.  The files are probably too large.  Adam Griffin and I are working it, though.

We're trying to upload the image to Google Maps, but are running into size limitations.  I was able to put Missouri online as a test here, but when I tried to put the Southwest region on the maps, things crashed.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #14 on: January 25, 2015, 12:41:21 AM »
« Edited: January 25, 2015, 12:46:27 AM by cinyc »

The bad news is that I haven't had any success in further combining the shapefiles, even when using a program to simplify the shapefiles.  Nor have I had success making even regional maps on Google Fusion.  Again, the files are probably too large.

The good news is that I was able to do is convert the regional shapefiles into 11 .kml files that can be viewed together or separately on Google Earth.  If I have set the Google Drive permissions right, they should be available for download here, if you're interested.  Please let me know if you can't download them.

There are 8 CONUS regional .kml files, plus one each for Alaska and Hawaii, and a US Water file to put on top if you don't like precincts bleeding into the ocean.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #15 on: January 25, 2015, 01:11:29 AM »

Finally, here are maps of the 2008 Presidential results in Alaska and Hawaii (Click on the picture for a larger view):

Alaska:


Hawaii:
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #16 on: January 27, 2015, 12:06:10 AM »
« Edited: January 28, 2015, 12:18:49 AM by cinyc »

I've put the maps onto Google Fusion Tables, using the Atlas Color Scheme.  Because of the limitations of Google's mapping software, they are really only good when zoomed in, to various levels depending on the size of the geography.   NYC and LA need to be fairly zoomed in; other areas not so much.  Unfortunately, I have to divide the maps into sections because the software really doesn't like it when you have more than 40,000 shapes.  Click on the name of the region below to get the regional map:

Northeast
Southeast
Great Lakes
Great Plains
West
Alaska & Hawaii

Because I went over 40,000 shapes in the West map, Seattle might not show up.  If it doesn't, you can click here for an alternative West Map that should include Seattle but doesn't have clickable percentage data.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #17 on: January 27, 2015, 12:58:13 AM »

Well this was interesting. I draw maps of neighborhoods in my area, and I try to show which candidate won each precinct - in addition to other features, such as roads, bike routes, major buildings, elevations, parks, etc. I have noticed that there's nowhere to find Kentucky precinct shapefiles, so I've had to use QGIS to create and edit my own shapefile. I just use a purple dotted line for the precinct lines.

Yeah, we couldn't find the Kentucky VTD lines, either.  Census used to have them (and Dave Bradlee included them in Dave's Redistricting App), but for some strange reason, Census' website doesn't have them any more.  Adam Griffin has a request into the relevant Kentucky authorities for the shapefile, which appear to be some state secret.  It's unclear whether they will provide us with it.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #18 on: January 27, 2015, 01:10:13 AM »

I know the Kentucky precinct lines have changed just since 2008. In my county, for example, they carved out a new precinct called Fort Thomas T, which is uninhabited. This was so the Democratic parts of the county could be linked along precinct lines, allowing the Republican parts of the county to poke up between them.

Precinct lines shift election to election, more in some states than others.  It's not clear to what extent the 2010 VTD lines were actually used in 2008 in any state.  I still don't know how the professors who aggregated the data used on Dave's Redistricting App and these maps did it.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #19 on: January 27, 2015, 01:56:26 PM »

Good news!  Adam Griffin successfully obtained the missing KY shapefile from the relevant KY authority.  So I can add KY to the maps.  Would you prefer I add KY to the Southeast regional Google Maps (where it probably belongs) or the Great Lakes map so that we can see the Cincinnati metro in full?

I shouid have new maps posted tonight.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #20 on: January 27, 2015, 05:07:30 PM »

Hello everyone, new forum user here, I write occasionally for the Daily Kos Elections front page.

Do any of you happen to have or know where I might find 2012 precinct boundary shapefiles for Colorado, Illinois, Maryland, Missouri, New York, Ohio, and Washington state (preferably statewide but select counties help too)? I'm working on a project for DKE and some of these shapefiles have been impossible to track down or county clerks want to charge and arm and a leg for them. Thanks

Also on this thread's subject topic, a long while back I made a simple cut and paste map of all 48 states plus DC where DRA has 2008 presidential data. It doesn't look as good as a GIS-rendered map of course, but it uses the old-DRA color scheme and was 10,000px wide (zoom level Cool. Maybe Miles will post it for me since the Atlas won't let me include linked images yet.

Did you try the Harvard Election Data Archive or Aaron Strauss' Github page?  They might have what you're looking for. 
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #21 on: January 27, 2015, 05:48:04 PM »

Yes, the Harvard archive appeared to be almost all pre-2012 maps while Strauss' collection, while helpful, is missing the remaining states I need (and his MD file had issues when I tried to use it).

There is a little Colorado data on the Open Colorado website - just Denver, Boulder and Gilpin Counties.

You might be able to ask WNYC radio where they got their NYC shapefiles.  They have been putting real-time NYC precinct-level results up on election night.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #22 on: January 27, 2015, 11:49:12 PM »
« Edited: January 28, 2015, 12:18:05 AM by cinyc »

Here are revised images with Kentucky (Click on the image for a larger view):

Nationwide:


Mid-South:


Mid-South couldn't be hosted in our gallery because the picture size is too large.

Here is a link to the new Southeast Google Fusion Tables Map, which includes Kentucky:
Southeast

I am also going to make the shapefiles available for those who want to download them and use a GIS program to view later tonight or tomorrow.  I'm not sure if we can include Kentucky in the download for legal reasons, though.  Adam Griffin has asked for clarification.
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #23 on: January 28, 2015, 02:22:25 AM »
« Edited: April 09, 2015, 07:35:50 PM by cinyc »

I uploaded the relevant shapefiles here, if anyone is interested.  PM me if you need specific info on how to use them in MapWindow GIS.  I use MapWindow GIS 4.7.5, an older version, because later versions don't support saved color schemes. 

Edited to add: I've updated the download link because of an issue with the PCT McCain and PCT Obama data in some Western states.  If you've downloaded this before, that data issue has been fixed in the new zip file.

I've also been able to make a nationwide map using Google Fusion Tables.  That is available here:
Nationwide
Logged
cinyc
Atlas Icon
*****
Posts: 12,719


« Reply #24 on: January 29, 2015, 05:22:19 PM »

It looks like we've been affected by some major sea level rise here in Coastal VA/NC. Tongue  I'm wondering if there is an issue with the coastal shapefiles.

anyway, great work. That website will be very useful.

The water shapefiles are directly from the Census Bureau' s 2009 shapefiles for coastal counties and counties with significant lakes and rivers, filtered to remove smaller water features.  Areas like the Florida Keys and Cape Hatteras don't show up on the regional maps because the islands themselves are too small to show up on the large maps.  They appear on MapWindow GIS when properly zoomed in.
 
I'm not sure if Census considers swamps as water features, which might explain why parts of Louisiana and North Carolina get swamped in Light Cyan.
Logged
Pages: [1] 2  
Jump to:  


Login with username, password and session length

Terms of Service - DMCA Agent and Policy - Privacy Policy and Cookies

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Page created in 0.105 seconds with 12 queries.