‘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 ...

Function to check R package installation status

30. August 2016 how to, r 0
Function to check R package installation status
Today, I was updating a script that a coworker might use while I’m on vacation.  Knowing that she might not have some of the necessary packages installed on her machine, I wrote a function to check if the package was installed.  If the package is missing, the function will install it; if a package is already ...

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 ...