{"id":45,"date":"2009-06-01T02:25:50","date_gmt":"2009-06-01T02:25:50","guid":{"rendered":"http:\/\/www.ericson.net\/content\/?p=45"},"modified":"2009-06-18T01:56:27","modified_gmt":"2009-06-18T01:56:27","slug":"mapping-olympic-medals","status":"publish","type":"post","link":"https:\/\/www.ericson.net\/content\/2009\/06\/mapping-olympic-medals\/","title":{"rendered":"Mapping Olympic Medals"},"content":{"rendered":"<p>Back in January, I answered a number of graphics-related questions in the <a href=\"http:\/\/www.nytimes.com\/2009\/01\/19\/business\/media\/19askthetimes.html?_r=1&#038;pagewanted=all\">Talk to the Newsroom<\/a> feature on nytimes.com, including one about our <a href=\"http:\/\/www.nytimes.com\/interactive\/2008\/08\/04\/sports\/olympics\/20080804_MEDALCOUNT_MAP.html\">Map of Olympic Medals<\/a>:<\/p>\n<blockquote><p>Q. I was very impressed by the Olympic-by-Olympic medal counts you ran during the Summer Games; the bubbles representing the biggest hauls of each Olympiad were a microcosm of 20th-century political and economic power. Can you walk us through the birth of something like this? Did someone browse through the medal counts and see trends \u2014 the rise of the U.S. and, later, China, the unnatural power of East Germany, e.g. \u2014 or is this something that becomes clear after you\u2019ve finished the graphics?<br \/>\n\u2014 John Dillon<\/p><\/blockquote>\n<p><!--more--><\/p>\n<p>A. I\u2019m glad you enjoyed the \u201cMap of Olympic Medals.\u201d We were looking for an interesting way to show trends in the medal count, and a quick glance at the data revealed how the counts were affected by the cold war boycotts in 1980 and 1984, the fall of the Soviet Union and the recent growth in China, so it seemed like a geographic representation might be the way to go.<\/p>\n<p>The next question was the form that the map should take. A constant challenge with data-driven maps is the presentation of data on top of the geographic areas that differ vastly in size. For example, Canada and The Netherlands won about the same number of medals in Beijing, but Canada occupies more than 200 times the land area of The Netherlands.<\/p>\n<p>There are a number of ways to attack this problem, each with pluses and minuses:<\/p>\n<p>If you were to do a traditional map where the countries were colored by the number of medals won, Canada and the Netherlands would have the same color, but Canada would be far more prominent on the map simply because of its size.<\/p>\n<p>A proportional symbols map \u2014 what we informally call a \u201cbubble\u201d map \u2014 places a circle, scaled in proportion to the data, on top of each country. It can give you a better representation of the data, but in places like Europe, where the countries are so close together, you can end up with so many overlapping circles that you can\u2019t tell countries apart. For an example, check out our county-by-county presidential election bubble map.<\/p>\n<p>A contiguous cartogram rescales each country so that its area on the map is proportional to the data.. It can be extraordinarily effective in some cases, but other times it ends up distorting the countries so much that it\u2019s hard to recognize them. Mark Newman\u2019s site at the University of Michigan has a number of examples, on topics ranging from population to greenhouse gas emissions.<\/p>\n<p>The form we chose was similar to a Dorling cartogram, which removes all references to the shape of the country and replaces them all with a symbol like a circle. The goal was to try to keep the countries\u2019 relative positions loosely correct \u2014 Canada north of the United States, and Mexico to the south \u2014 and have the countries remain in roughly the same spots from year to year. Using this style of map can give you a better presentation of the countries with the highest medal count \u2014 you don\u2019t have to worry about circles overlapping or shapes being distorted \u2014 at the expense of the ones with a low count, which are too small to be labeled. But when looking at medal counts, you\u2019re usually more interested in who did well, so it seemed an acceptable trade-off.<\/p>\n<p>The idea to use this style was loosely inspired by a terrific cartogram by John Tomanio in Fortune magazine in 2001 that showed the largest 500 companies in the world and the countries they were based in. (Sadly, I can\u2019t find it online anymore.)<\/p>\n<p>In the past, we\u2019d done similar cartograms a number of times \u2014 check out our 2003 California recall election graphic, done with squares \u2014 but in every case, a graphics editor had gone in and positioned the countries by hand. The tricky thing in this case was generating the cartogram dynamically, since the data would change throughout the Olympics, and we wouldn\u2019t have the time to update it each time a medal was awarded.<\/p>\n<p>So Lee Byron, one of our summer interns and a terrific programmer, came up with an algorithm to position the countries automatically in Flash using a \u201cforce-directed graph using a particle system.\u201d Countries try to locate themselves near where they are geographically located as well as close to geographically neighboring countries. The algorithm required a number of rounds of tweaking \u2014 for a while, New Zealand kept appearing west of Australia \u2014 but by the end, it was doing a remarkably good job of generating a map on the fly.<\/p>\n<p>At which point, we hooked it up to a live data feed of the Olympic results and let it roll.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in January, I answered a number of graphics-related questions in the Talk to the Newsroom feature on nytimes.com, including one about our Map of Olympic Medals: Q. I was very impressed by the Olympic-by-Olympic medal counts you ran during the Summer Games; the bubbles representing the biggest hauls of each Olympiad were a microcosm [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[4],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/posts\/45"}],"collection":[{"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":11,"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/posts\/45\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ericson.net\/content\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}