Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple library containing information about countries and their territories.

License

NotificationsYou must be signed in to change notification settings

Hyuchia/Atlas

Repository files navigation

Atlas is a simple library containing data about countries and their territories. The term territory here refers to any place that holds an equivalence to a state in their respective country, each territory can have additional information of itself, including the list of cities within it.

The data provided by this library has been scraped from different sites and is provided with no guarantees of it being accurate or complete.

Country territories will be added as they are required (gathering all data takes quite some time), but any contributions are welcome!

Data Sources

Countries:https://github.com/mledoze/countries

Countries

United States

The data for the US includes data on 50 States, 1 Federal District and 5 special areas.

For simplicity purposes, cities, towns and villages that are officially incorporated into a state regardless of its population have have been included as cities.

CDPs have been included in Hawaii's data and Townships were not included in Michigan's data.

Data Sources

Documentation

Installation

Atlas is provided as an UMD module that can be installed by adding the files manually to your project or via a package manager.

Yarn

yarn add @blac-sheep/atlas

NPM

npm install @blac-sheep/atlas

Adding it manually

<scriptsrc="atlas.min.js"></script>

Usage

NodeJS

constatlas=require('@blac-sheep/atlas');

ES6

importAtlasasatlasfrom'@blac-sheep/atlas';

Browser

constatlas=Atlas.default;

Classes

Atlas

Static Properties

NameTypeDescription
countriesArray<Country>List of countries available on the Atlas

Country

Instance Properties

NameTypeDescription
nameArray<Country>Country's name commonly used
official_namestringCountry's official name
capitalstringCountry's capital
flagstringCountry's flag unicode (emoji)
abbreviationstringCountry's 2 letter code
territoriesArray<Territory>List of territories belonging to the country

Territory

Instance Properties

NameTypeDescription
namestringTerritory's name
abbreviationstringTerritory's abbreviation
typestringTerritory's legal status within the country (State, Unincorporated, Unorganized, etc.)
capitalstringTerritory's capital city (If applies)
citiesArray<string>List of cities (officially incorporated places) in the territory

License

Atlas is released under theGPLv3 license.

About

A simple library containing information about countries and their territories.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp