Skip to the content

Kuni国

Look up countries, codes, names and subdivisions, load country data on demand and mount a native country card.

Kuni (国) is Japanese for a country. About the name

Contents

Reference · Subdivision facts

SubdivisionFactstype

The facts about one subdivision, from the /subdivision-facts entry: null where Wikidata has none, or gives two.

Import it

import type { SubdivisionFacts } from "@johnmorrisdotca/kuni/subdivision-facts";

Definition

interface SubdivisionFacts {
    code: string;
    capital: {
        en: string;
        ja: string | null;
        reading?: string;
    } | null;
    capitalPoint: LatLon | null;
    population: number | null;
    populationYear: number | null;
    areaKm2: number | null;
    areaYear: number | null;
    point: LatLon | null;
}

Members

NameTypeDescription
codestring

ISO 3166-2, "JP-13"

capital{ en: string; ja: string | null; reading?: string; } | null

The seat of its government; reading in hiragana

capitalPointLatLon | null

The capital's coordinates

populationnumber | null

People, from Wikidata

populationYearnumber | null

The year the population is for, where Wikidata says

areaKm2number | null

Area in square kilometres, from Wikidata

areaYearnumber | null

The year the area is for, where Wikidata says

pointLatLon | null

Wikidata's coordinate location for the subdivision

Examples

import type { SubdivisionFacts } from "@johnmorrisdotca/kuni/subdivision-facts";
import { loadSubdivisionFacts } from "@johnmorrisdotca/kuni/subdivision-facts";

const value: SubdivisionFacts = (await loadSubdivisionFacts("JP"))![0];
console.log(typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[
  'code',
  'capital',
  'capitalPoint',
  'population',
  'populationYear',
  'areaKm2'
]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kuni 1.4.0.