bblocks.import_tools.who ======================== .. py:module:: bblocks.import_tools.who .. autoapi-nested-parse:: Tools to extract _data from WHO Attributes ---------- .. autoapisummary:: bblocks.import_tools.who.GHED_URL Classes ------- .. autoapisummary:: bblocks.import_tools.who.GHED Functions --------- .. autoapisummary:: bblocks.import_tools.who.extract_ghed_data bblocks.import_tools.who._clean_ghed_codes bblocks.import_tools.who._clean_ghed_data bblocks.import_tools.who._clean_metadata bblocks.import_tools.who.download_ghed Module Contents --------------- .. py:data:: GHED_URL :type: str :value: 'https://apps.who.int/nha/database/Home/IndicatorsDownload/en' .. py:function:: extract_ghed_data() -> bytes Extract GHED dataset .. py:function:: _clean_ghed_codes(df: pandas.DataFrame) -> pandas.DataFrame Clean GHED codes .. py:function:: _clean_ghed_data(df: pandas.DataFrame) -> pandas.DataFrame Clean GHED _data dataframe .. py:function:: _clean_metadata(df: pandas.DataFrame) -> pandas.DataFrame Clean GHED metadata .. py:function:: download_ghed() -> None Download GHED dataset to disk .. py:class:: GHED Bases: :py:obj:`bblocks.import_tools.common.ImportData` An object to extract GHED _data To use, create an instance of the class and call the load_indicator method. If the _data is already downloaded, it will be loaded from disk. If not, it will be downloaded. If `update_data` is set to True, the _data will be downloaded regardless of whether it is already on disk. To force an update, call the update method. To get the _data, call the get_data method. To get the metadata, call the get_metadata method. .. py:attribute:: _metadata :type: pandas.DataFrame :value: None .. py:method:: load_data() -> bblocks.import_tools.common.ImportData Load GHED data :returns: The same object to allow chaining .. py:method:: update_data(reload_data: bool) -> bblocks.import_tools.common.ImportData Update GHED _data :returns: The same object to allow chaining .. py:method:: get_metadata() -> pandas.DataFrame Get GHED metadata as a pandas dataframe :returns: A pandas dataframe with the metadata