0.2.3 • Published 3 years ago

@blac-sheep/atlas v0.2.3

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

Atlas

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

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

Usage

NodeJS

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

ES6

import Atlas as atlas from '@blac-sheep/atlas';

Browser

const atlas = 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 the GPLv3 license.

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

5 years ago