Module: USGeo

Defined in:
lib/us_geo.rb,
lib/us_geo/area.rb,
lib/us_geo/zcta.rb,
lib/us_geo/place.rb,
lib/us_geo/state.rb,
lib/us_geo/county.rb,
lib/us_geo/engine.rb,
lib/us_geo/region.rb,
lib/us_geo/version.rb,
lib/us_geo/division.rb,
lib/us_geo/population.rb,
lib/us_geo/urban_area.rb,
lib/us_geo/zcta_place.rb,
lib/us_geo/base_record.rb,
lib/us_geo/zcta_county.rb,
lib/us_geo/place_county.rb,
lib/us_geo/zcta_mapping.rb,
lib/us_geo/urban_cluster.rb,
lib/us_geo/urbanized_area.rb,
lib/us_geo/zcta_urban_area.rb,
lib/us_geo/metropolitan_area.rb,
lib/us_geo/micropolitan_area.rb,
lib/us_geo/urban_area_county.rb,
lib/us_geo/county_subdivision.rb,
lib/us_geo/metropolitan_division.rb,
lib/us_geo/zcta_county_subdivision.rb,
lib/us_geo/combined_statistical_area.rb,
lib/us_geo/core_based_statistical_area.rb,
lib/us_geo/urban_area_county_subdivision.rb

Defined Under Namespace

Modules: Area, Population Classes: BaseRecord, CombinedStatisticalArea, CoreBasedStatisticalArea, County, CountySubdivision, Division, Engine, LoadError, MetropolitanArea, MetropolitanDivision, MicropolitanArea, Place, PlaceCounty, Region, State, UrbanArea, UrbanAreaCounty, UrbanAreaCountySubdivision, UrbanCluster, UrbanizedArea, Zcta, ZctaCounty, ZctaCountySubdivision, ZctaMapping, ZctaPlace, ZctaUrbanArea

Constant Summary collapse

BASE_DATA_URI =
"https://raw.githubusercontent.com/bdurand/us_geo/master/data/2020_dist"
VERSION =
File.read(File.expand_path("../../VERSION", __dir__)).chomp.freeze

Class Method Summary collapse

Class Method Details

.base_data_uriObject

The root URI as a string of where to find the data files. This can be a URL or a file system path. The default is to load the data from files hosted with the project code on GitHub.



44
45
46
47
48
49
50
# File 'lib/us_geo.rb', line 44

def base_data_uri
  if defined?(@base_data_uri) && @base_data_uri
    @base_data_uri
  else
    ENV.fetch("US_GEO_BASE_DATA_URI", BASE_DATA_URI)
  end
end

.base_data_uri=(value) ⇒ Object



52
53
54
# File 'lib/us_geo.rb', line 52

def base_data_uri=(value)
  @base_data_uri = value&.to_s
end