emplevelggreadme

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

e834b20828fc043ecd0b470de7444e90fe76e6d211b0104490f1c1_640_map-united-states

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

e837b60828fd043ecd0b470de7444e90fe76e6d21fb2174595f5c7_640_pennies

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

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

blscrape_docfig3

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

fips_map

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

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

googlemapsmain

Detailed Geo Viz with Tableau, Mapbox and Google Street View

Tableau + Google Maps This has been one of my favorite Tableau tricks for a while. I originally saw Ben Jones do this a few years back but I think the Mapbox integration takes it to a whole new level. DISCLAIMER: from time to time, Google has been known to change their API, which inevitably breaks Read More

e835b90c2df3013ecd0b470de7444e90fe76e6d01eb414489cf0c1_640_lock

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

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