Reference · Framing, geometry and quiz tools
ChizuGrouptype
A named group of places: a continent, a UN M49 subregion, or any set of codes a page names (the countries of the
EU, Japan's Kanto region). The continents and subregions are CHIZU_CONTINENTS and CHIZU_SUBREGIONS; a map's own
groups are regionGroups(map); and any list of codes works with groupMap, groupBox and groupTones.
Import it
import type { ChizuGroup } from "@johnmorrisdotca/chizu";
Definition
interface ChizuGroup {
code: string;
kind: "continent" | "subregion" | "region";
name: string;
nameJa?: string;
reading?: string;
aliases?: string[];
codes: string[];
}
Members
| Name | Type | Description |
|---|---|---|
code | string | Its code: |
kind | "continent" | "subregion" | "region" | What kind of group it is. |
name | string | |
nameJa (optional) | string | undefined | |
reading (optional) | string | undefined | How |
aliases (optional) | string[] | undefined | Other names it goes by, in either language: Kansai and 関西 for Kinki. |
codes | string[] | The codes of the places in it, in order. |
Examples
import { CHIZU_SUBREGIONS } from "@johnmorrisdotca/chizu/names";
import type { ChizuGroup } from "@johnmorrisdotca/chizu";
const eastAsia: ChizuGroup = CHIZU_SUBREGIONS.find((group) => group.code === "030")!;
console.log(eastAsia.name, eastAsia.nameJa, eastAsia.codes.join(" "));
// Eastern Asia 東アジア CN HK JP KP KR MN MO TWEastern Asia 東アジア CN HK JP KP KR MN MO TWWhat it prints (run when this page was built)