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

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

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

Geocoding Addresses in R with ggmap

16. March 2016 data, programming, r 2
Geocoding Addresses in R with ggmap
A few months ago, I needed to geocode over 1,600 addresses so that I could plot them on a map. The biggest problem I had was trying to figure out how to geocode these addresses in an efficient manner. There are several services on the web that will allow you to geocode address-by-address, but that would ...

ifelse in R

15. March 2016 programming, r 0
ifelse in R
I found a new way to write an if else statement in R.  I get a bit frustrated with the monotony of opening and closing brackets for if statements.  After going through R courses on Coursera and Data Camp, they both teach if structures the same way.  The new function I discovered, ‘if else’, makes writing if statements easier ...