          File.read!(:code.priv_dir(:shippex) ++ '/iso-3166-2.json')
        )
 
+  @type country_code() :: binary()
+
   @doc """
   Returns all ISO-3166-2 data.
   """
+  @spec data() :: %{country_code() => map()}
   def data(), do: @iso
 
   @doc """

      iex> ISO.find_subdivision_code("SG", "SG-Invalid")
      {:error, "Invalid subdivision 'SG-Invalid' for country: SG (SG)"}
  """
  @spec find_subdivision_code(String.t(), String.t()) :: {:ok, String.t()} | {:error, String.t()}
  def find_subdivision_code(country, subdivision) do
    country_code =
      case @iso do

      iex> ISO.territory?("US")
      false
  """
  @spec territory?(country_code()) :: boolean()
  def territory?(code) do
    country = @iso[code]

