Code Monkey home page Code Monkey logo

world-countries-centroids's Introduction

World Countries - Centroids

Centroids of world countries in CSV, GeoJson, etc

Map of the country centroids

Background/Problems

  • There is no generally accepted definition of geographic center, and no completely satisfactory method for determining it. (USGS)
  • 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)

Version 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.

Schema

  • longitude
  • latitude
  • COUNTRY - country name
  • ISO - country ISO code
  • COUNTRYAFF - country affiliated
  • AFF_ISO - country affiliated ISO code

Data Usage

There are multiple ways to access the data.

Download

Go to the releases page to download, then check the dist folder for the data files.

REST API (ArcGIS Feature Service)

The data is also published to an ArcGIS Online hosted feature service. The REST endpoint to query is:

https://services9.arcgis.com/l9yXFvhjz46ekkZV/arcgis/rest/services/Countries_Centroids/FeatureServer/0/query

For example, get the center point of Mexico:

https://services9.arcgis.com/l9yXFvhjz46ekkZV/arcgis/rest/services/Countries_Centroids/FeatureServer/0/query?where=ISO+%3D+%27MX%27&outFields=*&f=pgeojson

... or for USA and territories: https://services9.arcgis.com/l9yXFvhjz46ekkZV/ArcGIS/rest/services/Countries_Centroids/FeatureServer/0/query?where=AFF_ISO%3D%27US%27&outFields=*&f=pgeojson (Preview)

REST call - all data

Use JSDelivr to get all the data as CSV or GeoJSON:

NPM

https://www.npmjs.com/package/world-countries-centroids

License

See LICENSE file.

world-countries-centroids's People

Contributors

gavinr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.