Sha256: bfca81caf77ad5d76c09b45122e49f06449a4cfcfdbda7e99672c3d69f4b31ab
Contents?: true
Size: 1.5 KB
Versions: 12
Compression:
Stored size: 1.5 KB
Contents
# FIXME TODO try to clean up this data ZipCode.class_eval do # sabshere 9/20/10 this isn't called anywhere # def set_latitude_and_longitude # return if latitude.present? and longitude.present? # a = Geokit::Geocoders::YahooGeocoder.geocode name # update_attributes! :latitude => a.lat, :longitude => a.lng # end data_miner do import 'the Mapping Hacks zipcode database', :url => 'http://mappinghacks.com/data/zipcode.zip', :filename => 'zipcode.csv' do key 'name', :field_name => 'zip', :sprintf => '%05d' store 'state_postal_abbreviation', :field_name => 'state' store 'description', :field_name => 'city' store 'latitude' store 'longitude' end import 'a list of zipcode states and eGRID Subregions from the US EPA', :url => 'http://www.epa.gov/cleanenergy/documents/egridzips/Power_Profiler_Zipcode_Tool_v3-2.xlsx', :sheet => 'Zip-subregion' do key 'name', :field_name => 'ZIP (character)' store 'state_postal_abbreviation', :field_name => 'State' store 'egrid_subregion_abbreviation', :field_name => 'Primary eGRID Subregion' end import 'a Brighter Planet-created list of zipcode Climate Divisions', :url => 'http://static.brighterplanet.com/science/data/geography/zip_code_name-climate_division_name.csv' do key 'name', :field_name => 'zip_code_name', :sprintf => '%05d' store 'climate_division_name' end # FIXME TODO verify this end end
Version data entries
12 entries across 12 versions & 1 rubygems