Examining the Tweeting Patterns of Prominent Crossfit Gyms

A. Introduction The growth of Crossfit has been one of the biggest developments in the fitness industry over the past decade. Promoted as both a physical exercise philosophy and also as a competitive fitness sport, Crossfit is a high-intensity fitness program incorporating elements from several sports and exercise protocols such as high-intensity interval training, Olympic weightlifting, … Read more

Categories R Tags ExcerptFavorite

Spelling 2.0: Improved Markdown and RStudio Support

We have released updates for the rOpenSci text analysis tools. This technote will highlight some of the major improvements in the spelling package and also the underlying hunspell package, which provides the spelling engine for the spelling package. install.packages(“spelling”) Update to the latest versions to use these cool new features! Upcoming version of #rstats spelling … Read more

Categories R Tags ExcerptFavorite

How to Scrape Data from a JavaScript Website with R

In September 2017, I found myself working on a project that required odds data for football. At the time I didn’t know about resources such as Football-Data or the odds-api, so I decided to build a scraper to collect data directly from the bookmakers. However, most of them used JavaScript to display their odds, so … Read more

Categories R Tags ExcerptFavorite

Data, movies and ggplot2

Yet another boring barplot?No!I’ve asked my students from MiNI WUT to visualize some data about their favorite movies or series.Results are pretty awesome.Believe me or not, but charts in these posters are created with ggplot2 (most of them)! Star Wars Fan of StaR WaRs? Find out which color is the most popular for lightsabers!Yes, these … Read more

Categories R Tags ExcerptFavorite

Spinning Pins

Condenado a estar toda la vida, preparando alguna despedida (Desarraigo, Extremoduro) I live just a few minutes from the Spanish National Museum of Science and Technology (MUNCYT), where I use to go from time to time with my family. The museum is plenty of interesting artifacts, from a portrait of Albert Einstein made with thousands … Read more

Categories R Tags ExcerptFavorite

My R take on Advent of Code – Day 2

This is my second blog post from the series of My R take on Advent of Code. If you’d like to know more about Advent of Code, check out the first post from the series or simply go to their website. Below you’ll find the challnge from Day 2 and the solution that worked for … Read more

Categories R Tags ExcerptFavorite

All the (NBA) box scores you ever wanted

In this previous post, I showed how one can scrape top-level NBA game data from BasketballReference.com. In the post after that, I demonstrated how to scrape play-by-play data for one game. After writing those posts, I thought to myself: why not do both? And that is what I did: scrape all the box scores for … Read more

Categories R Tags ExcerptFavorite

So you want to play a pRank in R…?

So…you want to play a pRank with R? This short post will give you a fun function you can use in R to help you out! How to change a file’s modified time with R Let’s say we have a file, test.txt. What if we want to change the last modified date of the file … Read more

Categories R Tags ExcerptFavorite

Alternative approaches to scaling Shiny with RStudio Shiny Server, ShinyProxy or custom architecture.

Shiny is a great tool for fast prototyping. When a data science team creates a Shiny app, sometimes it becomes very popular. From that point this app becomes a tool used on production by many people, that should be reliable and work fast for many concurrent users. There are many ways to optimize a Shiny app like … Read more

Categories R Tags ExcerptFavorite

vtreat Variable Importance

vtreat‘s purpose is to produce pure numeric R data.frames that are ready for supervised predictive modeling (predicting a value from other values). By ready we mean: a purely numeric data frame with no missing values and a reasonable number of columns (missing-values re-encoded with indicators, and high-degree categorical re-encode by effects codes or impact codes). … Read more

Categories R Tags ExcerptFavorite

Statistics in Glaucoma: Part III

Samuel Berchuck is a Postdoctoral Associate in Duke University’s Department of Statistical Science and Forge-Duke’s Center for Actionable Health Data Science. Joshua L. Warren is an Assistant Professor of Biostatistics at Yale University. Looking Forward in Glaucoma Progression Research The contribution of the womblR package and corresponding statistical methodology is a technique for correctly accounting … Read more

Categories R Tags ExcerptFavorite

rcites – The story behind the package

The Ecology Hackathon Almost one year ago now, ecologists filled a room for the “Ecology Hackathon: Developing R Packages for Accessing, Synthesizing and Analyzing Ecological Data” that was co-organised by rOpenSci Fellow, Nick Golding and Methods in Ecology and Evolution. This hackathon was part of the “Ecology Across Borders” Joint Annual Meeting 2017 of BES, … Read more

Categories R Tags ExcerptFavorite

An R Shiny app to recognize flower species

Introduction Playing around with PyTorch and R Shiny resulted in a simple Shiny app where the user can upload a flower image, the system will then predict the flower species. Steps that I took Download labeled flower data from the Visual Geometry Group, Install Pytorch and download their transfer learning tutorial script, You need to … Read more

Categories R Tags ExcerptFavorite

Day 17 – little helper to_na

We at STATWORX work a lot with R and we often use the same little helper functions within our projects. These functions ease our daily work life by reducing repetitive code parts or by creating overviews of our projects. At first, there was no plan to make a package, but soon I realised, that it … Read more

Categories R Tags ExcerptFavorite

Phillips-Ouliaris Test For Cointegration

In a project of developing PPNR balance projection models, I tried to use the Phillips-Ouliaris (PO) test to investigate the cointegration between the historical balance and a set of macro-economic variables and noticed that implementation routines of PO test in various R packages, e.g. urca and tseries, would give different results. After reading through the … Read more

Categories R Tags ExcerptFavorite

My R take on Advent of Code – Day 1

Ho, ho, ho! It’s almost Christmas time and I don’t know about you, but I can’t wait for it! And what can be a better way of killing the waiting time (advent!) than participating in excellent Advent od Code. Big thanks to Colin Fay for telling me about it! It’s a series of coding riddles, … Read more

Categories R Tags ExcerptFavorite

2018-13 Rendering HTML Content in R Graphics

This report describes several R packages that allow HTML content to be rendered as part of an R plot. The core package is called ‘layoutEngine’, but that package requires a “backend” package to perform HTML layout calculations. Three example backends are demonstrated: ‘layoutEngineCSSBox’, ‘layoutEnginePhantomJS’, and ‘layoutEngineDOM’. We also introduce two new font packages, ‘gyre’ and … Read more

Categories R Tags ExcerptFavorite

Minimum CRPS vs. maximum likelihood

In a new paper in Monthly Weather Review, minimum CRPS and maximum likelihood estimation are compared for fitting heteroscedastic (or nonhomogenous) regression models under different response distributions. Minimum CRPS is more robust to distributional misspecification while maximum likelihood is slightly more efficient under correct specification. An R implementation is available in the crch package. Citation … Read more

Categories R Tags ExcerptFavorite

Quoting Concatenate

In our last note we used wrapr::qe() to help quote expressions. In this note we will discuss quoting and code-capturing interfaces (interfaces that capture user source code) a bit more. My position on code-capturing interfaces (or non-standard-evaluation/NSE) is: if poorly handled, they can be a large interface price/risk to pay for the minor convenience of … Read more

Categories R Tags ExcerptFavorite

Word associations from the Small World of Words

Do you subscribe to the Data is Plural newsletter from Jeremy Singer-Vine? You probably should, because it is a treasure trove of interesting datasets arriving in your email inbox. In the November 28 edition, Jeremy linked to the Small World of Words project, and I was entranced. I love stuff like that, all about words … Read more

Categories R Tags ExcerptFavorite

linl 0.0.3: Micro release

Our linl package for writing LaTeX letter with (R)markdown had a fairly minor release today, following up on the previous release well over a year ago. This version just contains one change which Mark van der Loo provided a few months ago with a clean PR. As another user was just bitten the same issue … Read more

Categories R Tags ExcerptFavorite

Request for comments on planned features for futile.logger 1.5

I will be pushing a new version of futile.logger (version 1.5) to CRAN in January. This version introduces a number of enhancements and fixes some bugs. It will also contain at least one breaking change. I am making the release process public, since the package is now used in a number of other packages. If … Read more

Categories R Tags ExcerptFavorite

Six Sigma DMAIC Series in R – Part4

Categories Basic Statistics Tags Data Visualisation Linear Regression R Programming Hope you liked the Part 1 ,Part 2 and Part 3 of this Series. In this Part 4, we will go through the tools used during the Improve phase of Six Sigma DMAIC cycle. The most representative tool used during the Improve Phase is DOE-Design … Read more

Categories R Tags ExcerptFavorite

Day 15 – little helper sci_palette

We at STATWORX work a lot with R and we often use the same little helper functions within our projects. These functions ease our daily work life by reducing repetitive code parts or by creating overviews of our projects. At first, there was no plan to make a package, but soon I realised, that it … Read more

Categories R Tags ExcerptFavorite

Advent of Code: Most Popular Languages

You might have heard of the Advent of Code,a 25-day challenge involving a programming puzzle a day, to be solvedwith the language of your choice. I’ve noted the popularity of thisactivity in my Twitter timeline but also in my GitHub timeline whereI’ve seen the creation of a few advent-of-code or so repositories. AoC is largely … Read more

Categories R Tags ExcerptFavorite

RStudio Pandoc – HTML To Markdown

The knitr and rmarkdown packages are used in conjunction with pandoc to convert R code and figures to a variety of formats including PDF, and word. Here, I’m exploring how to convert HTML back to markdown format. This post came about when I was searching how to convert XML to markdown, which I still haven’t … Read more

Categories R Tags ExcerptFavorite

Manipulate dates easily with {lubridate}

This blog post is an excerpt of my ebook Modern R with the tidyverse that you can read forfree here. This is taken from Chapter 5, which presentsthe {tidyverse} packages and how to use them to compute descriptive statistics and manipulate data.In the text below, I scrape a table from Wikipedia, which shows when African … Read more

Categories R Tags ExcerptFavorite

Learning R: A gentle introduction to higher-order functions

Have you ever thought about why the definition of a function in R is different from many other programming languages? The part that causes the biggest difficulties (especially for beginners of R) is that you state the name of the function at the beginning and use the assignment operator – as if functions were like … Read more

Categories R Tags ExcerptFavorite

In case you missed it: November 2018 roundup

Related To leave a comment for the author, please follow the link and comment on their blog: Revolutions. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, … Read more

Categories R Tags ExcerptFavorite

Day 14 – little helper print_fs

We at STATWORX work a lot with R and we often use the same little helper functions within our projects. These functions ease our daily work life by reducing repetitive code parts or by creating overviews of our projects. At first, there was no plan to make a package, but soon I realised, that it … Read more

Categories R Tags ExcerptFavorite

running plot [and simulated annealing]

Last weekend, I found out a way to run updated plots within a loop in R, when calling plot() within the loop was never updated in real time. The above suggestion of including a Sys.sleep(0.25) worked perfectly on a simulated annealing example for determining the most dispersed points in a unit disc. Related To leave … Read more

Categories R Tags ExcerptFavorite

My book ‘Deep Learning from first principles:Second Edition’ now on Amazon

The second edition of my book ‘Deep Learning from first principles:Second Edition- In vectorized Python, R and Octave’, is now available on Amazon, in both paperback ($14.99)  and kindle ($9.99/Rs449/-)  versions. Since this book is almost 70% code, all functions, and code snippets have been formatted to use the fixed-width font ‘Lucida Console’. In addition … Read more

Categories R Tags ExcerptFavorite

Pdftools 2.0: powerful pdf text extraction tools

A new version of pdftools has been released to CRAN. Go get it while it’s hot: install.packages(“pdftools”) This version has two major improvements: low level text extraction and encoding improvements. About PDF textboxes A pdf document may seem to contain paragraphs or tables in a viewer, but this is not actually true. PDF is a … Read more

Categories R Tags ExcerptFavorite

Yet another visualization of the Bayesian Beta-Binomial model

The Beta-Binomial model is the “hello world” of Bayesian statistics. That is, it’s the first model you get to run, often before you even know what you are doing. There are many reasons for this: It only has one parameter, the underlying proportion of success, so it’s easy to visualize and reason about. It’s easy … Read more

Categories R Tags ExcerptFavorite

Reusable Pipelines in R

Pipelines in R are popular, the most popular one being magrittr as used by dplyr. This note will discuss the advanced re-usable piping systems: rquery/rqdatatable operator trees and wrapr function object pipelines. In each case we have a set of objects designed to extract extra power from the wrapr dot-arrow pipe %.>%. Piping Piping is … Read more

Categories R Tags ExcerptFavorite

Gold-Mining Week 15 (2018)

The post Gold-Mining Week 15 (2018) appeared first on Fantasy Football Analytics. Related R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and … Read more

Categories R Tags ExcerptFavorite

RTutor: Better Incentive Contracts For Road Construction

Since about two weeks, I face a large additional traffic jam every morning due to a construction site on the road. When passing the construction site, often only few people or sometimes nobody seems to be working there. Being an economist, I really wonder how much of such traffic jams could be avoided with better … Read more

Categories R Tags ExcerptFavorite

Day 13 – little helper read_files

We at STATWORX work a lot with R and we often use the same little helper functions within our projects. These functions ease our daily work life by reducing repetitive code parts or by creating overviews of our projects. At first, there was no plan to make a package, but soon I realised, that it … Read more

Categories R Tags ExcerptFavorite

Recreating the NBA lead tracker graphic

For each NBA game, nba.com has a really nice graphic which tracks the point differential between the two teams throughout the game. Here is the lead tracker graphic for the game between the LA Clippers and the Phoenix Suns on 10 Dec 2018: Taken from https://www.nba.com/games/20181210/LACPHX#/matchup I thought it would be cool to try recreating … Read more

Categories R Tags ExcerptFavorite

Rsampling Fama French

Today we will continue our work on Fama French factor models, but more as a vehicle to explore some of the awesome stuff happening in the world of tidy models. For new readers who want get familiar with Fama French before diving into this post, see here where we covered importing and wrangling the data, … Read more

Categories R Tags ExcerptFavorite

Twins on the up

Are multiple births on the increase? My twin boys turned 5 years old today. Wow, time flies. Life is never dull, because twins are still seen as something of a novelty, so wherever we go, we find ourselves in conversation with strangers, who are intrigued by the whole thing. In order to save time if … Read more

Categories R Tags ExcerptFavorite

My introductory course on Bayesian statistics

So, after having held workshops introducing Bayes for a couple of years now, I finally pulled myself together and completed my DataCamp course: Fundamentals of Bayesian Data Analysis in R! ? While it’s called a course, it’s more like a 4 hour workshop and — without requiring anything but basic R skills and a vague … Read more

Categories R Tags ExcerptFavorite

Teaching and Learning Materials for Data Visualization

Data Visualization: A Practical Introduction will begin shipping next week. I’ve written an R package that contains datasets, functions, and a course packet to go along with the book. The socviz package contains about twenty five datasets and a number of utility and convenience functions. The datasets range in size from things with just a … Read more

Categories R Tags ExcerptFavorite

Day 12 – little helper dive

We at STATWORX work a lot with R and we often use the same little helper functions within our projects. These functions ease our daily work life by reducing repetitive code parts or by creating overviews of our projects. At first, there was no plan to make a package, but soon I realised, that it … Read more

Categories R Tags ExcerptFavorite

Visualizing Hurricane Data with Shiny

Motivation for Project Around the time that I was selecting a topic for this project, my parents and my hometown found themselves in the path of a Category 1 hurricane. Thankfully, everyone was ok, and there was only minor damage to their property. But this event made me think about how long it had been … Read more

Categories R Tags ExcerptFavorite

Scraping the Turkey Accordion

Related To leave a comment for the author, please follow the link and comment on their blog: R on datawookie. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) … Read more

Categories R Tags ExcerptFavorite

Reading List Faster With parallel, doParallel, and pbapply

I have several tables that I would like to load as a sole data frame. Derived functions from read. table () have a lot of convenient features, but it seems like there is a lot of steps in the implementation that would slow things down. The gain in performance of reading 29 CSV files (about … Read more

Categories R Tags ExcerptFavorite

Using ggplot2 for functional time series

I spoke yesterday about using ggplot2 for functional data graphics, rather than the custom-built plotting functionality available in the many functional data packages, including my own rainbow package written with Hanlin Shang. It is a much more powerful and flexible way to work, so I thought it would be useful to share some examples. French … Read more

Categories R Tags ExcerptFavorite