Recently Nick Fine contributed heavily to DST3K by implementing the remaining APIs the Data Science Toolkit offers, adding tests with minitest, and DRYing up all the things. Check out the diff!

After you look through his awesome example of refactoring, fork the project and play. Here’s how

$ git clone
$ cd data_science_theater_3000
$ gem install bundler
$ bundle install
$ bundle exec rake test
$ bundle console

...then in console:

request = '' )
 > #<datasciencetheater3000::ip2coordinates:0x000000019c7f60 ip="""">

 > {""=>{"longitude"=>-122.057403564453, "country_name"=>"United States", "postal_code"=>"94043", "region"=>"CA", "locality"=>"Mountain View", "country_code"=>"US", "dma_code"=>807, "latitude"=>37.4192008972168, "country_code3"=>"USA", "area_code"=>650}}

This is also fun ... pass output from street2coordinates or ip2coordinates to coordinates2politics

locations_request = ["", ""] )
 > #<datasciencetheater3000::ip2coordinates:0x000000026b17f8 ip="">

locations = locations_request.result
 > {""=>{ ... ... ... }, ""=>{ ... ... ... }}

politics_request = locations )
 > #<datasciencetheater3000::coordinates2politics:0x00000002ba6470 coordinates=""[[\"37.4192008972168\",\"-122.057403564453\"],[\"37.4192008972168\",\"-122.057403564453\"]]"">

politics = politics_request.result

Have fun!

Tad Hosford is a recent addition to the isotope|eleven development team. He graduated from the UAB Electrical and Computer Engineering department in 2009. He says software development is a perfect fit for him because it offers endless opportunities to create and to find new solutions to interesting problems.