{"id":428,"date":"2014-01-06T21:38:36","date_gmt":"2014-01-07T02:38:36","guid":{"rendered":"http:\/\/homepages.uc.edu\/~yaozo\/wordpress\/?p=428"},"modified":"2014-01-06T21:38:36","modified_gmt":"2014-01-07T02:38:36","slug":"create-excel-choropleth-maps-from-shape-files","status":"publish","type":"post","link":"https:\/\/zhuoyao.net\/index.php\/2014\/01\/06\/create-excel-choropleth-maps-from-shape-files\/","title":{"rendered":"Create Excel Choropleth Maps from Shape Files"},"content":{"rendered":"<div>\n<h3>How to transform Shape Files into Microsoft Excel Choropleth Maps \u2013 including 2 Maps of Germany by Zip Codes<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Germany by Zip Codes\" alt=\"Germany by Zip Codes\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee62ee706970d-pi\" width=\"248\" height=\"260\" align=\"left\" border=\"0\" \/>On several occasions I thought (and stated) that I already published everything I have to say about Choropleth Maps with Excel.<\/p>\n<p>Having said that, it seems as if\u00a0<em>\u201cthe ghosts I called I can\u2019t get rid of now\u201d<\/em>. Recently someone asked me if I could provide an Excel Choropleth Map of Germany by zip codes. Careless and stupid boy I am, I answered \u201csure this is no problem\u201d. What a misjudgment.<\/p>\n<p>If you followed my previous\u00a0<a title=\"Excel Choropleth Map articles\" href=\"http:\/\/www.clearlyandsimply.com\/clearly_and_simply\/choropleth-maps\/\">Excel Choropleth Map articles<\/a>, you know that it takes either an Enhanced Metafile of the map you can ungroup in Excel to get the shapes or at least an SVG file to transform it to an EMF file using e.g.\u00a0<a title=\"Inkscape\" href=\"http:\/\/inkscape.org\/\">Inkscape<\/a>.<\/p>\n<p>And here is the roadblock I encountered: I simply couldn\u2019t find a map of Germany by zip codes in one of the required formats. All I could find were ESRI shape files. After hours of searching for EMF and SVG files, I gave up, simply reversed my thinking and looked for a tool to convert shape files into SVG. 5 minutes later I had the solution.<\/p>\n<p>Today\u2019s post describes how to use\u00a0<a title=\"Indiemapper\" href=\"http:\/\/indiemapper.com\/\">Indiemapper<\/a>, a free online tool, to transform shape files into SVG which can then be used for Microsoft Excel Choropleth Maps in the well-known way.<\/p>\n<\/div>\n<div>\n<h4>The Challenge<\/h4>\n<p>The Choropleth Map approach I used in all articles here requires ungrouped shapes in Excel. The easiest way of getting there is an EMF file you simply import into Excel and ungroup it until you have one shape for each region you want to visualize. If you don\u2019t have an EMF file,\u00a0<a title=\"Build your own Choropleth Maps with Excel\" href=\"http:\/\/www.clearlyandsimply.com\/clearly_and_simply\/2009\/08\/build-your-own-choropleth-maps-with-excel.html\">this article<\/a>\u00a0shows you how to transform an SVG file into EMF format.<\/p>\n<p>But what if you can find the map you need neither in EMF nor in SVG format.\u00a0<a href=\"http:\/\/www.gadm.org\/country\">Global Administrative Areas<\/a>, for one, provides the administrative regions of all countries of the world. The problem: they are ESRI shapes files, not EMF or SVG.<\/p>\n<p>Today\u2019s challenge is to find an easy way of transforming ESRI shape files into EMF which can be directly used in Excel for creating Choropleth Maps.<\/p>\n<h4>The Solution &#8211; Indiemapper<\/h4>\n<p><a title=\"Indiemapper\" href=\"http:\/\/indiemapper.com\/\">Indiemapper<\/a>\u00a0is a free service provided by\u00a0<a title=\"Axis Maps\" href=\"http:\/\/www.axismaps.com\/\">Axis Maps<\/a>\u00a0making static, thematic maps from geographic data. It also as an export feature to transfer shape files into SVG, JPG and PNG.<\/p>\n<p><a title=\"Indiemapper\" href=\"http:\/\/www.indiemapper.com\/\"><img loading=\"lazy\" decoding=\"async\" title=\"Indiemapper\" alt=\"Indiemapper\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee617a698970d-pi\" width=\"520\" height=\"308\" border=\"0\" \/><\/a><strong>Step 1: Load your Shape Files<\/strong><\/p>\n<p>After launching Indiemapper, click on Shapefile and browse for the file on your computer.<\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017d3ea30f01970c-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Browse for Shape File - click to enlarge\" alt=\"Browse for Shape File - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017d3ea30f12970c-pi\" width=\"320\" height=\"216\" border=\"0\" \/><\/a>If available, also upload the .dbf file in the following dialogue.<\/p>\n<p><strong>Step 2: Skip New Layer Option<\/strong><\/p>\n<p>Skip the next dialogue window to add a new layer by clicking on Cancel:<\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee617a6df970d-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Skip New Layer Option - click to enlarge\" alt=\"Skip New Layer Option - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017d3ea30f41970c-pi\" width=\"520\" height=\"303\" border=\"0\" \/><\/a><strong>Step 3: Turn off the Graticule<\/strong><\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017d3ea30f55970c-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Graticule - click to enlarge\" alt=\"Graticule - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017c34743607970b-pi\" width=\"200\" height=\"386\" border=\"0\" \/><\/a><\/p>\n<p>If necessary (like it was in my case), uncheck the strokes checkbox in the Graticule window.<\/p>\n<p><strong>Step 4: Export<\/strong><\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017c34743649970b-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Export - click to enlarge\" alt=\"Export - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017d3ea30fcd970c-pi\" width=\"520\" height=\"303\" border=\"0\" \/><\/a><\/p>\n<p>Click on export at the top right of the website, choose \u201clayered SVG\u201d, select a filename and click on Generate File:<\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee617a77b970d-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Generate File - click to enlarge\" alt=\"Generate File - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017c34743674970b-pi\" width=\"200\" height=\"283\" border=\"0\" \/><\/a><\/p>\n<p>Finally export the generated SVG file to your computer:<\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee617a79a970d-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Export File - click to enlarge\" alt=\"Export File - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017d3ea30ff6970c-pi\" width=\"200\" height=\"283\" border=\"0\" \/><\/a><\/p>\n<p>That\u2019s it. In 4 simple steps we transformed an ESRI Shape File into SVG, i.e. the file format we can now transform into an EMF file and prepare it for being used as a Choropleth Map in Excel, exactly the way I already described it here:\u00a0<a title=\"Build your own Choropleth Maps with Excel\" href=\"http:\/\/www.clearlyandsimply.com\/clearly_and_simply\/2009\/08\/build-your-own-choropleth-maps-with-excel.html\">Build your own Choropleth Maps with Excel<\/a>.<\/p>\n<h4>The Show Case \u2013 Germany by Zip Codes<\/h4>\n<p>With the few steps described above combined with the technique to transform SVG files into Excel Choropleth Maps (<a title=\"Build your own Choropleth Maps with Excel\" href=\"http:\/\/www.clearlyandsimply.com\/clearly_and_simply\/2009\/08\/build-your-own-choropleth-maps-with-excel.html\">here<\/a>), I was able to produce the following 2 maps of Germany by zip codes in almost no time.<\/p>\n<p>For your understanding: German zip codes have 5 digits and there are more than 8,200 of them (only the ones which represent a geographical region). Very often, geographical visualizations use only the first 2 digits of the zip code, dividing Germany into 95 regions. 95? Shouldn\u2019t that be 99? No. the remaining 4 are unused or do not represent a geographical area.<\/p>\n<p>So, here is a map of Germany by zip code 2 (what we call PLZ 2):<\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee617a7ce970d-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Germany by Zip Code 2 - click to enlarge\" alt=\"Germany by Zip Code 2 - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017c347436e9970b-pi\" width=\"520\" height=\"591\" border=\"0\" \/><\/a>And here is the comprehensive one: Germany by zip code 5 (PLZ 5) with more than 8,200 shapes:<\/p>\n<p><a href=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee62ee7a2970d-pi\"><img loading=\"lazy\" decoding=\"async\" title=\"Germany by Zip Code 5 - click to enlarge\" alt=\"Germany by Zip Code 5 - click to enlarge\" src=\"http:\/\/www.clearlyandsimply.com\/.a\/6a00e554d9fb998833017ee62ee800970d-pi\" width=\"520\" height=\"620\" border=\"0\" \/><\/a><\/p>\n<p>The Disadvantages<\/p>\n<p>Let\u2019s call a spade a spade: using Choropleth Maps in Microsoft Excel is nothing else than the poor man\u2019s geographical visualization tool. It takes some time and know-how to set them up and they come with a couple of disadvantages.<\/p>\n<p>The zip code 2 map with 95 shapes works pretty well. With the zip code 5 map, however, the technique is definitely reaching its limits:<\/p>\n<ul>\n<li>More than 8,200 shapes bloat the file size to almost 9 MB<\/li>\n<li>Although I used the optimized VBA code provided\u00a0<a title=\"Faster Choropleth Maps with Microsoft Excel\" href=\"http:\/\/www.clearlyandsimply.com\/clearly_and_simply\/2012\/09\/faster-choropleth-maps-with-microsoft-excel.html\">here<\/a>, the map takes around 10 seconds to update on my machine. Everything else than a good performance and user experience<\/li>\n<\/ul>\n<p>Still, if you do not have a professional geographical visualization tool available, Microsoft Excel can be a reasonable workaround, even for a very detailed map like Germany by zip codes.<\/p>\n<h4>The Download Links<\/h4>\n<p>Germany by zip code 2 (PLZ 2):<\/p>\n<p><a title=\"Download Choropleth Map Germany by Zip Code 2 (Microsoft Excel 2007\/2010, 965.7K)\" href=\"http:\/\/www.clearlyandsimply.com\/files\/2012\/12\/choropleth_map_germany_by_zip_code_2.xlsm\">Download Choropleth Map Germany by Zip Code 2 (Microsoft Excel 2007\/2010, 965.7K)<\/a><\/p>\n<p>Germany by zip code 5 (PLZ 5):<\/p>\n<p><a title=\"Download Choropleth Map Germany by Zip Code 5 (Microsoft Excel 2007\/2010, 8910.4K)\" href=\"http:\/\/www.clearlyandsimply.com\/files\/2012\/12\/choropleth_map_germany_by_zip_code_5.xlsm\">Download Choropleth Map Germany by Zip Code 5 (Microsoft Excel 2007\/2010, 8910.4K)<\/a><\/p>\n<p>The data used in these example workbooks is made up.<\/p>\n<h4>Acknowledgements<\/h4>\n<p>Many thanks go to the developers of\u00a0<a title=\"Indiemapper\" href=\"http:\/\/indiemapper.com\/\">Indiemapper<\/a>, Zachary Johnson, Andy Woodruff, Dave Heyman, Ben Sheesley and Mark Harrower for creating this great online tool and to<a title=\"Axis Maps\" href=\"http:\/\/www.axismaps.com\/\">Axis Maps<\/a>\u00a0for providing it for free. Thank you!<\/p>\n<p>Stay tuned.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to transform Shape Files into Microsoft Excel Choropleth Maps \u2013 including 2 Maps of Germany by Zip Codes On several occasions I thought (and&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-428","post","type-post","status-publish","format-standard","hentry","category-arcgis"],"_links":{"self":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":0,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/428\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/media?parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/categories?post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/tags?post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}