Class: USGeo::CombinedStatisticalArea
- Inherits:
-
BaseRecord
- Object
- ActiveRecord::Base
- BaseRecord
- USGeo::CombinedStatisticalArea
- Includes:
- Area, Population
- Defined in:
- lib/us_geo/combined_statistical_area.rb
Overview
Combined statistical area (CSA) of multiple metropolitan areas with weak regional and economic connectoins between them.
Constant Summary
Constants inherited from BaseRecord
BaseRecord::STATUS_IMPORTED, BaseRecord::STATUS_MANUAL, BaseRecord::STATUS_REMOVED
Instance Attribute Summary collapse
-
#geoid ⇒ String
3-digit code for the CSA.
-
#name ⇒ String
Name of the CSA.
Attributes included from Area
Attributes included from Population
Attributes inherited from BaseRecord
Class Method Summary collapse
Methods included from Area
#land_area_km, #percent_land, #total_area, #water_area_km
Methods included from Population
#housing_density, #housing_density_km, #population_density, #population_density_km
Methods inherited from BaseRecord
#imported?, #manual?, #removed?
Instance Attribute Details
#geoid ⇒ String
|
|
# File 'lib/us_geo/combined_statistical_area.rb', line 23
|
#name ⇒ String
|
|
# File 'lib/us_geo/combined_statistical_area.rb', line 26
|
Class Method Details
.load!(uri = nil) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/us_geo/combined_statistical_area.rb', line 33 def load!(uri = nil) location = data_uri(uri || "combined_statistical_areas.csv") import! do load_data_file(location) do |row| load_record!(geoid: row["GEOID"]) do |record| record.name = row["Name"] record.short_name = row["Short Name"] record.population = row["Population"] record.housing_units = row["Housing Units"] record.land_area = row["Land Area"] record.water_area = row["Water Area"] end end end end |