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

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

CPI_Nov

Using R to Scrape the Bureau of Labor Statistics

I’m taking a break for sports statistics today. Regular readers know I have a fascination of sabermetrics but during my “nine to five” I’m usually dealing with the labor market…enter the Bureau of Labor Statistics (BLS). If you’ve never been to the BLS website, it’s worth a trip. The amount of public data that are Read More

4705154034_25a54ca1a1_unemployment

How to Scrape Unemployment Data From the BLS API using R-Studio

The Bureau of Labor Statistics (BLS) is one of the most diverse sources of public data around. The one problem…the website is pretty horrible to work with. If you want to download one flat Excel sheet, the BLS website has you covered but if you want to download multiple data sets and compare them you’re Read More