hrbrthemes 0.6.0 on CRAN + Other In-Development Package News

[This article was first published on R – rud.is, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Version 0.6.0 of the hrbrthemes🔗 package should be hitting a CRAN mirror near you soon. Apart from some general documentation and code cleanup this release includes the dark theme folks have been seeing in blog posts and tweets over the past few months. It’s called theme_ft_rc() since it is an homage to the wonderful new chart theme developed by the @ft_data crew over at the Financial Times (you can see examples from their work here).

While there was nothing stopping folks from using the GitHub version, the CRAN release makes it more widely available. There are still intermittent issues with fonts for some folks which I’ll be working on for the next release.

Since you’ve already seen lots of examples of these charts I won’t just make a gratuitous example using the theme. I will, however, make some charts based on a new data package dubbed iceout🔗. The iceout package was originally conceived by Ben Tupper from the Bigelow Laboratory for Ocean Sciences. I keep an eye on fellow Mainer repositories and I did not realize (but should have known) that researches keep track of when inland bodies of water freeze and thaw. The package name is derived from the term used for the thaw measurements (“ice-out” or “ice-off”).

Before becoming obsessed with this data and getting the package to the current state it is in, the original codebase worked off of a USGS Lake Ice-Out Data for New England dataset that focused solely on New England and only went up to 2005. Some digging discovered that

  • Maine’s Department of Agriculture and Forestry maintains online records since 2003; and,
  • Minnesota’s Department of Natural Resources maintains a comprehensive database of records going back to the 1800’s.

But I hit the jackpot after discovering the U.S. National Snow & Ice Data Center’s Global Lake and River Ice Phenology dataset which:

… contains freeze and breakup dates and other ice cover descriptive data for 865 lakes and rivers. Of the 542 water bodies that have records longer than 19 years, 370 are in North America and 172 are in Eurasia; 249 have records longer than 50 years; and 66 longer than 100 years. A few have data prior to 1845. These data, from water bodies distributed around the Northern Hemisphere, allow analysis of broad spatial patterns as well as long-term temporal patterns.

So, I converted the original package to a data package containing all four of those datasets plus some interactive functions for pulling “live” data and a set of “builders” to regenerate the databases. Let’s take a quick look at what’s in the NSIDC data and the global coverage area:

library(iceout) # github/hrbrmstr/iceout
library(hrbrthemes) 
library(ggplot2)
library(dplyr)

data("nsidc_iceout")

glimpse(nsidc_iceout)
## Observations: 35,918
## Variables: 37
## $ lakecode                 "ARAI1", "ARAI1", "ARAI1", "ARAI1", "ARAI1", "ARAI1", "ARAI1…
## $ lakename                 "Lake Suwa", "Lake Suwa", "Lake Suwa", "Lake Suwa", "Lake Su…
## $ lakeorriver              "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", …
## $ season                   "1443-44", "1444-45", "1445-46", "1446-47", "1447-48", "1448…
## $ iceon_year               1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, …
## $ iceon_month              12, 11, 12, 12, 11, 12, 12, 12, 12, 11, 12, 12, 12, 12, 12, …
## $ iceon_day                8, 23, 1, 2, 30, 8, 13, 8, 23, 28, 3, 5, 1, 5, 6, 20, 10, 15…
## $ iceoff_year              NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ iceoff_month             NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ iceoff_day               NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ duration                 NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ latitude                 36.15, 36.15, 36.15, 36.15, 36.15, 36.15, 36.15, 36.15, 36.1…
## $ longitude                138.08, 138.08, 138.08, 138.08, 138.08, 138.08, 138.08, 138.…
## $ country                  "Japan", "Japan", "Japan", "Japan", "Japan", "Japan", "Japan…
## $ froze                    TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, …
## $ obs_comments             "calendar correction for ice_on: -30 days of original data; …
## $ area_drained             531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, …
## $ bow_comments             NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ conductivity_us          NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ elevation                759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, …
## $ filename                 "ARAI", "ARAI", "ARAI", "ARAI", "ARAI", "ARAI", "ARAI", "ARA…
## $ initials                 "ARAI", "ARAI", "ARAI", "ARAI", "ARAI", "ARAI", "ARAI", "ARA…
## $ inlet_streams            "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", …
## $ landuse_code             "UAFO", "UAFO", "UAFO", "UAFO", "UAFO", "UAFO", "UAFO", "UAF…
## $ largest_city_population  52000, 52000, 52000, 52000, 52000, 52000, 52000, 52000, 5200…
## $ max_depth                7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, …
## $ mean_depth               4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, …
## $ median_depth             NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ power_plant_discharge    NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ secchi_depth             NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ shoreline                18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, …
## $ surface_area             12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, …
## $ state                    "Nagano Prefecture", "Nagano Prefecture", "Nagano Prefecture…
## $ iceon_date               1443-12-08, 1444-11-23, 1445-12-01, 1446-12-02, 1447-11-30,…
## $ iceon_doy                342, 328, 335, 336, 334, 343, 347, 342, 357, 333, 337, 339, …
## $ iceout_date              NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,…
## $ iceout_doy               NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …

maps::map("world", ".", exact = FALSE, plot = FALSE, fill = TRUE) %>%
  fortify() -> wrld

ggplot() + 
  ggalt::geom_cartogram(
    data = wrld, map = wrld, aes(long, lat, map_id=region), 
    fill="#3B454A",  color = "white", size = 0.125
  ) +
  geom_point(
    data = distinct(nsidc_iceout, lakeorriver, longitude, latitude),
    aes(longitude, latitude, fill = lakeorriver), 
    size = 1.5, color = "#2b2b2b", stroke = 0.125, shape = 21
  ) +
  scale_fill_manual(
    name = NULL, values = c("L"="#fdbf6f", "R"="#1f78b4"), labels=c("L" = "Lake", "R" = "River")
  ) +
  ggalt::coord_proj("+proj=wintri", ylim = range(nsidc_iceout$latitude, na.rm = TRUE)) +
  labs(title = "NSIDC Dataset Coverage") +
  theme_ft_rc(grid="") +
  theme(legend.position = c(0.375, 0.1)) +
  theme(axis.text = element_blank(), axis.title = element_blank())

W00t! Lots of data (though not all of the extra features are populated for all readings/areas)!

I think the reason the ice-out data garnered my obsession was how it can be used as another indicator that we are indeed in the midst of a climate transformation. Let’s look at the historical ice-out information for Maine inland bodies of water:

filter(nsidc_iceout, country == "United States", state == "ME") %>% 
  mutate(iceout_date = as.Date(format(iceout_date, "2020-%m-%d"))) %>% # we want the Y axis formatted as month-day so we choose a leap year to ensure we get leap dates (if any)
  ggplot(aes(iceoff_year, iceout_date)) +
  geom_point(aes(color = lakename), size = 0.5, alpha=1/4) +
  geom_smooth(aes(color = lakename), se=FALSE, method = "loess", size=0.25) +
  scale_y_date(date_labels = "%b-%d") +
  labs(
    x = NULL, y = "Ice-out Month/Day", color = NULL,
    title = "Historical Ice-out Data/Trends for Maine Inland Bodies of Water"
  ) +
  theme_ft_rc(grid="XY")

You can follow that code-pattern to look at other states. It’s also fun to look at the ice-out date distributions by latitude grouping:

filter(nsidc_iceout, !is.na(latitude) & !is.na(longitude) & !is.na(iceout_date)) %>% 
  filter(country == "United States") %>% 
  mutate(iceout_date = as.Date(format(iceout_date, "2020-%m-%d"))) %>% 
  mutate(lat_grp = cut(latitude, scales::pretty_breaks(5)(latitude), ordered_result = TRUE)) %>% 
  arrange(desc(iceoff_year)) %>% 
  ggplot() +
  ggbeeswarm::geom_quasirandom(
    aes(lat_grp, iceout_date, fill = iceoff_year), groupOnX = TRUE, 
    shape = 21, size =1, color = "white", stroke = 0.125, alpha=1/2
  ) +
  scale_y_date(date_labels = "%b-%d") +
  viridis::scale_fill_viridis(name = "Year", option = "magma") +
  labs(
    x = "Latitude Grouping", y = "Ice-out Month/Day",
    title = "U.S. Ice-out Historical Day/Month Distributions by Latitude Grouping"
  ) +
  theme_ft_rc(grid="Y")

If you want to focus on individual lakes there’s a Shiny app for that (well one for the U.S. anyway).

After loading the package, just enter explore_us() at an R console and you’ll see something like this:

The leaflet view will zoom to each new lake selected and the graph will be updated as well.

Other Package News

The sergeant🔗 package is reaching a stable point in the 0.8.0 branch (mostly due to David Severski’s tireless help finding bugs 😁) and should be headed to CRAN soon. Get your issues or PRs in if you want them CRANdied.

I’ve finally updated the Java library dependencies in pdfboxjars🔗 so pdfbox🔗 will no longer cause GitHub to tell you or I that it is insecure.

There’s a new package dubbed reapr🔗 that is aimed somewhere at the intersection of curl + httr + rvest. Fundamentally, it provides some coder-uplift when scraping data. The README has examples but here’s what you get on an initial scrape of this blog’s index page:

reapr::reap_url("http://rud.is/b")
##                Title: rud.is | "In God we trust. All others must bring data"
##         Original URL: http://rud.is/b
##            Final URL: https://rud.is/b/
##           Crawl-Date: 2019-01-17 19:51:09
##               Status: 200
##         Content-Type: text/html; charset=UTF-8
##                 Size: 50 kB
##           IP Address: 104.236.112.222
##                 Tags: body[1], center[1], form[1], h2[1], head[1], hgroup[1], html[1],
##                       label[1], noscript[1], section[1], title[1],
##                       aside[2], nav[2], ul[2], style[5], img[6],
##                       input[6], article[8], time[8], footer[9], h1[9],
##                       header[9], p[10], li[19], meta[20], div[31],
##                       script[40], span[49], link[53], a[94]
##           # Comments: 17
##   Total Request Time: 2.093s

The reap_url() function:

  • Uses httr::GET() to make web connections and retrieve content which enables it to behave more like an actual (non-javascript-enabled) browser. You can pass anything httr::GET() can handle to ... (e.g. httr::user_agent()) to have as much granular control over the interaction as possible.
  • Returns a richer set of data. After the httr::response object is obtained many tasks are performed including:
    • timestamping of the URL crawl
    • extraction of the asked-for URL and the final URL (in the case
      of redirects)
    • extraction of the IP address of the target server
    • extraction of both plaintext and parsed (xml_document) HTML
    • extraction of the plaintext webpage </code> (if any)</li> <li>generation of a dynamic list tags in the document which can be<br /> fed directly to HTML/XML search/retrieval function (which may<br /> speed up node discovery)</li> <li>extraction of the text of all comments in the HTML document</li> <li>inclusion of the full <code>httr::response</code> object with the returned<br /> object</li> <li>extraction of the time it took to make the complete request</li> </ul> </li> </ul> <p>I’m still wrestling with the API so definitely file issues with suggestions (wherever you’re most comfortable socially coding).</p> <p>Speaking of IP addresses (bullet 3 above), I finally got some time to study the <a href="https://getdnsapi.net/" rel="nofollow" target="_blank"><code>gdns</code><img src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&ssl=1" alt="🔗" class="wp-smiley jetpack-lazy-image" style="height: 1em; max-height: 1em;" data-recalc-dims="1" data-lazy-src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&is-pending-load=1#038;ssl=1" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"><noscript><img src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&ssl=1" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" data-recalc-dims="1" /></noscript></a> C library (a modern DNS API library) and created the <a href="https://git.sr.ht/~hrbrmstr/clandnstine" rel="nofollow" target="_blank"><code>clandnstine</code><img src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&ssl=1" alt="🔗" class="wp-smiley jetpack-lazy-image" style="height: 1em; max-height: 1em;" data-recalc-dims="1" data-lazy-src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&is-pending-load=1#038;ssl=1" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"><noscript><img src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&ssl=1" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" data-recalc-dims="1" /></noscript></a> package. The package name jeu de mots is due to the fact that the intent is to have it solely support <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" rel="nofollow" target="_blank">DNS over TLS</a> requests since regular DNS is plaintext, enables ISP spying/injection and generally fraught with peril. All forms of DNS lookups are supported. The catch is that you have to point it at a DNS over TLS-capable resolver. The package defaults to Quad9 (9.9.9.9) because I trust them more than Google or Cloudflare (btw: that’s not saying much as I trust used car salesfolks more than all three of them). Keep an eye (or RSS reader) peeled on <a href="https://blog.rapid7.com/" rel="nofollow" target="_blank">$WORK blog</a> over the coming weeks as I’ll have some analysis and data on a few hundred DNS over TLS endpoints you can use thanks to a new study developed by cow-orkers Jon Hart and Shan Skidar.</p> <p>There also a toy package <a href="https://git.sr.ht/~hrbrmstr/forcequotes" rel="nofollow" target="_blank"><code>forecequotes</code><img src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&ssl=1" alt="🔗" class="wp-smiley jetpack-lazy-image" style="height: 1em; max-height: 1em;" data-recalc-dims="1" data-lazy-src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&is-pending-load=1#038;ssl=1" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"><noscript><img src="https://i0.wp.com/s.w.org/images/core/emoji/11/72x72/1f517.png?w=578&ssl=1" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" data-recalc-dims="1" /></noscript></a> that is more “have fun with the <code>cli</code> & <code>crayon</code> packages” than anything else. But if you like Star Wars, random quote APIs and want to integrate richer command line interface output into your work, then definitely give it a peek.</p> <p>Finally, I haven’t used R’s direct C interface in a while (since Rcpp is addictive and handy) and wanted to keep those skills fresh, so I made a <a href="https://git.sr.ht/~hrbrmstr/iptrie" rel="nofollow" target="_blank">wrapper</a> to an old (in internet years) <a href="https://github.com/zmap/iptree" rel="nofollow" target="_blank">IP address trie C library</a>. The underlying library is much slower than what we use in <code>iptools</code> but it works, does a bit more than its <code>iptoos</code> counterpart and covers data marshaling, external pointer handling, and attribute/class setting so it may be a half-decent reference package for using the R<->C bridge.</p> <h3>FIN</h3> <p>If you know of more/better ice-out data please drop an issue in the Bigelow Labs’ <code>iceout</code> repo and I’ll get it integrated. And, if you do your own ice-out exploration definitely blog about it, tell R Weekly and drop a note in the comments.</p> <p>Here are links to all the mentioned packages grouped by social coding platform (so you can interact/collaborate wherever you feel most comfortable working):</p> <p><strong>sr.ht</strong></p> <ul> <li><a href="https://git.sr.ht/~hrbrmstr/hrbrthemes" rel="nofollow" target="_blank">hrbrthemes</a></li> <li><a href="https://git.sr.ht/~hrbrmstr/sergeant" rel="nofollow" target="_blank">sergeant</a></li> <li><a href="https://git.sr.ht/~hrbrmstr/pdfboxjars" rel="nofollow" target="_blank">pdfboxjars</a></li> <li><a href="https://git.sr.ht/~hrbrmstr/pdfbox" rel="nofollow" target="_blank">pdfbox</a></li> <li><a href="https://git.sr.ht/~hrbrmstr/reapr" rel="nofollow" target="_blank">reapr</a></li> <li><a href="https://git.sr.ht/~hrbrmstr/forcequotes" rel="nofollow" target="_blank">forcequotes</a></li> <li><a href="https://git.sr.ht/~hrbrmstr/iptrie" rel="nofollow" target="_blank">iptrie</a></li> </ul> <p><strong>GitLab</strong></p> <ul> <li><a href="https://gitlab.com/hrbrmstr/hrbrthemes" rel="nofollow" target="_blank">hrbrthemes</a></li> <li><a href="https://gitlab.com/hrbrmstr/sergeant" rel="nofollow" target="_blank">sergeant</a></li> <li><a href="https://gitlab.com/hrbrmstr/pdfboxjars" rel="nofollow" target="_blank">pdfboxjars</a></li> <li><a href="https://gitlab.com/hrbrmstr/pdfbox" rel="nofollow" target="_blank">pdfbox</a></li> <li><a href="https://gitlab.com/hrbrmstr/reapr" rel="nofollow" target="_blank">reapr</a></li> <li><a href="https://gitlab.com/hrbrmstr/forcequotes" rel="nofollow" target="_blank">forcequotes</a></li> <li><a href="https://gitlab.com/hrbrmstr/iptrie" rel="nofollow" target="_blank">iptrie</a></li> </ul> <p><strong>GitHub</strong></p> <ul> <li><a href="https://github.com/hrbrmstr/hrbrthemes" rel="nofollow" target="_blank">hrbrthemes</a></li> <li><a href="https://github.com/hrbrmstr/sergeant" rel="nofollow" target="_blank">sergeant</a></li> <li><a href="https://github.com/hrbrmstr/pdfboxjars" rel="nofollow" target="_blank">pdfboxjars</a></li> <li><a href="https://github.com/hrbrmstr/pdfbox" rel="nofollow" target="_blank">pdfbox</a></li> <li><a href="https://github.com/hrbrmstr/reapr" rel="nofollow" target="_blank">reapr</a></li> <li><a href="https://github.com/hrbrmstr/forcequotes" rel="nofollow" target="_blank">forcequotes</a></li> <li><a href="https://github.com/hrbrmstr/iptrie" rel="nofollow" target="_blank">iptrie</a></li> </ul> <script type="text/javascript"> var vglnk = {key: '949efb41171ac6ec1bf7f206d57e90b8'}; (function(d, t) { var s = d.createElement(t); s.type = 'text/javascript'; s.async = true; // s.defer = true; // s.src = '//cdn.viglink.com/api/vglnk.js'; s.src = 'https://www.r-bloggers.com/wp-content/uploads/2020/08/vglnk.js'; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, 'script')); </script> <div id='jp-relatedposts' class='jp-relatedposts' > <h3 class="jp-relatedposts-headline"><em>Related</em></h3> </div><aside class="mashsb-container mashsb-main mashsb-stretched"><div class="mashsb-box"><div class="mashsb-buttons"><a class="mashicon-facebook mash-small mash-center mashsb-noshadow" href="https://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.r-bloggers.com%2F2019%2F01%2Fhrbrthemes-0-6-0-on-cran-other-in-development-package-news%2F" target="_blank" rel="nofollow"><span class="icon"></span><span class="text">Share</span></a><a class="mashicon-twitter mash-small mash-center mashsb-noshadow" href="https://twitter.com/intent/tweet?text=hrbrthemes%200.6.0%20on%20CRAN%20%2B%20Other%20In-Development%20Package%20News&url=https://www.r-bloggers.com/2019/01/hrbrthemes-0-6-0-on-cran-other-in-development-package-news/&via=Rbloggers" target="_blank" rel="nofollow"><span class="icon"></span><span class="text">Tweet</span></a><div class="onoffswitch2 mash-small mashsb-noshadow" style="display:none;"></div></div> </div> <div style="clear:both;"></div></aside> <!-- Share buttons by mashshare.net - Version: 3.7.7--> <p class="syndicated-attribution"><div style="border: 1px solid; background: none repeat scroll 0 0 #EDEDED; margin: 1px; font-size: 13px;"> <div style="text-align: center;">To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://rud.is/b/2019/01/21/hrbrthemes-0-6-0-on-cran-other-in-development-package-news/"> R – rud.is</a></strong>.</div> <hr /> <a href="https://www.r-bloggers.com/" rel="nofollow">R-bloggers.com</a> offers <strong><a href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers" rel="nofollow">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" href="https://www.r-project.org/" rel="nofollow">R</a> news and tutorials about <a title="R tutorials" href="https://www.r-bloggers.com/how-to-learn-r-2/" rel="nofollow">learning R</a> and many other topics. <a title="Data science jobs" href="https://www.r-users.com/" rel="nofollow">Click here if you're looking to post or find an R/data-science job</a>. <hr>Want to share your content on R-bloggers?<a href="https://www.r-bloggers.com/add-your-blog/" rel="nofollow"> click here</a> if you have a blog, or <a href="http://r-posts.com/" rel="nofollow"> here</a> if you don't. </div></p> </div> </article><nav class="post-navigation clearfix" role="navigation"> <div class="post-nav left"> <a href="https://www.r-bloggers.com/2019/01/a-shiny-web-app-from-lego-truck-trailer-2/" rel="prev">← Previous post</a></div> <div class="post-nav right"> <a href="https://www.r-bloggers.com/2019/01/r-studio-conf-2019-easing-your-fomo-with-r-resources/" rel="next">Next post →</a></div> </nav> </div> <aside class="mh-sidebar sb-right"> <div id="custom_html-2" class="widget_text sb-widget widget_custom_html"><div class="textwidget custom-html-widget"> <div class="top-search" style="padding-left: 0px;"> <form id="searchform" action="http://www.google.com/cse" target="_blank"> <div> <input type="hidden" name="cx" value="005359090438081006639:paz69t-s8ua" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" value="" name="q" id="q" autocomplete="on" style="font-size:16px;" placeholder="Search R-bloggers.." /> <input type="submit" id="searchsubmit2" name="sa" value="Go" style="font-size:16px;" /> </div> </form> </div> <!-- thanks: https://stackoverflow.com/questions/14981575/google-cse-with-a-custom-form https://stackoverflow.com/questions/10363674/change-size-of-text-in-text-input-tag --></div></div><div id="text-6" class="sb-widget widget_text"> <div class="textwidget"><div style="min-height:26px;border:1px solid #ccc;padding:3px;text-align:left; background: none repeat scroll 0 0 #FDEADA;"> <form style="width:202px; float:left;" action="https://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('https://feedburner.google.com/fb/a/mailverify?uri=RBloggers', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"> <input type="text" style="width:110px" onclick="if (this.value == 'Your e-mail here') this.value = '';" value='Your e-mail here' name="email"/> <input type="hidden" value="RBloggers" name="uri"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" /> <!-- https://feeds.feedburner.com/~fc/RBloggers?bg=99CCFF&fg=444444&anim=0 --> </form> <div> <a href="https://feeds.feedburner.com/RBloggers"><img src="https://i2.wp.com/www.r-bloggers.com/wp-content/uploads/2020/07/RBloggers_feedburner_count_2020_07_01-e1593671704447.gif?w=578&ssl=1" style="height:17px;min-width:80px;class:skip-lazy;" alt data-recalc-dims="1" data-lazy-src="https://i2.wp.com/www.r-bloggers.com/wp-content/uploads/2020/07/RBloggers_feedburner_count_2020_07_01-e1593671704447.gif?w=578&is-pending-load=1#038;ssl=1" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class=" jetpack-lazy-image"><noscript><img src="https://i2.wp.com/www.r-bloggers.com/wp-content/uploads/2020/07/RBloggers_feedburner_count_2020_07_01-e1593671704447.gif?w=578&ssl=1" style="height:17px;min-width:80px;class:skip-lazy;" alt="" data-recalc-dims="1" /></noscript></a> </div> </div> <br/> <div> <script> function init() { var vidDefer = document.getElementsByTagName('iframe'); for (var i=0; i<vidDefer.length; i++) { if(vidDefer[i].getAttribute('data-src')) { vidDefer[i].setAttribute('src',vidDefer[i].getAttribute('data-src')); } } } window.onload = init; </script> <iframe allowtransparency="true" frameborder="0" scrolling="no" src="" data-src="//platform.twitter.com/widgets/follow_button.html?screen_name=rbloggers&data-show-count" style="width:100%; height:30px;"></iframe> <div id="fb-root"></div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v7.0&appId=124112670941750&autoLogAppEvents=1" nonce="RysU23SE"></script> <div style="min-height: 154px;" class="fb-page" data-href="https://www.facebook.com/rbloggers/" data-tabs="" data-width="300" data-height="154" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/rbloggers/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/rbloggers/">R bloggers Facebook page</a></blockquote></div> <!-- <iframe src="" data-src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FR-bloggers%2F191414254890&width=300&height=155&show_faces=true&colorscheme=light&stream=false&border_color&header=false&appId=400430016676958" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:140px;" allowTransparency="true"></iframe> --> <!-- <br/> <strong>If you are an R blogger yourself</strong> you are invited to <a href="https://www.r-bloggers.com/add-your-blog/">add your own R content feed to this site</a> (<strong>Non-English</strong> R bloggers should add themselves- <a href="https://www.r-bloggers.com/lang/add-your-blog">here</a>) --> </div></div> </div><div id="wppp-3" class="sb-widget widget_wppp"><h4 class="widget-title">Most viewed posts (weekly)</h4> <ul class='wppp_list'> <li><a href='https://www.r-bloggers.com/2016/11/5-ways-to-subset-a-data-frame-in-r/' title='5 Ways to Subset a Data Frame in R'>5 Ways to Subset a Data Frame in R</a></li> <li><a href='https://www.r-bloggers.com/2015/12/how-to-write-the-first-for-loop-in-r/' title='How to write the first for loop in R'>How to write the first for loop in R</a></li> <li><a href='https://www.r-bloggers.com/2020/09/introducing-our-new-book-tidy-modeling-with-r/' title='Introducing our new book, Tidy Modeling with R'>Introducing our new book, Tidy Modeling with R</a></li> <li><a href='https://www.r-bloggers.com/2020/09/how-to-explore-data-dataexplorer-package/' title='How to Explore Data: {DataExplorer} Package'>How to Explore Data: {DataExplorer} Package</a></li> <li><a href='https://www.r-bloggers.com/2010/02/r-sorting-a-data-frame-by-the-contents-of-a-column/' title='R – Sorting a data frame by the contents of a column'>R – Sorting a data frame by the contents of a column</a></li> </ul> </div><div id="text-18" class="sb-widget widget_text"><h4 class="widget-title">Sponsors</h4> <div class="textwidget"><div style="min-height: 2055px;"> <script data-cfasync="false" type="text/javascript"> // https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode- // this must be placed higher. Otherwise it doesn't work. // data-cfasync="false" is for making sure cloudflares' rocketcache doesn't interfeare with this // in this case it only works because it was used at the original script in the text widget function createCookie(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + value + expires + "; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } // no longer use async because of google // async async function readTextFile(file) { // Helps people browse between pages without the need to keep downloading the same // ads txt page everytime. This way, it allows them to use their browser's cache. var random_number = readCookie("ad_random_number_cookie"); if(random_number == null) { var random_number = Math.floor(Math.random()*100*(new Date().getTime()/10000000000)); createCookie("ad_random_number_cookie",random_number,1) } file += '?t='+random_number; var rawFile = new XMLHttpRequest(); rawFile.onreadystatechange = function () { if(rawFile.readyState === 4) { if(rawFile.status === 200 || rawFile.status == 0) { // var allText = rawFile.responseText; // document.write(allText); document.write(rawFile.responseText); } } } rawFile.open("GET", file, false); rawFile.send(null); } // readTextFile('https://raw.githubusercontent.com/Raynos/file-store/master/temp.txt'); readTextFile("https://www.r-bloggers.com/wp-content/uploads/text-widget_anti-cache.txt"); </script> </div></div> </div> <div id="recent-posts-3" class="sb-widget widget_recent_entries"> <h4 class="widget-title">Recent Posts</h4> <ul> <li> <a href="https://www.r-bloggers.com/2020/09/multi-armed-bandit-with-thompson-sampling/">Multi-Armed Bandit with Thompson Sampling</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/whose-dream-is-this-when-and-how-to-use-the-keras-functional-api/">Whose dream is this? When and how to use the Keras Functional API</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/moving-on-as-head-of-solutions-and-ai-at-draper-and-dash/">Moving on as Head of Solutions and AI at Draper and Dash</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/permutations-in-r/">Permutations in R</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/sequential-satisficing/">Sequential satisficing</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/a-frosty-deal/">A Frosty Deal?</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/r-risk-and-compliance-survey-we-need-your-help/">R – Risk and Compliance Survey: we need your help!</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/virtuearl-speaker-interview/">VirtuEARL: Speaker interview</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/dds-data-science-platform-dsp-making-healthcare-analytics-easier/">D&D’s Data Science Platform (DSP) – making healthcare analytics easier</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/gold-mining-week-2-2020/">Gold-Mining Week 2 (2020)</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/high-school-swimming-state-off-tournament-championship-california-1-vs-texas-2/">High School Swimming State-Off Tournament Championship California (1) vs. Texas (2)</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/introducing-our-new-book-tidy-modeling-with-r/">Introducing our new book, Tidy Modeling with R</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/learning-data-science-with-rstudio-cloud-a-students-perspective/">Learning Data Science with RStudio Cloud: A Student’s Perspective</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/risk-scoring-in-digital-contact-tracing-apps/">Risk Scoring in Digital Contact Tracing Apps</a> </li> <li> <a href="https://www.r-bloggers.com/2020/09/whats-new-in-dalex-and-dalextra/">What’s new in DALEX and DALEXtra</a> </li> </ul> </div><div id="rss-7" class="sb-widget widget_rss"><h4 class="widget-title"><a class="rsswidget" href="https://feeds.feedburner.com/Rjobs"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="https://www.r-bloggers.com/wp-includes/images/rss.png" alt="RSS" /></a> <a class="rsswidget" href="https://www.r-users.com/">Jobs for R-users</a></h4><ul><li><a class='rsswidget' href='http://feedproxy.google.com/~r/RJobs/~3/XUqQfUzxziw/'>Junior Data Scientist / Quantitative economist</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/RJobs/~3/C2KYkXtMCHw/'>Senior Quantitative Analyst</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/RJobs/~3/z5mEr8qKkUI/'>R programmer</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/RJobs/~3/wi3Gfi8GNqA/'>Data Scientist – CGIAR Excellence in Agronomy (Ref No: DDG-R4D/DS/1/CG/EA/06/20)</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/RJobs/~3/aSK4JGQQOfg/'>Data Analytics Auditor, Future of Audit Lead @ London or Newcastle</a></li></ul></div><div id="rss-9" class="sb-widget widget_rss"><h4 class="widget-title"><a class="rsswidget" href="https://feeds.feedburner.com/Python-bloggers"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="https://www.r-bloggers.com/wp-includes/images/rss.png" alt="RSS" /></a> <a class="rsswidget" href="https://python-bloggers.com/">python-bloggers.com (python/data-science news)</a></h4><ul><li><a class='rsswidget' href='http://feedproxy.google.com/~r/Python-bloggers/~3/Ih7X5g4SNhM/'>Technical documentation</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/Python-bloggers/~3/nNVXT8NdLls/'>Sequential satisficing</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/Python-bloggers/~3/XbY7X2KCs10/'>Python Musings #4: Why you shouldn’t use Google Forms for getting Data- Simulating Spam Attacks with Selenium</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/Python-bloggers/~3/Sl950SzexeI/'>Building a Chatbot with Google DialogFlow</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/Python-bloggers/~3/HHBjc9No3WM/'>Big Data Ignite 2020 Webinar Series</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/Python-bloggers/~3/uDRaZc72SY8/'>How to Create Dummy Pandas Data Frames</a></li><li><a class='rsswidget' href='http://feedproxy.google.com/~r/Python-bloggers/~3/XVbTw63vnYU/'>LanguageTool: Grammar and Spell Checker in Python</a></li></ul></div><div id="text-16" class="sb-widget widget_text"> <div class="textwidget"><strong><a href="https://www.r-bloggers.com/blogs-list/">Full list of contributing R-bloggers</a></strong></div> </div><div id="archives-3" class="sb-widget widget_archive"><h4 class="widget-title">Archives</h4> <label class="screen-reader-text" for="archives-dropdown-3">Archives</label> <select id="archives-dropdown-3" name="archive-dropdown"> <option value="">Select Month</option> <option value='https://www.r-bloggers.com/2020/09/'> September 2020  (107)</option> <option value='https://www.r-bloggers.com/2020/08/'> August 2020  (178)</option> <option value='https://www.r-bloggers.com/2020/07/'> July 2020  (226)</option> <option value='https://www.r-bloggers.com/2020/06/'> June 2020  (203)</option> <option value='https://www.r-bloggers.com/2020/05/'> May 2020  (285)</option> <option value='https://www.r-bloggers.com/2020/04/'> April 2020  (291)</option> <option value='https://www.r-bloggers.com/2020/03/'> March 2020  (246)</option> <option value='https://www.r-bloggers.com/2020/02/'> February 2020  (218)</option> <option value='https://www.r-bloggers.com/2020/01/'> January 2020  (213)</option> <option value='https://www.r-bloggers.com/2019/12/'> December 2019  (215)</option> <option value='https://www.r-bloggers.com/2019/11/'> November 2019  (193)</option> <option value='https://www.r-bloggers.com/2019/10/'> October 2019  (216)</option> <option value='https://www.r-bloggers.com/2019/09/'> September 2019  (211)</option> <option value='https://www.r-bloggers.com/2019/08/'> August 2019  (256)</option> <option value='https://www.r-bloggers.com/2019/07/'> July 2019  (228)</option> <option value='https://www.r-bloggers.com/2019/06/'> June 2019  (218)</option> <option value='https://www.r-bloggers.com/2019/05/'> May 2019  (250)</option> <option value='https://www.r-bloggers.com/2019/04/'> April 2019  (275)</option> <option value='https://www.r-bloggers.com/2019/03/'> March 2019  (295)</option> <option value='https://www.r-bloggers.com/2019/02/'> February 2019  (255)</option> <option value='https://www.r-bloggers.com/2019/01/'> January 2019  (281)</option> <option value='https://www.r-bloggers.com/2018/12/'> December 2018  (252)</option> <option value='https://www.r-bloggers.com/2018/11/'> November 2018  (285)</option> <option value='https://www.r-bloggers.com/2018/10/'> October 2018  (308)</option> <option value='https://www.r-bloggers.com/2018/09/'> September 2018  (291)</option> <option value='https://www.r-bloggers.com/2018/08/'> August 2018  (270)</option> <option value='https://www.r-bloggers.com/2018/07/'> July 2018  (333)</option> <option value='https://www.r-bloggers.com/2018/06/'> June 2018  (298)</option> <option value='https://www.r-bloggers.com/2018/05/'> May 2018  (321)</option> <option value='https://www.r-bloggers.com/2018/04/'> April 2018  (301)</option> <option value='https://www.r-bloggers.com/2018/03/'> March 2018  (291)</option> <option value='https://www.r-bloggers.com/2018/02/'> February 2018  (241)</option> <option value='https://www.r-bloggers.com/2018/01/'> January 2018  (330)</option> <option value='https://www.r-bloggers.com/2017/12/'> December 2017  (261)</option> <option value='https://www.r-bloggers.com/2017/11/'> November 2017  (270)</option> <option value='https://www.r-bloggers.com/2017/10/'> October 2017  (290)</option> <option value='https://www.r-bloggers.com/2017/09/'> September 2017  (294)</option> <option value='https://www.r-bloggers.com/2017/08/'> August 2017  (340)</option> <option value='https://www.r-bloggers.com/2017/07/'> July 2017  (283)</option> <option value='https://www.r-bloggers.com/2017/06/'> June 2017  (317)</option> <option value='https://www.r-bloggers.com/2017/05/'> May 2017  (349)</option> <option value='https://www.r-bloggers.com/2017/04/'> April 2017  (324)</option> <option value='https://www.r-bloggers.com/2017/03/'> March 2017  (365)</option> <option value='https://www.r-bloggers.com/2017/02/'> February 2017  (317)</option> <option value='https://www.r-bloggers.com/2017/01/'> January 2017  (367)</option> <option value='https://www.r-bloggers.com/2016/12/'> December 2016  (347)</option> <option value='https://www.r-bloggers.com/2016/11/'> November 2016  (294)</option> <option value='https://www.r-bloggers.com/2016/10/'> October 2016  (306)</option> <option value='https://www.r-bloggers.com/2016/09/'> September 2016  (254)</option> <option value='https://www.r-bloggers.com/2016/08/'> August 2016  (287)</option> <option value='https://www.r-bloggers.com/2016/07/'> July 2016  (326)</option> <option value='https://www.r-bloggers.com/2016/06/'> June 2016  (263)</option> <option value='https://www.r-bloggers.com/2016/05/'> May 2016  (292)</option> <option value='https://www.r-bloggers.com/2016/04/'> April 2016  (260)</option> <option value='https://www.r-bloggers.com/2016/03/'> March 2016  (302)</option> <option value='https://www.r-bloggers.com/2016/02/'> February 2016  (268)</option> <option value='https://www.r-bloggers.com/2016/01/'> January 2016  (337)</option> <option value='https://www.r-bloggers.com/2015/12/'> December 2015  (304)</option> <option value='https://www.r-bloggers.com/2015/11/'> November 2015  (234)</option> <option value='https://www.r-bloggers.com/2015/10/'> October 2015  (259)</option> <option value='https://www.r-bloggers.com/2015/09/'> September 2015  (238)</option> <option value='https://www.r-bloggers.com/2015/08/'> August 2015  (264)</option> <option value='https://www.r-bloggers.com/2015/07/'> July 2015  (243)</option> <option value='https://www.r-bloggers.com/2015/06/'> June 2015  (213)</option> <option value='https://www.r-bloggers.com/2015/05/'> May 2015  (235)</option> <option value='https://www.r-bloggers.com/2015/04/'> April 2015  (211)</option> <option value='https://www.r-bloggers.com/2015/03/'> March 2015  (259)</option> <option value='https://www.r-bloggers.com/2015/02/'> February 2015  (212)</option> <option value='https://www.r-bloggers.com/2015/01/'> January 2015  (245)</option> <option value='https://www.r-bloggers.com/2014/12/'> December 2014  (236)</option> <option value='https://www.r-bloggers.com/2014/11/'> November 2014  (221)</option> <option value='https://www.r-bloggers.com/2014/10/'> October 2014  (218)</option> <option value='https://www.r-bloggers.com/2014/09/'> September 2014  (259)</option> <option value='https://www.r-bloggers.com/2014/08/'> August 2014  (217)</option> <option value='https://www.r-bloggers.com/2014/07/'> July 2014  (235)</option> <option value='https://www.r-bloggers.com/2014/06/'> June 2014  (241)</option> <option value='https://www.r-bloggers.com/2014/05/'> May 2014  (243)</option> <option value='https://www.r-bloggers.com/2014/04/'> April 2014  (260)</option> <option value='https://www.r-bloggers.com/2014/03/'> March 2014  (289)</option> <option value='https://www.r-bloggers.com/2014/02/'> February 2014  (269)</option> <option value='https://www.r-bloggers.com/2014/01/'> January 2014  (263)</option> <option value='https://www.r-bloggers.com/2013/12/'> December 2013  (264)</option> <option value='https://www.r-bloggers.com/2013/11/'> November 2013  (241)</option> <option value='https://www.r-bloggers.com/2013/10/'> October 2013  (234)</option> <option value='https://www.r-bloggers.com/2013/09/'> September 2013  (215)</option> <option value='https://www.r-bloggers.com/2013/08/'> August 2013  (224)</option> <option value='https://www.r-bloggers.com/2013/07/'> July 2013  (254)</option> <option value='https://www.r-bloggers.com/2013/06/'> June 2013  (272)</option> <option value='https://www.r-bloggers.com/2013/05/'> May 2013  (260)</option> <option value='https://www.r-bloggers.com/2013/04/'> April 2013  (279)</option> <option value='https://www.r-bloggers.com/2013/03/'> March 2013  (277)</option> <option value='https://www.r-bloggers.com/2013/02/'> February 2013  (294)</option> <option value='https://www.r-bloggers.com/2013/01/'> January 2013  (343)</option> <option value='https://www.r-bloggers.com/2012/12/'> December 2012  (308)</option> <option value='https://www.r-bloggers.com/2012/11/'> November 2012  (277)</option> <option value='https://www.r-bloggers.com/2012/10/'> October 2012  (308)</option> <option value='https://www.r-bloggers.com/2012/09/'> September 2012  (270)</option> <option value='https://www.r-bloggers.com/2012/08/'> August 2012  (263)</option> <option value='https://www.r-bloggers.com/2012/07/'> July 2012  (247)</option> <option value='https://www.r-bloggers.com/2012/06/'> June 2012  (298)</option> <option value='https://www.r-bloggers.com/2012/05/'> May 2012  (287)</option> <option value='https://www.r-bloggers.com/2012/04/'> April 2012  (295)</option> <option value='https://www.r-bloggers.com/2012/03/'> March 2012  (304)</option> <option value='https://www.r-bloggers.com/2012/02/'> February 2012  (264)</option> <option value='https://www.r-bloggers.com/2012/01/'> January 2012  (280)</option> <option value='https://www.r-bloggers.com/2011/12/'> December 2011  (251)</option> <option value='https://www.r-bloggers.com/2011/11/'> November 2011  (261)</option> <option value='https://www.r-bloggers.com/2011/10/'> October 2011  (281)</option> <option value='https://www.r-bloggers.com/2011/09/'> September 2011  (187)</option> <option value='https://www.r-bloggers.com/2011/08/'> August 2011  (258)</option> <option value='https://www.r-bloggers.com/2011/07/'> July 2011  (219)</option> <option value='https://www.r-bloggers.com/2011/06/'> June 2011  (225)</option> <option value='https://www.r-bloggers.com/2011/05/'> May 2011  (239)</option> <option value='https://www.r-bloggers.com/2011/04/'> April 2011  (268)</option> <option value='https://www.r-bloggers.com/2011/03/'> March 2011  (249)</option> <option value='https://www.r-bloggers.com/2011/02/'> February 2011  (205)</option> <option value='https://www.r-bloggers.com/2011/01/'> January 2011  (209)</option> <option value='https://www.r-bloggers.com/2010/12/'> December 2010  (188)</option> <option value='https://www.r-bloggers.com/2010/11/'> November 2010  (172)</option> <option value='https://www.r-bloggers.com/2010/10/'> October 2010  (219)</option> <option value='https://www.r-bloggers.com/2010/09/'> September 2010  (185)</option> <option value='https://www.r-bloggers.com/2010/08/'> August 2010  (203)</option> <option value='https://www.r-bloggers.com/2010/07/'> July 2010  (175)</option> <option value='https://www.r-bloggers.com/2010/06/'> June 2010  (167)</option> <option value='https://www.r-bloggers.com/2010/05/'> May 2010  (164)</option> <option value='https://www.r-bloggers.com/2010/04/'> April 2010  (152)</option> <option value='https://www.r-bloggers.com/2010/03/'> March 2010  (165)</option> <option value='https://www.r-bloggers.com/2010/02/'> February 2010  (135)</option> <option value='https://www.r-bloggers.com/2010/01/'> January 2010  (121)</option> <option value='https://www.r-bloggers.com/2009/12/'> December 2009  (126)</option> <option value='https://www.r-bloggers.com/2009/11/'> November 2009  (66)</option> <option value='https://www.r-bloggers.com/2009/10/'> October 2009  (87)</option> <option value='https://www.r-bloggers.com/2009/09/'> September 2009  (65)</option> <option value='https://www.r-bloggers.com/2009/08/'> August 2009  (56)</option> <option value='https://www.r-bloggers.com/2009/07/'> July 2009  (64)</option> <option value='https://www.r-bloggers.com/2009/06/'> June 2009  (54)</option> <option value='https://www.r-bloggers.com/2009/05/'> May 2009  (35)</option> <option value='https://www.r-bloggers.com/2009/04/'> April 2009  (38)</option> <option value='https://www.r-bloggers.com/2009/03/'> March 2009  (40)</option> <option value='https://www.r-bloggers.com/2009/02/'> February 2009  (33)</option> <option value='https://www.r-bloggers.com/2009/01/'> January 2009  (42)</option> <option value='https://www.r-bloggers.com/2008/12/'> December 2008  (16)</option> <option value='https://www.r-bloggers.com/2008/11/'> November 2008  (14)</option> <option value='https://www.r-bloggers.com/2008/10/'> October 2008  (10)</option> <option value='https://www.r-bloggers.com/2008/09/'> September 2008  (8)</option> <option value='https://www.r-bloggers.com/2008/08/'> August 2008  (11)</option> <option value='https://www.r-bloggers.com/2008/07/'> July 2008  (7)</option> <option value='https://www.r-bloggers.com/2008/06/'> June 2008  (8)</option> <option value='https://www.r-bloggers.com/2008/05/'> May 2008  (8)</option> <option value='https://www.r-bloggers.com/2008/04/'> April 2008  (4)</option> <option value='https://www.r-bloggers.com/2008/03/'> March 2008  (5)</option> <option value='https://www.r-bloggers.com/2008/02/'> February 2008  (6)</option> <option value='https://www.r-bloggers.com/2008/01/'> January 2008  (10)</option> <option value='https://www.r-bloggers.com/2007/12/'> December 2007  (3)</option> <option value='https://www.r-bloggers.com/2007/11/'> November 2007  (5)</option> <option value='https://www.r-bloggers.com/2007/10/'> October 2007  (9)</option> <option value='https://www.r-bloggers.com/2007/09/'> September 2007  (7)</option> <option value='https://www.r-bloggers.com/2007/08/'> August 2007  (21)</option> <option value='https://www.r-bloggers.com/2007/07/'> July 2007  (9)</option> <option value='https://www.r-bloggers.com/2007/06/'> June 2007  (3)</option> <option value='https://www.r-bloggers.com/2007/05/'> May 2007  (3)</option> <option value='https://www.r-bloggers.com/2007/04/'> April 2007  (1)</option> <option value='https://www.r-bloggers.com/2007/03/'> March 2007  (5)</option> <option value='https://www.r-bloggers.com/2007/02/'> February 2007  (4)</option> <option value='https://www.r-bloggers.com/2006/11/'> November 2006  (1)</option> <option value='https://www.r-bloggers.com/2006/10/'> October 2006  (2)</option> <option value='https://www.r-bloggers.com/2006/08/'> August 2006  (3)</option> <option value='https://www.r-bloggers.com/2006/07/'> July 2006  (1)</option> <option value='https://www.r-bloggers.com/2006/06/'> June 2006  (1)</option> <option value='https://www.r-bloggers.com/2006/05/'> May 2006  (3)</option> <option value='https://www.r-bloggers.com/2006/04/'> April 2006  (1)</option> <option value='https://www.r-bloggers.com/2006/03/'> March 2006  (1)</option> <option value='https://www.r-bloggers.com/2006/02/'> February 2006  (5)</option> <option value='https://www.r-bloggers.com/2006/01/'> January 2006  (1)</option> <option value='https://www.r-bloggers.com/2005/10/'> October 2005  (1)</option> <option value='https://www.r-bloggers.com/2005/09/'> September 2005  (3)</option> <option value='https://www.r-bloggers.com/2005/05/'> May 2005  (1)</option> </select> <script type="text/javascript"> /* <![CDATA[ */ (function() { var dropdown = document.getElementById( "archives-dropdown-3" ); function onSelectChange() { if ( dropdown.options[ dropdown.selectedIndex ].value !== '' ) { document.location.href = this.options[ this.selectedIndex ].value; } } dropdown.onchange = onSelectChange; })(); /* ]]> */ </script> </div><div id="linkcat-3349" class="sb-widget widget_links"><h4 class="widget-title">Other sites</h4> <ul class='xoxo blogroll'> <li><a href="http://www.proc-x.com/" title="SAS news gathered from bloggers">SAS blogs</a></li> <li><a href="https://www.r-users.com/">Jobs for R-users</a></li> </ul> </div> </aside></div> </div> <div class="copyright-wrap"> <p class="copyright">Copyright © 2020 | <a href="https://www.mhthemes.com/" rel="nofollow">MH Corporate basic by MH Themes</a></p> </div> </div> <!-- TPC! Memory Usage (http://webjawns.com) Memory Usage: 72964192 Memory Peak Usage: 73303968 WP Memory Limit: 820M PHP Memory Limit: 800M Checkpoints: 9 --> <!-- Schema & Structured Data For WP v1.9.49.1 - --> <script type="application/ld+json" class="saswp-schema-markup-output"> [{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.r-bloggers.com#Organization","name":"R-bloggers","url":"http:\/\/www.r-bloggers.com","sameAs":[],"logo":{"@type":"ImageObject","url":"http:\/\/www.r-bloggers.com\/wp-content\/uploads\/2020\/07\/R_blogger_logo_02.png","width":"1061","height":"304"},"contactPoint":{"@type":"ContactPoint","contactType":"technical support","telephone":"","url":"https:\/\/www.r-bloggers.com\/contact-us\/"}},{"@type":"WebSite","@id":"https:\/\/www.r-bloggers.com#website","headline":"R-bloggers","name":"R-bloggers","description":"R news and tutorials contributed by hundreds of R bloggers","url":"https:\/\/www.r-bloggers.com","potentialAction":{"@type":"SearchAction","target":"https:\/\/www.r-bloggers.com\/?s={search_term_string}","query-input":"required name=search_term_string"},"publisher":{"@id":"https:\/\/www.r-bloggers.com#Organization"}},{"@context":"https:\/\/schema.org","@type":"WebPage","@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#webpage","name":"hrbrthemes 0.6.0 on CRAN + Other In-Development Package News | R-bloggers","url":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/","lastReviewed":"2019-01-21T10:47:58-06:00","reviewedBy":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http:\/\/www.r-bloggers.com\/wp-content\/uploads\/2020\/07\/R_blogger_logo_02.png","width":"1061","height":"304"},"name":"R-bloggers"},"inLanguage":"en-US","description":"Version 0.6.0 of the hrbrthemes\ud83d\udd17 package should be hitting a CRAN mirror near you soon. Apart from some general documentation and code cleanup this release includes the dark theme folks have been seeing in blog posts and tweets over the past few months. It\u2019s called theme_ft_rc() since it is an homage to the wonderful new... Continue reading \u2192","primaryImageOfPage":{"@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#primaryimage"},"mainContentOfPage":[[{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Home","url":"https:\/\/www.r-bloggers.com"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"About","url":"http:\/\/www.r-bloggers.com\/about\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"RSS","url":"https:\/\/feeds.feedburner.com\/RBloggers"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"add your blog!","url":"http:\/\/www.r-bloggers.com\/add-your-blog\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Learn R","url":"https:\/\/www.r-bloggers.com\/how-to-learn-r-2\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"R jobs","url":"https:\/\/www.r-users.com\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Submit a new job (it's free)","url":"https:\/\/www.r-users.com\/submit-job\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Browse latest jobs (also free)","url":"https:\/\/www.r-users.com\/"},{"@context":"https:\/\/schema.org","@type":"SiteNavigationElement","@id":"https:\/\/www.r-bloggers.com\/#top nav","name":"Contact us","url":"http:\/\/www.r-bloggers.com\/contact-us\/"}]],"isPartOf":{"@id":"https:\/\/www.r-bloggers.com#website"},"breadcrumb":{"@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#breadcrumb"}},{"@type":"BreadcrumbList","@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https:\/\/www.r-bloggers.com","name":"R-bloggers"}},{"@type":"ListItem","position":2,"item":{"@id":"https:\/\/www.r-bloggers.com\/category\/r-bloggers\/","name":"R bloggers"}},{"@type":"ListItem","position":3,"item":{"@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/","name":"hrbrthemes 0.6.0 on CRAN + Other In-Development Package News | R-bloggers"}}]},{"@type":"Article","@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#article","url":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/","inLanguage":"en-US","mainEntityOfPage":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#webpage","headline":"hrbrthemes 0.6.0 on CRAN + Other In-Development Package News | R-bloggers","description":"Version 0.6.0 of the hrbrthemes\ud83d\udd17 package should be hitting a CRAN mirror near you soon. Apart from some general documentation and code cleanup this release includes the dark theme folks have been seeing in blog posts and tweets over the past few months. It\u2019s called theme_ft_rc() since it is an homage to the wonderful new... Continue reading \u2192","articleBody":"Version 0.6.0 of the hrbrthemes package should be hitting a CRAN mirror near you soon. Apart from some general documentation and code cleanup this release includes the dark theme folks have been seeing in blog posts and tweets over the past few months. It’s called theme_ft_rc() since it is an homage to the wonderful new chart theme developed by the @ft_data crew over at the Financial Times (you can see examples from their work here). While there was nothing stopping folks from using the GitHub version, the CRAN release makes it more widely available. There are still intermittent issues with fonts for some folks which I’ll be working on for the next release. Since you’ve already seen lots of examples of these charts I won’t just make a gratuitous example using the theme. I will, however, make some charts based on a new data package dubbed iceout. The iceout package was originally conceived by Ben Tupper from the Bigelow Laboratory for Ocean Sciences. I keep an eye on fellow Mainer repositories and I did not realize (but should have known) that researches keep track of when inland bodies of water freeze and thaw. The package name is derived from the term used for the thaw measurements (“ice-out” or “ice-off”). Before becoming obsessed with this data and getting the package to the current state it is in, the original codebase worked off of a USGS Lake Ice-Out Data for New England dataset that focused solely on New England and only went up to 2005. Some digging discovered that Maine’s Department of Agriculture and Forestry maintains online records since 2003; and, Minnesota’s Department of Natural Resources maintains a comprehensive database of records going back to the 1800’s. But I hit the jackpot after discovering the U.S. National Snow & Ice Data Center’s Global Lake and River Ice Phenology dataset which: … contains freeze and breakup dates and other ice cover descriptive data for 865 lakes and rivers. Of the 542 water bodies that have records longer than 19 years, 370 are in North America and 172 are in Eurasia; 249 have records longer than 50 years; and 66 longer than 100 years. A few have data prior to 1845. These data, from water bodies distributed around the Northern Hemisphere, allow analysis of broad spatial patterns as well as long-term temporal patterns. So, I converted the original package to a data package containing all four of those datasets plus some interactive functions for pulling “live” data and a set of “builders” to regenerate the databases. Let’s take a quick look at what’s in the NSIDC data and the global coverage area: library(iceout) # github\/hrbrmstr\/iceout library(hrbrthemes) library(ggplot2) library(dplyr) data(\"nsidc_iceout\") glimpse(nsidc_iceout) ## Observations: 35,918 ## Variables: 37 ## $ lakecode <chr> \"ARAI1\", \"ARAI1\", \"ARAI1\", \"ARAI1\", \"ARAI1\", \"ARAI1\", \"ARAI1\u2026 ## $ lakename <chr> \"Lake Suwa\", \"Lake Suwa\", \"Lake Suwa\", \"Lake Suwa\", \"Lake Su\u2026 ## $ lakeorriver <chr> \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \u2026 ## $ season <chr> \"1443-44\", \"1444-45\", \"1445-46\", \"1446-47\", \"1447-48\", \"1448\u2026 ## $ iceon_year <dbl> 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, \u2026 ## $ iceon_month <dbl> 12, 11, 12, 12, 11, 12, 12, 12, 12, 11, 12, 12, 12, 12, 12, \u2026 ## $ iceon_day <dbl> 8, 23, 1, 2, 30, 8, 13, 8, 23, 28, 3, 5, 1, 5, 6, 20, 10, 15\u2026 ## $ iceoff_year <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ iceoff_month <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ iceoff_day <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ duration <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ latitude <dbl> 36.15, 36.15, 36.15, 36.15, 36.15, 36.15, 36.15, 36.15, 36.1\u2026 ## $ longitude <dbl> 138.08, 138.08, 138.08, 138.08, 138.08, 138.08, 138.08, 138.\u2026 ## $ country <chr> \"Japan\", \"Japan\", \"Japan\", \"Japan\", \"Japan\", \"Japan\", \"Japan\u2026 ## $ froze <lgl> TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, \u2026 ## $ obs_comments <chr> \"calendar correction for ice_on: -30 days of original data; \u2026 ## $ area_drained <dbl> 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, \u2026 ## $ bow_comments <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ conductivity_us <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ elevation <dbl> 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, \u2026 ## $ filename <chr> \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARA\u2026 ## $ initials <chr> \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARAI\", \"ARA\u2026 ## $ inlet_streams <chr> \"-\", \"-\", \"-\", \"-\", \"-\", \"-\", \"-\", \"-\", \"-\", \"-\", \"-\", \"-\", \u2026 ## $ landuse_code <chr> \"UAFO\", \"UAFO\", \"UAFO\", \"UAFO\", \"UAFO\", \"UAFO\", \"UAFO\", \"UAF\u2026 ## $ largest_city_population <dbl> 52000, 52000, 52000, 52000, 52000, 52000, 52000, 52000, 5200\u2026 ## $ max_depth <dbl> 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, 7.6, \u2026 ## $ mean_depth <dbl> 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, 4.7, \u2026 ## $ median_depth <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ power_plant_discharge <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ secchi_depth <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 ## $ shoreline <dbl> 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, \u2026 ## $ surface_area <dbl> 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, \u2026 ## $ state <chr> \"Nagano Prefecture\", \"Nagano Prefecture\", \"Nagano Prefecture\u2026 ## $ iceon_date <date> 1443-12-08, 1444-11-23, 1445-12-01, 1446-12-02, 1447-11-30,\u2026 ## $ iceon_doy <dbl> 342, 328, 335, 336, 334, 343, 347, 342, 357, 333, 337, 339, \u2026 ## $ iceout_date <date> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,\u2026 ## $ iceout_doy <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, \u2026 maps::map(\"world\", \".\", exact FALSE, plot FALSE, fill TRUE) %>% fortify() -> wrld ggplot() + ggalt::geom_cartogram( data wrld, map wrld, aes(long, lat, map_idregion), fill\"#3B454A\", color \"white\", size 0.125 ) + geom_point( data distinct(nsidc_iceout, lakeorriver, longitude, latitude), aes(longitude, latitude, fill lakeorriver), size 1.5, color \"#2b2b2b\", stroke 0.125, shape 21 ) + scale_fill_manual( name NULL, values c(\"L\"\"#fdbf6f\", \"R\"\"#1f78b4\"), labelsc(\"L\" \"Lake\", \"R\" \"River\") ) + ggalt::coord_proj(\"+projwintri\", ylim range(nsidc_iceout$latitude, na.rm TRUE)) + labs(title \"NSIDC Dataset Coverage\") + theme_ft_rc(grid\"\") + theme(legend.position c(0.375, 0.1)) + theme(axis.text element_blank(), axis.title element_blank()) W00t! Lots of data (though not all of the extra features are populated for all readings\/areas)! I think the reason the ice-out data garnered my obsession was how it can be used as another indicator that we are indeed in the midst of a climate transformation. Let’s look at the historical ice-out information for Maine inland bodies of water: filter(nsidc_iceout, country \"United States\", state \"ME\") %>% mutate(iceout_date as.Date(format(iceout_date, \"2020-%m-%d\"))) %>% # we want the Y axis formatted as month-day so we choose a leap year to ensure we get leap dates (if any) ggplot(aes(iceoff_year, iceout_date)) + geom_point(aes(color lakename), size 0.5, alpha1\/4) + geom_smooth(aes(color lakename), seFALSE, method \"loess\", size0.25) + scale_y_date(date_labels \"%b-%d\") + labs( x NULL, y \"Ice-out Month\/Day\", color NULL, title \"Historical Ice-out Data\/Trends for Maine Inland Bodies of Water\" ) + theme_ft_rc(grid\"XY\") You can follow that code-pattern to look at other states. It’s also fun to look at the ice-out date distributions by latitude grouping: filter(nsidc_iceout, !is.na(latitude) & !is.na(longitude) & !is.na(iceout_date)) %>% filter(country \"United States\") %>% mutate(iceout_date as.Date(format(iceout_date, \"2020-%m-%d\"))) %>% mutate(lat_grp cut(latitude, scales::pretty_breaks(5)(latitude), ordered_result TRUE)) %>% arrange(desc(iceoff_year)) %>% ggplot() + ggbeeswarm::geom_quasirandom( aes(lat_grp, iceout_date, fill iceoff_year), groupOnX TRUE, shape 21, size 1, color \"white\", stroke 0.125, alpha1\/2 ) + scale_y_date(date_labels \"%b-%d\") + viridis::scale_fill_viridis(name \"Year\", option \"magma\") + labs( x \"Latitude Grouping\", y \"Ice-out Month\/Day\", title \"U.S. Ice-out Historical Day\/Month Distributions by Latitude Grouping\" ) + theme_ft_rc(grid\"Y\") If you want to focus on individual lakes there’s a Shiny app for that (well one for the U.S. anyway). After loading the package, just enter explore_us() at an R console and you’ll see something like this: The leaflet view will zoom to each new lake selected and the graph will be updated as well. Other Package News The sergeant package is reaching a stable point in the 0.8.0 branch (mostly due to David Severski’s tireless help finding bugs ) and should be headed to CRAN soon. Get your issues or PRs in if you want them CRANdied. I’ve finally updated the Java library dependencies in pdfboxjars so pdfbox will no longer cause GitHub to tell you or I that it is insecure. There’s a new package dubbed reapr that is aimed somewhere at the intersection of curl + httr + rvest. Fundamentally, it provides some coder-uplift when scraping data. The README has examples but here’s what you get on an initial scrape of this blog’s index page: reapr::reap_url(\"http:\/\/rud.is\/b\") ## Title: rud.is | \"In God we trust. All others must bring data\" ## Original URL: http:\/\/rud.is\/b ## Final URL: https:\/\/rud.is\/b\/ ## Crawl-Date: 2019-01-17 19:51:09 ## Status: 200 ## Content-Type: text\/html; charsetUTF-8 ## Size: 50 kB ## IP Address: 104.236.112.222 ## Tags: body, center, form, h2, head, hgroup, html, ## label, noscript, section, title, ## aside, nav, ul, style, img, ## input, article, time, footer, h1, ## header, p, li, meta, div, ## script, span, link, a ## # Comments: 17 ## Total Request Time: 2.093s The reap_url() function: Uses httr::GET() to make web connections and retrieve content which enables it to behave more like an actual (non-javascript-enabled) browser. You can pass anything httr::GET() can handle to ... (e.g. httr::user_agent()) to have as much granular control over the interaction as possible. Returns a richer set of data. After the httr::response object is obtained many tasks are performed including: timestamping of the URL crawl extraction of the asked-for URL and the final URL (in the case of redirects) extraction of the IP address of the target server extraction of both plaintext and parsed (xml_document) HTML extraction of the plaintext webpage <title> (if any) generation of a dynamic list tags in the document which can be fed directly to HTML\/XML search\/retrieval function (which may speed up node discovery) extraction of the text of all comments in the HTML document inclusion of the full httr::response object with the returned object extraction of the time it took to make the complete request I’m still wrestling with the API so definitely file issues with suggestions (wherever you’re most comfortable socially coding). Speaking of IP addresses (bullet 3 above), I finally got some time to study the gdns C library (a modern DNS API library) and created the clandnstine package. The package name jeu de mots is due to the fact that the intent is to have it solely support DNS over TLS requests since regular DNS is plaintext, enables ISP spying\/injection and generally fraught with peril. All forms of DNS lookups are supported. The catch is that you have to point it at a DNS over TLS-capable resolver. The package defaults to Quad9 (9.9.9.9) because I trust them more than Google or Cloudflare (btw: that’s not saying much as I trust used car salesfolks more than all three of them). Keep an eye (or RSS reader) peeled on $WORK blog over the coming weeks as I’ll have some analysis and data on a few hundred DNS over TLS endpoints you can use thanks to a new study developed by cow-orkers Jon Hart and Shan Skidar. There also a toy package forecequotes that is more “have fun with the cli & crayon packages” than anything else. But if you like Star Wars, random quote APIs and want to integrate richer command line interface output into your work, then definitely give it a peek. Finally, I haven’t used R’s direct C interface in a while (since Rcpp is addictive and handy) and wanted to keep those skills fresh, so I made a wrapper to an old (in internet years) IP address trie C library. The underlying library is much slower than what we use in iptools but it works, does a bit more than its iptoos counterpart and covers data marshaling, external pointer handling, and attribute\/class setting so it may be a half-decent reference package for using the RC bridge. FIN If you know of more\/better ice-out data please drop an issue in the Bigelow Labs’ iceout repo and I’ll get it integrated. And, if you do your own ice-out exploration definitely blog about it, tell R Weekly and drop a note in the comments. Here are links to all the mentioned packages grouped by social coding platform (so you can interact\/collaborate wherever you feel most comfortable working): sr.ht hrbrthemes sergeant pdfboxjars pdfbox reapr forcequotes iptrie GitLab hrbrthemes sergeant pdfboxjars pdfbox reapr forcequotes iptrie GitHub hrbrthemes sergeant pdfboxjars pdfbox reapr forcequotes iptrie","keywords":"","datePublished":"2019-01-21T10:47:58-06:00","dateModified":"2019-01-21T10:47:58-06:00","author":{"@type":"Person","name":"hrbrmstr","description":"","url":"https:\/\/www.r-bloggers.com\/author\/hrbrmstr\/","sameAs":["http:\/\/rud.is\/b"],"image":{"@type":"ImageObject","url":"https:\/\/secure.gravatar.com\/avatar\/a04efa3cb278aef9562457e0b659c262?s=96&d=mm&r=g","height":96,"width":96}},"publisher":{"@id":"https:\/\/www.r-bloggers.com#Organization"},"image":[{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72,"@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#primaryimage"},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/i2.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/nc-idc-coverage.png?resize=780%2C296&ssl=1","width":780,"height":296},{"@type":"ImageObject","url":"https:\/\/i1.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/me-inland.png?resize=780%2C561&ssl=1","width":780,"height":561},{"@type":"ImageObject","url":"https:\/\/i2.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/lat-grp.png?resize=780%2C655&ssl=1","width":780,"height":655},{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/explore-us-shiny-02.png?resize=780%2C678&ssl=1","width":780,"height":678},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f601.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72},{"@type":"ImageObject","url":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/1f517.png","width":72,"height":72}],"isPartOf":{"@id":"https:\/\/www.r-bloggers.com\/2019\/01\/hrbrthemes-0-6-0-on-cran-other-in-development-package-news\/#webpage"}}]}] </script> <script> var snp_f = []; var snp_hostname = new RegExp(location.host); var snp_http = new RegExp("^(http|https)://", "i"); var snp_cookie_prefix = ''; var snp_separate_cookies = false; var snp_ajax_url = 'https://www.r-bloggers.com/wp-admin/admin-ajax.php'; var snp_ajax_nonce = 'd7edfc91cb'; var snp_ignore_cookies = false; var snp_enable_analytics_events = false; var snp_enable_mobile = false; var snp_use_in_all = false; var snp_excluded_urls = []; snp_excluded_urls.push(''); </script> <div class="snp-root"> <input type="hidden" id="snp_popup" value="" /> <input type="hidden" id="snp_popup_id" value="" /> <input type="hidden" id="snp_popup_theme" value="" /> <input type="hidden" id="snp_exithref" value="" /> <input type="hidden" id="snp_exittarget" value="" /> <div id="snppopup-welcome" class="snp-pop-109583 snppopup"><input type="hidden" class="snp_open" value="scroll" /><input type="hidden" class="snp_show_on_exit" value="2" /><input type="hidden" class="snp_exit_js_alert_text" value="" /><input type="hidden" class="snp_exit_scroll_down" value="" /><input type="hidden" class="snp_exit_scroll_up" value="" /><input type="hidden" class="snp_open_scroll" value="50" /><input type="hidden" class="snp_optin_redirect_url" value="" /><input type="hidden" class="snp_show_cb_button" value="yes" /><input type="hidden" class="snp_popup_id" value="109583" /><input type="hidden" class="snp_popup_theme" value="theme6" /><input type="hidden" class="snp_overlay" value="disabled" /><input type="hidden" class="snp_cookie_conversion" value="30" /><input type="hidden" class="snp_cookie_close" value="180" /><div class="snp-fb snp-theme6"> <div class="snp-subscribe-inner"> <h1 class="snp-header"><i>Never miss an update! </i> <br/> <strong>Subscribe to R-bloggers</strong> to receive <br/>e-mails with the latest R posts.<br/> <small>(You will not see this message again.)</small></h1> <div class="snp-form"> <form action="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers" method="post" class="snp-subscribeform snp_subscribeform"> <fieldset> <div class="snp-field"> <input type="text" name="email" id="snp_email" placeholder="Your E-mail..." class="snp-field snp-field-email" /> </div> <button type="submit" class="snp-submit">Submit</button> </fieldset> </form> </div> <a href="#" class="snp_nothanks snp-close">Click here to close (This popup will not appear again)</a> </div> </div> <style>.snp-pop-109583 .snp-theme6 { max-width: 700px;} .snp-pop-109583 .snp-theme6 h1 {font-size: 17px;} .snp-pop-109583 .snp-theme6 { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field ::-webkit-input-placeholder { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field :-moz-placeholder { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field :-ms-input-placeholder { color: #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field input { border: 1px solid #a0a4a9;} .snp-pop-109583 .snp-theme6 .snp-field { color: #000000;} .snp-pop-109583 .snp-theme6 { background: #f2f2f2;} </style><script> jQuery(document).ready(function() { }); </script> </div> <script type="text/javascript"> var CaptchaCallback = function() { jQuery('.g-recaptcha').each(function(index, el) { grecaptcha.render(el, { 'sitekey' : '' }); }); }; </script> </div> <script type="text/javascript">/* <![CDATA[ */!function(e,n){var r={"selectors":{"block":"pre","inline":"code"},"options":{"indent":4,"ampersandCleanup":true,"linehover":true,"rawcodeDbclick":false,"textOverflow":"scroll","linenumbers":false,"theme":"enlighter","language":"r","retainCssClasses":false,"collapse":false,"toolbarOuter":"","toolbarTop":"{BTN_RAW}{BTN_COPY}{BTN_WINDOW}{BTN_WEBSITE}","toolbarBottom":""},"resources":["https:\/\/www.r-bloggers.com\/wp-content\/plugins\/enlighter\/cache\/enlighterjs.min.css?vVCnEZeurtkU0vr","https:\/\/www.r-bloggers.com\/wp-content\/plugins\/enlighter\/\/resources\/enlighterjs\/enlighterjs.min.js"]},o=document.getElementsByTagName("head")[0],t=n&&(n.error||n.log)||function(){};e.EnlighterJSINIT=function(){!function(e,n){var r=0,l=null;function c(o){l=o,++r==e.length&&(!0,n(l))}e.forEach(function(e){switch(e.match(/\.([a-z]+)(?:[#?].*)?$/)[1]){case"js":var n=document.createElement("script");n.onload=function(){c(null)},n.onerror=c,n.src=e,n.async=!0,o.appendChild(n);break;case"css":var r=document.createElement("link");r.onload=function(){c(null)},r.onerror=c,r.rel="stylesheet",r.type="text/css",r.href=e,r.media="all",o.appendChild(r);break;default:t("Error: invalid file extension",e)}})}(r.resources,function(e){e?t("Error: failed to dynamically load EnlighterJS resources!",e):"undefined"!=typeof EnlighterJS?EnlighterJS.init(r.selectors.block,r.selectors.inline,r.options):t("Error: EnlighterJS resources not loaded yet!")})},(document.querySelector(r.selectors.block)||document.querySelector(r.selectors.inline))&&e.EnlighterJSINIT()}(window,console); /* ]]> */</script><script type='text/javascript' src='https://www.r-bloggers.com/wp-content/plugins/arscode-ninja-popups/js/jquery.ck.min.js?ver=5.5.1' id='jquery-np-cookie-js'></script> <script type='text/javascript' src='https://www.r-bloggers.com/wp-content/plugins/arscode-ninja-popups/js/dialog_trigger.js?ver=5.5.1' id='js-dialog_trigger-js'></script> <script type='text/javascript' src='https://www.r-bloggers.com/wp-content/plugins/arscode-ninja-popups/js/ninjapopups.min.js?ver=5.5.1' id='js-ninjapopups-js'></script> <script type='text/javascript' src='https://www.r-bloggers.com/wp-content/plugins/arscode-ninja-popups/fancybox2/jquery.fancybox.min.js?ver=5.5.1' id='fancybox2-js'></script> <script type='text/javascript' src='https://c0.wp.com/p/jetpack/7.3.2/_inc/build/photon/photon.min.js' id='jetpack-photon-js'></script> <script type='text/javascript' id='flying-pages-js-before'> window.FPConfig= { delay: 0, ignoreKeywords: ["\/wp-admin","\/wp-login.php","\/cart","add-to-cart","logout","#","?",".png",".jpeg",".jpg",".gif",".svg"], maxRPS: 3, hoverDelay: 50 }; </script> <script type='text/javascript' src='https://www.r-bloggers.com/wp-content/plugins/flying-pages/flying-pages.min.js?ver=2.4.2' id='flying-pages-js' defer></script> <script type='text/javascript' src='https://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=202038' id='devicepx-js'></script> <script type='text/javascript' src='https://c0.wp.com/p/jetpack/7.3.2/_inc/build/lazy-images/js/lazy-images.min.js' id='jetpack-lazy-images-js'></script> <script type='text/javascript' src='https://c0.wp.com/c/5.5.1/wp-includes/js/wp-embed.min.js' id='wp-embed-js'></script> <script type='text/javascript' src='https://stats.wp.com/e-202038.js' async='async' defer='defer'></script> <script type='text/javascript'> _stq = window._stq || []; _stq.push([ 'view', {v:'ext',j:'1:7.3.2',blog:'11524731',post:'176191',tz:'-6',srv:'www.r-bloggers.com'} ]); _stq.push([ 'clickTrackerInit', '11524731', '176191' ]); </script> <script type="text/javascript"> jQuery(document).ready(function ($) { //$( document ).ajaxStart(function() { //}); for (var i = 0; i < document.forms.length; ++i) { var form = document.forms[i]; if ($(form).attr("method") != "get") { $(form).append('<input type="hidden" name="PnM-zH_AKJNfBeFs" value="v*TMZOlu5zynohG6" />'); } if ($(form).attr("method") != "get") { $(form).append('<input type="hidden" name="-cRxUiIS" value="6UaC7c1T" />'); } if ($(form).attr("method") != "get") { $(form).append('<input type="hidden" name="VXUxhtONi" value="Nc8akts2n" />'); } if ($(form).attr("method") != "get") { $(form).append('<input type="hidden" name="GyoDAYLMZ" value="yE2gzT5Zm" />'); } } $(document).on('submit', 'form', function () { if ($(this).attr("method") != "get") { $(this).append('<input type="hidden" name="PnM-zH_AKJNfBeFs" value="v*TMZOlu5zynohG6" />'); } if ($(this).attr("method") != "get") { $(this).append('<input type="hidden" name="-cRxUiIS" value="6UaC7c1T" />'); } if ($(this).attr("method") != "get") { $(this).append('<input type="hidden" name="VXUxhtONi" value="Nc8akts2n" />'); } if ($(this).attr("method") != "get") { $(this).append('<input type="hidden" name="GyoDAYLMZ" value="yE2gzT5Zm" />'); } return true; }); jQuery.ajaxSetup({ beforeSend: function (e, data) { //console.log(Object.getOwnPropertyNames(data).sort()); //console.log(data.type); if (data.type !== 'POST') return; if (typeof data.data === 'object' && data.data !== null) { data.data.append("PnM-zH_AKJNfBeFs", "v*TMZOlu5zynohG6"); data.data.append("-cRxUiIS", "6UaC7c1T"); data.data.append("VXUxhtONi", "Nc8akts2n"); data.data.append("GyoDAYLMZ", "yE2gzT5Zm"); } else { data.data = data.data + '&PnM-zH_AKJNfBeFs=v*TMZOlu5zynohG6&-cRxUiIS=6UaC7c1T&VXUxhtONi=Nc8akts2n&GyoDAYLMZ=yE2gzT5Zm'; } } }); }); </script> </body> </html> <!-- Dynamic page generated in 0.967 seconds. --> <!-- Cached page generated by WP-Super-Cache on 2020-09-20 13:21:33 --> <!-- Compression = gzip -->