

{"id":2793,"date":"2013-11-27T09:01:25","date_gmt":"2013-11-27T14:01:25","guid":{"rendered":"http:\/\/rud.is\/b\/?p=2793"},"modified":"2017-04-02T22:51:56","modified_gmt":"2017-04-03T03:51:56","slug":"mapping-power-outages-in-maine-with-r","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/","title":{"rendered":"Mapping Power Outages In Maine With R"},"content":{"rendered":"<p><b>UPDATE: A Shiny (dynamic) version of this is now <a href=\"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-dynamically-with-shinyr\/\">available<\/a><\/b>.<\/p>\n<p>We had yet-another power outage this morning due to the weird weather patterns of the week and it was the final catalyst I needed to crank out some R code to map the affected counties.<\/p>\n<p>Central Maine Power provides an <span class=\"removed_link\" title=\"http:\/\/www.cmpco.com\/outages\/outageinformation.html\">outage portal<\/span> where folks can both report outages and see areas impacted by outages. They use an SAP web service that generates the outage table and the aforelinked page just embeds that URL (<code>http:\/\/www3.cmpco.com\/OutageReports\/CMP.html<\/code>) as an iframe. We can use the XML package in R to grab that HTML file, parse it, extract the table and then send the data to <code>ggplot<\/code>.<\/p>\n<p>It should be a good starting point for anyone wishing to do something similar. The next itch to scratch for me on this is a live D3 map that uses the outage table with drill-down capabilities to the linked data.<\/p>\n<pre lang=\"rsplus\">library(maps)\r\nlibrary(maptools)\r\nlibrary(ggplot2)\r\nlibrary(plyr)\r\nlibrary(XML)\r\n\r\ncmp.url <- \"http:\/\/www3.cmpco.com\/OutageReports\/CMP.html\"\r\n# get outage table (first one on the cmp.url page)\r\ncmp.node <- getNodeSet(htmlParse(cmp.url),\"\/\/table\")[[1]]\r\ncmp.tab <- readHTMLTable(cmp.node,\r\n                         header=c(\"subregion\",\"total.customers\",\"without.power\"),\r\n                         skip.rows=c(1,2,3),\r\n                         trim=TRUE, stringsAsFactors=FALSE)\r\n\r\n# clean up the table to it's easier to work with\r\ncmp.tab <- cmp.tab[-nrow(cmp.tab),] # get rid of last row\r\ncmp.tab$subregion <- tolower(cmp.tab$subregion)\r\ncmp.tab$total.customers <- as.numeric(gsub(\",\",\"\",cmp.tab$total.customers))\r\ncmp.tab$without.power <- as.numeric(gsub(\",\",\"\",cmp.tab$without.power))\r\n\r\n# get maine map with counties\r\ncounty.df <- map_data('county')\r\nme <- subset(county.df, region==\"maine\")\r\n\r\n# get a copy with just the affected counties\r\nout <- subset(me, subregion %in% cmp.tab$subregion)\r\n\r\n# add outage into to it\r\nout <- join(out, cmp.tab)\r\n\r\n# plot the map\r\ngg <- ggplot(me, aes(long, lat, group=group))\r\ngg <- gg + geom_polygon(fill=NA, colour='gray50', size=0.25)\r\ngg <- gg + geom_polygon(data=out, aes(long, lat, group=group, fill=without.power), \r\n                        colour='gray50', size=0.25)\r\ngg <- gg + scale_fill_gradient2(low=\"#FFFFCC\", mid=\"#FD8D3C\", high=\"#800026\")\r\ngg <- gg + coord_map()\r\ngg <- gg + theme_bw()\r\ngg <- gg + labs(x=\"\", y=\"\", title=\"CMP (Maine) Customers Without Power by County\")\r\ngg <- gg + theme(panel.border = element_blank(),\r\n                 panel.background = element_blank(),\r\n                 panel.grid = element_blank(),\r\n                 axis.text = element_blank(),\r\n                 axis.ticks = element_blank(),\r\n                 legend.position=\"left\",\r\n                 legend.title=element_blank())\r\ngg<\/pre>\n<p><center><a target=_blank href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2799\" data-permalink=\"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/plot_zoom-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&amp;ssl=1\" data-orig-size=\"530,680\" 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;}\" data-image-title=\"Plot_Zoom\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=510%2C654&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?resize=233%2C300&#038;ssl=1\" alt=\"Plot_Zoom\" width=\"233\" height=\"300\" class=\"aligncenter size-medium wp-image-2799\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?resize=233%2C300&amp;ssl=1 233w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?resize=116%2C150&amp;ssl=1 116w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?w=530&amp;ssl=1 530w\" sizes=\"auto, (max-width: 233px) 100vw, 233px\" \/>(click for larger)<\/a><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE: A Shiny (dynamic) version of this is now available. We had yet-another power outage this morning due to the weird weather patterns of the week and it was the final catalyst I needed to crank out some R code to map the affected counties. Central Maine Power provides an outage portal where folks can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2799,"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":[24,678,673,674,707,91],"tags":[],"class_list":["post-2793","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-charts-graphs","category-data-visualization","category-datavis-2","category-dataviz","category-maine","category-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mapping Power Outages In Maine With 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\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mapping Power Outages In Maine With R - rud.is\" \/>\n<meta property=\"og:description\" content=\"UPDATE: A Shiny (dynamic) version of this is now available. We had yet-another power outage this morning due to the weird weather patterns of the week and it was the final catalyst I needed to crank out some R code to map the affected counties. Central Maine Power provides an outage portal where folks can [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-27T14:01:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-03T03:51:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"530\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Mapping Power Outages In Maine With R\",\"datePublished\":\"2013-11-27T14:01:25+00:00\",\"dateModified\":\"2017-04-03T03:51:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/\"},\"wordCount\":160,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/Plot_Zoom.png?fit=530%2C680&ssl=1\",\"articleSection\":[\"Charts &amp; Graphs\",\"Data Visualization\",\"DataVis\",\"DataViz\",\"maine\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/\",\"name\":\"Mapping Power Outages In Maine With R - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/Plot_Zoom.png?fit=530%2C680&ssl=1\",\"datePublished\":\"2013-11-27T14:01:25+00:00\",\"dateModified\":\"2017-04-03T03:51:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/Plot_Zoom.png?fit=530%2C680&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/Plot_Zoom.png?fit=530%2C680&ssl=1\",\"width\":530,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/11\\\/27\\\/mapping-power-outages-in-maine-with-r\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mapping Power Outages In Maine With 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":"Mapping Power Outages In Maine With 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\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/","og_locale":"en_US","og_type":"article","og_title":"Mapping Power Outages In Maine With R - rud.is","og_description":"UPDATE: A Shiny (dynamic) version of this is now available. We had yet-another power outage this morning due to the weird weather patterns of the week and it was the final catalyst I needed to crank out some R code to map the affected counties. Central Maine Power provides an outage portal where folks can [&hellip;]","og_url":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/","og_site_name":"rud.is","article_published_time":"2013-11-27T14:01:25+00:00","article_modified_time":"2017-04-03T03:51:56+00:00","og_image":[{"width":530,"height":680,"url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1","type":"image\/png"}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Mapping Power Outages In Maine With R","datePublished":"2013-11-27T14:01:25+00:00","dateModified":"2017-04-03T03:51:56+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/"},"wordCount":160,"commentCount":2,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1","articleSection":["Charts &amp; Graphs","Data Visualization","DataVis","DataViz","maine","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/","url":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/","name":"Mapping Power Outages In Maine With R - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1","datePublished":"2013-11-27T14:01:25+00:00","dateModified":"2017-04-03T03:51:56+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1","width":530,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-with-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Mapping Power Outages In Maine With 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\/2013\/11\/Plot_Zoom.png?fit=530%2C680&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p23idr-J3","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2803,"url":"https:\/\/rud.is\/b\/2013\/11\/27\/mapping-power-outages-in-maine-dynamically-with-shinyr\/","url_meta":{"origin":2793,"position":0},"title":"Mapping Power Outages in Maine Dynamically with Shiny\/R","author":"hrbrmstr","date":"2013-11-27","format":false,"excerpt":"I decided to forego the D3 map mentioned in the previous post in favor of a Shiny one since I had 90% of the mapping code written. I binned the ranges into three groups, changed the color over to something more pleasant (with RColorBrewer), added an interactive table for the\u2026","rel":"","context":"In &quot;data driven security&quot;","block_context":{"text":"data driven security","link":"https:\/\/rud.is\/b\/category\/data-driven-security\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/162.243.111.4_3838_outages_.png?fit=470%2C735&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3141,"url":"https:\/\/rud.is\/b\/2014\/11\/27\/power-outage-impact-choropleths-in-5-steps-in-r-featuring-rvest-rstudio-projects\/","url_meta":{"origin":2793,"position":1},"title":"Power Outage Impact Choropleths In 5 Steps in R (featuring rvest &#038; RStudio &#8220;Projects&#8221;)","author":"hrbrmstr","date":"2014-11-27","format":false,"excerpt":"I and @awpiii were trading news about the power outages in Maine & New Hampshire last night and he tweeted the link to the @PSNH [Outage Map](http:\/\/www.psnh.com\/outage\/). As if the Bing Maps tiles weren't bad enough, the use of a categorical color scale instead of a sequential one[[1](http:\/\/earthobservatory.nasa.gov\/blogs\/elegantfigures\/2011\/05\/20\/qualitative-vs-sequential-color-scales\/)] caused sufficient\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":[]},{"id":6930,"url":"https:\/\/rud.is\/b\/2017\/11\/02\/yet-another-power-outages-post-full-tidyverse-edition\/","url_meta":{"origin":2793,"position":2},"title":"Yet-Another-Power Outages Post : Full Tidyverse Edition","author":"hrbrmstr","date":"2017-11-02","format":false,"excerpt":"This past weekend, violent windstorms raged through New England. We \u2014 along with over 500,000 other Mainers \u2014 went \"dark\" in the wee hours of Monday morning and (this post was published on Thursday AM) we still have no utility-provided power nor high-speed internet access. The children have turned iFeral,\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\/2017\/11\/plot_zoom_png.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/11\/plot_zoom_png.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2816,"url":"https:\/\/rud.is\/b\/2013\/11\/28\/one-more-timemapping-maine-power-outages-with-d3\/","url_meta":{"origin":2793,"position":3},"title":"One More Time\u2026Mapping Maine Power Outages with D3","author":"hrbrmstr","date":"2013-11-28","format":false,"excerpt":"It started with a local R version and migrated to a Shiny version and is now in full D3 glory. Some down time gave me the opportunity to start a basic D3 version of the outage map, but it needs a bit of work as it relies on a page\u2026","rel":"","context":"In &quot;d3&quot;","block_context":{"text":"d3","link":"https:\/\/rud.is\/b\/category\/d3\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Central_Maine_Power_Live_Outage_Map-2.png?fit=757%2C649&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Central_Maine_Power_Live_Outage_Map-2.png?fit=757%2C649&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Central_Maine_Power_Live_Outage_Map-2.png?fit=757%2C649&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/11\/Central_Maine_Power_Live_Outage_Map-2.png?fit=757%2C649&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2846,"url":"https:\/\/rud.is\/b\/2013\/12\/27\/points-polygons-and-power-outages\/","url_meta":{"origin":2793,"position":4},"title":"Points, Polygons and Power Outages","author":"hrbrmstr","date":"2013-12-27","format":false,"excerpt":"Most of my free coding time has been spent tweaking a D3-based live power outage tracker for Central Maine Power customers (there's also a woefully less-featured Shiny app for it, too). There is some R associated with the D3 vis, but it's limited to a cron job that's makes the\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":6917,"url":"https:\/\/rud.is\/b\/2017\/10\/30\/gg_tweeting-power-outages\/","url_meta":{"origin":2793,"position":5},"title":"gg_tweet&#8217;ing Power Outages","author":"hrbrmstr","date":"2017-10-30","format":false,"excerpt":"As many folks know, I live in semi-rural Maine and we were hit pretty hard with a wind+rain storm Sunday to Monday. The hrbrmstr compound had no power (besides a generator) and no stable\/high-bandwidth internet (Verizon LTE was heavily congested) since 0500 Monday and still does not as I write\u2026","rel":"","context":"In &quot;ggplot&quot;","block_context":{"text":"ggplot","link":"https:\/\/rud.is\/b\/category\/ggplot\/"},"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\/2793","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=2793"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/2793\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media\/2799"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=2793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=2793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=2793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}