Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The realistic Earth's pure parts

cityRankfunction

How much a city counts when names crowd: its people, and a bonus for the capital of a country (2 million), another seat of government (1 million) and the capital of a subdivision (100,000).

Import it

import { cityRank } from "@johnmorrisdotca/chikyu-earth/realistic";

Definition

function cityRank(city: Pick<NamedCity, "population" | "capital">): number

Parameters

NameTypeDescription
cityPick<NamedCity, "population" | "capital">

The city.

Returns

number

The rank; higher is named first.

Examples

import { cityRank } from "@johnmorrisdotca/chikyu-earth/realistic";

console.log(cityRank({ population: 5_700, capital: "national" }), cityRank({ population: 5_700, capital: null }));
2005700 5700

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.