Skip to contents

As in golemworldbank, a bubble per country, as large as its population, colored by its group (EU, EFTA, candidate), on axes that stay the same for all the years; here with the code of the country over its bubble, and the correlation of the two indicators across the countries of each year.

Usage

plot_scatter(x_data, y_data, x_indicator, y_indicator, population = NULL)

Arguments

x_data, y_data

Data frames from get_indicator().

x_indicator, y_indicator

The ids of the two indicators in indicators().

population

Data frame of the population of the countries, from get_indicator("population"), for the size of the bubbles; NULL, or a country without it, for bubbles of the smallest size.

Value

A plotly object, or NULL when the two indicators have no year in common.

Examples

plot_scatter(
  saved_indicator("gdp_pps"), saved_indicator("life_expectancy"), "gdp_pps", "life_expectancy",
  population = saved_indicator("population")
)