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 · Country facts

CountryFactstype

The facts about one country, from the /facts entry: plain numbers and codes, null where a source has none.

Import it

import type { CountryFacts } from "@johnmorrisdotca/kuni/facts";

Definition

interface CountryFacts {
    alpha2: string;
    population: number | null;
    populationYear: number | null;
    areaKm2: number | null;
    areaYear: number | null;
    areaOf: "whole" | "land" | null;
    point: LatLon | null;
    capitalPoint: LatLon | null;
    borders: readonly string[];
    drivingSide: DrivingSide | null;
    weekStart: WeekStart;
    measurement: MeasurementSystem;
    paper: PaperSize;
    hourCycle: HourCycle;
}

Members

NameTypeDescription
alpha2string

ISO 3166-1 alpha-2, "JP"

populationnumber | null

People, from Wikidata; null where there is no permanent population (Antarctica)

populationYearnumber | null

The year the population is for; null only where the figure has none (0, uninhabited)

areaKm2number | null

Area in square kilometres, from Wikidata

areaYearnumber | null

The year the area is for, where Wikidata says; most areas carry no year

areaOf"whole" | "land" | null

"land" where the only figure is for the land alone; null with no area

pointLatLon | null

Wikidata's coordinate location for the country: a representative point, not a computed centroid

capitalPointLatLon | null

The capital's coordinates; null where there is no capital

bordersreadonly string[]

Alpha-2 codes of the countries it shares a land border with; [] for an island

drivingSideDrivingSide | null

null where there are no public roads

weekStartWeekStart

The first day of the week on a calendar there, from CLDR: "mon" for most, "sun" for the United States and Japan.

measurementMeasurementSystem

The system of measurement in everyday use, from CLDR: "metric", or "US" and "UK".

paperPaperSize

The paper size in everyday use, from CLDR: "A4", or "US-Letter" in the Americas' Letter countries.

hourCycleHourCycle

The clock CLDR prefers there: "h12" (1 to 12, with AM and PM) or "h23" (0 to 23).

Examples

import type { CountryFacts } from "@johnmorrisdotca/kuni/facts";
import { facts } from "@johnmorrisdotca/kuni/facts";

const value: CountryFacts = facts("JP")!;
console.log(typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[
  'alpha2',
  'population',
  'populationYear',
  'areaKm2',
  'areaYear',
  'areaOf'
]

What it prints (run when this page was built)

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