{"id":15284693,"url":"https://github.com/simonepri/osm-countries","last_synced_at":"2025-04-12T23:43:55.797Z","repository":{"id":57316542,"uuid":"110892422","full_name":"simonepri/osm-countries","owner":"simonepri","description":"🔎 Get the OpenStreetMap's relation id from a country code.","archived":false,"fork":false,"pushed_at":"2018-01-08T13:44:15.000Z","size":13,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T23:43:50.082Z","etag":null,"topics":["countries","maps","openstreetmap"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonepri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-15T22:11:05.000Z","updated_at":"2022-05-29T04:37:55.000Z","dependencies_parsed_at":"2022-08-25T20:31:56.829Z","dependency_job_id":null,"html_url":"https://github.com/simonepri/osm-countries","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fosm-countries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fosm-countries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fosm-countries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fosm-countries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonepri","download_url":"https://codeload.github.com/simonepri/osm-countries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647256,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["countries","maps","openstreetmap"],"created_at":"2024-09-30T14:59:27.857Z","updated_at":"2025-04-12T23:43:55.779Z","avatar_url":"https://github.com/simonepri.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osm-countries\n[![Travis CI](https://travis-ci.org/simonepri/osm-countries.svg?branch=master)](https://travis-ci.org/simonepri/osm-countries) [![Codecov](https://img.shields.io/codecov/c/github/simonepri/osm-countries/master.svg)](https://codecov.io/gh/simonepri/osm-countries) [![npm](https://img.shields.io/npm/dm/osm-countries.svg)](https://www.npmjs.com/package/osm-countries) [![npm version](https://img.shields.io/npm/v/osm-countries.svg)](https://www.npmjs.com/package/osm-countries) [![npm dependencies](https://david-dm.org/simonepri/osm-countries.svg)](https://david-dm.org/simonepri/osm-countries) [![npm dev dependencies](https://david-dm.org/simonepri/osm-countries/dev-status.svg)](https://david-dm.org/simonepri/osm-countries#info=devDependencies)\n\n\u003e 🔎 Get the OpenStreetMap relation id from a country code.\n\n## Install\n\n```\n$ npm install --save osm-countries\n```\n\n## Usage\n\n```js\nconst osmCountries = require('osm-countries');\n\nosmCountries.get('ITA');\n// =\u003e '365331'\n\nosmCountries.get('USA');\n// =\u003e '148838'\n```\n\n## API\n\n\u003ca name=\"get\"\u003e\u003c/a\u003e\n\n## get(code) ⇒ \u003ccode\u003estring\u003c/code\u003e\nConverts an alpha-3 iso 3166-1 code to its corrispective relation id on OSM.\n\n**Returns**: \u003ccode\u003estring\u003c/code\u003e - OSM relation id of the given country.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| code | \u003ccode\u003estring\u003c/code\u003e | Alpha-3 iso 3166-1 country code. |\n\n\u003ca name=\"map\"\u003e\u003c/a\u003e\n\n## map() ⇒ \u003ccode\u003eobject\u003c/code\u003e\nReturns a map from alpha-3 iso 3166-1 codes to theyr corrispective relation\nids on OSM.\n\n**Returns**: \u003ccode\u003eobject\u003c/code\u003e - Map of all OSM relation ids.  \n\n## Authors\n* **Simone Primarosa** - [simonepri](https://github.com/simonepri)\n\nSee also the list of [contributors](https://github.com/simonepri/osm-countries/contributors) who participated in this project.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonepri%2Fosm-countries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonepri%2Fosm-countries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonepri%2Fosm-countries/lists"}