{"id":1024331,"date":"2020-10-05T09:00:07","date_gmt":"2020-10-05T16:00:07","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=1024331"},"modified":"2020-10-02T17:35:07","modified_gmt":"2020-10-03T00:35:07","slug":"visualize-electoral-swing-using-composite-symbols","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols","title":{"rendered":"Visualize electoral swing using composite symbols"},"author":6561,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[22941],"tags":[26451,717771,30111,29481],"industry":[],"product":[36831,36601],"class_list":["post-1024331","blog","type-blog","status-publish","format-standard","hentry","category-mapping","tag-cartography","tag-cim","tag-data-visualization","tag-elections","product-js-api-arcgis","product-developers"],"acf":{"short_description":"Use dynamic, scalable, composite symbols to map electoral swing in the next election.","flexible_content":[{"acf_fc_layout":"content","content":"<p>The U.S. presidential election is only one month away, which means we&#8217;ll see a lot of maps showing the results of polls, projections, and ultimately results. One of the most common election variables to explore is <a href=\"https:\/\/en.wikipedia.org\/wiki\/Swing_(politics)\">swing<\/a>.<\/p>\n<p>Electoral swing measures the change in votes for one or more political parties between two elections. <a href=\"https:\/\/codepen.io\/kekenes\/pen\/rNegRbQ?editors=0010\">The following map<\/a> shows a traditional swing visualization for the 2012-2016 U.S. presidential election using the <a href=\"https:\/\/developers.arcgis.com\/javascript\/\">ArcGIS API for JavaScript<\/a> (ArcGIS JS API).<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1029411,"id":1029411,"title":"Screen Shot 2020-10-02 at 5.03.22 PM","filename":"Screen-Shot-2020-10-02-at-5.03.22-PM.png","filesize":231389,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-10-02-at-5-03-22-pm","alt":"Republican swing in the 2016 election. Red icons indicate counties where a higher percentage of people voted for the Republican candidate compared to 2012. Blue counties represent a decline in Republican support. Size indicates the strength of the swing.","author":"6561","description":"","caption":"Republican swing in the 2016 election. Red icons indicate counties where a higher percentage of people voted for the Republican candidate compared to 2012. Blue counties represent a decline in Republican support. Size indicates the strength of the swing.","name":"screen-shot-2020-10-02-at-5-03-22-pm","status":"inherit","uploaded_to":1024331,"date":"2020-10-03 00:05:10","modified":"2020-10-03 00:05:54","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1510,"height":814,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM.png","medium-width":464,"medium-height":250,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM.png","medium_large-width":768,"medium_large-height":414,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM.png","large-width":1510,"large-height":814,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM.png","1536x1536-width":1510,"1536x1536-height":814,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM.png","2048x2048-width":1510,"2048x2048-height":814,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM-826x445.png","card_image-width":826,"card_image-height":445,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-10-02-at-5.03.22-PM.png","wide_image-width":1510,"wide_image-height":814}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/codepen.io\/kekenes\/full\/rNegRbQ"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Expand to view the Arcade expression used to create this map<\/strong><\/summary>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #333;font-weight: bold\">var<\/span> rep12 = $feature.PRS_REP_12;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> rep16 = $feature.PRS_REP_16;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> dem12 = $feature.PRS_DEM_12;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> dem16 = $feature.PRS_DEM_16;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> oth12 = $feature.PRS_OTH_12;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> oth16 = $feature.PRS_OTH_16;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> all12 = Sum(rep12, dem12, oth12);\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> all16 = Sum(rep16, dem16, oth16);\r\n\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> rep12Share = (rep12\/all12) * <span style=\"color: #008080\">100<\/span>;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> rep16Share = (rep16\/all16) * <span style=\"color: #008080\">100<\/span>;\r\n<span style=\"color: #333;font-weight: bold\">return<\/span> rep16Share - rep12Share;\r\n<\/code><\/pre>\n<\/details>\n<p>While this map is interesting, it fails to provide context to the swing. For example, there was a significant decrease in Republican support in Utah and Idaho, but those states still overwhelmingly voted Republican in 2016. Did they swing more democratic or did third party votes play a more significant role in the outcome of the election? <\/p>\n<p>These questions led to the creation of <a href=\"https:\/\/ekenes.github.io\/election-2016\/\">the following app<\/a>, which visualizes the swing, or change in votes for each party, on a state and county level.<\/p>\n<h2>Electoral swing for each party in one map<\/h2>\n"},{"acf_fc_layout":"image","image":{"ID":1024561,"id":1024561,"title":"swing-cim-overview","filename":"swing-cim-overview.png","filesize":137997,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/swing-cim-overview","alt":"Electoral swing in the 2016 U.S. presidential election by state. Solid symbols indicate a growth in support for a party. Hollow symbols indicate a decrease in votes for the party.","author":"6561","description":"","caption":"Electoral swing in the 2016 U.S. presidential election by state. Solid symbols indicate a growth in support for a party. Hollow symbols indicate a decrease in votes for the party.","name":"swing-cim-overview","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 20:05:17","modified":"2020-09-29 20:06:32","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1600,"height":797,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview.png","medium-width":464,"medium-height":231,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview.png","medium_large-width":768,"medium_large-height":383,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview.png","large-width":1600,"large-height":797,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview-1536x765.png","1536x1536-width":1536,"1536x1536-height":765,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview.png","2048x2048-width":1600,"2048x2048-height":797,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview-826x411.png","card_image-width":826,"card_image-height":411,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swing-cim-overview.png","wide_image-width":1600,"wide_image-height":797}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/ekenes.github.io\/election-2016\/"},{"acf_fc_layout":"content","content":"<p>Each state and county in this map is assigned a composite (i.e. multi-part) symbol with three symbol layers: a red circle or ring for Republican votes, a blue circle or ring for Democrat votes, and a yellow circle or ring for other votes. <\/p>\n<p>A filled in circle represents an increase in votes. A ring, or hollow circle, represents a decrease in votes from the previous election.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1026511,"id":1026511,"title":"Screen Shot 2020-09-30 at 9.51.06 AM","filename":"Screen-Shot-2020-09-30-at-9.51.06-AM.png","filesize":8946,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-9-51-06-am","alt":"Legend describing each component of a multipart symbol visualizing electoral swing.","author":"6561","description":"","caption":"","name":"screen-shot-2020-09-30-at-9-51-06-am","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 16:51:27","modified":"2020-09-30 16:51:42","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":457,"height":125,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM-213x125.png","thumbnail-width":213,"thumbnail-height":125,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","medium-width":457,"medium-height":125,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","medium_large-width":457,"medium_large-height":125,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","large-width":457,"large-height":125,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","1536x1536-width":457,"1536x1536-height":125,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","2048x2048-width":457,"2048x2048-height":125,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","card_image-width":457,"card_image-height":125,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/Screen-Shot-2020-09-30-at-9.51.06-AM.png","wide_image-width":457,"wide_image-height":125}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>As you zoom in, a label will appear next to each symbol layer indicating the actual change in votes represented by the symbol. At a glance, you immediately see where gains in one party coincide with losses in another.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024571,"id":1024571,"title":"states-labels","filename":"states-labels.png","filesize":74838,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/states-labels","alt":"Electoral swing in the midwestern states for the 2016 U.S. presidential election.","author":"6561","description":"","caption":"Electoral swing in the midwestern states for the 2016 U.S. presidential election.","name":"states-labels","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 20:08:49","modified":"2020-09-29 20:09:56","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":996,"height":642,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels.png","medium-width":405,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels.png","medium_large-width":768,"medium_large-height":495,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels.png","large-width":996,"large-height":642,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels.png","1536x1536-width":996,"1536x1536-height":642,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels.png","2048x2048-width":996,"2048x2048-height":642,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels-721x465.png","card_image-width":721,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/states-labels.png","wide_image-width":996,"wide_image-height":642}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/ekenes.github.io\/election-2016\/"},{"acf_fc_layout":"content","content":"<p>For example, Utah County, Utah shows a significant decrease in Republican votes and a significant increase in third party votes, with a slight increase in Democratic votes from 2012-2016.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024621,"id":1024621,"title":"ut-county-change","filename":"ut-county-change.png","filesize":7636,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ut-county-change","alt":"Electoral swing in Utah County, Utah in the 2016 U.S. presidential election","author":"6561","description":"","caption":"","name":"ut-county-change","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 20:12:43","modified":"2020-09-29 20:13:16","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":332,"height":169,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change-213x169.png","thumbnail-width":213,"thumbnail-height":169,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","medium-width":332,"medium-height":169,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","medium_large-width":332,"medium_large-height":169,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","large-width":332,"large-height":169,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","1536x1536-width":332,"1536x1536-height":169,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","2048x2048-width":332,"2048x2048-height":169,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","card_image-width":332,"card_image-height":169,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png","wide_image-width":332,"wide_image-height":169}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-county-change.png"},{"acf_fc_layout":"content","content":"<p>The swing here appears to be significant. Interestingly, this county didn&#8217;t shift from right to left as the first map in this article suggests. Rather, it shows a shift from right to center. But how much did that swing matter?<\/p>\n<h2>Add context with swipe<\/h2>\n<p>I added a <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-widgets-Swipe.html\">Swipe<\/a> widget to allow the user to explore two views of this data. <\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024671,"id":1024671,"title":"swipe","filename":"swipe.gif","filesize":189368,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/swipe-6","alt":"animation showing the swipe widget provide context to the final election results compared to the change in votes.","author":"6561","description":"","caption":"","name":"swipe-6","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 20:29:18","modified":"2020-09-29 20:29:54","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":600,"height":365,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","medium-width":429,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","medium_large-width":600,"medium_large-height":365,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","large-width":600,"large-height":365,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","1536x1536-width":600,"1536x1536-height":365,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","2048x2048-width":600,"2048x2048-height":365,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","card_image-width":600,"card_image-height":365,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/swipe.gif","wide_image-width":600,"wide_image-height":365}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/ekenes.github.io\/election-2016\/"},{"acf_fc_layout":"content","content":"<p>The left view shows the change between both elections, and the right view shows the actual results. This allows people to view electoral swing in the context of how much that swing actually resulted in a shift in electoral votes.<\/p>\n<p>While the change in Utah County was large, the third party votes didn&#8217;t result in flipping the state, let alone the county because support for the Republican party is so strong there.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024681,"id":1024681,"title":"ut-compare","filename":"ut-compare.png","filesize":63670,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ut-compare","alt":"","author":"6561","description":"","caption":"On the left: Change in votes for each party between the 2012 and 2016 U.S. presidential elections in Utah County, Utah. On the right: voting results per party in the 2016 U.S. presidential election in Utah County, Utah.","name":"ut-compare","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 20:32:46","modified":"2020-09-29 20:34:41","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1600,"height":695,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare.png","medium-width":464,"medium-height":202,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare.png","medium_large-width":768,"medium_large-height":334,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare.png","large-width":1600,"large-height":695,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare-1536x667.png","1536x1536-width":1536,"1536x1536-height":667,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare.png","2048x2048-width":1600,"2048x2048-height":695,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare-826x359.png","card_image-width":826,"card_image-height":359,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-compare.png","wide_image-width":1600,"wide_image-height":695}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/ekenes.github.io\/election-2016\/"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/github.com\/ekenes\/election-2016\">Download or clone the code<\/a> used to create this app to try this technique with your own data. <\/p>\n<p>The remainder of this post explores some of the data and provides details on how this map was made.<\/p>\n<ul>\n<li><a href=\"#explore-the-data\">Explore the data<\/a><\/li>\n<li><a href=\"#how-the-map-is-made\">How the map was made<\/a><\/li>\n<li><a href=\"#working-with-size\">Working with size<\/a><\/li>\n<\/ul>\n<p><a name=\"explore-the-data\"><\/a><\/p>\n<h2>Explore the data<\/h2>\n<p>Once <a href=\"https:\/\/ekenes.github.io\/election-2016\/\">the map<\/a> was done, I couldn&#8217;t help but spend time exploring various parts of the country and seeing the shift on state and local levels. The shift was stark in many states, not just those that flipped parties in 2016.<\/p>\n<h3>Swing states<\/h3>\n<p>For the purposes of this section, I refer to swing states as the states that actually flipped parties from 2012 to 2016. States that nearly flipped, but didn&#8217;t, aren&#8217;t considered.<\/p>\n<p>Six states states flipped Republican from Democrat in 2016. They showed unique patterns describing why they flipped. Expand the state name below to learn about how each voted.<\/p>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Florida<\/strong><\/summary>\n<p>Florida was one of three states (the others were Nevada and Texas) that saw an increase in voting for all three categories. You would think this would equate to a Democratic win considering the state voted Democrat in 2012. However, Republicans added a whopping 439,000 votes to their 2012 tally in 2016. This was enough to overcome the increase in Democratic votes, allowing Trump to win the state by 1 point.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024821,"id":1024821,"title":"fl-popup","filename":"fl-popup.png","filesize":23710,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/fl-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"fl-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 21:40:02","modified":"2020-09-29 21:40:21","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":450,"height":289,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","medium-width":406,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","medium_large-width":450,"medium_large-height":289,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","large-width":450,"large-height":289,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","1536x1536-width":450,"1536x1536-height":289,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","2048x2048-width":450,"2048x2048-height":289,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","card_image-width":450,"card_image-height":289,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png","wide_image-width":450,"wide_image-height":289}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-popup.png"},{"acf_fc_layout":"image","image":{"ID":1024831,"id":1024831,"title":"fl-s","filename":"fl-s.png","filesize":33479,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/fl-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"fl-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 21:40:04","modified":"2020-09-29 21:40:37","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1043,"height":470,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png","medium-width":464,"medium-height":209,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png","medium_large-width":768,"medium_large-height":346,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png","large-width":1043,"large-height":470,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png","1536x1536-width":1043,"1536x1536-height":470,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png","2048x2048-width":1043,"2048x2048-height":470,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s-826x372.png","card_image-width":826,"card_image-height":372,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png","wide_image-width":1043,"wide_image-height":470}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/fl-s.png"},{"acf_fc_layout":"content","content":"<p>As you zoom in, you can view patterns on the county level. Note while there was a larger increase in Democratic votes than Republican votes in large cities like Miami and Orlando, most other counties saw a decrease in Democratic votes. Republicans gained votes in almost every county of the state. The accumulation of these smaller gains was enough to flip the state. <\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1027511,"id":1027511,"title":"Screen Shot 2020-09-30 at 4.56.40 PM","filename":"Screen-Shot-2020-09-30-at-4.56.40-PM-scaled.png","filesize":1136958,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-scaled.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-4-56-40-pm","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"screen-shot-2020-09-30-at-4-56-40-pm","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 23:59:02","modified":"2020-09-30 23:59:35","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2560,"height":1248,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-scaled.png","medium-width":464,"medium-height":226,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-scaled.png","medium_large-width":768,"medium_large-height":374,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-scaled.png","large-width":1920,"large-height":936,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-1536x749.png","1536x1536-width":1536,"1536x1536-height":749,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-2048x998.png","2048x2048-width":2048,"2048x2048-height":998,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-826x403.png","card_image-width":826,"card_image-height":403,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM-1920x936.png","wide_image-width":1920,"wide_image-height":936}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.40-PM.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Iowa<\/strong><\/summary>\n<p>Iowa voted Trump by a margin of nearly 10 percentage points. The popup below shows this was due to a 20 point drop in Democratic votes and a significant increase in Republican votes.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024741,"id":1024741,"title":"ia-popup","filename":"ia-popup.png","filesize":23442,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ia-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"ia-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 20:52:30","modified":"2020-09-29 21:40:15","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":448,"height":257,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","medium-width":448,"medium-height":257,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","medium_large-width":448,"medium_large-height":257,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","large-width":448,"large-height":257,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","1536x1536-width":448,"1536x1536-height":257,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","2048x2048-width":448,"2048x2048-height":257,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","card_image-width":448,"card_image-height":257,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png","wide_image-width":448,"wide_image-height":257}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-popup.png"},{"acf_fc_layout":"image","image":{"ID":1024751,"id":1024751,"title":"ia-s","filename":"ia-s.png","filesize":65666,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ia-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"ia-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 20:52:32","modified":"2020-09-29 20:54:04","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2036,"height":772,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s.png","medium-width":464,"medium-height":176,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s.png","medium_large-width":768,"medium_large-height":291,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s.png","large-width":1920,"large-height":728,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s-1536x582.png","1536x1536-width":1536,"1536x1536-height":582,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s.png","2048x2048-width":2036,"2048x2048-height":772,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s-826x313.png","card_image-width":826,"card_image-height":313,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s-1920x728.png","wide_image-width":1920,"wide_image-height":728}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ia-s.png"},{"acf_fc_layout":"content","content":"<p>As you zoom in, you can view patterns on the county level. Note that there was a near universal increase in Republican votes and decrease in Democratic votes. Not one county appears to be a major factor in the swing. <\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1027561,"id":1027561,"title":"Screen Shot 2020-09-30 at 5.02.30 PM","filename":"Screen-Shot-2020-09-30-at-5.02.30-PM-scaled.png","filesize":1693476,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-scaled.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-5-02-30-pm","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"screen-shot-2020-09-30-at-5-02-30-pm","status":"inherit","uploaded_to":1024331,"date":"2020-10-01 00:03:15","modified":"2020-10-01 00:03:30","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2560,"height":983,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-scaled.png","medium-width":464,"medium-height":178,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-scaled.png","medium_large-width":768,"medium_large-height":295,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-scaled.png","large-width":1920,"large-height":737,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-1536x590.png","1536x1536-width":1536,"1536x1536-height":590,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-2048x787.png","2048x2048-width":2048,"2048x2048-height":787,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-826x317.png","card_image-width":826,"card_image-height":317,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM-1920x737.png","wide_image-width":1920,"wide_image-height":737}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-5.02.30-PM.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Michigan<\/strong><\/summary>\n<p>Trump won Michigan by a very slim margin of 11,837 votes (0.2% points). More voters swung to a third party candidate here than they did Republican.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024851,"id":1024851,"title":"mi-popup","filename":"mi-popup.png","filesize":24286,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/mi-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"mi-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 21:51:59","modified":"2020-09-29 21:52:15","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":447,"height":254,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","medium-width":447,"medium-height":254,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","medium_large-width":447,"medium_large-height":254,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","large-width":447,"large-height":254,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","1536x1536-width":447,"1536x1536-height":254,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","2048x2048-width":447,"2048x2048-height":254,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","card_image-width":447,"card_image-height":254,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png","wide_image-width":447,"wide_image-height":254}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-popup.png"},{"acf_fc_layout":"image","image":{"ID":1024861,"id":1024861,"title":"mi-s","filename":"mi-s.png","filesize":43705,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/mi-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"mi-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 21:52:03","modified":"2020-09-29 21:52:27","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":980,"height":562,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s.png","medium-width":455,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s.png","medium_large-width":768,"medium_large-height":440,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s.png","large-width":980,"large-height":562,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s.png","1536x1536-width":980,"1536x1536-height":562,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s.png","2048x2048-width":980,"2048x2048-height":562,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s-811x465.png","card_image-width":811,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/mi-s.png","wide_image-width":980,"wide_image-height":562}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>While Trump gained Republican votes in nearly every county, the lackluster turnout in Wayne County (Detroit) probably had more to do with his win than the Republican gains in small counties. Democrats lost nearly 79,000 votes in Wayne County, while 22,000 people opted to vote for a third-party candidate.<\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1027531,"id":1027531,"title":"Screen Shot 2020-09-30 at 4.57.10 PM","filename":"Screen-Shot-2020-09-30-at-4.57.10-PM-scaled.png","filesize":1545689,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-scaled.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-4-57-10-pm","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"screen-shot-2020-09-30-at-4-57-10-pm","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 23:59:26","modified":"2020-10-01 00:00:52","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2560,"height":1371,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-scaled.png","medium-width":464,"medium-height":248,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-scaled.png","medium_large-width":768,"medium_large-height":411,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-scaled.png","large-width":1920,"large-height":1028,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-1536x823.png","1536x1536-width":1536,"1536x1536-height":823,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-2048x1097.png","2048x2048-width":2048,"2048x2048-height":1097,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-826x443.png","card_image-width":826,"card_image-height":443,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM-1920x1029.png","wide_image-width":1920,"wide_image-height":1029}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.10-PM.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Ohio<\/strong><\/summary>\n<p>Trump won Ohio by a healthy margin of 454,983 votes (8.5% points). While votes for the Republican candidate increased by 4.5% from 2012, it&#8217;s hard to overstate the impact the lower Democratic turnout likely had on the outcome.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024891,"id":1024891,"title":"oh-popup","filename":"oh-popup.png","filesize":23950,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/oh-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"oh-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:01:33","modified":"2020-09-29 22:02:07","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":450,"height":259,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","medium-width":450,"medium-height":259,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","medium_large-width":450,"medium_large-height":259,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","large-width":450,"large-height":259,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","1536x1536-width":450,"1536x1536-height":259,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","2048x2048-width":450,"2048x2048-height":259,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","card_image-width":450,"card_image-height":259,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png","wide_image-width":450,"wide_image-height":259}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-popup.png"},{"acf_fc_layout":"image","image":{"ID":1024901,"id":1024901,"title":"oh-s","filename":"oh-s.png","filesize":43649,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/oh-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"oh-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:01:35","modified":"2020-09-29 22:02:00","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1025,"height":526,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png","medium-width":464,"medium-height":238,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png","medium_large-width":768,"medium_large-height":394,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png","large-width":1025,"large-height":526,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png","1536x1536-width":1025,"1536x1536-height":526,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png","2048x2048-width":1025,"2048x2048-height":526,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s-826x424.png","card_image-width":826,"card_image-height":424,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png","wide_image-width":1025,"wide_image-height":526}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/oh-s.png"},{"acf_fc_layout":"content","content":"<p>As you look at individual counties, urban areas such as Cleveland, Dayton, Cincinnati, Akron, and Columbus saw a major drop in both Democratic and Republican votes.<\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1027541,"id":1027541,"title":"Screen Shot 2020-09-30 at 4.57.22 PM","filename":"Screen-Shot-2020-09-30-at-4.57.22-PM-scaled.png","filesize":2944874,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-scaled.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-4-57-22-pm","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"screen-shot-2020-09-30-at-4-57-22-pm","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 23:59:38","modified":"2020-10-01 00:00:40","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2560,"height":1413,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-scaled.png","medium-width":464,"medium-height":256,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-scaled.png","medium_large-width":768,"medium_large-height":424,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-scaled.png","large-width":1920,"large-height":1060,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-1536x848.png","1536x1536-width":1536,"1536x1536-height":848,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-2048x1130.png","2048x2048-width":2048,"2048x2048-height":1130,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-826x456.png","card_image-width":826,"card_image-height":456,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM-1920x1059.png","wide_image-width":1920,"wide_image-height":1059}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.22-PM.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Pennsylvania<\/strong><\/summary>\n<p>Trump narrowly won Pennsylvania by 1.1% of the vote. Unlike Michigan, Ohio, and Wisconsin, this had more to do with a larger gain in Republican votes than a poor showing for the Democratic party.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024941,"id":1024941,"title":"pa-popup","filename":"pa-popup.png","filesize":23126,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/pa-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"pa-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:09:40","modified":"2020-09-29 22:09:59","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":440,"height":257,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","medium-width":440,"medium-height":257,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","medium_large-width":440,"medium_large-height":257,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","large-width":440,"large-height":257,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","1536x1536-width":440,"1536x1536-height":257,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","2048x2048-width":440,"2048x2048-height":257,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","card_image-width":440,"card_image-height":257,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png","wide_image-width":440,"wide_image-height":257}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-popup.png"},{"acf_fc_layout":"image","image":{"ID":1024951,"id":1024951,"title":"pa-s","filename":"pa-s.png","filesize":36873,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/pa-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"pa-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:09:42","modified":"2020-09-29 22:09:53","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1042,"height":349,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png","medium-width":464,"medium-height":155,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png","medium_large-width":768,"medium_large-height":257,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png","large-width":1042,"large-height":349,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png","1536x1536-width":1042,"1536x1536-height":349,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png","2048x2048-width":1042,"2048x2048-height":349,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s-826x277.png","card_image-width":826,"card_image-height":277,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png","wide_image-width":1042,"wide_image-height":349}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/pa-s.png"},{"acf_fc_layout":"content","content":"<p>As you look at individual counties, urban areas, with the exception of Philadelphia, actually showed more support for the Democratic party. Similar to Florida, the widespread support in all counties led to the Republican win. <\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1027551,"id":1027551,"title":"Screen Shot 2020-09-30 at 4.57.32 PM","filename":"Screen-Shot-2020-09-30-at-4.57.32-PM-scaled.png","filesize":1809127,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-scaled.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-4-57-32-pm","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"screen-shot-2020-09-30-at-4-57-32-pm","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 23:59:55","modified":"2020-10-01 00:01:40","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2560,"height":863,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-scaled.png","medium-width":464,"medium-height":156,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-scaled.png","medium_large-width":768,"medium_large-height":259,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-scaled.png","large-width":1920,"large-height":647,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-1536x518.png","1536x1536-width":1536,"1536x1536-height":518,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-2048x690.png","2048x2048-width":2048,"2048x2048-height":690,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-826x278.png","card_image-width":826,"card_image-height":278,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM-1920x647.png","wide_image-width":1920,"wide_image-height":647}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.32-PM.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Wisconsin<\/strong><\/summary>\n<p>Trump won Wisconsin by less than 1% of the vote. Yet only 1,500 more votes were cast for the Republican candidate in 2016 than in 2012! Clearly the lack of Democratic support and a huge increase in third-party votes were the primary reasons for swinging this state Republican in 2016.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1024981,"id":1024981,"title":"wi-popup","filename":"wi-popup.png","filesize":22714,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/wi-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"wi-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:14:36","modified":"2020-09-29 22:14:55","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":449,"height":261,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","medium-width":449,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","medium_large-width":449,"medium_large-height":261,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","large-width":449,"large-height":261,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","1536x1536-width":449,"1536x1536-height":261,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","2048x2048-width":449,"2048x2048-height":261,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","card_image-width":449,"card_image-height":261,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png","wide_image-width":449,"wide_image-height":261}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-popup.png"},{"acf_fc_layout":"image","image":{"ID":1024991,"id":1024991,"title":"wi-s","filename":"wi-s.png","filesize":37165,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/wi-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"wi-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:14:39","modified":"2020-09-29 22:14:50","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1014,"height":505,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png","medium-width":464,"medium-height":231,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png","medium_large-width":768,"medium_large-height":382,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png","large-width":1014,"large-height":505,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png","1536x1536-width":1014,"1536x1536-height":505,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png","2048x2048-width":1014,"2048x2048-height":505,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s-826x411.png","card_image-width":826,"card_image-height":411,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png","wide_image-width":1014,"wide_image-height":505}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wi-s.png"},{"acf_fc_layout":"content","content":"<p>Look no further than Milwaukee, where Democrats saw a loss of more than 43,000 votes compared to 2012. <\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1027501,"id":1027501,"title":"Screen Shot 2020-09-30 at 4.57.49 PM","filename":"Screen-Shot-2020-09-30-at-4.57.49-PM-scaled.png","filesize":2925902,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-scaled.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-4-57-49-pm","alt":"","author":"6561","description":"","caption":"","name":"screen-shot-2020-09-30-at-4-57-49-pm","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 23:58:45","modified":"2020-09-30 23:58:45","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2560,"height":1472,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-scaled.png","medium-width":454,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-scaled.png","medium_large-width":768,"medium_large-height":442,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-scaled.png","large-width":1878,"large-height":1080,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-1536x883.png","1536x1536-width":1536,"1536x1536-height":883,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-2048x1178.png","2048x2048-width":2048,"2048x2048-height":1178,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-808x465.png","card_image-width":808,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM-1878x1080.png","wide_image-width":1878,"wide_image-height":1080}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.57.49-PM.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<h3>Other states<\/h3>\n<p>Other states showed interesting swing patterns, but didn&#8217;t actually result in flipping the state to the opposing party in 2016.<\/p>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>California<\/strong> (and Oregon and Washington)<\/summary>\n<p>California has been a Democratic stronghold for a long time. You wouldn&#8217;t think so simply by looking at the swing map on the left. Despite the more that 2 million votes (30% drop) Democrats lost in the state, Clinton still won by a margin of 28 points.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025021,"id":1025021,"title":"ca-popup","filename":"ca-popup.png","filesize":23836,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ca-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"ca-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:25:57","modified":"2020-09-29 22:26:56","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":445,"height":256,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","medium-width":445,"medium-height":256,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","medium_large-width":445,"medium_large-height":256,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","large-width":445,"large-height":256,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","1536x1536-width":445,"1536x1536-height":256,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","2048x2048-width":445,"2048x2048-height":256,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","card_image-width":445,"card_image-height":256,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png","wide_image-width":445,"wide_image-height":256}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-popup.png"},{"acf_fc_layout":"image","image":{"ID":1025031,"id":1025031,"title":"ca-s","filename":"ca-s.png","filesize":30913,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ca-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"ca-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:25:59","modified":"2020-09-29 22:26:33","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":935,"height":560,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png","medium-width":436,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png","medium_large-width":768,"medium_large-height":460,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png","large-width":935,"large-height":560,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png","1536x1536-width":935,"1536x1536-height":560,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png","2048x2048-width":935,"2048x2048-height":560,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s-776x465.png","card_image-width":776,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png","wide_image-width":935,"wide_image-height":560}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ca-s.png"},{"acf_fc_layout":"content","content":"<p>Both Republicans and Democrats saw a significant loss of votes in 2016 throughout the state. <\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1027521,"id":1027521,"title":"Screen Shot 2020-09-30 at 4.56.56 PM","filename":"Screen-Shot-2020-09-30-at-4.56.56-PM-scaled.png","filesize":1518371,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-scaled.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/screen-shot-2020-09-30-at-4-56-56-pm","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"screen-shot-2020-09-30-at-4-56-56-pm","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 23:59:14","modified":"2020-10-01 00:02:03","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":2560,"height":1531,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-scaled.png","medium-width":436,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-scaled.png","medium_large-width":768,"medium_large-height":459,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-scaled.png","large-width":1806,"large-height":1080,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-1536x919.png","1536x1536-width":1536,"1536x1536-height":919,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-2048x1225.png","2048x2048-width":2048,"2048x2048-height":1225,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-777x465.png","card_image-width":777,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM-1806x1080.png","wide_image-width":1806,"wide_image-height":1080}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/10\/Screen-Shot-2020-09-30-at-4.56.56-PM.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Texas<\/strong><\/summary>\n<p>Like Florida, Texas saw a huge increase in voter turnout for all parties in 2016. It is the only state where Democrats gained more votes than all other parties. Despite the more than 16% increase in votes from 2012, they still lost the state by 9 percentage points.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025051,"id":1025051,"title":"tx-popup","filename":"tx-popup.png","filesize":23015,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/tx-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"tx-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:26:17","modified":"2020-09-29 22:26:58","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":446,"height":258,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","medium-width":446,"medium-height":258,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","medium_large-width":446,"medium_large-height":258,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","large-width":446,"large-height":258,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","1536x1536-width":446,"1536x1536-height":258,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","2048x2048-width":446,"2048x2048-height":258,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","card_image-width":446,"card_image-height":258,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png","wide_image-width":446,"wide_image-height":258}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-popup.png"},{"acf_fc_layout":"image","image":{"ID":1025061,"id":1025061,"title":"tx-s","filename":"tx-s.png","filesize":31395,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/tx-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"tx-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:26:19","modified":"2020-09-29 22:26:41","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1035,"height":544,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png","medium-width":464,"medium-height":244,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png","medium_large-width":768,"medium_large-height":404,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png","large-width":1035,"large-height":544,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png","1536x1536-width":1035,"1536x1536-height":544,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png","2048x2048-width":1035,"2048x2048-height":544,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s-826x434.png","card_image-width":826,"card_image-height":434,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png","wide_image-width":1035,"wide_image-height":544}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-s.png"},{"acf_fc_layout":"content","content":"<p>On a county level, the increase in Democratic votes is clear in large cities and along the border. While Texas has traditionally been a solid red state, it appears to be trending blue even in a year when Democratic strongholds, such as California, saw a lack of enthusiasm to vote. <\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025041,"id":1025041,"title":"tx-c","filename":"tx-c.png","filesize":97409,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/tx-c","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"tx-c","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:26:13","modified":"2020-09-29 22:26:36","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1040,"height":523,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png","medium-width":464,"medium-height":233,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png","medium_large-width":768,"medium_large-height":386,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png","large-width":1040,"large-height":523,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png","1536x1536-width":1040,"1536x1536-height":523,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png","2048x2048-width":1040,"2048x2048-height":523,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c-826x415.png","card_image-width":826,"card_image-height":415,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png","wide_image-width":1040,"wide_image-height":523}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/tx-c.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Utah<\/strong><\/summary>\n<p>Utah is one of the strongest Republican voting states in the country. That&#8217;s why you shouldn&#8217;t read too much into a major drop in votes for Republicans. Despite Republicans losing half (yes, a 50% drop) the votes from 2012, voters still chose the Republican candidate by a margin of 19 percentage points. <\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025081,"id":1025081,"title":"ut-popup","filename":"ut-popup.png","filesize":23935,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ut-popup","alt":"popup describing the swing of the election in the context of the final results.","author":"6561","description":"","caption":"","name":"ut-popup","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:26:24","modified":"2020-09-29 22:27:04","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":442,"height":254,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","medium-width":442,"medium-height":254,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","medium_large-width":442,"medium_large-height":254,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","large-width":442,"large-height":254,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","1536x1536-width":442,"1536x1536-height":254,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","2048x2048-width":442,"2048x2048-height":254,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","card_image-width":442,"card_image-height":254,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png","wide_image-width":442,"wide_image-height":254}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-popup.png"},{"acf_fc_layout":"image","image":{"ID":1025091,"id":1025091,"title":"ut-s","filename":"ut-s.png","filesize":24525,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ut-s","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"ut-s","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:26:26","modified":"2020-09-29 22:26:50","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":704,"height":484,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png","medium-width":380,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png","medium_large-width":704,"medium_large-height":484,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png","large-width":704,"large-height":484,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png","1536x1536-width":704,"1536x1536-height":484,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png","2048x2048-width":704,"2048x2048-height":484,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s-676x465.png","card_image-width":676,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png","wide_image-width":704,"wide_image-height":484}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-s.png"},{"acf_fc_layout":"content","content":"<p>Those lost Republican votes didn&#8217;t shift Democratic though. The majority of swing voters either opted not to vote at all, or vote for a third party instead. Third party votes nearly outnumbered Democratic votes. Third party gains were an enormous, but ultimately not a significant, increase from 2012. <\/p>\n<p><em>Click image for an enlarged view of the map<\/em><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025071,"id":1025071,"title":"ut-c","filename":"ut-c.png","filesize":37301,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/ut-c","alt":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","author":"6561","description":"","caption":"Left: Electoral swing in the U.S. presidential election from 2012-2016. Right: 2016 U.S. presidential results per party.","name":"ut-c","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 22:26:22","modified":"2020-09-29 22:26:45","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":832,"height":556,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png","medium-width":391,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png","medium_large-width":768,"medium_large-height":513,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png","large-width":832,"large-height":556,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png","1536x1536-width":832,"1536x1536-height":556,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png","2048x2048-width":832,"2048x2048-height":556,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c-696x465.png","card_image-width":696,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png","wide_image-width":832,"wide_image-height":556}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ut-c.png"},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/ekenes.github.io\/election-2016\/\"><strong>Explore the map<\/strong><\/a><br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<p><a name=\"how-the-map-is-made\"><\/a><\/p>\n<h2>How the map was made<\/h2>\n<p>This map was made using data-driven composite <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-symbols-CIMSymbol.html\">CIM symbols<\/a> in the ArcGIS JS API. In a <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/analytics\/analytics\/happy-maps\/\">May 2017 blog article<\/a>, John Nelson described this style of symbology as &#8220;multi-part graduated symbology&#8221;. <\/p>\n<p>The main difference between Nelson&#8217;s symbols and those I use in the <a href=\"https:\/\/ekenes.github.io\/election-2016\/\">electoral swing visualization<\/a> is the usage of filled versus empty symbols to indicate positive and negative change. The credit goes to my colleague Mark Harrower for inspiring this idea of using hollow symbols to represent negative values.<\/p>\n<h2>CIM symbols<\/h2>\n<p>CIM (<a href=\"https:\/\/github.com\/Esri\/cim-spec\">Cartographic Information Model<\/a>) symbols are customizable, multi-layered, scalable vector symbols that allow you to create complex multi-variate data-driven visualizations.<\/p>\n<p>The <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-Renderer.html\">renderer<\/a> is normally responsible for overriding symbol properties based on data values. But renderers and <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/api-reference\/esri-renderers-visualVariables-VisualVariable.html\">visual variables<\/a> can&#8217;t override the properties of individual multipart symbols like a CIMSymbol. If the basic primitives in the ArcGIS JS API renderers won&#8217;t cut it, then CIM is the way to go for full customization.<\/p>\n<p>Depending on the geometry type, CIM symbols can be more complicated than how I present them. For the purposes of this article, the CIMSymbol is composed of two major parts: <\/p>\n<ul>\n<li><a href=\"#symbol-layers\">Symbol layers<\/a><\/li>\n<li><a href=\"#primitive-overrides\">Primitive overrides<\/a><\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1025131,"id":1025131,"title":"cim-overview","filename":"cim-overview-e1601442107307.png","filesize":136648,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/cim-overview","alt":"code snippet of a CIM symbol","author":"6561","description":"","caption":"","name":"cim-overview","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:09:51","modified":"2020-09-29 23:10:08","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":563,"height":350,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","medium-width":420,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","medium_large-width":563,"medium_large-height":350,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","large-width":563,"large-height":350,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","1536x1536-width":563,"1536x1536-height":350,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","2048x2048-width":563,"2048x2048-height":350,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-748x465.png","card_image-width":748,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","wide_image-width":563,"wide_image-height":350}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Note there aren&#8217;t high level properties of the CIM symbol like color, size, etc. All the significant configuration happens on individual symbol layers.<\/p>\n<p><a name=\"symbol-layers\"><\/a><\/p>\n<h2>Symbol layers<\/h2>\n<p>A symbol layer is a component, or part, of a symbol. You can configure its shape, color, texture, size, position, etc. Each circle of the electoral swing symbol is a symbol layer.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025161,"id":1025161,"title":"symbol-layers","filename":"symbol-layers.png","filesize":12386,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/symbol-layers","alt":"Symbol layers as represented in the map.","author":"6561","description":"","caption":"","name":"symbol-layers","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:20:25","modified":"2020-09-29 23:20:45","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":461,"height":136,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers-213x136.png","thumbnail-width":213,"thumbnail-height":136,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","medium-width":461,"medium-height":136,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","medium_large-width":461,"medium_large-height":136,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","large-width":461,"large-height":136,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","1536x1536-width":461,"1536x1536-height":136,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","2048x2048-width":461,"2048x2048-height":136,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","card_image-width":461,"card_image-height":136,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/symbol-layers.png","wide_image-width":461,"wide_image-height":136}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>While you only see three symbol layers at a time, the electoral swing symbol actually contains six symbol layers. Three are simultaneously active, and the other three are dynamically hidden based on the feature&#8217;s data.<\/p>\n<details>\n<summary><strong>Expand to view how to configure the &#8216;Democratic votes gained&#8217; symbol layer<\/strong><\/summary>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #333;font-weight: bold\">const<\/span> symbolLayer = {\r\n  type: <span style=\"color: #d14\">\"CIMVectorMarker\"<\/span>,\r\n  enable: <span style=\"color: #333;font-weight: 500\">true<\/span>,\r\n  primitiveName: <span style=\"color: #d14\">\"democrat-positive-votes\"<\/span>,\r\n  frame: { xmin: <span style=\"color: #008080\">0.0<\/span>, ymin: <span style=\"color: #008080\">0.0<\/span>, xmax: <span style=\"color: #008080\">17.0<\/span>, ymax: <span style=\"color: #008080\">17.0<\/span> },\r\n  anchorPoint: { x: <span style=\"color: #008080\">0.5<\/span>, y: <span style=\"color: #008080\">0<\/span> },\r\n  anchorPointUnits: <span style=\"color: #d14\">\"Relative\"<\/span>,\r\n  markerGraphics: [\r\n    {\r\n      type: <span style=\"color: #d14\">\"CIMMarkerGraphic\"<\/span>,\r\n      geometry: {\r\n        rings: [\r\n          [\r\n            [<span style=\"color: #008080\">8.5<\/span>, <span style=\"color: #008080\">0.2<\/span>],\r\n            [<span style=\"color: #008080\">7.06<\/span>, <span style=\"color: #008080\">0.33<\/span>],\r\n            [<span style=\"color: #008080\">5.66<\/span>, <span style=\"color: #008080\">0.7<\/span>],\r\n            [<span style=\"color: #008080\">4.35<\/span>, <span style=\"color: #008080\">1.31<\/span>],\r\n            <span style=\"color: #998;font-style: italic\">\/\/ additional vertices<\/span>\r\n            <span style=\"color: #998;font-style: italic\">\/\/ to complete the circle<\/span>\r\n          ]\r\n        ]\r\n      },\r\n      symbol: {\r\n        type: <span style=\"color: #d14\">\"CIMPolygonSymbol\"<\/span>,\r\n        symbolLayers: [\r\n          {\r\n            type: <span style=\"color: #d14\">\"CIMSolidFill\"<\/span>,\r\n            enable: <span style=\"color: #333;font-weight: 500\">true<\/span>,\r\n            color: [<span style=\"color: #008080\">60<\/span>, <span style=\"color: #008080\">108<\/span>, <span style=\"color: #008080\">204<\/span>, <span style=\"color: #008080\">255<\/span>]\r\n          }\r\n        ]\r\n      }\r\n    }\r\n  ],\r\n  scaleSymbolsProportionally: <span style=\"color: #333;font-weight: 500\">true<\/span>,\r\n  respectFrame: <span style=\"color: #333;font-weight: 500\">true<\/span>\r\n};\r\n<\/code><\/pre>\n<\/details>\n<p>At first glance, this snippet can be a lot to digest, especially considering it is just one of six symbol layers that compose a single symbol.<\/p>\n<p>I will deconstruct the symbol layer to its various parts to describe how to build the symbol layers powering the electoral swing visualization.<\/p>\n<ul>\n<li><a href=\"#primitive-name\">Primitive name<\/a><\/li>\n<li><a href=\"#frame\">Frame<\/a><\/li>\n<li><a href=\"#anchor-point\">Anchor point<\/a><\/li>\n<li><a href=\"#marker-graphics\">Marker graphics<\/a><\/li>\n<li><a href=\"#geometry\">Geometry<\/a><\/li>\n<li><a href=\"#symbol\">Symbol<\/a><\/li>\n<\/ul>\n<p><a name=\"primitive-name\"><\/a><\/p>\n<h3>Primitive name<\/h3>\n"},{"acf_fc_layout":"image","image":{"ID":1025801,"id":1025801,"title":"primitive-name-snippet","filename":"primitive-name-snippet.png","filesize":18440,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/primitive-name-snippet","alt":"Snippet highlighting where to specify the primitive name","author":"6561","description":"","caption":"","name":"primitive-name-snippet","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 04:55:17","modified":"2020-09-30 04:55:44","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":573,"height":183,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet-213x183.png","thumbnail-width":213,"thumbnail-height":183,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","medium-width":464,"medium-height":148,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","medium_large-width":573,"medium_large-height":183,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","large-width":573,"large-height":183,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","1536x1536-width":573,"1536x1536-height":183,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","2048x2048-width":573,"2048x2048-height":183,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","card_image-width":573,"card_image-height":183,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-snippet.png","wide_image-width":573,"wide_image-height":183}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The <code>primitiveName<\/code> uniquely identifies the symbol layer by name. It is crucial when you need to override a symbol property based on a data value. The <a href=\"#primitive-overrides\">primitive overrides<\/a> section below describes how to dynamically override symbol properties. <\/p>\n<p>On a fundamental level, it makes it easy to identify what you intend the symbol to represent. The following graphic shows the primitive names I assigned to each symbol layer.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025231,"id":1025231,"title":"primitive-name-example","filename":"primitive-name-example.png","filesize":13139,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/primitive-name-example","alt":"Symbol layers showing the primitive names for each.","author":"6561","description":"","caption":"","name":"primitive-name-example","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:30:25","modified":"2020-09-29 23:31:06","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":423,"height":212,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","medium-width":423,"medium-height":212,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","medium_large-width":423,"medium_large-height":212,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","large-width":423,"large-height":212,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","1536x1536-width":423,"1536x1536-height":212,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","2048x2048-width":423,"2048x2048-height":212,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","card_image-width":423,"card_image-height":212,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-name-example.png","wide_image-width":423,"wide_image-height":212}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p><a name=\"frame\"><\/a><\/p>\n<h3>Frame<\/h3>\n"},{"acf_fc_layout":"image","image":{"ID":1025821,"id":1025821,"title":"frame-code-snippet","filename":"frame-code-snippet.png","filesize":17777,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/frame-code-snippet","alt":"Snippet highlighting where to specify the frame of the symbol layer.","author":"6561","description":"","caption":"","name":"frame-code-snippet","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 04:55:49","modified":"2020-09-30 04:56:19","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":572,"height":175,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet-213x175.png","thumbnail-width":213,"thumbnail-height":175,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","medium-width":464,"medium-height":142,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","medium_large-width":572,"medium_large-height":175,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","large-width":572,"large-height":175,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","1536x1536-width":572,"1536x1536-height":175,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","2048x2048-width":572,"2048x2048-height":175,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","card_image-width":572,"card_image-height":175,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-code-snippet.png","wide_image-width":572,"wide_image-height":175}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The <code>frame<\/code> defines the bounds of the symbol layer&#8217;s geometry in relative screen units. The symbol layer geometry is defined in the <a href=\"#marker-graphics\">markerGraphics<\/a> property.<\/p>\n<p>In this case, each symbol layer (circle or ring) is defined in a 17&#215;17 square.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025241,"id":1025241,"title":"frame-image","filename":"frame-image.png","filesize":6345,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/frame-image","alt":"The frame of one of the symbol layers.","author":"6561","description":"","caption":"","name":"frame-image","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:34:50","modified":"2020-09-29 23:35:09","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":296,"height":162,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image-213x162.png","thumbnail-width":213,"thumbnail-height":162,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","medium-width":296,"medium-height":162,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","medium_large-width":296,"medium_large-height":162,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","large-width":296,"large-height":162,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","1536x1536-width":296,"1536x1536-height":162,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","2048x2048-width":296,"2048x2048-height":162,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","card_image-width":296,"card_image-height":162,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/frame-image.png","wide_image-width":296,"wide_image-height":162}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p><a name=\"anchor-point\"><\/a><\/p>\n<h3>Anchor point<\/h3>\n"},{"acf_fc_layout":"image","image":{"ID":1025811,"id":1025811,"title":"anchor-point-snippet2","filename":"anchor-point-snippet2.png","filesize":19017,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/anchor-point-snippet2","alt":"Snippet highlighting where to specify the anchor of the symbol layer.","author":"6561","description":"","caption":"","name":"anchor-point-snippet2","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 04:55:45","modified":"2020-09-30 04:56:08","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":566,"height":172,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2-213x172.png","thumbnail-width":213,"thumbnail-height":172,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","medium-width":464,"medium-height":141,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","medium_large-width":566,"medium_large-height":172,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","large-width":566,"large-height":172,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","1536x1536-width":566,"1536x1536-height":172,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","2048x2048-width":566,"2048x2048-height":172,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","card_image-width":566,"card_image-height":172,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-snippet2.png","wide_image-width":566,"wide_image-height":172}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The <code>anchorPoint<\/code> defines how the frame of the symbol layer is anchored relative to the geometry of the feature. This can be in screen units or relative units. The relative units allow you to anchor the frame as a proportion to its placement over the feature geometry.<\/p>\n<p>In the image below, I set a relative <code>anchorPoint<\/code> of <code>{x: 0.5, y: 0}<\/code> for both Democratic symbol layers because I want the anchor (or feature geometry) to be located 50% to the right of the frame. <\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025261,"id":1025261,"title":"anchor-point-example","filename":"anchor-point-example.png","filesize":7422,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/anchor-point-example","alt":"An example of an anchor point of 0,0 and an anchor point of -0.5, 0.","author":"6561","description":"","caption":"An anchor point of (0,0) anchors the frame directly on top of the feature geometry. An anchor point of (0.5, 0) anchors the frame 50% to the left of the geometry. ","name":"anchor-point-example","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:39:02","modified":"2020-09-29 23:43:55","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":416,"height":143,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example-213x143.png","thumbnail-width":213,"thumbnail-height":143,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","medium-width":416,"medium-height":143,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","medium_large-width":416,"medium_large-height":143,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","large-width":416,"large-height":143,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","1536x1536-width":416,"1536x1536-height":143,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","2048x2048-width":416,"2048x2048-height":143,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","card_image-width":416,"card_image-height":143,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-point-example.png","wide_image-width":416,"wide_image-height":143}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Because Democrats are described as &#8220;left wing&#8221;, Republicans as &#8220;right wing&#8221;, and other voters generally as &#8220;centrist&#8221;, I chose to layout the symbol layers to match those directions using the anchor points described in the image below.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025281,"id":1025281,"title":"anchor-points-all","filename":"anchor-points-all.png","filesize":10091,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/anchor-points-all","alt":"Example showing the anchor point of each symbol layer in the symbol.","author":"6561","description":"","caption":"","name":"anchor-points-all","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:39:05","modified":"2020-09-29 23:39:57","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":428,"height":218,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","medium-width":428,"medium-height":218,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","medium_large-width":428,"medium_large-height":218,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","large-width":428,"large-height":218,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","1536x1536-width":428,"1536x1536-height":218,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","2048x2048-width":428,"2048x2048-height":218,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","card_image-width":428,"card_image-height":218,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/anchor-points-all.png","wide_image-width":428,"wide_image-height":218}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<details>\n<summary><strong>Why not use X\/Y offsets instead of anchor points?<\/strong><\/summary>\n<p>Initially I used <code>offsetY<\/code> and <code>offsetX<\/code> in the symbol layer properties to adjust symbol layer placement. But one offset distance doesn&#8217;t work well with symbol layers of various sizes.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025511,"id":1025511,"title":"offset-probs","filename":"offset-probs.png","filesize":54094,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/offset-probs","alt":"Setting a constant offset results in an inconsistent look for symbol layers with different size. Some overlap and others are spread far apart.","author":"6561","description":"","caption":"Setting a constant offset results in an inconsistent look for symbol layers with different size. Some overlap and others are spread far apart.","name":"offset-probs","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 01:14:20","modified":"2020-09-30 01:15:13","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":936,"height":524,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png","medium-width":464,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png","medium_large-width":768,"medium_large-height":430,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png","large-width":936,"large-height":524,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png","1536x1536-width":936,"1536x1536-height":524,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png","2048x2048-width":936,"2048x2048-height":524,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs-826x462.png","card_image-width":826,"card_image-height":462,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png","wide_image-width":936,"wide_image-height":524}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/offset-probs.png"},{"acf_fc_layout":"content","content":"<p>To overcome this issue with <code>offsetX<\/code> and <code>offsetY<\/code>, you would need to write primitive overrides for each to describe how much to offset the symbol based on the size of the symbol layer.<\/p>\n<p>In contrast, the <code>anchorPoint<\/code> ensures the symbol layer sizes are scaled from the anchor point so you never have to worry about adjusting symbol layer offsets based on data values.<br \/>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<p><a name=\"marker-graphics\"><\/a><\/p>\n<h3>Marker graphics<\/h3>\n"},{"acf_fc_layout":"image","image":{"ID":1025311,"id":1025311,"title":"sl-marker","filename":"sl-marker-e1601441863579.png","filesize":35521,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/sl-marker","alt":"Snippet showing the properties of a marker graphic.","author":"6561","description":"","caption":"","name":"sl-marker","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:47:22","modified":"2020-09-29 23:47:54","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":300,"height":201,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","medium-width":300,"medium-height":201,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","medium_large-width":300,"medium_large-height":201,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","large-width":300,"large-height":201,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","1536x1536-width":300,"1536x1536-height":201,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","2048x2048-width":300,"2048x2048-height":201,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","card_image-width":300,"card_image-height":201,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-marker-e1601441863579.png","wide_image-width":300,"wide_image-height":201}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The <code>markerGraphics<\/code> property allows you to define the <a href=\"#geometry\">geometry<\/a> and <a href=\"#symbol\">symbol<\/a> of the graphic representing the symbol layer. I only define one circle graphic for each symbol layer.<\/p>\n<p><a name=\"geometry\"><\/a><\/p>\n<h3>Geometry<\/h3>\n<p>The <code>geometry<\/code> property of the marker graphic defines the shape of a vector symbol using coordinates within the bounds of the frame. In this case I create a circle.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025321,"id":1025321,"title":"sl-geometry","filename":"sl-geometry-e1601441965926.png","filesize":90950,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-e1601441965926.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/sl-geometry","alt":"Snippet showing how a circle is defined in a marker graphic geometry.","author":"6561","description":"","caption":"","name":"sl-geometry","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:48:15","modified":"2020-09-29 23:48:36","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":380,"height":350,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-e1601441965926.png","medium-width":283,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-e1601441965926.png","medium_large-width":380,"medium_large-height":350,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-e1601441965926.png","large-width":380,"large-height":350,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-e1601441965926.png","1536x1536-width":380,"1536x1536-height":350,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-e1601441965926.png","2048x2048-width":380,"2048x2048-height":350,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-504x465.png","card_image-width":504,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-geometry-e1601441965926.png","wide_image-width":380,"wide_image-height":350}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/github.com\/ekenes\/election-2016\/blob\/master\/app\/symbolUtils.ts#L1-L43\">See the full geometry definition<\/a> of the circle I use in the app.<\/p>\n<p><a name=\"symbol\"><\/a><\/p>\n<h3>Symbol<\/h3>\n"},{"acf_fc_layout":"image","image":{"ID":1025331,"id":1025331,"title":"sl-solid","filename":"sl-solid-e1601442004140.png","filesize":64688,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/sl-solid","alt":"Snippet showing how to define a solid symbol.","author":"6561","description":"","caption":"","name":"sl-solid","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:50:52","modified":"2020-09-29 23:51:08","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":405,"height":300,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","medium-width":352,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","medium_large-width":405,"medium_large-height":300,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","large-width":405,"large-height":300,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","1536x1536-width":405,"1536x1536-height":300,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","2048x2048-width":405,"2048x2048-height":300,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","card_image-width":405,"card_image-height":300,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-solid-e1601442004140.png","wide_image-width":405,"wide_image-height":300}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The <code>symbol<\/code> configures the style of the graphic. This contains one or more symbol layers for defining how the graphic should look to the user. For the <code>*-positive-votes<\/code> symbol layers, I add a solid fill as shown in the image above.<\/p>\n<p>For the <code>*-negative-votes<\/code> symbol layers, I add a stroke symbol layer to have the appearance of an empty circle.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025341,"id":1025341,"title":"sl-donut","filename":"sl-donut-e1601442058878.png","filesize":91794,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-e1601442058878.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/sl-donut","alt":"Snippet showing how to create a symbol with a stroke symbol layer.","author":"6561","description":"","caption":"","name":"sl-donut","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:52:34","modified":"2020-09-29 23:52:52","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":368,"height":350,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-e1601442058878.png","medium-width":274,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-e1601442058878.png","medium_large-width":368,"medium_large-height":350,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-e1601442058878.png","large-width":368,"large-height":350,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-e1601442058878.png","1536x1536-width":368,"1536x1536-height":350,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-e1601442058878.png","2048x2048-width":368,"2048x2048-height":350,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-489x465.png","card_image-width":489,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/sl-donut-e1601442058878.png","wide_image-width":368,"wide_image-height":350}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Notice that I also set the <code>scaleSymbolsProportionally<\/code> property to <code>true<\/code>. This scales the thickness of the stroke as the symbol gets larger to make it prominent if the number of negative votes is large in comparison to other symbol layers.<\/p>\n<p>Because defining a symbol layer can be arduous, and since all six symbol layers share many of the same properties, <a href=\"https:\/\/github.com\/ekenes\/election-2016\/blob\/master\/app\/symbolUtils.ts#L55\">I created a helper function<\/a> to simplify the configuration.<\/p>\n<p><a name=\"primitive-overrides\"><\/a><\/p>\n<h2>Primitive overrides<\/h2>\n<p>At this point, you may have noticed there is still no connection between the symbol layers and the data. We didn&#8217;t even define default sizes for each symbol layer. Thanks to primitive overrides, we can use <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/arcade\/#visualization\">Arcade expressions<\/a> to dynamically change many symbol layer properties from data values.<\/p>\n<h3>Create a primitive override object<\/h3>\n<p>Primitive overrides are defined in the <code>primitiveOverrides<\/code> property of the symbol.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025131,"id":1025131,"title":"cim-overview","filename":"cim-overview-e1601442107307.png","filesize":136648,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/cim-overview","alt":"code snippet of a CIM symbol","author":"6561","description":"","caption":"","name":"cim-overview","status":"inherit","uploaded_to":1024331,"date":"2020-09-29 23:09:51","modified":"2020-09-29 23:10:08","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":563,"height":350,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","medium-width":420,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","medium_large-width":563,"medium_large-height":350,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","large-width":563,"large-height":350,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","1536x1536-width":563,"1536x1536-height":350,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","2048x2048-width":563,"2048x2048-height":350,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-748x465.png","card_image-width":748,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/cim-overview-e1601442107307.png","wide_image-width":563,"wide_image-height":350}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The only symbol layer property I&#8217;m interested in overriding is <code>size<\/code>. To override the size of a symbol layer, I need to reference its <code>primitiveName<\/code> and the <code>propertyName<\/code>.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025381,"id":1025381,"title":"primitive-names","filename":"primitive-names.png","filesize":38818,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/primitive-names","alt":"Snippet highlighting where to specify the primitive name and property name to override","author":"6561","description":"","caption":"","name":"primitive-names","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 00:07:49","modified":"2020-09-30 00:08:11","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":519,"height":444,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","medium-width":305,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","medium_large-width":519,"medium_large-height":444,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","large-width":519,"large-height":444,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","1536x1536-width":519,"1536x1536-height":444,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","2048x2048-width":519,"2048x2048-height":444,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","card_image-width":519,"card_image-height":444,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-names.png","wide_image-width":519,"wide_image-height":444}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>If there is an increase in votes for a party, I want to display the corresponding symbol layer with the fill symbol at a size proportional to the positive change in votes and hide the hollow symbol layer.<\/p>\n<p>Likewise, if there is a negative change in votes, the hollow symbol layer will display based on the absolute value of the change in votes. <\/p>\n<p>Place the Arcade expression returning a new size in the <code>expression<\/code> property of the <code>valueExpressionInfo<\/code> object.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025371,"id":1025371,"title":"primitive-arcade","filename":"primitive-arcade.png","filesize":53355,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/primitive-arcade","alt":"Snippet highlighting where to place the Arcade expression in the primitive override","author":"6561","description":"","caption":"","name":"primitive-arcade","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 00:07:47","modified":"2020-09-30 00:09:37","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":519,"height":444,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","medium-width":305,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","medium_large-width":519,"medium_large-height":444,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","large-width":519,"large-height":444,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","1536x1536-width":519,"1536x1536-height":444,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","2048x2048-width":519,"2048x2048-height":444,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","card_image-width":519,"card_image-height":444,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/primitive-arcade.png","wide_image-width":519,"wide_image-height":444}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h3>Use Arcade to dynamically override size<\/h3>\n<p>The primitive override Arcade expression does three things to determine a new size for the symbol layer:<\/p>\n<ul>\n<li><a href=\"#calculate-a-new-data-value\">Calculate a new data value<\/a><\/li>\n<li><a href=\"#translate-data-values-to-size-values\">Translate data values to size values<\/a><\/li>\n<li><a href=\"#adjust-sizes-based-on-view-scale\">Adjust sizes based on view scale<\/a><\/li>\n<\/ul>\n<details>\n<summary><strong>Expand to view the full Arcade expression used to override symbol layer size<\/strong><\/summary>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #333;font-weight: bold\">var<\/span> votesNext = $feature.PRS_DEM_16;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> votesPrevious = $feature.PRS_DEM_12;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> change = votesNext - votesPrevious;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> value = IIF( change &gt; <span style=\"color: #008080\">0<\/span>, change, <span style=\"color: #008080\">0<\/span>);\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ assign sizes to data values<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ interpolate between stops<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> sizeFactor = When(\r\n  value &gt;= <span style=\"color: #008080\">500000<\/span>, <span style=\"color: #008080\">40<\/span>,\r\n  value &gt;= <span style=\"color: #008080\">100000<\/span>, <span style=\"color: #008080\">30<\/span> + ((<span style=\"color: #008080\">40<\/span>-<span style=\"color: #008080\">30<\/span>)\/(<span style=\"color: #008080\">500000<\/span>-<span style=\"color: #008080\">100000<\/span>) * (value - <span style=\"color: #008080\">100000<\/span>)),\r\n  value &gt;= <span style=\"color: #008080\">50000<\/span>, <span style=\"color: #008080\">5<\/span> + ((<span style=\"color: #008080\">30<\/span>-<span style=\"color: #008080\">5<\/span>)\/(<span style=\"color: #008080\">100000<\/span>-<span style=\"color: #008080\">50000<\/span>) * (value - <span style=\"color: #008080\">1<\/span>)),\r\n  value &gt;= <span style=\"color: #008080\">10000<\/span>, <span style=\"color: #008080\">1<\/span> + ((<span style=\"color: #008080\">5<\/span>-<span style=\"color: #008080\">1<\/span>)\/(<span style=\"color: #008080\">50000<\/span>-<span style=\"color: #008080\">10000<\/span>) * (value - <span style=\"color: #008080\">0.5<\/span>)),\r\n  value &gt; <span style=\"color: #008080\">0<\/span>, <span style=\"color: #008080\">0.5<\/span> + ((<span style=\"color: #008080\">1<\/span>-<span style=\"color: #008080\">0.5<\/span>)\/(<span style=\"color: #008080\">10000<\/span>) * value),\r\n  <span style=\"color: #008080\">0<\/span>\r\n);\r\n\r\n<span style=\"color: #998;font-style: italic\">\/\/ adjust size based on scale<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ symbols grow as you zoom in<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ symbols shrink as you zoom out<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> scaleFactorBase = ( referenceScale \/ $view.scale );\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> scaleFactor = When(\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">1<\/span>, <span style=\"color: #008080\">1<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ 1<\/span>\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">0.5<\/span>, scaleFactorBase * <span style=\"color: #008080\">1<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ 0.6<\/span>\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">0.25<\/span>, scaleFactorBase * <span style=\"color: #008080\">1<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ 0.45<\/span>\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">0.125<\/span>, scaleFactorBase * <span style=\"color: #008080\">1<\/span>,  <span style=\"color: #998;font-style: italic\">\/\/ 0.3125<\/span>\r\n  scaleFactorBase * <span style=\"color: #008080\">1<\/span>  <span style=\"color: #998;font-style: italic\">\/\/ 0.1875<\/span>\r\n);\r\n\r\n<span style=\"color: #333;font-weight: bold\">return<\/span> sizeFactor * scaleFactor;\r\n<\/code><\/pre>\n<\/details>\n<p><a name=\"calculate-a-new-data-value\"><\/a><\/p>\n<h4>Calculate a new data value<\/h4>\n<p>The following snippet from the expression demonstrates how to calculate the change in votes between the two years for the <code>democrat-positive-votes<\/code> primitive.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #998;font-style: italic\">\/\/ 2016 Democrat votes<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> votesNext = $feature.PRS_DEM_16;\r\n<span style=\"color: #998;font-style: italic\">\/\/ 2012 Democrat votes<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> votesPrevious = $feature.PRS_DEM_12;\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> change = votesNext - votesPrevious;\r\n<span style=\"color: #998;font-style: italic\">\/\/ size will be zero if there wasn\u2019t<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ a positive change in votes<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> value = IIF( change &gt; <span style=\"color: #008080\">0<\/span>, change, <span style=\"color: #008080\">0<\/span>);\r\n<\/code><\/pre>\n<p>Pay particular attention to the <code>IIF(change &gt; 0, change, 0)<\/code> line. This determines whether the symbol layer will be visible. If there is a positive change in votes, then the difference will be used in the size calculation. If there was a negative change, then the size will be zero and the symbol layer will therefore not render. <\/p>\n<p>This line is slightly different for the <code>democrat-negative-votes<\/code> symbol layer:<\/p>\n<p><code>var value = IIF(change &lt; 0, abs(change), 0);<\/code><\/p>\n<p>This will use the absolute value of the difference in votes for the size calculation and return zero if there was an increase in votes.<\/p>\n<p><a name=\"translate-data-values-to-size-values\"><\/a><\/p>\n<h4>Translate data values to size values<\/h4>\n<p>Because the value returned from the expression should represent a size value in screen units we need to properly translate data values to sizes.<\/p>\n<p>The following snippet assigns sizes to specific data values and interpolates all sizes relative to the stops.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #998;font-style: italic\">\/\/ assign sizes to data values<\/span>\r\n<span style=\"color: #998;font-style: italic\">\/\/ interpolate between stops<\/span>\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> sizeFactor = When(\r\n  value &gt;= <span style=\"color: #008080\">500000<\/span>, <span style=\"color: #008080\">40<\/span>,\r\n  value &gt;= <span style=\"color: #008080\">100000<\/span>, <span style=\"color: #008080\">30<\/span> + ((<span style=\"color: #008080\">40<\/span>-<span style=\"color: #008080\">30<\/span>)\/(<span style=\"color: #008080\">500000<\/span>-<span style=\"color: #008080\">100000<\/span>) * (value - <span style=\"color: #008080\">100000<\/span>)),\r\n  value &gt;= <span style=\"color: #008080\">50000<\/span>, <span style=\"color: #008080\">5<\/span> + ((<span style=\"color: #008080\">30<\/span>-<span style=\"color: #008080\">5<\/span>)\/(<span style=\"color: #008080\">100000<\/span>-<span style=\"color: #008080\">50000<\/span>) * (value - <span style=\"color: #008080\">1<\/span>)),\r\n  value &gt;= <span style=\"color: #008080\">10000<\/span>, <span style=\"color: #008080\">1<\/span> + ((<span style=\"color: #008080\">5<\/span>-<span style=\"color: #008080\">1<\/span>)\/(<span style=\"color: #008080\">50000<\/span>-<span style=\"color: #008080\">10000<\/span>) * (value - <span style=\"color: #008080\">0.5<\/span>)),\r\n  value &gt; <span style=\"color: #008080\">0<\/span>, <span style=\"color: #008080\">0.5<\/span> + ((<span style=\"color: #008080\">1<\/span>-<span style=\"color: #008080\">0.5<\/span>)\/(<span style=\"color: #008080\">10000<\/span>) * value),\r\n  <span style=\"color: #008080\">0<\/span>\r\n);\r\n<\/code><\/pre>\n<p><a name=\"adjust-sizes-based-on-view-scale\"><\/a><\/p>\n<h4>Adjust sizes based on view scale<\/h4>\n<p>Since one set of sizes doesn&#8217;t fit at all scales, I use the following code to grow symbol sizes as the user zooms in and shrink them as they zoom out.<\/p>\n<pre><code style=\"padding: 0.5em;color: #333;background: #f8f8f8\"><span style=\"color: #333;font-weight: bold\">var<\/span> scaleFactorBase = Round( referenceScale \/ $view.scale, <span style=\"color: #008080\">1<\/span> );\r\n<span style=\"color: #333;font-weight: bold\">var<\/span> scaleFactor = When(\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">8<\/span>, scaleFactorBase \/ <span style=\"color: #008080\">6<\/span>,\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">4<\/span>, scaleFactorBase \/ <span style=\"color: #008080\">3<\/span>,\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">2<\/span>, scaleFactorBase \/ <span style=\"color: #008080\">1.7<\/span>,\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">1<\/span>, scaleFactorBase,\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">0.5<\/span>, scaleFactorBase * <span style=\"color: #008080\">1.2<\/span>,\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">0.25<\/span>, scaleFactorBase * <span style=\"color: #008080\">1.2<\/span>,\r\n  scaleFactorBase &gt;= <span style=\"color: #008080\">0.125<\/span>, scaleFactorBase * <span style=\"color: #008080\">2.5<\/span>,\r\n  scaleFactorBase * <span style=\"color: #008080\">3<\/span>\r\n);\r\n\r\n<span style=\"color: #333;font-weight: bold\">return<\/span> sizeFactor * scaleFactor;\r\n<\/code><\/pre>\n<p>Once each primitive has an override based on its corresponding data values, the visual will show nice, scalable multipart vector symbols that dynamically size based on data values and the scale of the map.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025391,"id":1025391,"title":"atlanta","filename":"atlanta.png","filesize":90383,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/atlanta-2","alt":"","author":"6561","description":"","caption":"Electoral swing in the 2016 U.S. presidential election in the counties surrounding Atlanta, Georgia.","name":"atlanta-2","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 00:30:14","modified":"2020-09-30 00:31:02","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1040,"height":686,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png","medium-width":396,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png","medium_large-width":768,"medium_large-height":507,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png","large-width":1040,"large-height":686,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png","1536x1536-width":1040,"1536x1536-height":686,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png","2048x2048-width":1040,"2048x2048-height":686,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta-705x465.png","card_image-width":705,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png","wide_image-width":1040,"wide_image-height":686}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/atlanta.png"},{"acf_fc_layout":"content","content":"<p><a name=\"working-with-size\"><\/a><\/p>\n<h2>Working with size<\/h2>\n<p>The following describes some of the decisions that went into choosing how to scale features based on data values.<\/p>\n<ul>\n<li><a href=\"#legend-considerations\">Legend considerations<\/a><\/li>\n<li><a href=\"#size-range-states\">Size range (states)<\/a><\/li>\n<li><a href=\"#size-range-counties\">Size range (counties)<\/a><\/li>\n<li><a href=\"#choosing-a-size-range\">Choosing a size range<\/a><\/li>\n<\/ul>\n<p><a name=\"legend-considerations\"><\/a><\/p>\n<h3>Legend considerations<\/h3>\n<p>There&#8217;s no doubt a complex visual needs a legend, especially when it involves multipart symbology. However, you may have noticed that size is not adequately described in the legend of this app.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025421,"id":1025421,"title":"popup-labels","filename":"popup-labels.png","filesize":57758,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/popup-labels","alt":"The popup and labels help the user understand the values of a feature better than a legend.","author":"6561","description":"","caption":"The popup and labels help the user understand the values of a feature better than a legend.","name":"popup-labels","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 00:45:15","modified":"2020-09-30 00:45:44","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":806,"height":481,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels.png","medium-width":437,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels.png","medium_large-width":768,"medium_large-height":458,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels.png","large-width":806,"large-height":481,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels.png","1536x1536-width":806,"1536x1536-height":481,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels.png","2048x2048-width":806,"2048x2048-height":481,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels-779x465.png","card_image-width":779,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/popup-labels.png","wide_image-width":806,"wide_image-height":481}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>In traditional print cartography, the legend would need to be more descriptive. The intention of the legend is to help the map reader read the values of individual features.<\/p>\n<p>I intentionally decided to avoid a description of the size range in the legend because the size of county symbols and the size of state symbols actually have slight differences. However, the fundamental assumption with size remains true for both layers: larger means more.<\/p>\n<p>Since the legend can&#8217;t communicate size effectively, I added labels and popups to display exact values. As you zoom in, labels appear with the values represented by each symbol part. The popup adds context to the raw values with additional information about the results of the election.<\/p>\n<p><a name=\"size-range-states\"><\/a><\/p>\n<h3>Size range (states)<\/h3>\n<p>The size of state symbol layers are based on the total number of votes. Since electoral votes in the United States are based on population, a higher number of votes indicates states with a larger population and therefore more electoral votes. So icons in California and Texas should be larger than those in the midwestern states. <\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025431,"id":1025431,"title":"state-results","filename":"state-results.png","filesize":109494,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/state-results","alt":"Total votes for each party in the 2016 U.S. presidential election.","author":"6561","description":"","caption":"Total votes for each party in the 2016 U.S. presidential election.","name":"state-results","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 00:47:51","modified":"2020-09-30 00:48:35","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1445,"height":677,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png","medium-width":464,"medium-height":217,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png","medium_large-width":768,"medium_large-height":360,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png","large-width":1445,"large-height":677,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png","1536x1536-width":1445,"1536x1536-height":677,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png","2048x2048-width":1445,"2048x2048-height":677,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results-826x387.png","card_image-width":826,"card_image-height":387,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png","wide_image-width":1445,"wide_image-height":677}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/state-results.png"},{"acf_fc_layout":"content","content":"<p>It should be noted that it is theoretically possible that a high voter turnout in a smaller state may result in a larger symbol than a neighboring state with more electoral votes, but low voter turnout.<\/p>\n<p><a name=\"size-range-counties\"><\/a><\/p>\n<h3>Size range (counties)<\/h3>\n<p>The size of a county&#8217;s symbol is based on the county&#8217;s total votes <em>as a percentage of the total state votes. <\/em> <a href=\"https:\/\/www.esri.com\/arcgis-blog\/author\/jimhe\/\">Jim Herries<\/a>, suggested this awesome approach because in the United States not all votes are created equal. Since electoral votes determine the winner of the election, the overall value of an individual&#8217;s vote differs in allocating electoral votes for each state. <\/p>\n<p>Therefore, a county with 3,000 votes in West Virginia has more influence in determining how electoral votes are distributed in that state than a county with 3,000 votes in Florida, simply because West Virginia has fewer people than Florida.<\/p>\n<p>That is why the sizes of icons in Delaware and New England are much larger in size than equivalent county totals in other states. They are more prominent because results in those counties has a higher probability of flipping a state&#8217;s electoral votes from one party to another.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025441,"id":1025441,"title":"county-size-example","filename":"county-size-example.png","filesize":26237,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/county-size-example","alt":"The symbol layers in Fairfield County, Connecticut are larger than those in Westchester County, New York even though the vote totals are smaller. The results in Fairfield County have more influence on the awarding of electoral votes than the votes in Connecticut than the results in Westchester County have in awarding electoral votes in New York.","author":"6561","description":"","caption":"The symbol layers in Fairfield County, Connecticut are larger than those in Westchester County, New York even though the vote totals are smaller. The results in Fairfield County have more influence on the awarding of electoral votes in Connecticut than the results in Westchester County have in awarding electoral votes in New York.","name":"county-size-example","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 00:52:23","modified":"2020-09-30 19:07:57","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":695,"height":391,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","medium-width":464,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","medium_large-width":695,"medium_large-height":391,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","large-width":695,"large-height":391,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","1536x1536-width":695,"1536x1536-height":391,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","2048x2048-width":695,"2048x2048-height":391,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","card_image-width":695,"card_image-height":391,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png","wide_image-width":695,"wide_image-height":391}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/county-size-example.png"},{"acf_fc_layout":"content","content":"<p><a name=\"choosing-a-size-range\"><\/a><\/p>\n<h3>Choosing a size range<\/h3>\n<p>Choosing an appropriate size range for symbols is difficult. Each decision comes with benefits and tradeoffs. The correct decision depends on the story you want to tell. <\/p>\n<p>I initially bounded the high data values and scaled features with a value of 0 votes to 0 pixels. This made the counties with more influence in determining electoral votes stand out on a state by state basis.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025481,"id":1025481,"title":"wv-proportional","filename":"wv-proportional.png","filesize":42659,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/wv-proportional","alt":"Not providing a minimum bound for size made it easier to see patterns of influential counties in West Virginia.","author":"6561","description":"","caption":"Not providing a minimum bound for size made it easier to see patterns of influential counties in West Virginia.","name":"wv-proportional","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 01:00:53","modified":"2020-09-30 01:02:03","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":964,"height":721,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png","medium-width":349,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png","medium_large-width":768,"medium_large-height":574,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png","large-width":964,"large-height":721,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png","1536x1536-width":964,"1536x1536-height":721,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png","2048x2048-width":964,"2048x2048-height":721,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional-622x465.png","card_image-width":622,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png","wide_image-width":964,"wide_image-height":721}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-proportional.png"},{"acf_fc_layout":"content","content":"<p>But that approach comes with a tradeoff. It takes away from seeing the results of all areas at once. Setting a larger minimum size helps identify rural patterns since the accumulated total of their votes can still significantly impact a state&#8217;s electoral votes. <\/p>\n<p>I opted to make the minimum size larger since the accumulation of results from small counties was influential in some swing states.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1025471,"id":1025471,"title":"wv-minsize","filename":"wv-minsize.png","filesize":77305,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\/wv-minsize","alt":"Providing a minimum size makes it easier to see the results of all features, though the size variation isn't obvious.","author":"6561","description":"","caption":"Providing a minimum size makes it easier to see the results of all features, though the size variation isn't as stark. The more influential counties of West Virginia are now less obvious.","name":"wv-minsize","status":"inherit","uploaded_to":1024331,"date":"2020-09-30 01:00:50","modified":"2020-10-02 23:16:26","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":823,"height":675,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png","medium-width":318,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png","medium_large-width":768,"medium_large-height":630,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png","large-width":823,"large-height":675,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png","1536x1536-width":823,"1536x1536-height":675,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png","2048x2048-width":823,"2048x2048-height":675,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize-567x465.png","card_image-width":567,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png","wide_image-width":823,"wide_image-height":675}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/wv-minsize.png"},{"acf_fc_layout":"content","content":"<h2>Conclusion<\/h2>\n<p>I find this visualization fascinating. At a glance, you can see where gains in one party coincide with losses in another. I keep learning new stories as I explore how patterns shifted in different parts of the country. I look forward to updating this app with 2020 data as it becomes available.<\/p>\n<p>Since another election is approaching (and more will follow in the years to come), I made this app configurable so you can try it with your own data. Simply <a href=\"https:\/\/github.com\/ekenes\/election-2016\">clone this repo<\/a> and follow the configuration steps in the README.<\/p>\n<p>Give these composite symbols a try and share your maps!<\/p>\n"}],"authors":[{"ID":6561,"user_firstname":"Kristian","user_lastname":"Ekenes","nickname":"Kristian Ekenes","user_nicename":"kekenes","display_name":"Kristian Ekenes","user_email":"KEkenes@esri.com","user_url":"https:\/\/github.com\/ekenes","user_registered":"2018-03-02 00:18:32","user_description":"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"related_articles":"","card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/card-large.jpg","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/banner-states.jpg"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Visualize electoral swing using composite symbols<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Visualize electoral swing using composite symbols\" \/>\n<meta property=\"og:description\" content=\"Use dynamic, scalable, composite symbols to map electoral swing in the next election.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.esri.com\/arcgis-blog\/wp-content\/uploads\/2021\/10\/card-large.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"826\" \/>\n\t<meta property=\"og:image:height\" content=\"465\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\"},\"author\":{\"name\":\"Kristian Ekenes\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b\"},\"headline\":\"Visualize electoral swing using composite symbols\",\"datePublished\":\"2020-10-05T16:00:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\"},\"wordCount\":6,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"cartography\",\"CIM\",\"data visualization\",\"elections\"],\"articleSection\":[\"Mapping\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\",\"name\":\"Visualize electoral swing using composite symbols\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2020-10-05T16:00:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Visualize electoral swing using composite symbols\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b\",\"name\":\"Kristian Ekenes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png\",\"caption\":\"Kristian Ekenes\"},\"description\":\"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.\",\"sameAs\":[\"https:\/\/github.com\/ekenes\",\"https:\/\/www.linkedin.com\/in\/kristian-ekenes\/\",\"https:\/\/x.com\/kekenes\"],\"gender\":\"male\",\"jobTitle\":\"Principal Product Engineer\",\"worksFor\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Visualize electoral swing using composite symbols","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols","og_locale":"en_US","og_type":"article","og_title":"Visualize electoral swing using composite symbols","og_description":"Use dynamic, scalable, composite symbols to map electoral swing in the next election.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","og_image":[{"width":826,"height":465,"url":"https:\/\/www.esri.com\/arcgis-blog\/wp-content\/uploads\/2021\/10\/card-large.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols"},"author":{"name":"Kristian Ekenes","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b"},"headline":"Visualize electoral swing using composite symbols","datePublished":"2020-10-05T16:00:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols"},"wordCount":6,"commentCount":0,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["cartography","CIM","data visualization","elections"],"articleSection":["Mapping"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols","name":"Visualize electoral swing using composite symbols","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2020-10-05T16:00:07+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/visualize-electoral-swing-using-composite-symbols#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Visualize electoral swing using composite symbols"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5469f723fbfb78138efbb1da56e6aa9b","name":"Kristian Ekenes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/ekenes-zurich-213x200.png","caption":"Kristian Ekenes"},"description":"Kristian Ekenes is a Principal Product Engineer at Esri specializing in data visualization on the web. He works on the ArcGIS Maps SDK for JavaScript, ArcGIS Arcade, and Map Viewer in ArcGIS Online. Kristian's work focuses on researching and developing new and innovative data visualization capabilities of geospatial data in web maps, Arcade integration in web maps, and applications of generative AI assistants in web maps. Prior to joining Esri, he worked as a GIS Specialist for an environmental consulting company. Kristian has degrees from Brigham Young University and Arizona State University.","sameAs":["https:\/\/github.com\/ekenes","https:\/\/www.linkedin.com\/in\/kristian-ekenes\/","https:\/\/x.com\/kekenes"],"gender":"male","jobTitle":"Principal Product Engineer","worksFor":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes"}]}},"text_date":"October 5, 2020","author_name":"Kristian Ekenes","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/kekenes","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/10\/banner-states.jpg","primary_product":"ArcGIS Maps SDK for JavaScript","tag_data":[{"term_id":26451,"name":"cartography","slug":"cartography","term_group":0,"term_taxonomy_id":26451,"taxonomy":"post_tag","description":"","parent":0,"count":558,"filter":"raw"},{"term_id":717771,"name":"CIM","slug":"cim","term_group":0,"term_taxonomy_id":717771,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"},{"term_id":30111,"name":"data visualization","slug":"data-visualization","term_group":0,"term_taxonomy_id":30111,"taxonomy":"post_tag","description":"","parent":0,"count":97,"filter":"raw"},{"term_id":29481,"name":"elections","slug":"elections","term_group":0,"term_taxonomy_id":29481,"taxonomy":"post_tag","description":"","parent":0,"count":15,"filter":"raw"}],"category_data":[{"term_id":22941,"name":"Mapping","slug":"mapping","term_group":0,"term_taxonomy_id":22941,"taxonomy":"category","description":"","parent":0,"count":2683,"filter":"raw"}],"product_data":[{"term_id":36831,"name":"ArcGIS Maps SDK for JavaScript","slug":"js-api-arcgis","term_group":0,"term_taxonomy_id":36831,"taxonomy":"product","description":"","parent":36601,"count":361,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":761,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=js-api-arcgis","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1024331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/6561"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=1024331"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1024331\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=1024331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=1024331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=1024331"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=1024331"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=1024331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}