Tag Archives: JumpstartLab

Tutorial: Event Manager – by JumpstartLab

Today I built a program in Ruby called Event Manager that takes a CSV file containing ACTUAL attendee data from a political conference and manipulates that data based on certain instructions. If you’re new to Ruby or programming for that matter, I highly recommend it. Among other things, you’ll learn how to work with the CSV library and how to access a web-based API. The data file contains attendee names, addresses, phone numbers, emails, and the date and time they registered for the event. Problem #1 to solve was removing a lot of junk (incorrect street addresses and phone numbers). Here I learned a lot about string manipulation techniques. Then I learned how to output the cleaned data to a new CSV file. The fun part started when accessing the Sunlight API from the Sunlight Foundation, here I learned how to create a method called rep_lookup that looks up legislator data for each attendee based on their zipcode. I also learned how to create a method that pulls an attendee’s name and address from the original CSV file and creates a custom form letter in HTML. Awesome! Lastly, I learned how to do some analysis. I created methods that determined which days of the week and hours of the day most people registered for the event. This can be useful when determining the best times to run ads for a future event. All in all, this is a great tutorial for those wanting to learn Ruby. Check out the source code on my Github and the tutorial here.

Tagged , , , , ,
%d bloggers like this: