def get_stat_descriptions(self) -> Dict[str, Tuple[str, str]]:

        stat_descriptions_short = get_json_path(
            self._full_data_json, ["..", "measures", "..", "title_de"])
        stat_descriptions_long = get_json_path(
            self._full_data_json, ["..", "measures", "..", "definition_de"])
        return {
            name: (short, long)
            for name, short, long in
            zip(self.stat_names, stat_descriptions_short,
                stat_descriptions_long)
        }
    def get_stat_units(self) -> Dict[str, str]:
        def get_unit_info(unit_json):
            return unit_json[0]["measure_name_de"]

        stat_names = get_json_path(self._full_data_json,
                                   ["..", "measures", "..", "name"])
        units = map(
            get_unit_info,
            get_json_path(self._full_data_json,
                          ["..", "measures", "..", "units"]),
        )
        return dict(zip(stat_names, units))
    def get_enum_values(self) -> Dict[str, Dict[str, str]]:
        names = get_json_path(
            self._full_data_json,
            ["..", "measures", "..", "dimensions", "..", "name"])
        values = get_json_path(
            self._full_data_json,
            ["..", "measures", "..", "dimensions", "..", "value_names"],
        )
        gesamt_update = {"GESAMT": "Gesamt"}

        return {
            name: dict(vs, **gesamt_update)
            for name, vs in zip(names, values)
        }
 def get_query_enum_meta(
         self, query_fields_with_types: List[Tuple[str, str]]) -> EnumMeta:
     enum_meta: EnumMeta = {}
     for field, _ in query_fields_with_types:
         enum_values = get_json_path(
             self._full_data_json,
             ["..", "measures", "..", "dimensions", field, "value_names"],
         )
         if len(enum_values) > 0:
             gesamt_update = {"GESAMT": "Gesamt"}
             enum_meta[field] = dict(enum_values[0], **gesamt_update)
     return enum_meta
 def stat_names(self):
     return [
         k
         for stat in get_json_path(self._full_data_json, ["..", "measures"])
         for k in stat.keys()
     ]
 def is_statistic(self, stat_candidate: str) -> bool:
     return stat_candidate in get_json_path(
         self._full_data_json, ["..", "measures", "..", "name"])