u/TotallyRandomDude9

Basic USA Map Geometry Suggestions
▲ 3 r/QGIS

Basic USA Map Geometry Suggestions

So, I'm new to GIS. I'm using QGIS, and I feel like while it's a powerful tool, the learning curve is such that using it for what I want is an order of magnitude harder than it needs to be.

What I'm trying to do is to create electoral maps of the USA and its states using the approximate scale of the Cook PVI rating formula. In this case, it's a map of the 2012 state by state "Trend" over 2008, colored with an extension of the PVI color coding scheme on the Cook PVI wiki page.

(Simple takeaway: Mormons liked Romney.)

I've got the functionality working. I just think the shape of the map itself is terrible, and I was hoping for some pointers on how to improve the look. I'd like it to look more like the Trend maps on Dave Leip's Election Atlas, although without the color scheme:

https://uselectionatlas.org/RESULTS/data.php?year=2012&def=tnd&datatype=national&f=0&off=0&elect=0

What I've done here is to take Natural Earth's 10m Admin 1 – States, Provinces shapefile:

https://www.naturalearthdata.com/downloads/10m-cultural-vectors/

Then I used the filter feature to limit it to the 51 features with the admin 'United States of America'. Then set the Layer CRS to EPSG: 4236.

Then I used the Processing Toolbox's Geometry by Expression feature to move and Alaska and Hawaii with the following expression and exported the results to GPKG file I used as the basis for the above map (translate arguments are degrees):

CASE

WHEN "postal" = 'AK' THEN scale(translate( $geometry,-73,-33),0.3,0.3)

WHEN "postal" = 'HI' THEN scale(translate( $geometry,48,7),1.2,1.2)

ELSE $geometry

END

My wishlist:

  • Better curvature, maybe more room for the legend in the bottom right.
  • Better proportions and placement on AK and HI.
  • MAYBE get rid of the itty bitty minor Hawaiian islands floating above AK?
  • I guess a little box on the side for DC would be nice, but I don't care.

I'm assuming however I tweak the feature geometry the same code will work for the Admin 1 - Counties map. (Excepting that I'll need to get rid of the internal AK borders for the reporting counties that are not there.)

Thanks for any help you can suggest.

u/TotallyRandomDude9 — 5 days ago