Publications by Data Science Riot!
How to Install R Kernel for Jupyter on Mac OS X
IPython is a great tool for developers, particularly for R programmers who are accustomed to the luxury of running blocks of code during development. The ability to add an R kernel to the IPython environment gives one the ability to run Python and R side-by-side in the same programming environment. Update: This install method is less involved Ge...
2424 sym R (842 sym/10 pcs) 4 img
Using PL/R and PL/Python 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 fastest) on my CPU. T...
2522 sym R (784 sym/2 pcs) 2 img
Add Authentication to Shiny Server With Nginx
Shiny Server is a great tool, but I’ve always found it odd that there was no built-in password authentication. Sure, the Shiny Pro edition has SSL auth., but even for open source projects, I’m not really crazy about just anyone hitting my server whenever they want. To solve this little problem, I whipped up two work-arounds. One solution uses...
3659 sym Python (2771 sym/15 pcs) 4 img
Upgrade R Without Losing Your Packages
Since the first publication of this post, a couple of packages have emerged to automate this process. The installr package for Windows and the updateR package for OS X are particularly good. However, this continues to be a popular post, so I have decided to keep it up. This work-flow is short, sweet, and cross-platform. 1. Before you upgrade, bui...
1178 sym R (572 sym/3 pcs) 2 img
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 answer is, if ...
1932 sym R (2471 sym/2 pcs)
How to Install R Ubuntu 16.04 Xenial
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 Center; this would be the easy way to ...
1430 sym R (486 sym/5 pcs) 2 img
Mapping County Unemployment with blscrapeR
The blscrapeR package makes it easy to produce choropleth maps of various employment and unemployment rates from the Bureau of Labor Statistics (BLS.) It’s easy enough to pull a metric for a certain county. The code below pulls the unemployment rates for Orange County, FL from the BLS API. library(blscrapeR) df <- bls_api("LAUCN120950000000003"...
2494 sym R (2047 sym/7 pcs) 6 img
Calculate Wages and Benefits 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 first step in analy...
2385 sym R (3013 sym/10 pcs) 2 img
Mapping County Unemployment with blscrapeR
The blscrapeR package makes it easy to produce choropleth maps of various employment and unemployment rates from the Bureau of Labor Statistics (BLS.) It’s easy enough to pull a metric for a certain county. The code below pulls the unemployment rates for Orange County, FL from the BLS API. library(blscrapeR) df <- bls_api("LAUCN120950000000003"...
2494 sym R (2047 sym/7 pcs) 6 img
Calculate Wages and Benefits 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 first step in analy...
2385 sym R (3013 sym/10 pcs) 2 img