kommunkoder
Collection of all municipalities in Sweden with corresponding county and municipality codes (kommunkoder)
Data is provided by SCB (Statistiska Centralbyrån). Latest update to data used in lib was done 2015-03-09.
Install
$ npm install kommunkoder --save
$ bower install kommunkoder --save
Usage
;// → [ Array of all municipalities ] ;// → { code: '1440', municipality: 'Ale', county: 'Västra Götalands län' } ;// → { code: "1382", municipality: "Falkenberg", county: "Hallands län" } ;// → [ Array of all municipalities in specified county ] // pass an array of searches to get an array of multiple results;// → [{ code: '1231', municipality: 'Burlöv', county: 'Skåne län' },// { code: '1233', municipality: 'Vellinge', county: 'Skåne län' },// { code: '1496', municipality: 'Skövde', county: 'Västra Götalands län' }] // 'undefined' is retunred if no match is found;// → undefined
Tests
# clone this repo $ npm install$ npm test
License
MIT © Simon Johansson