class USGeo::CombinedStatisticalArea

Combined statistical area (CSA) of multiple metropolitan areas with weak regional and economic connectoins between them.

Public Class Methods

load!(uri = nil) click to toggle source
# File lib/us_geo/combined_statistical_area.rb, line 23
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.population = row["Population"]
        record.housing_units = row["Housing Units"]
        record.land_area = area_meters_to_miles(row["Land Area"])
        record.water_area = area_meters_to_miles(row["Water Area"])
      end
    end
  end
end