This gem provides a data set of all swiss villages taken out of the
"Ortschaftenverzeichnis" (ch.swisstopo-vd.ortschaftenverzeichnis_plz)
The data set made available through a ruby object called Village
contains
the following fields.
- name
- zip_code
- one_digit_spare
- commune
- canton
- latitude (WGS84)
- longitude (WGS84)
The data source can be downloaded as CSV here: PLZO_CSV_WGS84.zip
Add this line to your application's Gemfile:
gem 'swiss-village-directory'
And then execute:
$ bundle
Or install it yourself as:
$ gem install swiss-village-directory
Require the library
require 'swiss_village_directory'
Find by attributes:
SwissVillageDirectory.repository.find_all_by(name: 'Riedt b. Erlen')
or implement your own search logic
SwissVillageDirectory.villages.find { |v| v.name == 'Riedt b. Erlen' }
After checking out the repo, run bin/setup
to install dependencies. Then, run rspec
to run the tests.
You can also run bin/console
for an interactive prompt that will allow you to experiment.
If you would like to contribute, you're very welcome to.
Please follow these instructions:
Copyright (c) 2016 Renuo AG