bblocks.import_tools.who

Tools to extract _data from WHO

Attributes

GHED_URL

Classes

GHED

An object to extract GHED _data

Functions

extract_ghed_data(→ bytes)

Extract GHED dataset

_clean_ghed_codes(→ pandas.DataFrame)

Clean GHED codes

_clean_ghed_data(→ pandas.DataFrame)

Clean GHED _data dataframe

_clean_metadata(→ pandas.DataFrame)

Clean GHED metadata

download_ghed(→ None)

Download GHED dataset to disk

Module Contents

bblocks.import_tools.who.GHED_URL: str = 'https://apps.who.int/nha/database/Home/IndicatorsDownload/en'
bblocks.import_tools.who.extract_ghed_data() bytes

Extract GHED dataset

bblocks.import_tools.who._clean_ghed_codes(df: pandas.DataFrame) pandas.DataFrame

Clean GHED codes

bblocks.import_tools.who._clean_ghed_data(df: pandas.DataFrame) pandas.DataFrame

Clean GHED _data dataframe

bblocks.import_tools.who._clean_metadata(df: pandas.DataFrame) pandas.DataFrame

Clean GHED metadata

bblocks.import_tools.who.download_ghed() None

Download GHED dataset to disk

class bblocks.import_tools.who.GHED

Bases: 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.

_metadata: pandas.DataFrame = None
load_data() bblocks.import_tools.common.ImportData

Load GHED data

Returns:

The same object to allow chaining

update_data(reload_data: bool) bblocks.import_tools.common.ImportData

Update GHED _data

Returns:

The same object to allow chaining

get_metadata() pandas.DataFrame

Get GHED metadata as a pandas dataframe

Returns:

A pandas dataframe with the metadata