BeamLabCountries.Subdivision (beamlab_countries v2.0.1)

View Source

Country Subdivision struct.

Fields

  • id - subdivision code within its country (e.g. "CA" for California). IDs ending in ~ (e.g. "X1~") mark places that are not part of ISO 3166-2.
  • name - English name. Falls back to the :en translation when the data has no dedicated name.
  • unofficial_names - alternative names, always a list.
  • translations - map of language atom to name (e.g. %{de: "Bayern"}).
  • geo - coordinates and bounding box, if known.

Summary

Types

t()

@type t() :: %BeamLabCountries.Subdivision{
  geo: map() | nil,
  id: String.t() | nil,
  name: String.t() | nil,
  translations: %{optional(atom()) => String.t()} | nil,
  unofficial_names: [String.t()]
}