# `Yubin.Prefecture`
[🔗](https://github.com/NexPB/yubin/blob/v0.1.0/lib/yubin/prefecture.ex#L1)

One of the 47 prefectures, identified by its JIS X 0401 code.

`slug` is a stable romaji atom, suitable for an `Ecto.Enum`.

# `slug`

```elixir
@type slug() ::
  :hokkaido
  | :aomori
  | :iwate
  | :miyagi
  | :akita
  | :yamagata
  | :fukushima
  | :ibaraki
  | :tochigi
  | :gunma
  | :saitama
  | :chiba
  | :tokyo
  | :kanagawa
  | :niigata
  | :toyama
  | :ishikawa
  | :fukui
  | :yamanashi
  | :nagano
  | :gifu
  | :shizuoka
  | :aichi
  | :mie
  | :shiga
  | :kyoto
  | :osaka
  | :hyogo
  | :nara
  | :wakayama
  | :tottori
  | :shimane
  | :okayama
  | :hiroshima
  | :yamaguchi
  | :tokushima
  | :kagawa
  | :ehime
  | :kochi
  | :fukuoka
  | :saga
  | :nagasaki
  | :kumamoto
  | :oita
  | :miyazaki
  | :kagoshima
  | :okinawa
```

# `t`

```elixir
@type t() :: %Yubin.Prefecture{
  code: String.t(),
  kana: String.t(),
  name: String.t(),
  slug: slug()
}
```

# `all`

```elixir
@spec all() :: [t()]
```

Returns the 47 prefectures in JIS order, from `01` Hokkaido to `47` Okinawa.

# `from_code`

```elixir
@spec from_code(String.t()) :: t() | nil
```

Returns the prefecture with the 2-digit JIS code, or `nil`.

# `from_slug`

```elixir
@spec from_slug(atom()) :: t() | nil
```

Returns the prefecture with the slug, or `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
