fetch_country_happiness#

skrub.datasets.fetch_country_happiness(data_home=None)[source]#

Fetch the happiness index dataset (regression) available at https://github.com/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_homestr or path-like, default=None

The directory where to download and unzip the files.

Returns:
bunchBunch

A dictionary-like object with the following keys:

happiness_reportDataFrame of shape (146, 12)

Data from the world happiness report.

GDP_per_capitaDataFrame of shape (262, 2)

Data from the World Bank.

life_expectancyDataFrame of shape (260, 2)

Data from the World Bank.

legal_rights_indexDataFrame of shape (238, 2)

Data from the World Bank.

metadatadict

A dictionary containing the name of the dataset, a description and the sources.

happiness_report_pathstr

The path to the happiness report CSV file.

GDP_per_capita_pathstr

The path to the GDP per capita CSV file.

life_expectancy_pathstr

The path to the life expectancy CSV file.

legal_rights_index_pathstr

The path to the legal rights index CSV file.