Blog Archives

Labor Market Analysis with R: Will Obama Ever be Beat?

February 13, 2017
By
Labor Market Analysis with R: Will Obama Ever be Beat?

No matter how many jobs are promised, Barak Obama’s administration will be nearly impossible to beat when it comes to employment growth. The following code uses the blcrapeR package, which is available on CRAN. Politicians talk a lot about jobs and unemployment, even though the actual power they have over the labor market is up Read More

Read more »

Map Projections for R Shapefiles: United States

November 2, 2016
By
Map Projections for R Shapefiles: United States

Someone contacted me recently about the map projections used in my blscrapeR package. After a bit of web searching, I couldn’t find a really good list of map projections for the continental U.S. that could be used in R. This list is as much for my own reference as anyone else, but hope you find

Read more »

Use R to Calculate Inflation with the blscrapeR Package

October 13, 2016
By
Use R to Calculate Inflation with the blscrapeR Package

The Consumer Price Index (CPI) is the main standard for tracking the inflation of the U.S. dollar. The various CPI measures are published monthly by the Bureau of Labor Statistics. For this walk-through, we will be using the blcsrapeR package to download our data from the BLS and perform the calculation. The blscrapeR package can

Read more »

Calculate Wages and Benefits in R with blscrapeR

August 16, 2016
By
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 »

Using blscrapeR to Map County Unemployment Data

August 1, 2016
By
Using blscrapeR to Map County Unemployment Data

The blscrapeR package makes it easy to produce choropleth maps of various employment and unemployment rates from the Bureau of Labor Statistics (BLS.) Install blscrapeR from CRAN: install.packages("blscrapeR") 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)

Read more »

Mapping US Counties in R with FIPS

June 16, 2016
By
Mapping US Counties in R with FIPS

Anyone who’s spent any time around data knows primary keys are your friend. Enter the FIPS code. FIPS is the Federal Information Processing Standard and appears in most data sets published by the US government. Name Matching The map below is an example as the “wrong way” to do something like this. This map uses

Read more »

How to Install R on Linux Ubuntu 16.04 Xenial Xerus

April 26, 2016
By
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 »

Add Authentication to Shiny Server with Nginx

March 9, 2016
By
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

Read more »

How to Use R to Scrape Tweets: Super Tuesday 2016

March 2, 2016
By

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 »

How to Pimp Your .Rprofile

December 30, 2015
By

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 »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)