

{"id":3700,"date":"2015-10-04T20:01:20","date_gmt":"2015-10-05T01:01:20","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3700"},"modified":"2022-06-29T05:38:31","modified_gmt":"2022-06-29T10:38:31","slug":"replicating-natgeos-proper-earthquake-map-in-r","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/","title":{"rendered":"Replicating NatGeo&#8217;s &#8220;Proper&#8221; Earthquake Map in R"},"content":{"rendered":"<p>I saw <a href=\"http:\/\/news.nationalgeographic.com\/2015\/10\/151003-datapoints-what-earthquake-maps-should-really-look-like\/\">this post<\/a> over at NatGeo over the weekend and felt compelled to replicate this:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/news.nationalgeographic.com\/content\/dam\/news\/rights-exempt\/nat-geo-staff-graphics-illustrations\/2015\/10\/Earthquakes\/logarith_big.jpg?w=510\" alt=\"\" \/><\/p>\n<p>with ggplot2.<\/p>\n<p><a href=\"http:\/\/rud.is\/dl\/quakefiles.tgz\">Three shapefiles later<\/a> and we have it close enough to toss into a post (and I really don&#8217;t believe the continent names are necessary).<\/p>\n<pre><code class=\"language-r\">library(rgdal)\nlibrary(ggplot2)\nlibrary(ggthemes)\nlibrary(ggalt) # devtools::install_github(\"hrbrmstr\/ggalt\")\n\n# grab these from http:\/\/rud.is\/dl\/quakefiles.tgz\n\nworld &lt;- readOGR(\"countries.geo.json\", \"OGRGeoJSON\", stringsAsFactors=FALSE)\nplates &lt;- readOGR(\"plates.json\", \"OGRGeoJSON\", stringsAsFactors=FALSE)\nquakes &lt;- readOGR(\"quakes.json\", \"OGRGeoJSON\", stringsAsFactors=FALSE)\n\nworld_map &lt;- fortify(world)\nplates_map &lt;- fortify(plates)\nquakes_dat &lt;- data.frame(quakes)\nquakes_dat$trans &lt;- quakes_dat$mag %% 5\n\ngg &lt;- ggplot()\ngg &lt;- gg + geom_cartogram(data=world_map, map=world_map,\n                          aes(x=long, y=lat, map_id=id),\n                          color=\"white\", size=0.15, fill=\"#d8d8d6\")\ngg &lt;- gg + geom_cartogram(data=plates_map, map=plates_map,\n                          aes(x=long, y=lat, map_id=id),\n                          color=\"black\", size=0.1, fill=\"#00000000\", alpha=0)\ngg &lt;- gg + geom_point(data=quakes_dat,\n                      aes(x=coords.x1, y=coords.x2, size=trans),\n                      shape=1, alpha=1\/3, color=\"#d47e5d\", fill=\"#00000000\")\ngg &lt;- gg + geom_point(data=subset(quakes_dat, mag&gt;7.5),\n                      aes(x=coords.x1, y=coords.x2, size=trans),\n                      shape=1, alpha=1, color=\"black\", fill=\"#00000000\")\ngg &lt;- gg + geom_text(data=subset(quakes_dat, mag&gt;7.5),\n                     aes(x=coords.x1, y=coords.x2, label=sprintf(\"Mag %2.1f\", mag)),\n                     color=\"black\", size=3, vjust=c(3.9, 3.9, 5), fontface=\"bold\")\ngg &lt;- gg + scale_size(name=\"Magnitude\", trans=\"exp\", labels=c(5:8), range=c(1, 20))\ngg &lt;- gg + coord_map(\"mollweide\")\ngg &lt;- gg + theme_map()\ngg &lt;- gg + theme(legend.position=c(0.05, 0.99))\ngg &lt;- gg + theme(legend.direction=\"horizontal\")\ngg &lt;- gg + theme(legend.key=element_rect(color=\"#00000000\"))\ngg\n<\/code><\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3701\" data-permalink=\"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/unnamed-chunk-1-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&amp;ssl=1\" data-orig-size=\"1774,1012\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"unnamed-chunk-1-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=510%2C291&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?resize=510%2C291&#038;ssl=1\" alt=\"unnamed-chunk-1-1\" width=\"510\" height=\"291\" class=\"aligncenter size-full wp-image-3701\" \/><\/p>\n<p>I can only imagine how many mouse clicks that would be in a GIS program.<\/p>\n<p><strong>Addendum<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#comment-10477\">This comment<\/a> has links to where I acquired the shapefiles (good q by Michael)<\/li>\n<li>Thanks to <a href=\"http:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#comment-10478\">this comment<\/a> there&#8217;s now <a href=\"https:\/\/gist.github.com\/hrbrmstr\/7b779df95932752eae1d\">code in a gist<\/a> that makes a map re-cenetered on the Pacific<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/492abbc5439347a0bde0bf2944a1d2cf3c1d3b1b\/687474703a2f2f7275642e69732f646c2f726563656e7465722e706e67\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I saw this post over at NatGeo over the weekend and felt compelled to replicate this: with ggplot2. Three shapefiles later and we have it close enough to toss into a post (and I really don&#8217;t believe the continent names are necessary). library(rgdal) library(ggplot2) library(ggthemes) library(ggalt) # devtools::install_github(&#8220;hrbrmstr\/ggalt&#8221;) # grab these from http:\/\/rud.is\/dl\/quakefiles.tgz world &lt;- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3701,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[721,678,673,674,753,720,706,91],"tags":[810],"class_list":["post-3700","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cartography","category-data-visualization","category-datavis-2","category-dataviz","category-ggplot","category-gis","category-maps","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Replicating NatGeo&#039;s &quot;Proper&quot; Earthquake Map in R - rud.is<\/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:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Replicating NatGeo&#039;s &quot;Proper&quot; Earthquake Map in R - rud.is\" \/>\n<meta property=\"og:description\" content=\"I saw this post over at NatGeo over the weekend and felt compelled to replicate this: with ggplot2. Three shapefiles later and we have it close enough to toss into a post (and I really don&#8217;t believe the continent names are necessary). library(rgdal) library(ggplot2) library(ggthemes) library(ggalt) # devtools::install_github(&quot;hrbrmstr\/ggalt&quot;) # grab these from http:\/\/rud.is\/dl\/quakefiles.tgz world &lt;- [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-05T01:01:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-29T10:38:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1774\" \/>\n\t<meta property=\"og:image:height\" content=\"1012\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Replicating NatGeo&#8217;s &#8220;Proper&#8221; Earthquake Map in R\",\"datePublished\":\"2015-10-05T01:01:20+00:00\",\"dateModified\":\"2022-06-29T10:38:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/\"},\"wordCount\":100,\"commentCount\":22,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1\",\"keywords\":[\"post\"],\"articleSection\":[\"cartography\",\"Data Visualization\",\"DataVis\",\"DataViz\",\"ggplot\",\"gis\",\"maps\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/\",\"name\":\"Replicating NatGeo's \\\"Proper\\\" Earthquake Map in R - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1\",\"datePublished\":\"2015-10-05T01:01:20+00:00\",\"dateModified\":\"2022-06-29T10:38:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1\",\"width\":1774,\"height\":1012},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/10\\\/04\\\/replicating-natgeos-proper-earthquake-map-in-r\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Replicating NatGeo&#8217;s &#8220;Proper&#8221; Earthquake Map in R\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rud.is\\\/b\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\\\/\\\/rud.is\"],\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/author\\\/hrbrmstr\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Replicating NatGeo's \"Proper\" Earthquake Map in R - rud.is","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:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/","og_locale":"en_US","og_type":"article","og_title":"Replicating NatGeo's \"Proper\" Earthquake Map in R - rud.is","og_description":"I saw this post over at NatGeo over the weekend and felt compelled to replicate this: with ggplot2. Three shapefiles later and we have it close enough to toss into a post (and I really don&#8217;t believe the continent names are necessary). library(rgdal) library(ggplot2) library(ggthemes) library(ggalt) # devtools::install_github(\"hrbrmstr\/ggalt\") # grab these from http:\/\/rud.is\/dl\/quakefiles.tgz world &lt;- [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/","og_site_name":"rud.is","article_published_time":"2015-10-05T01:01:20+00:00","article_modified_time":"2022-06-29T10:38:31+00:00","og_image":[{"width":1774,"height":1012,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1","type":"image\/png"}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Replicating NatGeo&#8217;s &#8220;Proper&#8221; Earthquake Map in R","datePublished":"2015-10-05T01:01:20+00:00","dateModified":"2022-06-29T10:38:31+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/"},"wordCount":100,"commentCount":22,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1","keywords":["post"],"articleSection":["cartography","Data Visualization","DataVis","DataViz","ggplot","gis","maps","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/","url":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/","name":"Replicating NatGeo's \"Proper\" Earthquake Map in R - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1","datePublished":"2015-10-05T01:01:20+00:00","dateModified":"2022-06-29T10:38:31+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1","width":1774,"height":1012},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/10\/04\/replicating-natgeos-proper-earthquake-map-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Replicating NatGeo&#8217;s &#8220;Proper&#8221; Earthquake Map in R"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/10\/unnamed-chunk-1-1.png?fit=1774%2C1012&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-XG","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3775,"url":"https:\/\/rud.is\/b\/2015\/11\/08\/visualizing_survey_data\/","url_meta":{"origin":3700,"position":0},"title":"Visualizing Survey Data : Comparison Between Observations","author":"hrbrmstr","date":"2015-11-08","format":false,"excerpt":"Cybersecurity is a domain that really likes surveys, or at the very least it has many folks within it that like to conduct and report on surveys. One recent survey on threat intelligence is in it's second year, so it sets about comparing answers across years. Rather than go into\u2026","rel":"","context":"In &quot;Cybersecurity&quot;","block_context":{"text":"Cybersecurity","link":"https:\/\/rud.is\/b\/category\/cybersecurity\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/11\/Visualizing_Survey_Data___Comparison_Between_Observations.png?fit=1200%2C721&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/11\/Visualizing_Survey_Data___Comparison_Between_Observations.png?fit=1200%2C721&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/11\/Visualizing_Survey_Data___Comparison_Between_Observations.png?fit=1200%2C721&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/11\/Visualizing_Survey_Data___Comparison_Between_Observations.png?fit=1200%2C721&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/11\/Visualizing_Survey_Data___Comparison_Between_Observations.png?fit=1200%2C721&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11612,"url":"https:\/\/rud.is\/b\/2018\/10\/10\/geojson-version-of-cbc-quebec-ridings-hex-cartograms-with-example-usage-in-r\/","url_meta":{"origin":3700,"position":1},"title":"GeoJSON  Version of CBC Quebec Ridings Hex Cartograms with  Example Usage in R","author":"hrbrmstr","date":"2018-10-10","format":false,"excerpt":"The CBC covered the recent (as of the original post-time on this blog entry) Quebec elections and used a well-crafted hex grid map to display results: They have a great 'splainer on why they use this type of map. Thinking that it may be useful for others, I used a\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/10\/ggplot-sf.png?fit=1200%2C900&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3538,"url":"https:\/\/rud.is\/b\/2015\/07\/24\/a-path-towards-easier-map-projection-machinations-with-ggplot2\/","url_meta":{"origin":3700,"position":2},"title":"A Path Towards Easier Map Projection Machinations with ggplot2","author":"hrbrmstr","date":"2015-07-24","format":false,"excerpt":"The $DAYJOB doesn't afford much opportunity to work with cartographic datasets, but I really like maps and tinker with shapefiles and geo-data when I can, plus answer a ton of geo-questions on StackOverflow. R makes it easy\u2014one might even say too easy\u2014to work with maps. All it takes to make\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3832,"url":"https:\/\/rud.is\/b\/2015\/12\/28\/world-map-panel-plots-with-ggplot2-2-0-ggalt\/","url_meta":{"origin":3700,"position":3},"title":"World Map Panel Plots with ggplot2 2.0 &#038; ggalt","author":"hrbrmstr","date":"2015-12-28","format":false,"excerpt":"James Austin (@awhstin) made some #spiffy 4-panel maps with base R graphics but also posited he didn't use ggplot2 because: \u2026ggplot2 and maps currently do not support world maps at this point, which does not give us a great overall view. That is certainly a box I would not put\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/facetmaps.png?fit=1154%2C722&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/facetmaps.png?fit=1154%2C722&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/facetmaps.png?fit=1154%2C722&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/facetmaps.png?fit=1154%2C722&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/facetmaps.png?fit=1154%2C722&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":6380,"url":"https:\/\/rud.is\/b\/2017\/09\/18\/mapping-fall-foliage-with-sf\/","url_meta":{"origin":3700,"position":4},"title":"Mapping Fall Foliage with sf","author":"hrbrmstr","date":"2017-09-18","format":false,"excerpt":"I was socially engineered by @yoniceedee into creating today's post due to being prodded with this tweet: Where to see the best fall foliage, based on your location: https:\/\/t.co\/12pQU29ksB pic.twitter.com\/JiywYVpmno\u2014 Vox (@voxdotcom) September 18, 2017 Since there aren't nearly enough sf and geom_sf examples out on the wild, wild #rstats\u2026","rel":"","context":"In &quot;ggplot&quot;","block_context":{"text":"ggplot","link":"https:\/\/rud.is\/b\/category\/ggplot\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/f.gif?fit=800%2C480&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3054,"url":"https:\/\/rud.is\/b\/2014\/09\/26\/overcoming-d3-cartographic-envy-with-r-ggplot\/","url_meta":{"origin":3700,"position":5},"title":"Overcoming D3 Cartographic Envy With R + ggplot","author":"hrbrmstr","date":"2014-09-26","format":false,"excerpt":"When I used one of the Scotland TopoJSON files for a recent post, it really hit me just how much D3 cartography envy I had\/have as an R user. Don't get me wrong, I can conjure up D3 maps pretty well [1] [2] and the utility of an interactive map\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=3700"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3700\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/3701"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}