Class: USGeo::PlaceCounty

Inherits:
BaseRecord
  • Object
show all
Defined in:
lib/us_geo/place_county.rb

Overview

Mapping of urban areas to counties they overlap with.

Constant Summary

Constants inherited from BaseRecord

BaseRecord::STATUS_IMPORTED, BaseRecord::STATUS_MANUAL, BaseRecord::STATUS_REMOVED

Class Method Summary collapse

Methods inherited from BaseRecord

#imported?, #manual?, #removed?

Class Method Details

.load!(uri = nil) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/us_geo/place_county.rb', line 15

def load!(uri = nil)
  location = data_uri(uri || "place_counties.csv")

  import! do
    load_data_file(location) do |row|
      load_record!(place_geoid: row["Place GEOID"], county_geoid: row["County GEOID"]) do |record|
      end
    end
  end
end