Skip to content

Commit

Permalink
feat: Add iso3166_2 and geodata (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Jul 31, 2023
1 parent 4fc5acc commit d32b3ea
Show file tree
Hide file tree
Showing 42 changed files with 472,393 additions and 563 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ And then execute:
province.links
# => {:wikipedia=>"https://en.wikipedia.org/wiki/Phnom_Penh"}

# Get Geodata
province.geodata
# => #<struct Pumi::Geodata lat="11.5730391", long="104.857807", bounding_box=["11.4200852", "11.7349524", "104.7204046", "105.0440261"]>

# Get ISO3166_2 code
province.iso3166_2
# => "KH-12"

# Working with Districts (ស្រុក / ខណ្ឌ)

# Get all districts
Expand Down
5 changes: 0 additions & 5 deletions bin/parse_data
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ require "pumi"

Pumi::DataSource::NCDD.new.load_data!

Pumi::DataSource::Wikipedia.new(
scraper: Pumi::DataSource::Wikipedia::CambodianProvincesScraper.new,
data_file: Pumi::DataFile.new(:provinces)
).load_data!

Pumi::DataSource::Wikipedia.new(
scraper: Pumi::DataSource::Wikipedia::CambodianDistrictsScraper.new,
data_file: Pumi::DataFile.new(:districts)
Expand Down

0 comments on commit d32b3ea

Please sign in to comment.