‘urltools’ R package for the win!

20. January 2017 analytics, data, programming, r 0
‘urltools’ R package for the win!
Yesterday, there was an urgent need to sort through 247,000 URLs to find parameter issues. I started digging into the task in R using some packages to strip out the parameters from the URLs. However, it seemed like I was writing a lot of code to extract the parameters and then clean the extracted values ...

Analytics: What are the impacts of taking the site down right now?

16. January 2017 analytics, data, programming, r 0
Analytics: What are the impacts of taking the site down right now?
Ever been asked how the company’s revenue would impacted if the site needed to be taken offline for an hour? I wrote a script that uses the rSiteCatalyst package for Adobe Analytics to answer this question.   The script starts by requesting a report using the QueueOvertime() function that includes the following metrics: unique visitors, orders, and revenue. ...

How to order factors in R

04. October 2016 data, r 0
How to order factors in R
Importing data into R is awesome and easy. The annoying part can be where you need to create a visualization only to find that the factors are in the order in which they were imported–randomly unless you’ve preordered the data. Recently I was creating a heat map of website visits by weekday and hour to ...

US Senators Up for Reelection in 2016

07. August 2016 data, programming, r 0
US Senators Up for Reelection in 2016
In my state, I know who my senators are and their reelection status, but I didn’t know any of the senators from other states who were also up for reelection.  Feeling a bit uninformed, I used R to extract information from Wikipedia and summarize the data for me. Not shown in this post is the ...

Extracting Data with an API and RStudio

30. July 2016 data, r 0
Extracting Data with an API and RStudio
Recently, I needed to be able to extract analytics data from our provider before the last day of our contract.  We were moving to a much more robust system, and they were being less than helpful and very unresponsive.  That was when I remembered that they have an API available for extracting data.  The API allows ...

There has to be a better way

14. July 2016 data, programming, r 1
There has to be a better way
On my journey to becoming an R data ninja, I’ve learned a lot and have come a long way.  However, today, I found myself writing a ginormous nested ifelse statement in R.  I needed to code the quarter (Q1, Q2, Q3, and Q4) for over 6,000 rows and standard packages weren’t cutting it.  The Lubridate ...

stringr + regex = amazing

28. April 2016 data, programming, r 0
stringr + regex = amazing
I had a data request come through that required me to break down submitted forms by the topic of concern (i.e., why was the form submitted in the first place?).  I remember from my earlier work with this database, that the form fields were stored in key value pairs in one column.  This was ok, but ...

It’s “three-forty-two” not 34%

16. April 2016 data, misc 0
It’s “three-forty-two” not 34%
When I moved to the northwest suburbs of Chicago in 2006, I started getting into baseball (go White Sox!) because of my friend and his family’s love for the game. On one bright summer day, my friend’s dad took us to a White Sox game at U.S. Cellular Field (Comiskey Park, for my friends who ...