WeeklyEarningsPlotBLS

Calculate Wages and Benefits in R with blscrapeR

The most difficult thing about working with BLS data is gaining a clear understanding on what data are available and what they represent. Some of the more popular data sets can be found on the BLS Databases, Tables & Calculations website. The selected examples below do not include all series or databases. Install blscrapeR The Read More

rstudio16

How to Install R on Linux Ubuntu 16.04 Xenial Xerus

The long-awaited new Ubuntu LTS Xenial Xerus was released last week. I wrote a tutorial on installing R and R-Studio on the old 14.04 LTS, so I figured I’d update that document. Not much has changed for the new 16.04 version but there are new repositories. Install R-Base You can find R-Base in the Software Read More

SuperTeus

How to Use R to Scrape Tweets: Super Tuesday 2016

Super Tuesday 2016 has come and gone, we have most of the election results, but what were the American public saying on Twitter? The twitteR package for R allows you to scrape tweets from Twitter’s API and use them to form sentiment analysis. The Plotly chart below shows what the Twitter-verse was saying about the Read More

r_programming_language_logo_square_sticker_3_x_3

How to Pimp Your .Rprofile

After you’ve been using R for a little bit, you start to notice people talking about their .Rprofile as if it’s some mythical being. Nothing magical about it, but it can be a big time-saver if you find yourself typing things like, “summary()” or, the ever-hated, “stringasfactors=FALSE” ad nauseam. Where is my .Rprofile? The simple Read More

Screen Shot 2015-12-17 at 8.53.24 AM

Upgrade R on Windows with the installr Package

It’s that time again—time for a new R version! The latest version 3.2.3 “Wooden Christmas Tree” is a small upgrade for most, but a huge step for Windows users. Of the new features included in Wooden, half of them are Windows-specific. Several months back I wrote a tutorial on how to upgrade R on a Read More

6125799339_7828a3d357_inflation-dollar

Calculate Inflation with R

I was surprised to see there weren’t more of these types of calculators in the R community. Inflation and adjusted payments seem like they would be more common. I was able to find a way to gather Consumer Price Index data using the quantmod package but quantmod leaves you to your own devices in converting Read More

The-Ultimate-Battle-R-vs-Python

Data Science Workbench for Ubuntu 14.04

I found myself installing the same things over and over again on my VMs, so I decided to pack all my good DSR workbench action into one giant shell script that I could run and walk away from. Below is my markdown file, you can grab the shell scripts at my GitHub page. The script Read More

shiny-server-alive

Install Shiny Server for R on Ubuntu the Right Way

Is it time to spin up a new instance of Shiny Server? This tutorial is baseed on a fresh install of Ubuntu Server 14.04, but I’m sure it could be tweaked to work on RHEL or CentOS as well. There’s no real secret sauce to the install but there are several “gotcha’s” that most people Read More

15612895048_3226a9cd23_sabermetrics

Hacking The New Lahman Package 4.0-1 with R-Studio

The developers of the Lahman package for R have recently updated the package to include 2014 MLB stats! For those not familiar, this R package recreates Sean Lahman’s Baseball Database into a quick and handy little R package. I’ve written on the Lahman package before, and even suggested adding a few advanced statistics to the Read More

The-Ultimate-Battle-R-vs-Python

Using PL/R and PL/Python to find Medians and Quartiles in Postgres

I’ve recently been exploring options to calculate median and quartiles in my Postgres database. If you’re familiar with quartiles you know how handy they can be. There’s a few different options in the Postgres universe to accomplish this, so I figured I would give them all a whirl and see which was the friendliest (and Read More