fetch_country_happiness#
- skrub.datasets.fetch_country_happiness(data_home=None)[source]#
Fetch the happiness index dataset (regression) available at skrub-data/skrub-data-files
This is a regression use-case, where the goal is to predict the happiness index. The dataset contains data from the 2022 World Happiness Report, and from the World Bank open data platform. Size on disk: 64KB.
- Parameters:
- data_home: str or path, default=None
The directory where to download and unzip the files.
- Returns:
- bunchsklearn.utils.Bunch
A dictionary-like object with the following keys:
happiness_report: dataframe, data from the world happiness report. Shape: (146, 12)GDP_per_capita: dataframe from the World Bank. Shape: (262, 2)life_expectancy: dataframe from the World Bank. Shape: (260, 2)legal_rights_index: dataframe from the World Bank. Shape: (238, 2)metadata: a dictionary containing the name of the dataset, a description and the sources.