{"id":15413295,"url":"https://github.com/gavinr/world-countries-centroids","last_synced_at":"2025-08-26T22:32:47.738Z","repository":{"id":56335516,"uuid":"272318774","full_name":"gavinr/world-countries-centroids","owner":"gavinr","description":"Center points of world countries - CSV and GeoJSON","archived":false,"fork":false,"pushed_at":"2022-09-06T04:34:36.000Z","size":585,"stargazers_count":31,"open_issues_count":3,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-01T13:51:45.234Z","etag":null,"topics":["centroids","countries","geojson","geometry","locations","open-data","world"],"latest_commit_sha":null,"homepage":"https://gavinr.github.io/geojson-viewer/?url=https://cdn.jsdelivr.net/gh/gavinr/world-countries-centroids@v1/dist/countries.geojson","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/gavinr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://gavinr.com/contribute"}},"created_at":"2020-06-15T01:56:13.000Z","updated_at":"2024-10-05T09:50:06.000Z","dependencies_parsed_at":"2022-08-15T16:50:37.367Z","dependency_job_id":null,"html_url":"https://github.com/gavinr/world-countries-centroids","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinr%2Fworld-countries-centroids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinr%2Fworld-countries-centroids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinr%2Fworld-countries-centroids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinr%2Fworld-countries-centroids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinr","download_url":"https://codeload.github.com/gavinr/world-countries-centroids/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223696445,"owners_count":17187628,"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":["centroids","countries","geojson","geometry","locations","open-data","world"],"created_at":"2024-10-01T16:56:26.809Z","updated_at":"2024-11-08T14:02:28.118Z","avatar_url":"https://github.com/gavinr.png","language":"JavaScript","funding_links":["https://gavinr.com/contribute"],"categories":[],"sub_categories":[],"readme":"# World Countries - Centroids\r\n\r\nCentroids of world countries in CSV, GeoJson, etc\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://gavinr.github.io/geojson-viewer/?silent=true\u0026url=https://cdn.jsdelivr.net/gh/gavinr/world-countries-centroids@v1/dist/countries.geojson\"\u003e\u003cimg src=\"https://github.com/gavinr/world-countries-centroids/blob/master/countries.png?raw=true\" alt=\"Map of the country centroids\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\r\n## Background/Problems\r\n\r\n- _There is no generally accepted definition of geographic center, and no completely satisfactory method for determining it._ ([USGS](https://pubs.er.usgs.gov/publication/70039437))\r\n- _The geographic center of a region is a fundamental geographic concept, and yet there is no commonly accepted method for its determination._ ([Peter A. Rogerson](https://www.tandfonline.com/doi/full/10.1080/00330124.2015.1062707))\r\n\r\nVersion 1.0 has been updated to use the centroid of the largest land mass. This way large countries with many disparate areas (like USA, New Zealand, Chile, Portugal) have more rational center points.\r\n\r\n## Schema\r\n\r\n- `longitude`\r\n- `latitude`\r\n- `COUNTRY` - country name\r\n- `ISO` - country ISO code\r\n- `COUNTRYAFF` - country affiliated\r\n- `AFF_ISO` - country affiliated ISO code\r\n\r\n## Data Usage\r\n\r\nThere are multiple ways to access the data.\r\n\r\n### Download\r\n\r\nGo to the [releases page](https://github.com/gavinr/world-countries-centroids/releases) to download, then check the [dist folder](https://github.com/gavinr/world-countries-centroids/tree/master/dist) for the data files.\r\n\r\n### REST API (ArcGIS Feature Service)\r\n\r\nThe data is also published to an [ArcGIS Online hosted feature service](https://arcgis.com/home/item.html?id=782028ffbbfc47799f80e738f81c568d). The REST endpoint to [query](https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer-.htm) is:\r\n\r\n```\r\nhttps://services9.arcgis.com/l9yXFvhjz46ekkZV/arcgis/rest/services/Countries_Centroids/FeatureServer/0/query\r\n```\r\n\r\nFor example, get the center point of Mexico:\r\n\r\n\u003chttps://services9.arcgis.com/l9yXFvhjz46ekkZV/arcgis/rest/services/Countries_Centroids/FeatureServer/0/query?where=ISO+%3D+%27MX%27\u0026outFields=*\u0026f=pgeojson\u003e\r\n\r\n... or for USA and territories: \u003chttps://services9.arcgis.com/l9yXFvhjz46ekkZV/ArcGIS/rest/services/Countries_Centroids/FeatureServer/0/query?where=AFF_ISO%3D%27US%27\u0026outFields=*\u0026f=pgeojson\u003e ([Preview](https://gavinr.github.io/geojson-viewer/?url=https://services9.arcgis.com/l9yXFvhjz46ekkZV/ArcGIS/rest/services/Countries_Centroids/FeatureServer/0/query?where=AFF_ISO%3D%27US%27\u0026outFields=*\u0026f=pgeojson))\r\n\r\n### REST call - all data\r\n\r\nUse JSDelivr to get all the data as CSV or GeoJSON:\r\n\r\n- \u003chttps://cdn.jsdelivr.net/gh/gavinr/world-countries-centroids@v1/dist/countries.geojson\u003e ([Preview](https://gavinr.github.io/geojson-viewer/?url=https://cdn.jsdelivr.net/gh/gavinr/world-countries-centroids@v1/dist/countries.geojson))\r\n- \u003chttps://cdn.jsdelivr.net/gh/gavinr/world-countries-centroids@v1/dist/countries.csv\u003e\r\n\r\n### NPM\r\n\r\n\u003chttps://www.npmjs.com/package/world-countries-centroids\u003e\r\n\r\n## License\r\n\r\nSee [LICENSE](LICENSE) file.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinr%2Fworld-countries-centroids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinr%2Fworld-countries-centroids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinr%2Fworld-countries-centroids/lists"}