

{"id":3615,"date":"2015-08-20T11:41:50","date_gmt":"2015-08-20T16:41:50","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3615"},"modified":"2018-03-07T16:43:28","modified_gmt":"2018-03-07T21:43:28","slug":"track-hurricane-danny-with-r-leaflet","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/","title":{"rendered":"Track Hurricane Danny (Interactively) with R + leaflet"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3618\" data-permalink=\"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/rstudio-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png?fit=775%2C409&amp;ssl=1\" data-orig-size=\"775,409\" 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=\"poster image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png?fit=510%2C269&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png?resize=510%2C269&#038;ssl=1\" alt=\"poster image\" width=\"510\" height=\"269\" class=\"aligncenter size-full wp-image-3618\" \/><\/p>\n<p>Danny became the [first hurricane of the 2015 Season](http:\/\/www.accuweather.com\/en\/weather-news\/atlantic-gives-birth-to-tropical-depression-four-danny\/51857239), so it&#8217;s a good time to revisit how one might be able to track them with R.<\/p>\n<p>We&#8217;ll pull track data from [Unisys](http:\/\/weather.unisys.com\/hurricane\/atlantic\/2015\/index.php) and just look at Danny, but it should be easy to extrapolate from the code.<\/p>\n<p>For this visualization, we&#8217;ll use [leaflet](http:\/\/rstudio.github.io\/leaflet\/) since it&#8217;s all the rage and makes the plots interactive without any real work (thanks to the very real work by the HTML Widgets folks and the Leaflet.JS folks).<\/p>\n<p>Let&#8217;s get the library calls out of the way:<\/p>\n<pre lang=\"rsplus\">library(leaflet)\r\nlibrary(stringi)\r\nlibrary(htmltools)\r\nlibrary(RColorBrewer)<\/pre>\n<p>Now, we&#8217;ll get the tracks:<\/p>\n<pre lang=\"rsplus\">danny <- readLines(\"http:\/\/weather.unisys.com\/hurricane\/atlantic\/2015\/DANNY\/track.dat\")<\/pre>\n<p>Why aren't we using `read.csv` or `read.table` directly, you ask? Well, the data is in a _really_ ugly format thanks to the spaces in the `STATUS` column and two prefix lines:<\/p>\n<pre lang=\"text\">Date: 18-20 AUG 2015\r\nHurricane-1 DANNY\r\nADV  LAT    LON      TIME     WIND  PR  STAT\r\n  1  10.60  -36.50 08\/18\/15Z   30  1009 TROPICAL DEPRESSION\r\n  2  10.90  -37.50 08\/18\/21Z    -     - TROPICAL DEPRESSION\r\n  3  11.20  -38.80 08\/19\/03Z    -     - TROPICAL DEPRESSION\r\n  4  11.30  -40.20 08\/19\/09Z    -     - TROPICAL DEPRESSION\r\n  5  11.20  -41.10 08\/19\/15Z    -     - TROPICAL DEPRESSION\r\n  6  11.50  -42.00 08\/19\/21Z    -     - TROPICAL DEPRESSION\r\n  7  12.10  -42.70 08\/20\/03Z    -     - TROPICAL DEPRESSION\r\n  8  12.20  -43.70 08\/20\/09Z    -     - TROPICAL DEPRESSION\r\n  9  12.50  -44.80 08\/20\/15Z    -     - TROPICAL DEPRESSION\r\n+12  13.10  -46.00 08\/21\/00Z   70     - HURRICANE-1\r\n+24  14.00  -47.60 08\/21\/12Z   75     - HURRICANE-1\r\n+36  14.70  -49.40 08\/22\/00Z   75     - HURRICANE-1\r\n+48  15.20  -51.50 08\/22\/12Z   70     - HURRICANE-1\r\n+72  16.00  -56.40 08\/23\/12Z   65     - HURRICANE-1\r\n+96  16.90  -61.70 08\/24\/12Z   65     - HURRICANE-1\r\n+120  18.00  -66.60 08\/25\/12Z   55     - TROPICAL STORM<\/pre>\n<p>But, we can put that into shape pretty easily, using `gsub` to make it easier to read everything with `read.table` and we just skip over the first two lines (we'd use them if we were doing other things with more of the data).<\/p>\n<pre lang=\"rsplus\">danny_dat <- read.table(textConnection(gsub(\"TROPICAL \", \"TROPICAL_\", danny[3:length(danny)])), \r\n           header=TRUE, stringsAsFactors=FALSE)<\/pre>\n<p>Now, let's make the data a bit prettier to work with:<\/p>\n<pre lang=\"rsplus\"># make storm type names prettier\r\ndanny_dat$STAT <- stri_trans_totitle(gsub(\"_\", \" \", danny_dat$STAT))\r\n\r\n# make column names prettier\r\ncolnames(danny_dat) <- c(\"advisory\", \"lat\", \"lon\", \"time\", \"wind_speed\", \"pressure\", \"status\")<\/pre>\n<p>Those steps weren't absolutely necessary, but why do something half-baked (unless it's chocolate chip cookies)?<\/p>\n<p>Let's pick better colors than Unisys did. We'll use a color-blind safe palette from Color Brewer:<\/p>\n<pre lang=\"rsplus\">danny_dat$color <- as.character(factor(danny_dat$status, \r\n                          levels=c(\"Tropical Depression\", \"Tropical Storm\",\r\n                                   \"Hurricane-1\", \"Hurricane-2\", \"Hurricane-3\",\r\n                                   \"Hurricane-4\", \"Hurricane-5\"),\r\n                          labels=rev(brewer.pal(7, \"YlOrBr\"))))<\/pre>\n<p>And, now for the map! We'll make lines for the path that was already traced by Danny, then make interactive points for the forecast locations from the advisory data:<\/p>\n<pre lang=\"rsplus\">last_advisory <- tail(which(grepl(\"^[[:digit:]]+$\", danny_dat$advisory)), 1)\r\n\r\n# draw the map\r\nleaflet() %>% \r\n  addTiles() %>% \r\n  addPolylines(data=danny_dat[1:last_advisory,], ~lon, ~lat, color=~color) -> tmp_map\r\n\r\nif (last_advisory < nrow(danny_dat)) {\r\n  \r\n   tmp_map <- tmp_map %>% \r\n     addCircles(data=danny_dat[last_advisory:nrow(danny_dat),], ~lon, ~lat, color=~color, fill=~color, radius=25000,\r\n             popup=~sprintf(\"<b>Advisory forecast for +%sh (%s)<\/b><hr noshade size='1'\/>\r\n                           Position: %3.2f, %3.2f<br\/>\r\n                           Expected strength: <span style='color:%s'><strong>%s<\/strong><\/span><br\/>\r\n                           Forecast wind: %s (knots)<br\/>Forecast pressure: %s\",\r\n                           htmlEscape(advisory), htmlEscape(time), htmlEscape(lon),\r\n                           htmlEscape(lat), htmlEscape(color), htmlEscape(status), \r\n                           htmlEscape(wind_speed), htmlEscape(pressure)))\r\n}\r\n\r\nhtml_print(tmp_map)<\/pre>\n<p><center><iframe loading=\"lazy\" style=\"max-width=100%\" \n        src=\"\/b\/iframes\/hurricane\/danny.html\" \n        sandbox=\"allow-same-origin \n        allow-scripts\" width=\"100%\" \n        height=\"500\" \n        scrolling=\"no\" \n        seamless=\"seamless\" \n        frameBorder=\"0\"><\/iframe><\/center><\/p>\n<p>Click on one of the circles to see the popup.<\/p>\n<p>The entire source code is in [this gist](https:\/\/gist.github.com\/hrbrmstr\/e3253ddd353f1a489bb4) and, provided you have the proper packages installed, you can run this at any time with:<\/p>\n<pre lang=\"rsplus\">devtools::source_gist(\"e3253ddd353f1a489bb4\", sha1=\"00074e03e92c48c470dc182f67c91ccac612107e\")<\/pre>\n<p>The use of the `sha1` hash parameter will help ensure you aren't being asked to run a potentially modified & harmful gist, but you should visit the gist first to make sure I'm not messing with you (which, I'm not).<\/p>\n<p>If you riff off of this or have suggestions for improvement, drop a note here or in the gist comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Danny became the [first hurricane of the 2015 Season](http:\/\/www.accuweather.com\/en\/weather-news\/atlantic-gives-birth-to-tropical-depression-four-danny\/51857239), so it&#8217;s a good time to revisit how one might be able to track them with R. We&#8217;ll pull track data from [Unisys](http:\/\/weather.unisys.com\/hurricane\/atlantic\/2015\/index.php) and just look at Danny, but it should be easy to extrapolate from the code. For this visualization, we&#8217;ll use [leaflet](http:\/\/rstudio.github.io\/leaflet\/) since it&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"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":false,"_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":[678,673,674,91,680],"tags":[810],"class_list":["post-3615","post","type-post","status-publish","format-standard","hentry","category-data-visualization","category-datavis-2","category-dataviz","category-r","category-weather","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Track Hurricane Danny (Interactively) with R + leaflet - 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\/08\/20\/track-hurricane-danny-with-r-leaflet\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Track Hurricane Danny (Interactively) with R + leaflet - rud.is\" \/>\n<meta property=\"og:description\" content=\"Danny became the [first hurricane of the 2015 Season](http:\/\/www.accuweather.com\/en\/weather-news\/atlantic-gives-birth-to-tropical-depression-four-danny\/51857239), so it&#8217;s a good time to revisit how one might be able to track them with R. We&#8217;ll pull track data from [Unisys](http:\/\/weather.unisys.com\/hurricane\/atlantic\/2015\/index.php) and just look at Danny, but it should be easy to extrapolate from the code. For this visualization, we&#8217;ll use [leaflet](http:\/\/rstudio.github.io\/leaflet\/) since it&#8217;s [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-20T16:41:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T21:43:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.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\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Track Hurricane Danny (Interactively) with R + leaflet\",\"datePublished\":\"2015-08-20T16:41:50+00:00\",\"dateModified\":\"2018-03-07T21:43:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/\"},\"wordCount\":391,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/RStudio.png\",\"keywords\":[\"post\"],\"articleSection\":[\"Data Visualization\",\"DataVis\",\"DataViz\",\"R\",\"Weather\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/\",\"name\":\"Track Hurricane Danny (Interactively) with R + leaflet - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/RStudio.png\",\"datePublished\":\"2015-08-20T16:41:50+00:00\",\"dateModified\":\"2018-03-07T21:43:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/RStudio.png?fit=775%2C409&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/RStudio.png?fit=775%2C409&ssl=1\",\"width\":775,\"height\":409},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/08\\\/20\\\/track-hurricane-danny-with-r-leaflet\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Track Hurricane Danny (Interactively) with R + leaflet\"}]},{\"@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":"Track Hurricane Danny (Interactively) with R + leaflet - 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\/08\/20\/track-hurricane-danny-with-r-leaflet\/","og_locale":"en_US","og_type":"article","og_title":"Track Hurricane Danny (Interactively) with R + leaflet - rud.is","og_description":"Danny became the [first hurricane of the 2015 Season](http:\/\/www.accuweather.com\/en\/weather-news\/atlantic-gives-birth-to-tropical-depression-four-danny\/51857239), so it&#8217;s a good time to revisit how one might be able to track them with R. We&#8217;ll pull track data from [Unisys](http:\/\/weather.unisys.com\/hurricane\/atlantic\/2015\/index.php) and just look at Danny, but it should be easy to extrapolate from the code. For this visualization, we&#8217;ll use [leaflet](http:\/\/rstudio.github.io\/leaflet\/) since it&#8217;s [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/","og_site_name":"rud.is","article_published_time":"2015-08-20T16:41:50+00:00","article_modified_time":"2018-03-07T21:43:28+00:00","og_image":[{"url":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png","type":"","width":"","height":""}],"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\/08\/20\/track-hurricane-danny-with-r-leaflet\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Track Hurricane Danny (Interactively) with R + leaflet","datePublished":"2015-08-20T16:41:50+00:00","dateModified":"2018-03-07T21:43:28+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/"},"wordCount":391,"commentCount":5,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png","keywords":["post"],"articleSection":["Data Visualization","DataVis","DataViz","R","Weather"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/","url":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/","name":"Track Hurricane Danny (Interactively) with R + leaflet - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png","datePublished":"2015-08-20T16:41:50+00:00","dateModified":"2018-03-07T21:43:28+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png?fit=775%2C409&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/08\/RStudio.png?fit=775%2C409&ssl=1","width":775,"height":409},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/08\/20\/track-hurricane-danny-with-r-leaflet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Track Hurricane Danny (Interactively) with R + leaflet"}]},{"@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":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-Wj","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3563,"url":"https:\/\/rud.is\/b\/2015\/07\/26\/making-staticinteractive-voronoi-map-layers-in-ggplotleaflet\/","url_meta":{"origin":3615,"position":0},"title":"Making Static\/Interactive Voronoi Map Layers In ggplot\/leaflet","author":"hrbrmstr","date":"2015-07-26","format":false,"excerpt":"Despite having shown various ways to overcome D3 cartographic envy, there are always more examples that can cause the green monster to rear it's ugly head. Take the Voronoi Arc Map example. For those in need of a primer, a Voronoi tesslation\/diagram is: \u2026a partitioning of a plane into regions\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":3083,"url":"https:\/\/rud.is\/b\/2014\/10\/07\/plot-me-like-a-hurricane-a-k-a-animating-historical-north-atlantic-basin-tropical-storm-tracks\/","url_meta":{"origin":3615,"position":1},"title":"Plot Me Like a Hurricane (a.k.a. animating historical North Atlantic basin tropical storm tracks)","author":"hrbrmstr","date":"2014-10-07","format":false,"excerpt":"Markus Gessman (@MarkusGesmann) did a beautiful job [Visualising the seasonality of Atlantic windstorms](http:\/\/www.magesblog.com\/2014\/10\/visualising-seasonality-of-atlantic.html) using small multiples, which was inspired by both a [post](http:\/\/freakonometrics.hypotheses.org\/17113) by Arthur Charpentier (@freakonometrics) on using Markov spatial processes to \"generate\" hurricanes\u2014which was [tweaked a bit](http:\/\/robertgrantstats.wordpress.com\/2014\/10\/01\/transparent-hurricane-paths-in-r\/) by Robert Grant (@robertstats)\u2014and [Gaston Sanchez](https:\/\/github.com\/gastonstat)'s [Visualizing Hurricane Trajectories](http:\/\/rpubs.com\/gaston\/hurricanes) RPub. I\u2026","rel":"","context":"In &quot;Data Visualization&quot;","block_context":{"text":"Data Visualization","link":"https:\/\/rud.is\/b\/category\/data-visualization\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3298,"url":"https:\/\/rud.is\/b\/2015\/03\/09\/new-r-package-ipapi-ipdomain-geolocation\/","url_meta":{"origin":3615,"position":2},"title":"New R Package &#8211; ipapi (IP\/Domain Geolocation)","author":"hrbrmstr","date":"2015-03-09","format":false,"excerpt":"I noticed that the @rOpenSci folks had an interface to [ip-api.com](http:\/\/ip-api.com\/) on their [ToDo](https:\/\/github.com\/ropensci\/webservices\/wiki\/ToDo) list so I whipped up a small R package to fill said gap. Their IP Geolocation API will take an IPv4, IPv6 or FQDN and kick back a ASN, lat\/lon, address and more. The [ipapi package](https:\/\/github.com\/hrbrmstr\/ipapi)\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":11928,"url":"https:\/\/rud.is\/b\/2019\/02\/18\/in-dev-wigle-your-way-into-a-hotspot-with-wiglr\/","url_meta":{"origin":3615,"position":3},"title":"In Dev: WiGLE Your Way Into A Hotspot with wiglr","author":"hrbrmstr","date":"2019-02-18","format":false,"excerpt":"WiGLE has been around a while and is a great site to explore the pervasiveness or sparsity of Wi-Fi (and cellular) networks around the globe. While interactive use is fun, WiGLE also has a free API (so long as you obey the EULA and aren't abusive) that lets you explore\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/02\/search-results.png?fit=1200%2C494&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/02\/search-results.png?fit=1200%2C494&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/02\/search-results.png?fit=1200%2C494&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/02\/search-results.png?fit=1200%2C494&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/02\/search-results.png?fit=1200%2C494&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":13232,"url":"https:\/\/rud.is\/b\/2021\/11\/02\/30daymapchallenge-2021-day-2-lines\/","url_meta":{"origin":3615,"position":4},"title":"#30DayMapChallenge 2021 Day 2: Lines","author":"hrbrmstr","date":"2021-11-02","format":false,"excerpt":"The 30-Day Map Challenge is on again, and I'm hoping to be able to scrounge some time to get an entry for each day. Day 2 is lines (Day 1 was posted on Twitter only) and \u2014 while I'm hoping to focus on saving U.S. democracy for the majority of\u2026","rel":"","context":"In &quot;gis&quot;","block_context":{"text":"gis","link":"https:\/\/rud.is\/b\/category\/gis\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3775,"url":"https:\/\/rud.is\/b\/2015\/11\/08\/visualizing_survey_data\/","url_meta":{"origin":3615,"position":5},"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":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3615","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=3615"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3615\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}