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

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