<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Mapbox on Tony McGovern. Hacker. Artist. Storyteller. Data lover.</title>
    <link>/categories/mapbox/index.xml</link>
    <description>Recent content in Mapbox on Tony McGovern. Hacker. Artist. Storyteller. Data lover.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <atom:link href="/categories/mapbox/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Map of Wisconsin midterm election results for 2018</title>
      <link>/blog/wisconsin_midterms_shapefile/</link>
      <pubDate>Wed, 12 Dec 2018 00:00:00 +0000</pubDate>
      
      <guid>/blog/wisconsin_midterms_shapefile/</guid>
      <description>

&lt;h2 id=&#34;wisconsin-midterm-election-results-for-2018&#34;&gt;Wisconsin Midterm Election Results for 2018&lt;/h2&gt;

&lt;p&gt;When voters in the state of Wisconsin cast ballots for national and state elections, they do so at the &amp;ldquo;ward&amp;rdquo;-level, an administrative boundary created to conduct elections. Yet when it comes to tabulating and reporting election results, Wisconsin officials combine wards into &amp;ldquo;reporting units&amp;rdquo;, larger administrative boundaries comprised of one or more wards. But there is no authoritative body that produces shapefiles for these reporting unit boundaries, leaving analysts, journalists, and the public little opportunity to visualize Wisconsin election results in any meaningful way.&lt;/p&gt;

&lt;p&gt;For the 2018 midterm elections, John Johnson, Research Fellow at the Marquette Law School, filled in that gap and created a &lt;a href=&#34;https://johndjohnson.info/2018/12/10/a-shapefile-of-wisconsin-november-2018-reporting-units/&#34;&gt;shapefile that provides high-quality, consistent boundaries and election results for Wisconsin&lt;/a&gt;. Expanding on his work, I used his shapefile &amp;ndash; which also contains election data &amp;ndash; and visualized the results.
&lt;img src=&#34;../../img/main/Wisconsin_2018_Midterms.gif&#34; alt=&#34;Wisconsin Midterm Results&#34; /&gt;&lt;/p&gt;

&lt;p&gt;I created the map in Power BI using the Mapbox Visual. I converted the shapefile to geojson with &lt;a href=&#34;https://mapshaper.org/&#34;&gt;mapshaper&lt;/a&gt; and simplified its features using &lt;a href=&#34;https://github.com/mbloch/mapshaper/wiki/Command-Reference&#34;&gt;mapshaper&amp;rsquo;s command line tools&lt;/a&gt;. I applied the Visvalingam simplification method through the following statement:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;-simplify 10%
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I converted the geojson into a tileset using &lt;a href=&#34;https://www.mapbox.com/studio/tilesets/&#34;&gt;Mapbox Studio&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>