From 46158415f22168d20152a3d402468e4d3d8d661e Mon Sep 17 00:00:00 2001 From: Snowwpanda Date: Mon, 12 May 2025 02:14:58 +0200 Subject: [PATCH 01/11] Add updates for Plotly Intro tutorial --- 30_plotly_intro_to_libraries.ipynb | 1266 +++++++++ .../World-happiness-report-updated_2024.csv | 2364 +++++++++++++++++ data/plotly_intro/bubbly.py | 605 +++++ data/plotly_intro/country_region_mapping.csv | 144 + data/plotly_intro/gapminder.tsv | 1705 ++++++++++++ tutorial/intro_plotly_helper.py | 470 ++++ tutorial/my_bubbly.py | 636 +++++ .../test_30_plotly_intro_to_libraries.py | 240 ++ 8 files changed, 7430 insertions(+) create mode 100644 30_plotly_intro_to_libraries.ipynb create mode 100644 data/plotly_intro/World-happiness-report-updated_2024.csv create mode 100644 data/plotly_intro/bubbly.py create mode 100644 data/plotly_intro/country_region_mapping.csv create mode 100644 data/plotly_intro/gapminder.tsv create mode 100644 tutorial/intro_plotly_helper.py create mode 100644 tutorial/my_bubbly.py create mode 100644 tutorial/tests/test_30_plotly_intro_to_libraries.py diff --git a/30_plotly_intro_to_libraries.ipynb b/30_plotly_intro_to_libraries.ipynb new file mode 100644 index 00000000..ac1b6919 --- /dev/null +++ b/30_plotly_intro_to_libraries.ipynb @@ -0,0 +1,1266 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "_uuid": "bf21b194b3a4210fcd20580080ad8ae584e3025a" + }, + "source": [ + "# Introduction to Libraries" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "8dadc8c76dafcc26a6b4c4e0ddae581f2f64ccc3" + }, + "source": [ + "Welcome! This Jupyter Notebook is designed to introduce you to the power of Python libraries. Here in particular we will have a look at data analysis and visualization. We'll be focusing on two essential libraries:\n", + " - **Pandas**: A versatile library for data manipulation and analysis.\n", + " - **Plotly**: A powerful tool for creating interactive and visually appealing plots.\n", + "\n", + "Through practical examples, you'll learn how to:\n", + "Load and manipulate data using Pandas DataFrames.\n", + "Perform data analysis tasks such as filtering, grouping, and aggregation.\n", + "Create informative and interactive visualizations using Plotly." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Why are libraries important?\n", + "\n", + "Python libraries are collections of pre-written code that provide reusable functions and tools for specific tasks. They significantly extend the capabilities of Python, allowing you to perform complex operations without writing everything from scratch. This saves time and effort, promotes code reusability, and helps you focus on the higher-level logic of your data analysis and visualization workflows.\n", + "Have a look at the following plot: imagine you'd have to code every detail from scratch! Instead we rely on the help of libraries to do most of the heavy lifting for us. However there is still quite a bit to do before we can reproduce exactly this. Lets have a look at the following plot generated with plotly." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```pip install plotly```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "_kg_hide-input": true, + "_uuid": "9bd3a1e808d3d1251380c146f245e10f03ba387e" + }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "from tutorial.my_bubbly import bubbleplot \n", + "from plotly.offline import iplot\n", + "path = \"data/plotly_intro\"\n", + "gapminder_indicators = pd.read_csv(path + '/gapminder.tsv', delimiter='\\t')\n", + "\n", + "figure = bubbleplot(dataset=gapminder_indicators, x_column='gdpPercap', y_column='lifeExp', \n", + " bubble_column='country', time_column='year', size_column='pop', color_column='continent', \n", + " x_title=\"GDP per Capita\", y_title=\"Life Expectancy\", title='Gapminder Global Indicators',\n", + " x_logscale=True, scale_bubble=3, height=650)\n", + "iplot(figure, config={'scrollZoom': True})\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the graph above, the size corresponds to the population of each country and the values of GDP per capital and life expectency along with the name of the country can be seen by hovering over the cursor on the bubbles.\n", + "\n", + "Imagine the work you'd have to put in to build this without any libraries." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This animated bubble chart can convey a great deal of information since it can accomodate upto *six variables* in total, namely:\n", + "* X-axis (GDP per capita)\n", + "* Y-axis (Life Expectancy)\n", + "* Bubbles (Countries, can be seen by hovering the cursor over the dots)\n", + "* Time (in years)\n", + "* Size of bubbles (Population)\n", + "* Color of bubbles (Continents, variable can be categorical or numerical)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "e64fd356fab6b760bc4294384aa969d4c2ac9e78" + }, + "source": [ + "Using the function `bubbleplot` from the module [`bubbly`(bubble charts with plotly)](https://github.com/AashitaK/bubbly): See references for all source material." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Our goal is to recreate this Visualization but with a different dataset. For this we have already preloaded a data file in the folder `data/introtolibraries/World-happiness-report-updated_2024.csv` which is an open data record which can be found on kaggle.com" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Finding the right Library\n", + "\n", + "Finding the right library to use is always tricky and depends on your project requirements, the time you have available and the knowledge you may already have with libraries you already know well. Spending a bit of time at the beginning of a project researching and exploring some options and asking a friend for advice may be time well invested.\n", + "\n", + "For importing and exploring a dataset the most well known python library is Pandas. " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### What is Pandas?\n", + "\n", + "[Pandas](https://pandas.pydata.org/docs/index.html) is an open-source data manipulation and analysis library for Python.\n", + "It provides powerful data structures and functions designed to make working with structured data intuitive and efficient. At the heart of Pandas are two primary data structures:\n", + "\n", + "- **DataFrame**: A two-dimensional, size-mutable, and potentially heterogeneous tabular data structure with labeled axes (rows and columns). It's similar to a spreadsheet or SQL table and is generally the most commonly used Pandas object.\n", + "- **Series**: A one-dimensional labeled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.).\n", + "\n", + "Pandas integrates well with various other Python libraries, such as Matplotlib for plotting and NumPy for numerical computations, making it a central library in the Python data science stack." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Why We Need Pandas with Python\n", + "\n", + "Python, while a powerful programming language, isn't designed specifically for data analysis.\n", + "It lacks built-in, high-level data structures and tools that are intuitive and efficient for these tasks.\n", + "Here's where Pandas comes in:\n", + "\n", + "- **Data Cleaning and Preparation**: Data scientists spend a significant amount of time cleaning and preparing data. Pandas simplifies these tasks with built-in functions for filtering, selecting, and manipulating data.\n", + "- **Data Analysis**: With Pandas, analyzing and exploring data is more straightforward. It provides functions for aggregating, summarizing, and transforming data, making it easier to derive insights.\n", + "- **Data Visualization**: Though Pandas is not a data visualization library, it seamlessly interfaces with Matplotlib for plotting and visualizing data, allowing quick and informative visual analysis.\n", + "- **Handling Diverse Data Types**: Pandas efficiently handles a variety of data formats, including CSV, Excel files, SQL databases, and HDF5 format, making it a versatile tool for diverse data analysis needs." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### How to use a library\n", + "\n", + "#### Installing a library\n", + "\n", + "```pip install pandas```\n", + "\n", + "#### Importing the library\n", + "\n", + "Just like any code you had written yourself which is located in a different file the code for pandas needs to be imported with the statement\n", + "\n", + "```python\n", + "import pandas as pd\n", + "```\n", + "\n", + "As a prerequirement you must have the python package pandas installed, e.g. with your favorite package installer like pip. That is for another tutorial, we have preinstalled all the necessary libraries you will need in this environment.\n", + "You will notice also with pandas we immediatly rename the library namespace to pd, which is common for well none libraries to make typing faster. We adopt this practice here so you have have seen it before and aren't confused when it appears again.\n", + "\n", + "#### Accessing its functions\n", + "\n", + "Like we said a library is just a collection of useful functions. Now that we have imported the library we can use all the objects within. \n", + "As an example some useful functions in Pandas are\n", + "\n", + "\n", + "| Function | Description | Example |\n", + "|:---------------------------------|:---------------------------------------------------------------------------------------|:---------------------------------------------------|\n", + "| pd.read_csv() | Reads data from a CSV file and creates a DataFrame. | pd.read_csv('data.csv') |\n", + "| pd.DataFrame() | Creates a DataFrame from various data structures (lists, dictionaries, etc.). | pd.DataFrame({'col1': [1, 2], 'col2': ['a', 'b']}) |\n", + "| pd.DataFrame.head() | Displays the first few rows of the DataFrame (default is 5). | df.head() |\n", + "| pd.DataFrame.tail() | Displays the last few rows of the DataFrame (default is 5). | df.tail(10) |\n", + "| pd.DataFrame.info() | Provides a concise summary of the DataFrame, including data types and non-null values. | df.info() |\n", + "| pd.DataFrame.describe() | Generates descriptive statistics of the numerical columns in the DataFrame. | df.describe() |\n", + "| pd.DataFrame['column_name'] | Selects a specific column by its name. | df['Name'] |\n", + "| pd.DataFrame.loc[row_label, col_label] | Accesses a group of rows and columns by label(s). | df.loc[0, 'Age'] |\n", + "| pd.DataFrame.iloc[row_index, col_index] | Accesses a group of rows and columns by integer position(s). | df.iloc[2, 1] |\n", + "| pd.DataFrame.groupby('column_name') | Groups rows based on the values in a specified column for aggregation. | df.groupby('Category')['Value'].mean() |\n", + "| pd.DataFrame.sort_values(by='column_name') | Sorts the DataFrame by the values in one or more columns. | df.sort_values(by='Date', ascending=False) |\n", + "| pd.DataFrame.dropna() | Removes rows with missing values (NaN). | df.dropna() |\n", + "| pd.DataFrame.ffill() | Fills missing values by propagating the last valid observation forward to the next valid observation. | df.ffill() |\n", + "\n", + "#### Getting help and inspiration\n", + "\n", + "Of course one of the most important parts is to be able to understand, look-up and get help on any function of a library. Usually we start off with some inspiration, as we gave above with the plot, there might be someone who posted something which you would like to reproduce but with a twist or you would like to change something. This is generally a good starting point. However afterwards you won't have the documentation of all the functions so you need to have the skill to find documentation and understand the requirements for function, sometimes you even need to know more about the inner workings of a functions implementations.\n", + "\n", + "There are several ways to access documentation. One way, assuming it is a well maintained package online, is to find the documentation website. For pandas this is a great place to find details on functions, changes that may have been made with different versions and exploring alternatives to a given function.\n", + "\n", + "[Pandas Documentation](https://pandas.pydata.org/docs/index.html)\n", + "\n", + "If it is a smaller library you can list all top level functions with `dir` as in \n", + "```python\n", + "print(dir(pd))\n", + "```\n", + "However this will only give you top level functions.\n", + "\n", + "Many environments will have code completion or you may have an AI copilot to find functions.\n", + "And if you are struggling with a specific function you can print out the signature and the docstring with `help(function)`or `function?`\n", + "\n", + "When reading the documentation you might get overwhelmed. Keep a lookout for the function parameters, many of which may be optional, and good documentations tend to have an example to get a feel for the function.\n", + "\n", + "For most of this tutorial we will give you the infos about a function that you need, however if you want to know more or need some extra information then use these tools to inform yourself." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## First step: Data import and exploration\n", + "\n", + "Already getting you data from a file to a variable you can work with can be a headache. How do I read the file, how do i choose delimiters and what encoding does the file have?\n", + "\n", + "We will use the pd.read_csv function from pandas to read in the Worlds happiness report which is a report study on how people rate their happiness in different countries.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exercise reading in data\n", + "\n", + "In the cell below you should write the code that solves the first exercise:\n", + "\n", + " - Use the `path_to_happiness` which will be `data/plotly_intro/World-happiness-report-updated_2024.csv` which leads to a csv file to read in\n", + " - Read in the csv into a dataframe and output it as `pd.DataFrame`\n", + " - Because of how the `.csv`file is formated you must ensure that the encoding is latin1 `encoding='latin1'`" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%reload_ext tutorial.tests.testsuite" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%ipytest\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "def solution_read_in_dataframe(path_to_happiness: str) -> pd.DataFrame:\n", + " \"\"\"\n", + " Reads in a CSV file containing happiness data and returns it as a pandas DataFrame.\n", + "\n", + " Instructions:\n", + " - Use the `path_to_happiness` which will be `data/plotly_intro/World-happiness-report-updated_2024.csv`.\n", + " - Read in the CSV into a DataFrame using `pd.read_csv`.\n", + " - Ensure the encoding is set to 'latin1' as the file is formatted accordingly.\n", + "\n", + " Args:\n", + " path_to_happiness (str): Path to the CSV file containing the happiness data.\n", + "\n", + " Returns:\n", + " pd.DataFrame: A DataFrame containing the happiness data.\n", + " \"\"\"\n", + " # Your code starts here\n", + " return\n", + " # Your code ends here" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Playground\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "happyness = pd.read_csv('data/plotly_intro/World-happiness-report-updated_2024.csv', encoding='latin1')\n", + "happyness.describe()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "Use the above playground to explore the dataset using the functions test functions like:\n", + "| Function | Description | Example |\n", + "|:----------------------------------------------|:-----------------------------------------------------------------------------------------------------------|:---------------------------------------------|\n", + "| `pd.DataFrame.head()` | Displays the first few rows of the DataFrame (default is 5). | `df.head()` |\n", + "| `pd.DataFrame.tail()` | Displays the last few rows of the DataFrame (default is 5). | `df.tail(10)` |\n", + "| `pd.DataFrame.info()` | Provides a concise summary of the DataFrame, including data types and non-null values. | `df.info()` |\n", + "| `pd.DataFrame.describe()` | Generates descriptive statistics of the numerical columns in the DataFrame. | `df.describe()` |\n", + "| `pd.DataFrame['column_name']` | Selects a specific column by its name. | `df['Name']` |\n", + "| `pd.DataFrame.loc[row_label, col_label]` | Accesses a group of rows and columns by label(s). | `df.loc[0, 'Age']` |\n", + "| `pd.DataFrame.iloc[row_index, col_index]` | Accesses a group of rows and columns by integer position(s). | `df.iloc[2, 1]` |\n", + "| `pd.DataFrame.groupby('column_name')` | Groups rows based on the values in a specified column for aggregation. | `df.groupby('Category')['Value'].mean()` |\n", + "| `pd.DataFrame.shape` | Returns a tuple representing the dimensionality of the DataFrame (number of rows, number of columns). | `df.shape` |\n", + "| `pd.DataFrame.columns` | Returns the column labels of the DataFrame. | `df.columns` |\n", + "| `pd.DataFrame.index` | Returns the index (row labels) of the DataFrame. | `df.index` |\n", + "| `pd.DataFrame.dtypes` | Returns the data type of each column. | `df.dtypes` |\n", + "| `pd.DataFrame.values` | Returns a NumPy representation of the DataFrame. | `df.values` |\n", + "| `pd.DataFrame.nunique()` | Returns the number of unique values in each column. | `df['City'].nunique()` |\n", + "| `pd.DataFrame['column_name'].value_counts()` | Returns a Series containing counts of unique values in a column. | `df['Status'].value_counts()` |\n", + "| `pd.DataFrame.sort_values(by='column_name')` | Sorts the DataFrame by the values in a specified column. | `df.sort_values(by='Date')` |\n", + "| `pd.DataFrame.sort_index()` | Sorts the DataFrame by its index. | `df.sort_index()` |\n", + "| `pd.DataFrame.isna().sum()` | Returns the number of missing (NaN) values in each column. | `df.isna().sum()` |\n", + "| `pd.DataFrame.duplicated().sum()` | Returns the number of duplicate rows in the DataFrame. | `df.duplicated().sum()` |\n", + "| `pd.DataFrame['column_name'].unique()` | Returns a NumPy array of the unique values in a column. | `df['Country'].unique()` |\n", + "| `pd.DataFrame.sample(n=5)` | Returns a random sample of items from the DataFrame (default is 1). | `df.sample(n=10)` |\n", + "| `pd.DataFrame.filter(items=['col1', 'col3'])` | Subset the dataframe columns based on the specified items (labels). | `df.filter(items=['Product', 'Price'])` |\n", + "| `pd.DataFrame.filter(like='rate', axis=1)` | Subset the dataframe columns based on the specified regular expression (using 'like'). | `df.filter(like='temp', axis=1)` |\n", + "| `pd.DataFrame.filter(regex='^A', axis=1)` | Subset the dataframe columns based on the specified regular expression (using 'regex'). | `df.filter(regex='^ID', axis=1)` |\n", + "| `pd.DataFrame.nlargest(n, 'column_name')` | Returns the first n rows ordered by columns in descending order. | `df.nlargest(3, 'Revenue')` |\n", + "| `pd.DataFrame.nsmallest(n, 'column_name')` | Returns the first n rows ordered by columns in ascending order. | `df.nsmallest(2, 'Cost')` |\n", + "| `pd.DataFrame.corr(numeric_only=True)` | Computes pairwise correlation of columns, excluding NA/null values unless the entire row/column is NA. | `df.corr(numeric_only=True)` |\n", + "| `pd.DataFrame.cov(numeric_only=True)` | Computes pairwise covariance of columns, excluding NA/null values. | `df.cov(numeric_only=True)` |\n", + "| `pd.DataFrame.memory_usage(deep=True)` | Returns the memory usage of each column in bytes. The `deep=True` argument provides a more accurate estimate.| `df.memory_usage(deep=True)` |\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Data exploration\n", + "\n", + "After playing around a bit with some functions, this is what an initial exploration of the data set could look like. Run the next cell." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "\n", + "\n", + "happyness = pd.read_csv('data/plotly_intro/World-happiness-report-updated_2024.csv', encoding='latin1')\n", + "\n", + "\n", + "import pandas as pd\n", + "\n", + "# Assuming your dataframe is loaded into 'df'\n", + "df = happyness\n", + "print(\"--- First few rows of the dataframe ---\")\n", + "print(df.head(2))\n", + "print(\"\\n\")\n", + "\n", + "print(\"--- Summary information about the dataframe ---\")\n", + "df.info()\n", + "print(\"\\n\")\n", + "\n", + "print(\"--- Descriptive statistics for numerical columns ---\")\n", + "print(df.describe())\n", + "print(\"\\n\")\n", + "\n", + "print(\"--- Checking for unique values in each column ---\")\n", + "for col in df.columns:\n", + " unique_values = df[col].nunique()\n", + " print(f\"Column '{col}' has {unique_values} unique values.\")\n", + "print(\"\\n\")\n", + "\n", + "print(\"--- Checking for NaN (missing) values in each column ---\")\n", + "print(df.isnull().sum())\n", + "print(\"\\n\")\n", + "\n", + "# Example: Checking the span of a 'year' column (if it exists)\n", + "if 'year' in df.columns:\n", + " min_year = df['year'].min()\n", + " max_year = df['year'].max()\n", + " print(f\"--- Span of the 'year' column ---\")\n", + " print(f\"Minimum year: {min_year}\")\n", + " print(f\"Maximum year: {max_year}\")\n", + " print(f\"Year range: {max_year - min_year} years\")\n", + " print(\"\\n\")\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "67879155a77056411b701403cf464a2dd144eb7b" + }, + "source": [ + "# Building the plot from the scratch\n", + "\n", + "The plot you saw at the beginning was a plot that is part of the plotly tutorial. Many parts of this tutorial are heavily inspired by this [`kaggle project`](https://www.kaggle.com/code/aashita/guide-to-animated-bubble-charts-using-plotly). You can find many more on that website or online available in general. For reference see the end of the notebook.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Lets break down the steps we will go through during this notebook.\n", + "\n", + "## Steps:\n", + "* [Finding the limits](#limits)\n", + "* [Cleaning missing values](#clean)\n", + "* [Adding regional indicator](#adding)\n", + "* [Plotting basic scatter plot](#scatter)\n", + "* [Making frames per year](#frames)\n", + "* [Adding slider bar for time scale](#slider)\n", + "* [Adding pause-play button](#button)\n", + "* [Using bubble size as a variable](#size)\n", + "* [Classify into categories](#color)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Finding the limits \n", + "\n", + "If we are ploting a function, it is important to know the order of magnitude some of the data is in. In our case for example we want to have an animated plot over some years and it helps to know for which years we actually have data. In a dataframe we can e.g. use the .min() and .max() methods. Optionally, to understand the distribution or \"order of magnitude\" of your time values, you might want to plot out the years and check the rough distribution to identify any anomalies or gaps in the data. This can be done using a histogram or a line plot to visualize the frequency or trend of the time values over the range.\n", + "\n", + "We want to use matplotlib.pyplot for displaying the histogram because it has a useful function hist which does exactly that. \n", + "\n", + "We us the `matplotlib.pyplot as plt` library and there there is `.hist` function which will produce a histogram." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "\n", + "happiness = pd.read_csv('data/plotly_intro/World-happiness-report-updated_2024.csv', encoding='latin1')\n", + "years = happiness['year'].unique()\n", + "print(f\"Unique years in the dataset: {sorted(years)}\")\n", + "\n", + "df = happiness\n", + "df['year'] = happiness['year'].astype(int) # Ensure the years are integers\n", + "\n", + "# Determine the minimum and maximum years\n", + "min_year = df['year'].min()\n", + "max_year = df['year'].max()\n", + "number_of_bins = max_year - min_year + 1\n", + "\n", + "# Plot the histogram of the years\n", + "plt.figure(figsize=(10, 6)) # Adjust figure size for better readability\n", + "plt.hist(df['year'], bins=number_of_bins, edgecolor='grey') # Adjust bins as needed\n", + "plt.title('Histogram of Years')\n", + "plt.xlabel('Year')\n", + "plt.ylabel('Frequency')\n", + "plt.grid(True)\n", + "plt.show()\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Cleaning missing values \n", + "\n", + "Pandas provides several flexible methods for handling missing data, represented as `NaN`. You can identify missing values using `.isna()` or `.isnull()`, and then choose a strategy: `.dropna()` removes rows or columns with missing values, while `.fillna()` replaces them. `.ffill` propagates the last valid observation forward to fill the missing values. For example, `df.ffill` will replace a NaN with the value from the previous row which had a non-`Nan`value. You can also fill with a specific value (like the mean, median, or a constant). For time series data, you might use interpolation with `.interpolate()` to fill gaps. The best approach depends on the nature of the data and the goal of your analysis.\n", + "\n", + "For this step we will try to forwardfill the dataframe.\n", + "```python\n", + " cleaned_happiness = cleaned_happiness.sort_values(by=['Country name', 'year']).ffill()\n", + "```\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Exercise: Complete Happiness\n", + "\n", + "In this exercise we want to complete the dataframe with missing values. Complete the function below to \n", + "\n", + " 1) Fill in missing years for every country (so we have an entry for every year between 2005 and 2023 and every country). Do this by initializing a DataFrame with `pd.DataFrame()` with a list.\n", + " 2) Fill all missing values in the year 2005 with the value 1. Use the `.fillna()` function.\n", + " 3) Forwardfill all the remaining years with the function `.ffill()`. (To forward fill the order of the dataframe is important! Make sure to sort first.)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%reload_ext tutorial.tests.testsuite" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%ipytest\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "def solution_clean_dataset(happiness_df: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"Cleans the dataset by adding missing year and country values\n", + "\n", + " 1. Add in missing years for every country\n", + " 2. Fill the minimum year with values of 1\n", + " 3. Forward fill the rest of the years\n", + "\n", + " Args:\n", + " happiness_df : DataFrame containing the happiness data\n", + "\n", + " Returns:\n", + " - Cleaned DataFrame with missing values filled\n", + " \"\"\"\n", + " # Your code starts here\n", + " return \n", + " # Your code ends here" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Data cleaning is crucial in data analysis, but several pitfalls exist. Here's a summary of common mistakes and how to avoid them:\n", + "\n", + "1. Incorrectly Handling Missing Values\n", + "Replacing NaN values with the mean can be misleading, especially with skewed data. Consider using the median or more advanced imputation techniques, and understand the reason for missingness. Pandas tools like fillna(), dropna(), and interpolate() are essential here.\n", + "\n", + "2. Removing Outliers Without Investigation\n", + "Avoid automatically deleting outliers. Visualize the data to determine if outliers are genuine extreme values or errors. If genuine, they may be important for analysis. Use boolean indexing with summary statistics to handle them in Pandas.\n", + "\n", + "3. Ignoring Data Types\n", + "Ensure columns have the correct data type. Use df.info() to check and convert columns with pd.to_numeric(), pd.to_datetime(), or astype().\n", + "\n", + "4. Not Handling Duplicates Carefully\n", + "Investigate the source of duplicate rows before removing them. They may indicate data entry errors or represent significant repeated measurements. Pandas provides duplicated() and drop_duplicates() for this purpose.\n", + "\n", + "5. Applying Transformations Incorrectly\n", + "Scaling data without considering outliers can lead to issues. If scaling is necessary, consider robust scalers (like RobustScaler from scikit-learn) that are less affected by outliers." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Adding regional indicator \n", + "\n", + "We also want group the countries. \n", + "To add a regional indicator, we'll need another dataset that maps countries to their respective regions. We can then merge this data with our main happiness dataframe based on the 'Country name' column.\n", + "\n", + "Let's assume you have a CSV file named `country_region_mapping.csv` in your `data/plotly_intro/` directory with columns `'Country name'` and `'Region indicator'`. Then we could merge the dataframes on the country name and get a regional indicator for all the countries.\n", + "\n", + "Let's explore the `pd.merge` function for that. The merging of tables comes from SQL Table merges and if you are not familiar to those, for now keep in mind we want to do a **left merge** with the happiness table being the left table and the region mapping the right table and we merge **on** a column which they have in common.\n", + "\n", + "```python\n", + "pd.merge?\n", + "\n", + "Signature:\n", + "pd.merge(\n", + " left: 'DataFrame | Series',\n", + " right: 'DataFrame | Series',\n", + " how: 'MergeHow' = 'inner',\n", + " on: 'IndexLabel | AnyArrayLike | None' = None,\n", + " left_on: 'IndexLabel | AnyArrayLike | None' = None,\n", + " right_on: 'IndexLabel | AnyArrayLike | None' = None,\n", + " left_index: 'bool' = False,\n", + " right_index: 'bool' = False,\n", + " sort: 'bool' = False,\n", + " suffixes: 'Suffixes' = ('_x', '_y'),\n", + " copy: 'bool | None' = None,\n", + " indicator: 'str | bool' = False,\n", + " validate: 'str | None' = None,\n", + ") -> 'DataFrame'\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Exercise: Final Happiness\n", + "\n", + "In this exercise we want to add the regional indicators to the dataframe\n", + "\n", + " 1) Merge the region_df with complete_happiness_df.\n", + " 2) Fill missing falues with 'Unknown'." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%reload_ext tutorial.tests.testsuite" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%ipytest\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "def solution_add_regional_indicator(cleaned_happiness_df: pd.DataFrame, region_df: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"Adds a regional indicator to the dataset\n", + "\n", + " 1. Merge the cleaned_happiness_df with region_df on the 'Country name' and 'year' columns\n", + " 2. Fill the missing values in the 'Region indicator' column with 'Unknown'\n", + "\n", + " Args:\n", + " cleaned_happiness_df : DataFrame containing the happiness data\n", + " region_df : DataFrame containing the region data\n", + "\n", + " Returns:\n", + " - DataFrame with the regional indicator added\n", + " \"\"\"\n", + " # Your code starts here\n", + " return\n", + " # Your code ends here" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "7bd394a0dc02c3fb4e5ec1526c35a1955f0b14e6", + "jupyter": { + "outputs_hidden": true + } + }, + "source": [ + "## Plotting basic scatter plot \n", + "\n", + "Scatter plots from the plotly library are the most important thing we will be building up on. It magically transforms our data into a visual effect. For that we have to follow the exact rules of what the configuration parameters we need to follow.\n", + "\n", + "We work with the `iplot` function (interactive plot) from the plotly library, which takes a figure object, which is a dictionary containing the data, the layout and the frames. \n", + "\n", + "```python\n", + "figure = {\n", + " 'data': list[trace],\n", + " 'layout': dict,\n", + " 'frames': list[frame],\n", + "}\n", + "frame = {\n", + " 'data': list[trace],\n", + " 'name': str,\n", + "}\n", + "```\n", + "\n", + "The data can be seen as the plot data initially, and the frames are then the animation steps.\n", + "\n", + "Lets first try to create a simple scatter plot, for that we populate a figure dictionary data with a trace (dict) which contains an array of values for x, an array of values for y, a mode ('markers') and an array of strings for the text which ist what appears when hovered over.\n", + "\n", + "```python\n", + "trace = {\n", + " 'x': list[int],\n", + " 'y': list[int],\n", + " 'mode': 'markers',\n", + " 'text': list[str],\n", + " 'type': 'scatter'\n", + "}\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "_uuid": "682e20e7d96006aeb1466c7cacbf4360c699fd6f" + }, + "outputs": [], + "source": [ + "# Define the dataset and the columns\n", + "from tutorial.intro_plotly_helper import get_happiness_data, get_clean_dataset_with_region\n", + "from plotly.offline import iplot\n", + "dataset = get_clean_dataset_with_region(get_happiness_data())\n", + "x_column = 'Freedom to make life choices'\n", + "y_column = 'Life Ladder'\n", + "description_column = 'Country name'\n", + "# time_column = 'year'\n", + "\n", + "\n", + "\n", + "# Define figure\n", + "figure = {\n", + " 'data': [],\n", + " 'layout': {},\n", + " 'frames': []\n", + "}\n", + "\n", + "# Get a random representative year\n", + "year = 2010\n", + "\n", + "# Make the trace\n", + "trace = {\n", + " 'x': list(dataset.loc[dataset['year'] == year, x_column]), \n", + " 'y': list(dataset.loc[dataset['year'] == year, y_column]),\n", + " 'mode': 'markers',\n", + " 'text': list(dataset.loc[dataset['year'] == year, description_column]),\n", + " 'type': 'scatter',\n", + "}\n", + "\n", + "# Append the trace to the figure\n", + "figure['data'] = [trace]\n", + "\n", + "# Plot the figure\n", + "iplot(figure)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "810d72cd0c9581a9c89c28c14856c4db6887ef61" + }, + "source": [ + "## Making frames per year " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "12b6cf666ef1ebb3fb8619eff24ff7ae41799296" + }, + "source": [ + "Next we want to make the graph animated with a slider over the years. This is basically the same thing as making a scatter plot for every year and adding the slider. So it makes sense to functionalize the trace step we did before and then fill the frames with all of the traces." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "_uuid": "8033f8d68e1ba56213b706638dfc0ca43f7126ef" + }, + "outputs": [], + "source": [ + "from tutorial.intro_plotly_helper import get_happiness_data, get_clean_dataset_with_region, get_scatter_figure\n", + "from plotly.offline import iplot\n", + "\n", + "dataset = get_clean_dataset_with_region(get_happiness_data())\n", + "x_column = 'Freedom to make life choices'\n", + "y_column = 'Life Ladder'\n", + "description_column = 'Country name'\n", + "# time_column = 'year'\n", + "figure = get_scatter_figure(dataset, x_column, y_column, description_column)\n", + "\n", + "def frame_by_year(dataset, year, x_column, y_column, description_column):\n", + " \"\"\"Make a trace for a given year\"\"\"\n", + " # Make a trace\n", + " trace = {\n", + " 'x': list(dataset.loc[dataset['year'] == year, x_column]), \n", + " 'y': list(dataset.loc[dataset['year'] == year, y_column]),\n", + " 'mode': 'markers',\n", + " 'text': list(dataset.loc[dataset['year'] == year, description_column]),\n", + " 'type': 'scatter'\n", + " }\n", + " frame = {\n", + " 'data': [trace],\n", + " 'name': str(year)\n", + " }\n", + " return frame\n", + "\n", + "# Get the years\n", + "years = dataset['year'].unique()\n", + "# Sort the years\n", + "years.sort()\n", + "\n", + "\n", + "# Set timestep\n", + "figure['frames'] = [frame_by_year(dataset, year, x_column, y_column, description_column) for year in years]\n", + "iplot(figure)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "cd91579051aec5293b189b8985e41aac1b472880" + }, + "source": [ + "### Adding slider bar for time scale " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "824af00e3b9905ad341a9050acdf5da4c3334b4a" + }, + "source": [ + "The slider needs configuring, this would require a bit of reading up what exactly you need or if you have an example you can make use of the existing functions. The following is heavily inspired by the module [`bubbly`](https://github.com/AashitaK/bubbly). This is simply a configuration and contains only the years data." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "_uuid": "fc03387500edfa18300f6be8f572699157a38264" + }, + "outputs": [], + "source": [ + "from tutorial.intro_plotly_helper import full_clean_dataset, get_scatter_figure_with_years\n", + "\n", + "dataset = full_clean_dataset()\n", + "x_column = 'Freedom to make life choices'\n", + "y_column = 'Life Ladder'\n", + "description_column = 'Country name'\n", + "figure = get_scatter_figure_with_years(dataset, x_column, y_column, description_column)\n", + "\n", + "\n", + "years = dataset['year'].unique()\n", + "years.sort()\n", + "\n", + "figure['layout']['sliders'] = {\n", + " 'args': [\n", + " 'slider.value', {\n", + " 'duration': 400,\n", + " 'ease': 'cubic-in-out'\n", + " }\n", + " ],\n", + " 'initialValue': min(years),\n", + " 'plotlycommand': 'animate',\n", + " 'values': years,\n", + " 'visible': True\n", + "}\n", + "sliders_dict = {\n", + " 'active': 0,\n", + " 'yanchor': 'top',\n", + " 'xanchor': 'left',\n", + " 'currentvalue': {\n", + " 'font': {'size': 20},\n", + " 'prefix': 'Year:',\n", + " 'visible': True,\n", + " 'xanchor': 'right'\n", + " },\n", + " 'transition': {'duration': 300, 'easing': 'cubic-in-out'},\n", + " 'pad': {'b': 10, 't': 50},\n", + " 'len': 0.9,\n", + " 'x': 0.1,\n", + " 'y': 0,\n", + " 'steps': []\n", + "}\n", + "\n", + "def slider_step(year):\n", + " '''Creates a slider step.'''\n", + " \n", + " slider_step = {'args': [\n", + " [year],\n", + " {'frame': {'duration': 300, 'redraw': False},\n", + " 'mode': 'immediate',\n", + " 'transition': {'duration': 300}}\n", + " ],\n", + " 'label': str(year),\n", + " 'method': 'animate'}\n", + " return slider_step\n", + "\n", + "sliders_dict['steps'] = [slider_step(year) for year in years]\n", + "figure['layout']['sliders'] = [sliders_dict]\n", + "iplot(figure)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "a50ba67250bd23781b19640487c8ec284fb399f4" + }, + "source": [ + "## Adding pause-play button \n", + "\n", + "Buttons we give for free! (Run the above first)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "_uuid": "5097f53eecefb820ba4ccdbc28cbdf2c633e7ddc" + }, + "outputs": [], + "source": [ + "figure['layout']['updatemenus'] = [\n", + " {\n", + " 'buttons': [\n", + " {\n", + " 'args': [None, {'frame': {'duration': 500, 'redraw': False},\n", + " 'fromcurrent': True, 'transition': {'duration': 300, \n", + " 'easing': 'quadratic-in-out'}}],\n", + " 'label': 'Play',\n", + " 'method': 'animate'\n", + " },\n", + " {\n", + " 'args': [[None], {'frame': {'duration':0, 'redraw': False}, 'mode': 'immediate',\n", + " 'transition': {'duration': 0}}],\n", + " 'label': 'Pause',\n", + " 'method': 'animate'\n", + " }\n", + " ],\n", + " 'direction': 'left',\n", + " 'pad': {'r': 10, 't': 87},\n", + " 'showactive': False,\n", + " 'type': 'buttons',\n", + " 'x': 0.1,\n", + " 'xanchor': 'right',\n", + " 'y': 0,\n", + " 'yanchor': 'top'\n", + " }\n", + "]\n", + "iplot(figure)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "63258fcf5e60b88262f48c606236d26a45807a20" + }, + "source": [ + "## Using bubble size as a variable " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "fa97a15f3242c002ca32e24938d536e1fef4afc4" + }, + "source": [ + "Now we build on the above interactive graph by setting the size of the bubble as another variable we take the `Log GDP per capita`. \n", + "The size of the bubble is controlled by the ```marker``` attribute of each trace. The marker should have the format\n", + "```python\n", + "trace['marker'] = {\n", + " 'sizemode': 'area',\n", + " 'sizeref': int,\n", + " 'size': list[int]\n", + "}\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "First we need to make sure that the bubble sizes don't blow up the plot but also that they aren't so tiny we cannot see them. So we probably want sizes from 1 to 500. So we take the `Log GDP per capita` and scale it to a range of 1 to 500. We also add in an exponential scale from numpy library." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from tutorial.intro_plotly_helper import get_happiness_data, get_clean_dataset_with_region\n", + "import pandas as pd\n", + "import numpy as np\n", + "\n", + "complete_happiness_df = get_clean_dataset_with_region(get_happiness_data())\n", + "\n", + "log_gdp_df = complete_happiness_df[['Country name', 'year', 'Log GDP per capita']]\n", + "# get global min without 1\n", + "log_gdp_df_without_1 = log_gdp_df[log_gdp_df['Log GDP per capita'] != 1]\n", + "global_min_log_gdp_per_country = log_gdp_df_without_1['Log GDP per capita'].min()\n", + "# replace 1 with global min\n", + "log_gdp_df.loc[log_gdp_df['Log GDP per capita'] == 1, 'Log GDP per capita'] = global_min_log_gdp_per_country\n", + "global_max_log_gdp_per_country = log_gdp_df['Log GDP per capita'].max()\n", + "\n", + "\n", + "resized_log_gdp_df = log_gdp_df.copy()\n", + "# Scale exponentially between 1 and 500\n", + "resized_log_gdp_df['Resized Log GDP per capita'] = np.exp(log_gdp_df['Log GDP per capita']) * 500 / (np.exp(global_max_log_gdp_per_country) - np.exp(global_min_log_gdp_per_country))\n", + "\n", + "print(f\"Global min log GDP per country: {global_min_log_gdp_per_country}\")\n", + "print(f\"Global max log GDP per country: {global_max_log_gdp_per_country}\")\n", + "\n", + "# append to final_happiness_df\n", + "dataset = pd.merge(complete_happiness_df, resized_log_gdp_df, on=['Country name', 'year'], how='left')\n", + "# Check out year 2010\n", + "dataset[dataset['year'] == 2010].head(10)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "_cell_guid": "79c7e3d0-c299-4dcb-8224-4455121ee9b0", + "_kg_hide-input": false, + "_uuid": "d629ff2d2480ee46fbb7e2d37f6b5fab8052498a" + }, + "outputs": [], + "source": [ + "from tutorial.intro_plotly_helper import set_layout, full_clean_dataset\n", + "from plotly.offline import iplot\n", + "\n", + "\n", + "dataset = full_clean_dataset()\n", + "x_column = 'Freedom to make life choices'\n", + "y_column = 'Life Ladder'\n", + "description_column = 'Country name'\n", + "time_column = 'year'\n", + "# Set the layout\n", + "figure = set_layout(x_title='Freedom to make life choices', y_title='Life Ladder',\n", + " title='Happiness Indicators', x_logscale=False, y_logscale=False, \n", + " show_slider=True, slider_scale=years, show_button=True, show_legend=False, \n", + " height=650)\n", + "\n", + "# Define the new variable\n", + "bubble_size_column = 'Resized Log GDP per capita'\n", + "category_column = 'Regional indicator'\n", + "\n", + "\n", + "\n", + "# Make the grid\n", + "years = dataset[time_column].unique()\n", + "years.sort()\n", + " \n", + "\n", + "# Add the base frame\n", + "year = min(years)\n", + "trace = {\n", + " 'x': list(dataset.loc[dataset['year'] == year, x_column]), \n", + " 'y': list(dataset.loc[dataset['year'] == year, y_column]),\n", + " 'mode': 'markers',\n", + " 'text': list(dataset.loc[dataset['year'] == year, description_column]),\n", + " 'marker': {\n", + " 'size': list(dataset.loc[dataset['year'] == year, bubble_size_column]),\n", + " 'sizemode': 'area',\n", + " 'sizeref': 1,\n", + " },\n", + " 'type': 'scatter'\n", + "}\n", + "figure['data'].append(trace)\n", + "\n", + "\n", + "def frame_by_year_with_size(dataset, year, x_column, y_column, description_column):\n", + " \"\"\"Make a trace for a given year with bubble size\"\"\"\n", + " # Make a trace\n", + " trace = {\n", + " 'x': list(dataset.loc[dataset['year'] == year, x_column]), \n", + " 'y': list(dataset.loc[dataset['year'] == year, y_column]),\n", + " 'mode': 'markers',\n", + " 'text': list(dataset.loc[dataset['year'] == year, description_column]),\n", + " 'marker': {\n", + " 'size': list(dataset.loc[dataset['year'] == year, bubble_size_column]),\n", + " 'sizemode': 'area',\n", + " 'sizeref': 1,\n", + " },\n", + " 'type': 'scatter'\n", + " }\n", + " frame = {\n", + " 'data': [trace],\n", + " 'name': str(year)\n", + " }\n", + " return frame\n", + "\n", + "\n", + "# Add time frames\n", + "figure['frames'] = [frame_by_year_with_size(dataset, year, x_column, y_column, description_column) for year in years]\n", + "\n", + "\n", + "# Set the layout once more\n", + "figure['layout']['xaxis']['range'] = [0, 1.2]\n", + "figure['layout']['yaxis']['range'] = [0, 9]\n", + "\n", + "# Plot the animation\n", + "iplot(figure, config={'scrollZoom': True})" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "2a3441093b8ce8f92ddeff0e7358411fc7fcb2a5" + }, + "source": [ + "## Classify into categories " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "22d5e9e25c7cad813ce9e41cfcdc7960e887d615" + }, + "source": [ + "Now we add a category variable, namely region indicator in our case. By default if we split the traces into different categories they will all get different colors.\n", + "So the figure structure changes in that the data of a frame or a figure is now a list of traces instead of just one. So we split the data by year for every frame and then by categroy for every trace.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "```python\n", + "figure = {\n", + " 'data': list[trace], # Split by category\n", + " 'layout': {},\n", + " 'frames': list[frame] # Split by year\n", + "}\n", + "\n", + "frame = {\n", + " 'data': list[trace],\n", + " 'name': str,\n", + "}\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Exercise Frames with category\n", + "\n", + "In the below exercise, complete the function to output a frame with the above format, so that it is is a dictionary with `'data'` and `'name'` where the\n", + "\n", + "1. `'data'` is a list of traces where every trace is the subset containing a specific category in `'Regional indicator'` of the DataFrame. Each trace should now also have the key `'name'` which is the category.\n", + "2. `'name'` is equal to the year as a string.\n", + "\n", + "Take inspiration from above but now make the trace also a function dependent on the category." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%reload_ext tutorial.tests.testsuite" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%ipytest\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "\n", + "def solution_frames_with_category(dataset: pd.DataFrame, year: int, x_column: str, y_column: str, description_column: str, category_column: str, bubble_size_column: str) -> dict:\n", + " \"\"\"Make a frame for a given year with bubble size and color split the traces\n", + "\n", + " Args:\n", + " dataset : DataFrame containing the happiness data\n", + " year : Year to plot\n", + " x_column : Column name for x-axis\n", + " y_column : Column name for y-axis\n", + " description_column : Column name for text\n", + "\n", + " Returns:\n", + " - Dictionary containing the trace and frame information\n", + " \"\"\"\n", + " # Your code starts here\n", + " return\n", + " # Your code ends here" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "00b65071453b5b16a3e67cc68ec6ab822ff331d4" + }, + "source": [ + "So, we have finally generated the same interactive graph with our own dataset. Below is the full figure again." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from tutorial.intro_plotly_helper import load_full_happiness_figure\n", + "from plotly.offline import iplot\n", + "\n", + "figure = load_full_happiness_figure()\n", + "iplot(figure, config={'scrollZoom': True})" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Bonus Exercise Fixing a library\n", + "\n", + "\n", + "With huge and well established libraries like pandas or numpy there are many contributers behind them and a lot of effort is spent to find any kind of bugs and mistakes. However if you are browsing through possible libraries to use you might also find less well maintained libraries, ones that may only have a single author and ones that haven't been touched in a while. \n", + "\n", + "Here we give you a direct example, this tutorial was inspired by the [bubbly](https://github.com/AashitaK/bubbly) package. However with an update from the pandas library it is no longer compatible with newer versions of pandas and will through an error (see codeblock below). \n", + "So what to do in that case?\n", + "\n", + "There are many options, you can inform the author of this problem on github. Of course they may not have time to fix this. You can find a different library, however it might not be exactly the way you wanted it. You can downgrade your pandas library to be compatible, if you use pip show pandas you will see what version you have, it is possible to uninstall and reinstall a specific version. However this might not be feasable if you need it in other places and is generally not a pretty solution. \n", + "Last but not least you can try to fix it yourself.\n", + "\n", + "So as an exercise we exported the bubbly library as a file bubbly.py into the folder data.plotly_intro. It is quite a short library so quite managable.\n", + "Try to figure out what the error is exactly and then fix the library locally until the same code below compiles.\n", + "\n", + "(If you are interested in a solution, we have a fixed version under tutorial.my_bubbly.py, feel free to check the differences.)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "# from bubbly.bubbly import bubbleplot\n", + "from data.plotly_intro.bubbly import bubbleplot \n", + "from plotly.offline import iplot\n", + "path = \"data/plotly_intro\"\n", + "gapminder_indicators = pd.read_csv(path + '/gapminder.tsv', delimiter='\\t')\n", + "\n", + "figure = bubbleplot(dataset=gapminder_indicators, x_column='gdpPercap', y_column='lifeExp', \n", + " bubble_column='country', time_column='year', size_column='pop', color_column='continent', \n", + " x_title=\"GDP per Capita\", y_title=\"Life Expectancy\", title='Gapminder Global Indicators',\n", + " x_logscale=True, scale_bubble=3, height=650)\n", + "iplot(figure, config={'scrollZoom': True})\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "_uuid": "15bcce0fdc611f7ce7d36fcf9bacf6eade5b3561" + }, + "source": [ + "### References:\n", + "* https://www.kaggle.com/code/aashita/guide-to-animated-bubble-charts-using-plotly/notebook\n", + "* https://www.kaggle.com/datasets/unsdsn/world-happiness\n", + "* https://plot.ly/python/animations/\n", + "* https://stackoverflow.com/questions/45780920/plotly-icreate-animations-offline-on-jupyter-notebook\n", + "* https://plot.ly/python/gapminder-example/\n", + "* https://github.com/AashitaK/bubbly\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.4" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/data/plotly_intro/World-happiness-report-updated_2024.csv b/data/plotly_intro/World-happiness-report-updated_2024.csv new file mode 100644 index 00000000..602d36d1 --- /dev/null +++ b/data/plotly_intro/World-happiness-report-updated_2024.csv @@ -0,0 +1,2364 @@ +Country name,year,Life Ladder,Log GDP per capita,Social support,Healthy life expectancy at birth,Freedom to make life choices,Generosity,Perceptions of corruption,Positive affect,Negative affect +Afghanistan,2008,3.724,7.350,0.451,50.500,0.718,0.164,0.882,0.414,0.258 +Afghanistan,2009,4.402,7.509,0.552,50.800,0.679,0.187,0.850,0.481,0.237 +Afghanistan,2010,4.758,7.614,0.539,51.100,0.600,0.118,0.707,0.517,0.275 +Afghanistan,2011,3.832,7.581,0.521,51.400,0.496,0.160,0.731,0.480,0.267 +Afghanistan,2012,3.783,7.661,0.521,51.700,0.531,0.234,0.776,0.614,0.268 +Afghanistan,2013,3.572,7.680,0.484,52.000,0.578,0.059,0.823,0.547,0.273 +Afghanistan,2014,3.131,7.671,0.526,52.300,0.509,0.102,0.871,0.492,0.375 +Afghanistan,2015,3.983,7.654,0.529,52.600,0.389,0.078,0.881,0.491,0.339 +Afghanistan,2016,4.220,7.650,0.559,52.925,0.523,0.040,0.793,0.501,0.348 +Afghanistan,2017,2.662,7.648,0.491,53.250,0.427,-0.123,0.954,0.435,0.371 +Afghanistan,2018,2.694,7.631,0.508,53.575,0.374,-0.095,0.928,0.385,0.405 +Afghanistan,2019,2.375,7.640,0.420,53.900,0.394,-0.109,0.924,0.324,0.502 +Afghanistan,2021,2.436,7.325,0.454,54.550,0.394,-0.085,0.946,0.179,0.607 +Afghanistan,2022,1.281,,0.228,54.875,0.368,,0.733,0.206,0.576 +Afghanistan,2023,1.446,,0.368,55.200,0.228,,0.738,0.261,0.460 +Albania,2007,4.634,9.122,0.821,66.760,0.529,-0.013,0.875,0.489,0.246 +Albania,2009,5.485,9.241,0.833,67.320,0.525,-0.162,0.864,0.564,0.279 +Albania,2010,5.269,9.283,0.733,67.600,0.569,-0.176,0.726,0.576,0.300 +Albania,2011,5.867,9.310,0.759,67.880,0.487,-0.209,0.877,0.566,0.257 +Albania,2012,5.510,9.326,0.785,68.160,0.602,-0.173,0.848,0.553,0.271 +Albania,2013,4.551,9.338,0.759,68.440,0.632,-0.131,0.863,0.541,0.338 +Albania,2014,4.814,9.358,0.626,68.720,0.735,-0.029,0.883,0.573,0.335 +Albania,2015,4.607,9.382,0.639,69.000,0.704,-0.085,0.885,0.579,0.350 +Albania,2016,4.511,9.417,0.638,69.025,0.730,-0.021,0.901,0.567,0.322 +Albania,2017,4.640,9.455,0.638,69.050,0.750,-0.033,0.876,0.547,0.334 +Albania,2018,5.004,9.497,0.684,69.075,0.824,0.005,0.899,0.592,0.319 +Albania,2019,4.995,9.522,0.686,69.100,0.777,-0.103,0.914,0.548,0.274 +Albania,2020,5.365,9.494,0.710,69.125,0.754,0.002,0.891,0.563,0.265 +Albania,2021,5.255,9.588,0.702,69.150,0.827,0.039,0.896,0.554,0.254 +Albania,2022,5.212,9.649,0.724,69.175,0.802,-0.070,0.846,0.547,0.255 +Albania,2023,5.445,9.689,0.691,69.200,0.872,0.068,0.855,0.597,0.314 +Algeria,2010,5.464,9.306,,65.500,0.593,-0.212,0.618,, +Algeria,2011,5.317,9.316,0.810,65.600,0.530,-0.188,0.638,0.503,0.255 +Algeria,2012,5.605,9.330,0.839,65.700,0.587,-0.179,0.690,0.540,0.230 +Algeria,2014,6.355,9.355,0.818,65.900,,,,0.558,0.177 +Algeria,2016,5.341,9.383,0.749,66.100,,,,0.565,0.377 +Algeria,2017,5.249,9.377,0.807,66.200,0.437,-0.174,0.700,0.555,0.289 +Algeria,2018,5.043,9.370,0.799,66.300,0.583,-0.153,0.759,0.534,0.293 +Algeria,2019,4.745,9.361,0.803,66.400,0.385,-0.002,0.741,0.544,0.215 +Algeria,2020,5.438,9.291,0.868,66.500,0.574,-0.124,0.724,0.524,0.311 +Algeria,2021,5.217,9.308,0.841,66.600,0.558,-0.116,0.712,0.498,0.258 +Algeria,2022,5.538,9.323,0.783,66.700,0.440,-0.045,0.611,0.583,0.259 +Angola,2011,5.589,8.944,0.723,51.220,0.584,0.050,0.911,0.667,0.361 +Angola,2012,4.360,8.989,0.753,51.840,0.456,-0.141,0.906,0.591,0.305 +Angola,2013,3.937,9.000,0.722,52.460,0.410,-0.109,0.816,0.650,0.371 +Angola,2014,3.795,9.010,0.755,53.080,0.375,-0.173,0.834,0.595,0.368 +Argentina,2006,6.313,9.937,0.938,65.820,0.733,-0.162,0.852,0.748,0.328 +Argentina,2007,6.073,10.013,0.862,65.940,0.653,-0.146,0.881,0.750,0.279 +Argentina,2008,5.961,10.043,0.892,66.060,0.678,-0.137,0.865,0.720,0.318 +Argentina,2009,6.424,9.972,0.919,66.180,0.637,-0.135,0.885,0.762,0.237 +Argentina,2010,6.441,10.066,0.927,66.300,0.730,-0.132,0.855,0.765,0.211 +Argentina,2011,6.776,10.112,0.889,66.420,0.816,-0.180,0.755,0.769,0.232 +Argentina,2012,6.468,10.091,0.902,66.540,0.747,-0.153,0.817,0.744,0.272 +Argentina,2013,6.582,10.103,0.910,66.660,0.737,-0.136,0.823,0.766,0.254 +Argentina,2014,6.671,10.067,0.918,66.780,0.745,-0.170,0.854,0.769,0.238 +Argentina,2015,6.697,10.083,0.926,66.900,0.881,-0.180,0.851,0.768,0.305 +Argentina,2016,6.427,10.051,0.883,66.950,0.848,-0.198,0.851,0.732,0.312 +Argentina,2017,6.039,10.069,0.907,67.000,0.832,-0.192,0.841,0.715,0.292 +Argentina,2018,5.793,10.032,0.900,67.050,0.846,-0.216,0.855,0.732,0.321 +Argentina,2019,6.086,10.002,0.896,67.100,0.817,-0.217,0.830,0.735,0.319 +Argentina,2020,5.901,9.888,0.897,67.150,0.823,-0.131,0.816,0.679,0.342 +Argentina,2021,5.908,9.977,0.882,67.200,0.819,-0.014,0.816,0.685,0.345 +Argentina,2022,6.261,10.019,0.893,67.250,0.825,-0.130,0.810,0.724,0.284 +Argentina,2023,6.393,9.994,0.892,67.300,0.832,-0.129,0.846,0.720,0.301 +Armenia,2006,4.289,9.021,0.682,63.840,0.520,-0.235,0.850,0.453,0.469 +Armenia,2007,4.882,9.157,0.760,64.080,0.605,-0.255,0.817,0.454,0.412 +Armenia,2008,4.652,9.230,0.709,64.320,0.462,-0.219,0.876,0.486,0.385 +Armenia,2009,4.178,9.085,0.680,64.560,0.441,-0.218,0.882,0.479,0.411 +Armenia,2010,4.368,9.113,0.660,64.800,0.459,-0.180,0.891,0.437,0.426 +Armenia,2011,4.260,9.164,0.705,65.040,0.465,-0.230,0.875,0.411,0.459 +Armenia,2012,4.320,9.239,0.676,65.280,0.502,-0.220,0.893,0.470,0.464 +Armenia,2013,4.277,9.276,0.723,65.520,0.504,-0.201,0.900,0.503,0.450 +Armenia,2014,4.453,9.315,0.739,65.760,0.506,-0.225,0.920,0.510,0.404 +Armenia,2015,4.348,9.351,0.723,66.000,0.551,-0.209,0.901,0.527,0.438 +Armenia,2016,4.325,9.357,0.709,66.275,0.611,-0.178,0.921,0.516,0.437 +Armenia,2017,4.288,9.434,0.698,66.550,0.614,-0.155,0.865,0.552,0.437 +Armenia,2018,5.062,9.490,0.814,66.825,0.808,-0.171,0.677,0.535,0.455 +Armenia,2019,5.488,9.569,0.782,67.100,0.844,-0.181,0.583,0.537,0.430 +Armenia,2021,5.301,9.561,0.762,67.650,0.795,-0.159,0.705,0.566,0.478 +Armenia,2022,5.382,9.683,0.811,67.925,0.790,-0.158,0.705,0.531,0.549 +Armenia,2023,5.679,9.730,0.819,68.200,0.819,-0.179,0.681,0.575,0.423 +Australia,2005,7.341,10.662,0.968,69.800,0.935,,0.390,0.770,0.238 +Australia,2007,7.285,10.694,0.965,69.960,0.891,0.342,0.513,0.762,0.215 +Australia,2008,7.254,10.709,0.947,70.040,0.916,0.300,0.431,0.729,0.218 +Australia,2010,7.450,10.714,0.955,70.200,0.932,0.311,0.366,0.762,0.220 +Australia,2011,7.406,10.723,0.967,70.280,0.945,0.364,0.382,0.724,0.195 +Australia,2012,7.196,10.744,0.945,70.360,0.935,0.268,0.368,0.728,0.214 +Australia,2013,7.364,10.752,0.928,70.440,0.933,0.263,0.432,0.770,0.177 +Australia,2014,7.289,10.763,0.924,70.520,0.923,0.313,0.442,0.740,0.245 +Australia,2015,7.309,10.770,0.952,70.600,0.922,0.327,0.357,0.750,0.210 +Australia,2016,7.250,10.781,0.942,70.675,0.922,0.233,0.399,0.736,0.236 +Australia,2017,7.257,10.787,0.950,70.750,0.911,0.312,0.411,0.728,0.225 +Australia,2018,7.177,10.801,0.940,70.825,0.916,0.141,0.405,0.706,0.187 +Australia,2019,7.234,10.807,0.943,70.900,0.918,0.115,0.430,0.727,0.202 +Australia,2020,7.137,10.794,0.937,70.975,0.905,0.202,0.491,0.726,0.205 +Australia,2021,7.112,10.815,0.920,71.050,0.912,0.234,0.454,0.740,0.235 +Australia,2022,7.035,10.840,0.942,71.125,0.854,0.153,0.545,0.711,0.244 +Australia,2023,7.025,10.846,0.896,71.200,0.876,0.187,0.482,0.731,0.248 +Austria,2006,7.122,10.836,0.936,69.500,0.941,0.297,0.490,0.746,0.174 +Austria,2008,7.181,10.881,0.935,69.700,0.879,0.286,0.614,0.716,0.173 +Austria,2010,7.303,10.856,0.914,69.900,0.896,0.125,0.546,0.710,0.156 +Austria,2011,7.471,10.881,0.944,70.000,0.939,0.126,0.703,0.672,0.145 +Austria,2012,7.401,10.884,0.945,70.100,0.920,0.112,0.771,0.712,0.157 +Austria,2013,7.499,10.878,0.950,70.200,0.922,0.163,0.679,0.725,0.163 +Austria,2014,6.950,10.877,0.899,70.300,0.885,0.112,0.567,0.721,0.170 +Austria,2015,7.076,10.876,0.928,70.400,0.900,0.093,0.557,0.748,0.164 +Austria,2016,7.048,10.885,0.926,70.525,0.889,0.074,0.524,0.713,0.197 +Austria,2017,7.294,10.900,0.906,70.650,0.890,0.128,0.518,0.699,0.180 +Austria,2018,7.396,10.919,0.912,70.775,0.904,0.048,0.523,0.695,0.226 +Austria,2019,7.195,10.930,0.964,70.900,0.903,0.054,0.457,0.727,0.205 +Austria,2020,7.213,10.859,0.925,71.025,0.912,0.004,0.464,0.716,0.206 +Austria,2021,7.080,10.899,0.863,71.150,0.795,0.158,0.501,0.722,0.259 +Austria,2022,6.999,10.938,0.876,71.275,0.856,0.137,0.524,0.718,0.226 +Austria,2023,6.636,10.930,0.874,71.400,0.874,0.209,0.529,0.712,0.240 +Azerbaijan,2006,4.728,9.154,0.854,60.580,0.772,-0.239,0.774,0.469,0.276 +Azerbaijan,2007,4.568,9.366,0.753,60.860,0.522,-0.211,0.871,0.474,0.284 +Azerbaijan,2008,4.817,9.447,0.684,61.140,0.601,-0.034,0.715,0.561,0.227 +Azerbaijan,2009,4.574,9.515,0.736,61.420,0.498,-0.091,0.754,0.522,0.234 +Azerbaijan,2010,4.219,9.553,0.687,61.700,0.501,-0.128,0.858,0.516,0.272 +Azerbaijan,2011,4.680,9.541,0.725,61.980,0.537,-0.110,0.795,0.522,0.258 +Azerbaijan,2012,4.911,9.549,0.762,62.260,0.599,-0.146,0.763,0.523,0.266 +Azerbaijan,2013,5.481,9.592,0.770,62.540,0.672,-0.173,0.699,0.516,0.242 +Azerbaijan,2014,5.252,9.607,0.799,62.820,0.733,-0.214,0.654,0.502,0.220 +Azerbaijan,2015,5.147,9.606,0.786,63.100,0.764,-0.203,0.616,0.520,0.206 +Azerbaijan,2016,5.304,9.563,0.777,63.225,0.713,-0.210,0.607,0.509,0.191 +Azerbaijan,2017,5.152,9.555,0.787,63.350,0.731,-0.231,0.653,0.512,0.198 +Azerbaijan,2018,5.168,9.562,0.781,63.475,0.772,-0.237,0.561,0.527,0.191 +Azerbaijan,2019,5.173,9.578,0.887,63.600,0.854,-0.220,0.457,0.577,0.164 +Azerbaijan,2022,4.576,9.619,0.665,63.975,0.800,0.075,0.696,0.533,0.401 +Azerbaijan,2023,5.214,9.637,0.713,64.100,0.829,-0.160,0.627,0.509,0.221 +Bahrain,2009,5.701,10.714,0.904,64.760,0.896,0.031,0.506,0.707,0.422 +Bahrain,2010,5.937,10.728,0.877,65.000,0.862,-0.008,0.715,0.641,0.423 +Bahrain,2011,4.824,10.749,0.908,65.240,0.870,-0.061,0.583,0.506,0.514 +Bahrain,2012,5.027,10.775,0.911,65.480,0.682,,0.438,0.559,0.381 +Bahrain,2013,6.690,10.798,0.884,65.720,0.809,,0.525,0.711,0.306 +Bahrain,2014,6.165,10.802,,65.960,,,,, +Bahrain,2015,6.007,10.788,0.853,66.200,0.850,0.106,,0.653,0.303 +Bahrain,2016,6.170,10.789,0.863,66.125,0.889,0.082,,0.736,0.283 +Bahrain,2017,6.227,10.798,0.876,66.050,0.906,0.128,,0.754,0.290 +Bahrain,2019,7.098,10.815,0.878,65.900,0.907,0.035,,0.711,0.317 +Bahrain,2020,6.173,10.779,0.848,65.825,0.945,0.115,,0.730,0.297 +Bahrain,2023,5.959,10.877,0.817,65.600,0.869,0.155,,0.671,0.336 +Bangladesh,2006,4.319,7.940,0.672,59.120,0.612,0.052,0.786,0.459,0.321 +Bangladesh,2007,4.607,7.997,0.514,59.640,0.605,0.024,0.806,0.484,0.313 +Bangladesh,2008,5.052,8.047,0.467,60.160,0.606,-0.060,0.802,0.545,0.232 +Bangladesh,2009,5.083,8.087,0.528,60.680,0.631,-0.091,0.776,0.506,0.223 +Bangladesh,2010,4.858,8.130,0.549,61.200,0.659,-0.033,0.774,0.496,0.292 +Bangladesh,2011,4.986,8.181,0.606,61.720,0.838,-0.086,0.757,0.501,0.235 +Bangladesh,2012,4.724,8.231,0.582,62.240,0.668,-0.051,0.765,0.537,0.183 +Bangladesh,2013,4.660,8.277,0.530,62.760,0.742,-0.032,0.743,0.492,0.246 +Bangladesh,2014,4.636,8.323,0.577,63.280,0.736,-0.115,0.789,,0.231 +Bangladesh,2015,4.633,8.375,0.601,63.800,0.815,-0.085,0.721,0.543,0.226 +Bangladesh,2016,4.556,8.431,0.649,63.925,0.875,-0.105,0.688,0.437,0.235 +Bangladesh,2017,4.310,8.483,0.713,64.050,0.896,-0.004,0.635,0.436,0.214 +Bangladesh,2018,4.499,8.542,0.706,64.175,0.901,-0.059,0.701,0.433,0.361 +Bangladesh,2019,5.114,8.607,0.673,64.300,0.902,-0.067,0.656,0.433,0.369 +Bangladesh,2020,5.280,8.629,0.739,64.425,0.777,-0.025,0.742,0.485,0.332 +Bangladesh,2021,4.123,8.685,0.485,64.550,0.893,0.089,0.746,0.504,0.448 +Bangladesh,2022,3.408,8.742,0.404,64.675,0.865,-0.058,0.617,0.394,0.448 +Bangladesh,2023,4.114,8.783,0.450,64.800,0.919,0.019,0.756,0.435,0.435 +Belarus,2006,5.658,9.489,0.918,60.060,0.707,-0.252,0.708,0.535,0.269 +Belarus,2007,5.617,9.576,0.858,60.620,0.667,-0.230,0.695,0.502,0.235 +Belarus,2008,5.463,9.677,0.904,61.180,0.640,-0.226,0.696,,0.246 +Belarus,2009,5.564,9.681,0.908,61.740,0.679,-0.209,0.676,0.544,0.223 +Belarus,2010,5.526,9.759,0.918,62.300,0.700,-0.168,0.706,0.532,0.208 +Belarus,2011,5.225,9.813,0.910,62.860,0.656,-0.174,0.672,0.493,0.249 +Belarus,2012,5.749,9.832,0.902,63.420,0.645,-0.223,0.657,0.515,0.181 +Belarus,2013,5.876,9.842,0.923,63.980,0.723,-0.183,0.653,0.545,0.206 +Belarus,2014,5.812,9.858,0.880,64.540,0.647,-0.054,0.682,0.575,0.209 +Belarus,2015,5.719,9.818,0.924,65.100,0.623,-0.097,0.669,0.546,0.184 +Belarus,2016,5.178,9.792,0.927,65.325,0.658,-0.131,0.664,0.503,0.182 +Belarus,2017,5.553,9.818,0.900,65.550,0.621,-0.128,0.654,0.502,0.233 +Belarus,2018,5.234,9.851,0.905,65.775,0.644,-0.181,0.718,0.409,0.236 +Belarus,2019,5.821,9.867,0.917,66.000,0.657,-0.192,0.546,0.559,0.190 +Belgium,2005,7.262,10.744,0.935,68.400,0.924,,0.598,0.677,0.260 +Belgium,2007,7.219,10.791,0.922,68.720,0.901,0.064,0.721,0.744,0.218 +Belgium,2008,7.117,10.788,0.923,68.880,0.887,0.001,0.652,0.709,0.242 +Belgium,2010,6.854,10.778,0.931,69.200,0.807,0.016,0.697,0.793,0.240 +Belgium,2011,7.111,10.782,0.937,69.360,0.880,-0.020,0.711,0.752,0.225 +Belgium,2012,6.935,10.783,0.927,69.520,0.855,-0.056,0.758,0.718,0.238 +Belgium,2013,7.104,10.783,0.909,69.680,0.891,0.011,0.574,0.738,0.217 +Belgium,2014,6.855,10.794,0.944,69.840,0.861,-0.005,0.512,0.744,0.252 +Belgium,2015,6.904,10.809,0.885,70.000,0.869,0.056,0.469,0.747,0.240 +Belgium,2016,6.949,10.816,0.929,70.150,0.866,-0.062,0.497,0.701,0.260 +Belgium,2017,6.928,10.829,0.922,70.300,0.857,0.049,0.543,0.713,0.234 +Belgium,2018,6.892,10.842,0.930,70.450,0.808,-0.130,0.630,0.682,0.250 +Belgium,2019,6.772,10.859,0.884,70.600,0.776,-0.178,0.672,0.699,0.244 +Belgium,2020,6.839,10.799,0.904,70.750,0.767,-0.172,0.634,0.619,0.260 +Belgium,2021,6.882,10.856,0.915,70.900,0.823,0.077,0.523,0.687,0.260 +Belgium,2022,6.857,10.881,0.923,71.050,0.890,0.095,0.483,0.718,0.235 +Belgium,2023,6.944,10.883,0.896,71.200,0.870,0.065,0.522,0.725,0.245 +Belize,2007,6.451,9.192,0.872,64.300,0.705,0.006,0.769,0.732,0.251 +Belize,2014,5.956,9.135,0.757,65.000,0.874,-0.002,0.782,0.735,0.282 +Benin,2006,3.330,7.844,0.445,51.960,0.580,-0.015,0.790,0.521,0.309 +Benin,2008,3.667,7.891,0.382,52.480,0.709,-0.008,0.825,0.574,0.303 +Benin,2011,3.870,7.876,0.477,53.260,0.773,-0.145,0.849,0.574,0.219 +Benin,2012,3.193,7.894,0.523,53.520,0.769,-0.114,0.806,0.563,0.231 +Benin,2013,3.479,7.935,0.577,53.780,0.783,-0.088,0.856,0.646,0.216 +Benin,2014,3.347,7.967,0.506,54.040,0.776,-0.099,0.855,0.558,0.273 +Benin,2015,3.625,7.955,0.434,54.300,0.733,-0.029,0.850,0.555,0.373 +Benin,2016,4.007,7.958,0.493,54.600,0.780,-0.068,0.838,0.578,0.456 +Benin,2017,4.853,7.984,0.436,54.900,0.727,-0.068,0.767,0.598,0.458 +Benin,2018,5.820,8.020,0.504,55.200,0.713,0.000,0.747,0.625,0.468 +Benin,2019,4.976,8.057,0.442,55.500,0.770,-0.018,0.698,0.638,0.441 +Benin,2020,4.408,8.067,0.507,55.800,0.783,-0.086,0.532,0.557,0.305 +Benin,2021,4.493,8.108,0.436,56.100,0.724,-0.016,0.613,0.597,0.435 +Benin,2022,4.217,8.142,0.366,56.400,0.714,-0.033,0.580,0.571,0.444 +Benin,2023,4.420,8.174,0.398,56.700,0.786,-0.073,0.575,0.573,0.428 +Bhutan,2013,5.569,9.097,0.819,62.240,0.810,0.349,0.802,0.664,0.217 +Bhutan,2014,4.939,9.143,0.880,62.420,0.834,0.264,0.650,0.775,0.324 +Bhutan,2015,5.082,9.198,0.848,62.600,0.830,0.273,0.634,0.723,0.312 +Bolivia,2006,5.374,8.671,0.834,60.900,0.770,-0.048,0.794,0.708,0.432 +Bolivia,2007,5.628,8.698,0.796,61.100,0.780,-0.004,0.817,0.746,0.388 +Bolivia,2008,5.298,8.740,0.785,61.300,0.726,-0.096,0.801,0.723,0.392 +Bolivia,2009,6.086,8.756,0.831,61.500,0.779,-0.040,0.763,0.742,0.372 +Bolivia,2010,5.781,8.780,0.807,61.700,0.703,-0.073,0.781,0.720,0.350 +Bolivia,2011,5.779,8.813,0.817,61.900,0.782,-0.043,0.825,0.689,0.361 +Bolivia,2012,6.019,8.847,0.781,62.100,0.862,-0.019,0.840,0.699,0.409 +Bolivia,2013,5.767,8.896,0.803,62.300,0.846,-0.071,0.812,0.721,0.410 +Bolivia,2014,5.865,8.933,0.821,62.500,0.881,0.014,0.832,0.769,0.398 +Bolivia,2015,5.834,8.965,0.829,62.700,0.884,-0.034,0.862,0.749,0.393 +Bolivia,2016,5.770,8.991,0.796,62.850,0.882,-0.051,0.853,0.736,0.376 +Bolivia,2017,5.651,9.017,0.779,63.000,0.884,-0.124,0.819,0.655,0.434 +Bolivia,2018,5.916,9.044,0.827,63.150,0.863,-0.097,0.786,0.705,0.387 +Bolivia,2019,5.674,9.051,0.784,63.300,0.881,-0.090,0.857,0.701,0.419 +Bolivia,2020,5.559,8.946,0.805,63.450,0.877,-0.056,0.868,0.729,0.382 +Bolivia,2021,5.569,8.994,0.798,63.600,0.862,-0.058,0.812,0.721,0.403 +Bolivia,2022,5.929,9.012,0.824,63.750,0.865,-0.083,0.840,0.738,0.426 +Bolivia,2023,5.860,9.025,0.786,63.900,0.832,-0.059,0.877,0.753,0.401 +Bosnia and Herzegovina,2007,4.900,9.191,0.766,67.000,0.342,0.006,0.926,0.570,0.296 +Bosnia and Herzegovina,2009,4.963,9.246,0.735,67.000,0.258,-0.027,0.959,0.507,0.390 +Bosnia and Herzegovina,2010,4.669,9.272,0.773,67.000,0.365,-0.131,0.933,0.465,0.409 +Bosnia and Herzegovina,2011,4.995,9.300,0.725,67.000,0.333,-0.038,0.925,0.551,0.326 +Bosnia and Herzegovina,2012,4.773,9.310,0.779,67.000,0.420,-0.016,0.953,0.469,0.338 +Bosnia and Herzegovina,2013,5.124,9.349,0.767,67.000,0.390,0.039,0.970,0.489,0.315 +Bosnia and Herzegovina,2014,5.249,9.373,0.788,67.000,0.412,0.229,0.976,0.491,0.262 +Bosnia and Herzegovina,2015,5.117,9.428,0.656,67.000,0.631,-0.058,0.960,0.486,0.286 +Bosnia and Herzegovina,2016,5.181,9.473,0.808,67.050,0.633,0.130,0.957,0.566,0.304 +Bosnia and Herzegovina,2017,5.090,9.517,0.775,67.100,0.564,0.087,0.923,0.527,0.271 +Bosnia and Herzegovina,2018,5.887,9.566,0.836,67.150,0.659,0.118,0.913,0.568,0.277 +Bosnia and Herzegovina,2019,6.016,9.606,0.873,67.200,0.722,0.074,0.963,0.545,0.238 +Bosnia and Herzegovina,2020,5.516,9.588,0.899,67.250,0.740,0.132,0.916,0.602,0.325 +Bosnia and Herzegovina,2021,5.749,9.674,0.860,67.300,0.759,0.274,0.921,0.604,0.305 +Bosnia and Herzegovina,2022,5.872,9.723,0.856,67.350,0.743,0.191,0.933,0.543,0.285 +Bosnia and Herzegovina,2023,6.009,9.759,0.879,67.400,0.847,0.241,0.948,0.579,0.249 +Botswana,2006,4.739,9.495,0.883,48.840,0.824,-0.201,0.723,0.643,0.226 +Botswana,2008,5.451,9.543,0.832,49.720,0.858,-0.167,0.806,0.677,0.218 +Botswana,2010,3.553,9.446,0.866,50.600,0.826,-0.141,0.814,0.617,0.172 +Botswana,2011,3.520,9.492,0.860,51.040,0.813,-0.248,0.816,0.647,0.160 +Botswana,2012,4.836,9.471,0.837,51.480,0.799,-0.197,0.814,0.695,0.171 +Botswana,2013,4.128,9.557,0.856,51.920,0.767,-0.148,0.749,0.671,0.244 +Botswana,2014,4.031,9.593,0.859,52.360,0.791,-0.099,0.743,0.626,0.245 +Botswana,2015,3.762,9.524,0.816,52.800,0.857,-0.108,0.860,0.676,0.261 +Botswana,2016,3.499,9.573,0.768,53.075,0.852,-0.246,0.729,0.657,0.252 +Botswana,2017,3.505,9.593,0.768,53.350,0.817,-0.242,0.731,0.612,0.276 +Botswana,2018,3.461,9.613,0.795,53.625,0.818,-0.248,0.807,0.688,0.267 +Botswana,2019,3.471,9.624,0.774,53.900,0.833,-0.233,0.792,0.665,0.273 +Botswana,2022,3.435,9.650,0.750,54.725,0.739,-0.218,0.831,0.623,0.287 +Botswana,2023,3.332,9.673,0.701,55.000,0.741,-0.264,0.814,0.657,0.247 +Brazil,2005,6.637,9.435,0.883,63.100,0.882,,0.745,0.770,0.302 +Brazil,2007,6.321,9.512,0.886,63.420,0.777,-0.022,0.728,0.775,0.299 +Brazil,2008,6.691,9.552,0.878,63.580,0.782,-0.083,0.688,0.718,0.265 +Brazil,2009,7.001,9.541,0.913,63.740,0.767,-0.061,0.723,0.744,0.274 +Brazil,2010,6.837,9.604,0.906,63.900,0.806,-0.059,0.656,0.726,0.250 +Brazil,2011,7.038,9.634,0.916,64.060,0.834,-0.078,0.662,0.698,0.268 +Brazil,2012,6.660,9.644,0.890,64.220,0.849,,0.623,0.685,0.350 +Brazil,2013,7.140,9.665,0.910,64.380,0.785,-0.100,0.707,0.725,0.276 +Brazil,2014,6.981,9.661,0.898,64.540,0.714,-0.121,0.710,0.718,0.274 +Brazil,2015,6.547,9.617,0.907,64.700,0.799,-0.021,0.771,0.687,0.325 +Brazil,2016,6.375,9.575,0.912,64.875,0.807,-0.106,0.781,0.711,0.302 +Brazil,2017,6.333,9.580,0.905,65.050,0.765,-0.181,0.794,0.669,0.308 +Brazil,2018,6.191,9.590,0.882,65.225,0.751,-0.123,0.763,0.677,0.350 +Brazil,2019,6.451,9.595,0.899,65.400,0.830,-0.068,0.762,0.701,0.337 +Brazil,2020,6.110,9.555,0.831,65.575,0.786,-0.061,0.729,0.653,0.389 +Brazil,2021,6.010,9.598,0.814,65.750,0.792,0.086,0.739,0.662,0.407 +Brazil,2022,6.257,9.622,0.866,65.925,0.830,-0.064,0.742,0.681,0.341 +Brazil,2023,6.553,9.635,0.856,66.100,0.870,-0.036,0.733,0.694,0.313 +Bulgaria,2007,3.844,9.746,0.832,64.780,0.566,-0.146,0.976,0.500,0.226 +Bulgaria,2010,3.912,9.807,0.843,65.200,0.545,-0.153,0.941,0.513,0.238 +Bulgaria,2011,3.875,9.834,0.860,65.340,0.664,-0.236,0.948,0.490,0.271 +Bulgaria,2012,4.222,9.848,0.838,65.480,0.641,-0.181,0.938,0.510,0.237 +Bulgaria,2013,3.993,9.848,0.829,65.620,0.603,-0.199,0.962,0.537,0.278 +Bulgaria,2014,4.438,9.863,0.886,65.760,0.576,-0.062,0.955,0.542,0.236 +Bulgaria,2015,4.865,9.903,0.908,65.900,0.637,-0.207,0.941,0.556,0.214 +Bulgaria,2016,4.838,9.940,0.926,66.000,0.700,-0.177,0.936,0.545,0.172 +Bulgaria,2017,5.097,9.974,0.942,66.100,0.689,-0.160,0.911,0.542,0.189 +Bulgaria,2018,5.099,10.008,0.924,66.200,0.724,-0.182,0.952,0.554,0.189 +Bulgaria,2019,5.108,10.055,0.948,66.300,0.822,-0.115,0.943,0.577,0.200 +Bulgaria,2020,5.598,10.020,0.916,66.400,0.818,-0.012,0.901,0.642,0.221 +Bulgaria,2021,5.422,10.102,0.884,66.500,0.841,-0.018,0.891,0.647,0.253 +Bulgaria,2022,5.378,10.197,0.953,66.600,0.741,-0.152,0.942,0.582,0.165 +Bulgaria,2023,5.590,10.273,0.935,66.700,0.754,-0.131,0.948,0.539,0.192 +Burkina Faso,2006,3.801,7.327,0.796,49.440,0.588,0.026,0.798,0.678,0.266 +Burkina Faso,2007,4.017,7.337,0.771,49.880,0.582,-0.062,0.833,0.609,0.281 +Burkina Faso,2008,3.846,7.364,0.727,50.320,0.612,-0.103,0.887,0.538,0.304 +Burkina Faso,2010,4.036,7.416,0.773,51.200,0.587,-0.038,0.767,0.565,0.217 +Burkina Faso,2011,4.785,7.450,0.710,51.640,0.725,-0.107,0.707,0.578,0.205 +Burkina Faso,2012,3.955,7.482,0.744,52.080,0.622,-0.072,0.726,0.487,0.300 +Burkina Faso,2013,3.326,7.509,0.745,52.520,0.741,-0.018,0.765,0.592,0.287 +Burkina Faso,2014,3.481,7.521,0.742,52.960,0.710,-0.006,0.801,0.604,0.256 +Burkina Faso,2015,4.419,7.530,0.705,53.400,0.659,0.001,0.693,0.555,0.359 +Burkina Faso,2016,4.206,7.558,0.764,53.775,0.645,-0.003,0.721,0.590,0.337 +Burkina Faso,2017,4.647,7.590,0.785,54.150,0.614,-0.066,0.727,0.580,0.354 +Burkina Faso,2018,4.927,7.626,0.665,54.525,0.721,-0.016,0.757,0.656,0.343 +Burkina Faso,2019,4.741,7.654,0.683,54.900,0.678,-0.007,0.729,0.656,0.365 +Burkina Faso,2020,4.640,7.647,0.668,55.275,0.750,0.120,0.809,0.605,0.388 +Burkina Faso,2021,4.636,7.687,0.658,55.650,0.644,0.064,0.736,0.620,0.363 +Burkina Faso,2023,4.462,7.693,0.580,56.400,0.715,0.105,0.650,0.639,0.346 +Burundi,2008,3.563,6.700,0.291,49.660,0.260,-0.022,0.860,0.415,0.253 +Burundi,2009,3.792,6.687,0.326,50.280,0.427,-0.021,0.718,0.607,0.164 +Burundi,2011,3.706,6.694,0.422,51.520,0.490,-0.063,0.677,0.572,0.190 +Burundi,2014,2.905,6.723,0.565,53.380,0.431,-0.059,0.808,0.622,0.251 +Burundi,2018,3.775,6.607,0.485,55.200,0.646,-0.027,0.599,0.636,0.363 +Cambodia,2006,3.569,7.746,0.793,57.640,,0.250,0.829,,0.341 +Cambodia,2007,4.156,7.826,0.675,57.980,0.819,0.111,0.879,,0.320 +Cambodia,2008,4.462,7.874,0.619,58.320,0.914,0.041,0.888,0.600,0.335 +Cambodia,2009,4.111,7.860,0.818,58.660,0.937,0.148,0.965,0.691,0.188 +Cambodia,2010,4.141,7.904,0.697,59.000,0.940,0.345,0.896,0.662,0.422 +Cambodia,2011,4.161,7.957,0.716,59.340,0.927,0.413,0.775,0.637,0.308 +Cambodia,2012,3.899,8.013,0.606,59.680,0.956,0.242,0.890,0.713,0.352 +Cambodia,2013,3.674,8.070,0.651,60.020,0.941,0.159,0.812,0.670,0.440 +Cambodia,2014,3.883,8.125,0.693,60.360,0.938,0.234,0.843,0.682,0.482 +Cambodia,2015,4.162,8.179,0.729,60.700,0.956,0.204,0.825,0.731,0.399 +Cambodia,2016,4.461,8.233,0.746,60.900,0.958,0.070,0.840,0.713,0.398 +Cambodia,2017,4.586,8.287,0.765,61.100,0.964,0.082,0.821,0.669,0.408 +Cambodia,2018,5.122,8.347,0.795,61.300,0.958,0.029,,0.723,0.414 +Cambodia,2019,4.998,8.404,0.759,61.500,0.957,0.007,0.828,0.704,0.390 +Cambodia,2020,4.377,8.361,0.724,61.700,0.963,0.047,0.863,0.771,0.390 +Cambodia,2021,4.555,8.379,0.713,61.900,0.965,0.012,0.844,0.759,0.391 +Cambodia,2022,4.250,8.419,0.784,62.100,0.946,0.151,0.860,0.756,0.388 +Cambodia,2023,4.221,8.462,0.738,62.300,0.961,0.070,0.799,0.683,0.394 +Cameroon,2006,3.851,8.090,0.690,47.840,0.653,-0.020,0.907,0.588,0.271 +Cameroon,2007,4.350,8.104,0.717,48.280,0.644,-0.042,0.910,0.630,0.249 +Cameroon,2008,4.292,8.104,0.697,48.720,0.580,-0.079,0.945,0.613,0.312 +Cameroon,2009,4.741,8.101,0.729,49.160,0.698,-0.027,0.925,0.592,0.250 +Cameroon,2010,4.554,8.101,0.759,49.600,0.792,-0.008,0.875,0.594,0.274 +Cameroon,2011,4.434,8.106,0.738,50.040,0.817,-0.038,0.870,0.608,0.272 +Cameroon,2012,4.245,8.123,0.743,50.480,0.766,-0.041,0.898,0.617,0.284 +Cameroon,2013,4.271,8.144,0.760,50.920,0.794,-0.039,0.867,0.640,0.268 +Cameroon,2014,4.240,8.169,0.778,51.360,0.795,-0.080,0.856,0.604,0.216 +Cameroon,2015,5.038,8.193,0.646,51.800,0.791,0.041,0.868,0.624,0.346 +Cameroon,2016,4.816,8.207,0.659,52.475,0.713,-0.012,0.879,0.635,0.367 +Cameroon,2017,5.074,8.214,0.695,53.150,0.767,-0.036,0.844,0.632,0.377 +Cameroon,2018,5.251,8.225,0.677,53.825,0.816,0.028,0.884,0.630,0.356 +Cameroon,2019,4.937,8.231,0.711,54.500,0.712,-0.015,0.817,0.606,0.326 +Cameroon,2020,5.241,8.207,0.720,55.175,0.675,0.042,0.837,0.626,0.386 +Cameroon,2021,4.963,8.216,0.695,55.850,0.715,-0.029,0.849,0.612,0.347 +Cameroon,2022,4.712,8.225,0.629,56.525,0.675,0.022,0.849,0.586,0.362 +Cameroon,2023,4.946,8.238,0.716,57.200,0.739,-0.028,0.855,0.588,0.356 +Canada,2005,7.418,10.707,0.962,70.500,0.957,0.246,0.503,0.783,0.233 +Canada,2007,7.482,10.734,,70.620,0.930,0.244,0.406,0.812,0.257 +Canada,2008,7.486,10.733,0.939,70.680,0.926,0.256,0.370,0.802,0.202 +Canada,2009,7.488,10.692,0.943,70.740,0.915,0.241,0.413,0.793,0.248 +Canada,2010,7.650,10.711,0.954,70.800,0.934,0.225,0.413,0.791,0.233 +Canada,2011,7.426,10.733,0.922,70.860,0.951,0.247,0.433,0.803,0.248 +Canada,2012,7.415,10.739,0.948,70.920,0.918,0.284,0.466,0.776,0.229 +Canada,2013,7.594,10.752,0.936,70.980,0.916,0.310,0.406,0.801,0.263 +Canada,2014,7.304,10.770,0.918,71.040,0.939,0.264,0.442,0.791,0.259 +Canada,2015,7.413,10.769,0.939,71.100,0.931,0.247,0.427,0.792,0.286 +Canada,2016,7.245,10.768,0.924,71.150,0.912,0.205,0.385,0.768,0.237 +Canada,2017,7.415,10.786,0.934,71.200,0.945,0.157,0.362,0.799,0.218 +Canada,2018,7.175,10.799,0.923,71.250,0.946,0.100,0.372,0.773,0.259 +Canada,2019,7.109,10.803,0.925,71.300,0.912,0.105,0.436,0.781,0.285 +Canada,2020,7.025,10.740,0.931,71.350,0.887,0.043,0.434,0.738,0.307 +Canada,2021,6.939,10.783,0.926,71.400,0.898,0.189,0.384,0.763,0.276 +Canada,2022,6.918,10.799,0.929,71.450,0.838,0.220,0.442,0.719,0.287 +Canada,2023,6.841,10.794,0.902,71.500,0.847,0.196,0.468,0.726,0.304 +Central African Republic,2007,4.160,6.946,0.532,41.480,0.663,0.079,0.782,0.567,0.330 +Central African Republic,2010,3.568,7.031,0.483,42.500,0.690,-0.037,0.845,0.478,0.257 +Central African Republic,2011,3.678,7.057,0.387,42.840,0.780,-0.016,0.834,0.502,0.277 +Central African Republic,2016,2.693,6.707,0.290,44.750,0.624,0.033,0.859,0.551,0.494 +Central African Republic,2017,3.476,6.733,0.320,45.300,0.645,0.074,0.890,0.602,0.599 +Chad,2006,3.435,7.369,0.724,47.080,0.306,0.022,0.961,0.571,0.263 +Chad,2007,4.141,7.368,0.479,47.460,0.295,-0.017,0.874,0.598,0.245 +Chad,2008,4.632,7.363,0.571,47.840,0.527,0.057,0.944,0.569,0.225 +Chad,2009,3.639,7.369,0.646,48.220,0.401,0.016,0.931,0.601,0.221 +Chad,2010,3.743,7.462,0.734,48.600,0.505,0.020,0.858,0.560,0.287 +Chad,2011,4.393,7.428,0.819,48.980,0.540,0.025,0.876,0.579,0.289 +Chad,2012,4.033,7.478,0.673,49.360,0.563,-0.039,0.884,0.498,0.316 +Chad,2013,3.508,7.498,0.714,49.740,0.488,-0.051,0.882,0.437,0.314 +Chad,2014,3.460,7.529,0.733,50.120,0.567,-0.075,0.881,0.524,0.329 +Chad,2015,4.323,7.525,0.751,50.500,0.474,-0.034,0.889,0.593,0.358 +Chad,2016,4.029,7.429,0.616,50.875,0.525,0.047,0.820,0.564,0.468 +Chad,2017,4.559,7.365,0.661,51.250,0.615,0.003,0.792,0.584,0.538 +Chad,2018,4.486,7.355,0.577,51.625,0.650,0.020,0.763,0.532,0.544 +Chad,2019,4.251,7.354,0.640,52.000,0.537,0.051,0.832,0.556,0.460 +Chad,2022,4.397,7.253,0.720,53.125,0.679,0.218,0.805,0.588,0.499 +Chad,2023,4.544,7.254,0.609,53.500,0.586,0.138,0.755,0.541,0.467 +Chile,2006,6.063,9.870,0.836,67.780,0.744,0.161,0.634,0.752,0.348 +Chile,2007,5.698,9.910,0.815,67.960,0.662,0.236,0.723,0.708,0.342 +Chile,2008,5.789,9.938,0.804,68.140,0.640,0.076,0.741,0.706,0.330 +Chile,2009,6.494,9.916,0.832,68.320,0.747,0.141,0.734,0.756,0.300 +Chile,2010,6.636,9.963,0.857,68.500,0.786,0.100,0.702,0.760,0.300 +Chile,2011,6.526,10.013,0.819,68.680,0.701,0.104,0.753,0.758,0.317 +Chile,2012,6.599,10.063,0.855,68.860,0.734,0.186,0.782,0.736,0.288 +Chile,2013,6.740,10.086,0.862,69.040,0.737,0.077,0.741,0.791,0.285 +Chile,2014,6.844,10.094,0.862,69.220,0.733,0.209,0.758,0.800,0.276 +Chile,2015,6.533,10.105,0.827,69.400,0.769,0.032,0.812,0.752,0.333 +Chile,2016,6.579,10.110,0.841,69.550,0.652,0.094,0.858,0.792,0.283 +Chile,2017,6.320,10.108,0.880,69.700,0.790,-0.028,0.836,0.765,0.291 +Chile,2018,6.436,10.130,0.890,69.850,0.789,-0.068,0.816,0.755,0.276 +Chile,2019,5.942,10.119,0.869,70.000,0.659,-0.110,0.860,0.741,0.337 +Chile,2020,6.151,10.042,0.888,70.150,0.781,0.026,0.812,0.753,0.336 +Chile,2021,6.436,10.143,0.891,70.300,0.803,-0.052,0.859,0.735,0.221 +Chile,2022,6.415,10.161,0.887,70.450,0.793,-0.014,0.796,0.775,0.253 +Chile,2023,6.230,10.155,0.874,70.600,0.815,-0.027,0.836,0.779,0.263 +China,2006,4.560,8.696,0.747,65.660,,,,0.658,0.170 +China,2007,4.863,8.824,0.811,65.920,,-0.182,,0.664,0.159 +China,2008,4.846,8.911,0.748,66.180,0.853,-0.098,,0.705,0.147 +China,2009,4.454,8.996,0.798,66.440,0.771,-0.166,,0.670,0.162 +China,2010,4.653,9.092,0.768,66.700,0.805,-0.139,,0.658,0.158 +China,2011,5.037,9.178,0.787,66.960,0.824,-0.192,,0.710,0.134 +China,2012,5.095,9.247,0.788,67.220,0.808,-0.190,,0.689,0.159 +China,2013,5.241,9.315,0.778,67.480,0.805,-0.163,,0.717,0.142 +China,2014,5.196,9.380,0.820,67.740,,-0.222,,0.710,0.112 +China,2015,5.304,9.442,0.794,68.000,,-0.250,,0.667,0.171 +China,2016,5.325,9.503,0.742,68.125,,-0.233,,0.683,0.146 +China,2017,5.099,9.564,0.772,68.250,0.878,-0.180,,0.682,0.214 +China,2018,5.131,9.625,0.788,68.375,0.895,-0.164,,0.722,0.190 +China,2019,5.144,9.679,0.822,68.500,0.927,-0.178,,0.760,0.147 +China,2020,5.771,9.699,0.808,68.625,0.891,-0.109,,0.663,0.245 +China,2021,5.863,9.779,0.856,68.750,0.875,0.020,,0.698,0.240 +China,2023,6.145,9.861,0.797,69.000,0.793,-0.032,,0.708,0.210 +Colombia,2006,6.025,9.277,0.910,66.320,0.805,-0.021,0.808,0.776,0.326 +Colombia,2007,6.138,9.330,0.894,66.540,0.786,-0.046,0.860,0.774,0.287 +Colombia,2008,6.168,9.351,0.880,66.760,0.795,-0.047,0.763,0.768,0.307 +Colombia,2009,6.272,9.351,0.886,66.980,0.757,-0.060,0.837,0.786,0.273 +Colombia,2010,6.408,9.383,0.893,67.200,0.816,-0.055,0.815,0.792,0.265 +Colombia,2011,6.464,9.440,0.904,67.420,0.811,-0.079,0.847,0.785,0.286 +Colombia,2012,6.375,9.468,0.914,67.640,0.828,-0.015,0.868,0.829,0.294 +Colombia,2013,6.607,9.508,0.901,67.860,0.841,-0.076,0.898,0.815,0.278 +Colombia,2014,6.449,9.542,0.907,68.080,0.801,-0.096,0.887,0.825,0.278 +Colombia,2015,6.388,9.562,0.890,68.300,0.791,-0.106,0.843,0.803,0.292 +Colombia,2016,6.234,9.572,0.882,68.475,0.835,-0.106,0.898,0.770,0.294 +Colombia,2017,6.157,9.570,0.909,68.650,0.838,-0.163,0.875,0.790,0.299 +Colombia,2018,5.984,9.577,0.871,68.825,0.851,-0.154,0.855,0.775,0.301 +Colombia,2019,6.350,9.590,0.873,69.000,0.822,-0.177,0.854,0.791,0.322 +Colombia,2020,5.709,9.500,0.797,69.175,0.840,-0.091,0.808,0.759,0.340 +Colombia,2021,5.290,9.593,0.793,69.350,0.775,-0.065,0.831,0.752,0.348 +Colombia,2022,5.892,9.658,0.877,69.525,0.799,-0.164,0.863,0.762,0.306 +Colombia,2023,5.904,9.667,0.833,69.700,0.823,-0.142,0.870,0.754,0.285 +Comoros,2009,3.476,7.999,0.629,56.760,0.508,-0.082,0.838,0.626,0.167 +Comoros,2010,3.812,8.015,0.721,57.000,0.529,-0.003,0.741,0.664,0.178 +Comoros,2011,3.838,8.034,0.722,57.240,0.500,-0.084,0.732,0.622,0.173 +Comoros,2012,3.956,8.044,0.719,57.480,0.534,-0.130,0.651,0.616,0.212 +Comoros,2018,3.973,8.100,0.621,58.725,0.560,0.075,0.794,0.688,0.337 +Comoros,2019,4.609,8.099,0.632,58.900,0.538,0.067,0.762,0.665,0.336 +Comoros,2022,3.545,8.085,0.472,59.425,0.481,-0.018,0.732,0.603,0.352 +Comoros,2023,3.588,8.095,0.483,59.600,0.452,0.004,0.704,0.535,0.405 +Congo (Brazzaville),2008,3.820,8.390,0.555,52.240,0.526,-0.125,,0.603,0.298 +Congo (Brazzaville),2011,4.510,8.502,0.637,53.380,0.745,-0.137,0.833,0.601,0.288 +Congo (Brazzaville),2012,3.919,8.569,0.622,53.760,0.773,-0.144,0.800,0.547,0.323 +Congo (Brazzaville),2013,3.955,8.538,0.680,54.140,0.726,-0.107,0.752,0.599,0.291 +Congo (Brazzaville),2014,4.056,8.579,0.686,54.520,0.662,-0.140,0.808,0.558,0.400 +Congo (Brazzaville),2015,4.691,8.519,0.642,54.900,0.850,-0.129,0.841,0.555,0.261 +Congo (Brazzaville),2016,4.119,8.381,0.615,55.225,0.786,-0.091,0.790,0.586,0.304 +Congo (Brazzaville),2017,4.884,8.312,0.655,55.550,0.778,-0.148,0.763,0.574,0.382 +Congo (Brazzaville),2018,5.490,8.239,0.621,55.875,0.699,-0.105,0.738,0.571,0.448 +Congo (Brazzaville),2019,5.213,8.215,0.625,56.200,0.686,-0.059,0.741,0.594,0.405 +Congo (Brazzaville),2020,5.079,8.127,0.597,56.525,0.761,-0.024,0.728,0.572,0.435 +Congo (Brazzaville),2021,4.921,8.082,0.568,56.850,0.738,-0.023,0.733,0.568,0.420 +Congo (Brazzaville),2022,5.805,8.074,0.646,57.175,0.698,0.025,0.760,0.583,0.477 +Congo (Brazzaville),2023,4.954,8.086,0.561,57.500,0.702,-0.051,0.745,0.585,0.409 +Congo (Kinshasa),2009,3.984,6.699,0.733,49.400,0.556,-0.025,0.824,0.487,0.283 +Congo (Kinshasa),2011,4.517,6.769,0.744,50.400,0.631,-0.028,0.856,0.565,0.208 +Congo (Kinshasa),2012,4.639,6.803,0.770,50.900,0.557,-0.037,0.807,0.626,0.230 +Congo (Kinshasa),2013,4.497,6.851,0.830,51.400,0.480,0.009,0.913,0.556,0.187 +Congo (Kinshasa),2014,4.414,6.907,0.822,51.900,0.556,0.006,0.814,0.519,0.305 +Congo (Kinshasa),2015,3.903,6.940,0.767,52.400,0.574,-0.050,0.866,0.538,0.301 +Congo (Kinshasa),2016,4.522,6.929,0.864,52.825,0.637,-0.027,0.875,0.610,0.222 +Congo (Kinshasa),2017,4.311,6.931,0.670,53.250,0.704,0.066,0.809,0.541,0.404 +Congo (Kinshasa),2022,3.207,7.032,0.654,55.375,0.664,0.080,0.836,0.563,0.461 +Congo (Kinshasa),2023,3.383,7.076,0.572,55.800,0.687,0.152,0.837,0.546,0.497 +Costa Rica,2006,7.082,9.607,0.937,68.560,0.882,0.052,0.798,0.815,0.236 +Costa Rica,2007,7.432,9.672,0.918,68.720,0.923,0.089,0.820,0.826,0.240 +Costa Rica,2008,6.851,9.704,0.916,68.880,0.912,0.087,0.816,0.838,0.233 +Costa Rica,2009,7.615,9.682,0.900,69.040,0.886,0.057,0.787,0.840,0.217 +Costa Rica,2010,7.271,9.721,0.915,69.200,0.881,0.038,0.763,0.827,0.221 +Costa Rica,2011,7.229,9.752,0.892,69.360,0.926,-0.042,0.837,0.794,0.269 +Costa Rica,2012,7.272,9.788,0.902,69.520,0.929,0.037,0.794,0.837,0.263 +Costa Rica,2013,7.158,9.801,0.902,69.680,0.898,0.009,0.813,0.809,0.278 +Costa Rica,2014,7.247,9.824,0.914,69.840,0.927,0.000,0.788,0.797,0.290 +Costa Rica,2015,6.854,9.850,0.878,70.000,0.907,-0.068,0.761,0.811,0.286 +Costa Rica,2016,7.136,9.881,0.901,70.000,0.873,-0.042,0.781,0.830,0.281 +Costa Rica,2017,7.225,9.912,0.922,70.000,0.936,-0.086,0.742,0.791,0.275 +Costa Rica,2018,7.141,9.928,0.876,70.000,0.942,-0.117,0.781,0.802,0.326 +Costa Rica,2019,6.998,9.944,0.906,70.000,0.927,-0.156,0.836,0.791,0.303 +Costa Rica,2020,6.338,9.892,0.834,70.000,0.889,-0.139,0.772,0.759,0.350 +Costa Rica,2021,6.408,9.961,0.876,70.000,0.887,-0.029,0.782,0.774,0.318 +Costa Rica,2022,7.077,9.998,0.902,70.000,0.910,-0.049,0.751,0.793,0.272 +Costa Rica,2023,7.384,10.021,0.875,70.000,0.933,-0.067,0.767,0.806,0.282 +Croatia,2007,5.821,10.174,0.910,66.940,0.662,-0.099,0.934,0.550,0.337 +Croatia,2009,5.433,10.120,0.861,67.180,0.549,-0.278,0.958,0.557,0.272 +Croatia,2010,5.596,10.110,0.796,67.300,0.564,-0.244,0.973,0.554,0.259 +Croatia,2011,5.385,10.113,0.790,67.420,0.517,-0.205,0.977,0.552,0.273 +Croatia,2012,6.028,10.092,0.776,67.540,0.542,-0.250,0.924,0.572,0.271 +Croatia,2013,5.885,10.091,0.751,67.660,0.627,-0.211,0.936,0.554,0.285 +Croatia,2014,5.381,10.091,0.646,67.780,0.519,0.125,0.918,0.545,0.286 +Croatia,2015,5.205,10.124,0.768,67.900,0.694,-0.104,0.849,0.570,0.294 +Croatia,2016,5.417,10.166,0.798,68.075,0.672,-0.072,0.884,0.569,0.337 +Croatia,2017,5.343,10.211,0.770,68.250,0.716,-0.112,0.892,0.618,0.316 +Croatia,2018,5.536,10.248,0.910,68.425,0.691,-0.158,0.925,0.512,0.290 +Croatia,2019,5.626,10.287,0.936,68.600,0.739,-0.145,0.932,0.504,0.269 +Croatia,2020,6.508,10.202,0.923,68.775,0.837,-0.071,0.961,0.681,0.286 +Croatia,2021,6.287,10.367,0.918,68.950,0.842,0.001,0.934,0.640,0.274 +Croatia,2022,5.579,10.435,0.910,69.125,0.593,-0.213,0.875,0.573,0.267 +Croatia,2023,5.958,10.462,0.909,69.300,0.573,-0.205,0.810,0.610,0.230 +Cuba,2006,5.418,,0.970,68.000,0.281,,,0.596,0.277 +Cyprus,2006,6.238,10.567,0.878,70.160,0.836,0.012,0.712,0.704,0.253 +Cyprus,2009,6.833,10.559,0.812,70.640,0.775,0.048,0.801,0.668,0.329 +Cyprus,2010,6.387,10.556,0.822,70.800,0.755,0.066,0.833,0.699,0.296 +Cyprus,2011,6.690,10.534,0.844,70.960,0.745,0.173,0.841,0.682,0.272 +Cyprus,2012,6.181,10.484,0.767,71.120,0.725,0.092,0.871,0.687,0.369 +Cyprus,2013,5.439,10.418,0.744,71.280,0.656,0.096,0.867,0.657,0.420 +Cyprus,2014,5.627,10.411,0.770,71.440,0.715,0.054,0.868,0.661,0.397 +Cyprus,2015,5.439,10.451,0.770,71.600,0.628,0.107,0.893,0.660,0.383 +Cyprus,2016,5.795,10.510,0.786,71.800,0.756,-0.036,0.898,0.631,0.336 +Cyprus,2017,6.062,10.556,0.819,72.000,0.812,0.036,0.851,0.670,0.301 +Cyprus,2018,6.276,10.599,0.826,72.200,0.794,-0.031,0.848,0.663,0.298 +Cyprus,2019,6.137,10.639,0.776,72.400,0.740,-0.018,0.865,0.663,0.290 +Cyprus,2020,6.260,10.583,0.806,72.600,0.763,-0.086,0.816,0.671,0.284 +Cyprus,2021,6.269,10.638,0.855,72.800,0.718,-0.038,0.876,0.641,0.275 +Cyprus,2022,5.865,10.683,0.820,73.000,0.698,0.008,0.887,0.659,0.297 +Cyprus,2023,6.071,,0.803,73.200,0.730,,0.840,0.682,0.297 +Czechia,2005,6.439,10.322,0.919,67.100,0.865,,0.901,0.639,0.258 +Czechia,2007,6.500,10.433,0.900,67.340,0.799,-0.069,0.928,0.660,0.277 +Czechia,2010,6.250,10.419,0.934,67.700,0.779,-0.048,0.926,0.648,0.244 +Czechia,2011,6.331,10.434,0.914,67.820,0.787,-0.112,0.950,0.623,0.253 +Czechia,2012,6.334,10.425,0.912,67.940,0.740,-0.160,0.957,0.635,0.257 +Czechia,2013,6.698,10.424,0.888,68.060,0.726,-0.162,0.916,0.656,0.253 +Czechia,2014,6.484,10.445,0.878,68.180,0.800,-0.174,0.897,0.638,0.235 +Czechia,2015,6.608,10.496,0.911,68.300,0.808,-0.152,0.886,0.689,0.206 +Czechia,2016,6.736,10.519,0.931,68.425,0.850,-0.204,0.900,0.710,0.201 +Czechia,2017,6.790,10.567,0.901,68.550,0.832,-0.183,0.867,0.672,0.227 +Czechia,2018,7.034,10.595,0.929,68.675,0.790,-0.299,0.851,0.674,0.178 +Czechia,2020,6.897,10.562,0.964,68.925,0.906,-0.135,0.884,0.748,0.290 +Czechia,2021,6.942,10.615,0.950,69.050,0.891,0.157,0.863,0.716,0.240 +Czechia,2022,6.695,10.637,0.944,69.175,0.908,0.093,0.831,0.743,0.246 +Czechia,2023,6.827,10.639,0.927,69.300,0.906,0.025,0.832,0.750,0.254 +Denmark,2005,8.019,10.849,0.972,68.300,0.971,,0.237,0.777,0.154 +Denmark,2007,7.834,10.889,0.954,68.740,0.932,0.234,0.206,0.778,0.194 +Denmark,2008,7.971,10.878,0.954,68.960,0.970,0.266,0.248,0.759,0.163 +Denmark,2009,7.683,10.822,0.939,69.180,0.949,0.258,0.206,0.782,0.234 +Denmark,2010,7.771,10.836,0.975,69.400,0.944,0.237,0.175,0.796,0.155 +Denmark,2011,7.788,10.845,0.962,69.620,0.935,0.292,0.220,0.778,0.175 +Denmark,2012,7.520,10.844,0.951,69.840,0.933,0.133,0.187,0.783,0.209 +Denmark,2013,7.589,10.849,0.965,70.060,0.920,0.209,0.170,0.826,0.195 +Denmark,2014,7.508,10.860,0.956,70.280,0.942,0.112,0.237,0.780,0.233 +Denmark,2015,7.514,10.876,0.960,70.500,0.941,0.216,0.191,0.801,0.218 +Denmark,2016,7.558,10.900,0.954,70.625,0.948,0.132,0.210,0.786,0.208 +Denmark,2017,7.594,10.922,0.952,70.750,0.955,0.149,0.181,0.779,0.206 +Denmark,2018,7.649,10.936,0.958,70.875,0.935,0.012,0.151,0.773,0.206 +Denmark,2019,7.693,10.948,0.958,71.000,0.963,0.015,0.174,0.797,0.181 +Denmark,2020,7.515,10.924,0.947,71.125,0.938,0.045,0.214,0.753,0.227 +Denmark,2021,7.699,10.968,0.945,71.250,0.933,0.130,0.173,0.792,0.206 +Denmark,2022,7.545,10.997,0.970,71.375,0.930,0.222,0.203,0.787,0.205 +Denmark,2023,7.504,10.996,0.916,71.500,0.923,0.089,0.184,0.757,0.229 +Djibouti,2008,5.009,8.115,0.690,53.640,0.773,0.123,0.576,0.740,0.120 +Djibouti,2009,4.906,8.014,0.901,54.120,0.649,-0.007,0.634,0.630,0.232 +Djibouti,2010,5.006,7.934,,54.600,0.764,-0.072,0.597,, +Djibouti,2011,4.369,8.150,0.633,55.080,0.746,-0.082,0.519,0.543,0.181 +Dominican Republic,2006,5.088,9.306,0.919,65.360,0.858,0.033,0.755,0.733,0.274 +Dominican Republic,2007,5.081,9.365,0.848,65.120,0.886,-0.013,0.772,0.723,0.260 +Dominican Republic,2008,4.842,9.384,0.850,64.880,0.848,-0.050,0.728,0.654,0.329 +Dominican Republic,2009,5.432,9.381,0.878,64.640,0.863,-0.058,0.806,0.709,0.280 +Dominican Republic,2010,4.735,9.448,0.860,64.400,0.824,-0.080,0.780,0.707,0.282 +Dominican Republic,2011,5.397,9.465,0.872,64.160,0.848,0.009,0.788,0.738,0.300 +Dominican Republic,2012,4.753,9.479,0.879,63.920,0.840,-0.067,0.727,0.725,0.297 +Dominican Republic,2013,5.016,9.515,0.878,63.680,0.889,0.016,0.752,0.766,0.295 +Dominican Republic,2014,5.387,9.570,0.891,63.440,0.905,-0.025,0.760,0.772,0.300 +Dominican Republic,2015,5.062,9.625,0.893,63.200,0.856,-0.070,0.755,0.695,0.295 +Dominican Republic,2016,5.239,9.678,0.895,63.400,0.873,-0.085,0.737,0.725,0.278 +Dominican Republic,2017,5.605,9.713,0.894,63.600,0.855,-0.126,0.760,0.710,0.275 +Dominican Republic,2018,5.433,9.769,0.862,63.800,0.867,-0.155,0.762,0.719,0.291 +Dominican Republic,2019,6.004,9.808,0.884,64.000,0.877,-0.127,0.746,0.747,0.264 +Dominican Republic,2020,5.168,9.727,0.806,64.200,0.835,-0.128,0.636,0.724,0.314 +Dominican Republic,2021,6.031,9.832,0.857,64.400,0.859,-0.088,0.677,0.734,0.275 +Dominican Republic,2022,5.518,9.870,0.820,64.600,0.853,-0.086,0.656,0.723,0.306 +Dominican Republic,2023,5.921,9.900,0.860,64.800,0.867,-0.107,0.667,0.730,0.256 +Ecuador,2006,5.024,9.189,0.910,64.440,0.671,-0.097,0.901,0.785,0.357 +Ecuador,2007,4.996,9.194,0.839,64.780,0.670,-0.069,0.830,0.803,0.286 +Ecuador,2008,5.297,9.238,0.829,65.120,0.640,-0.100,0.801,0.811,0.283 +Ecuador,2009,6.022,9.227,0.779,65.460,0.737,-0.114,0.774,0.796,0.256 +Ecuador,2010,5.838,9.245,0.839,65.800,0.723,-0.069,0.806,0.771,0.220 +Ecuador,2011,5.795,9.305,0.818,66.140,0.788,-0.161,0.702,0.806,0.271 +Ecuador,2012,5.961,9.343,0.785,66.480,0.825,-0.089,0.730,0.767,0.333 +Ecuador,2013,6.019,9.376,0.801,66.820,0.787,-0.196,0.646,0.824,0.267 +Ecuador,2014,5.946,9.399,0.831,67.160,0.719,-0.173,0.661,0.841,0.306 +Ecuador,2015,5.964,9.385,0.856,67.500,0.801,-0.120,0.666,0.816,0.323 +Ecuador,2016,6.115,9.358,0.842,67.750,0.846,-0.021,0.774,0.807,0.365 +Ecuador,2017,5.840,9.366,0.849,68.000,0.879,-0.173,0.734,0.793,0.314 +Ecuador,2018,6.128,9.359,0.851,68.250,0.869,-0.105,0.831,0.817,0.328 +Ecuador,2019,5.809,9.341,0.808,68.500,0.830,-0.121,0.839,0.750,0.374 +Ecuador,2020,5.354,9.245,0.804,68.750,0.829,-0.163,0.855,0.755,0.416 +Ecuador,2021,5.435,9.275,0.786,69.000,0.821,-0.086,0.775,0.742,0.403 +Ecuador,2022,5.887,9.293,0.825,69.250,0.759,-0.083,0.866,0.777,0.356 +Ecuador,2023,5.852,9.307,0.782,69.500,0.731,-0.106,0.840,0.763,0.359 +Egypt,2005,5.168,9.042,0.848,61.400,0.817,,,0.689,0.346 +Egypt,2007,5.541,9.138,0.686,61.520,0.609,-0.126,,0.600,0.355 +Egypt,2008,4.632,9.187,0.738,61.580,,-0.093,0.914,0.627,0.301 +Egypt,2009,5.066,9.213,0.744,61.640,0.611,-0.105,0.801,0.549,0.339 +Egypt,2010,4.669,9.243,0.769,61.700,0.486,-0.081,0.826,0.491,0.276 +Egypt,2011,4.174,9.239,0.753,61.760,0.590,-0.157,0.859,0.456,0.353 +Egypt,2012,4.204,9.238,0.737,61.820,0.452,-0.143,0.880,0.458,0.398 +Egypt,2013,3.559,9.236,0.675,61.880,0.474,-0.147,0.913,0.487,0.483 +Egypt,2014,4.885,9.242,0.619,61.940,0.578,-0.132,0.749,0.477,0.327 +Egypt,2015,4.763,9.262,0.730,62.000,0.659,-0.094,0.684,0.554,0.344 +Egypt,2016,4.557,9.284,0.809,62.250,0.656,-0.147,0.818,0.538,0.370 +Egypt,2017,3.929,9.305,0.638,62.500,0.593,-0.158,,0.458,0.414 +Egypt,2018,4.005,9.338,0.759,62.750,0.682,-0.221,,0.407,0.285 +Egypt,2019,4.328,9.374,0.772,63.000,0.774,-0.204,,0.420,0.313 +Egypt,2020,4.472,9.392,0.673,63.250,0.770,-0.119,,0.543,0.442 +Egypt,2021,4.026,9.408,0.717,63.500,0.704,-0.233,0.580,0.387,0.325 +Egypt,2022,4.024,9.456,0.769,63.750,0.733,-0.214,,0.486,0.307 +Egypt,2023,3.881,9.480,0.730,64.000,0.625,-0.210,,0.436,0.352 +El Salvador,2006,5.701,8.885,0.878,65.120,0.683,-0.062,0.807,0.813,0.233 +El Salvador,2007,5.296,8.902,0.717,64.940,0.639,-0.021,0.785,0.833,0.220 +El Salvador,2008,5.191,8.919,0.747,64.760,0.636,-0.084,0.735,0.827,0.232 +El Salvador,2009,6.839,8.894,0.734,64.580,0.671,-0.110,0.648,0.841,0.243 +El Salvador,2010,6.740,8.911,0.757,64.400,0.669,-0.070,0.694,0.823,0.302 +El Salvador,2011,4.741,8.945,0.731,64.220,0.747,-0.133,0.707,0.830,0.336 +El Salvador,2012,5.934,8.968,0.806,64.040,0.683,-0.161,0.786,0.784,0.365 +El Salvador,2013,6.325,8.987,0.827,63.860,0.716,-0.156,0.772,0.801,0.317 +El Salvador,2014,5.857,9.000,0.798,63.680,0.778,-0.201,0.781,0.801,0.330 +El Salvador,2015,6.018,9.020,0.791,63.500,0.733,-0.163,0.805,0.816,0.333 +El Salvador,2016,6.140,9.042,0.794,63.850,0.800,-0.192,0.797,0.742,0.346 +El Salvador,2017,6.339,9.062,0.829,64.200,0.758,-0.179,0.778,0.800,0.268 +El Salvador,2018,6.241,9.084,0.820,64.550,0.863,-0.102,0.801,0.817,0.270 +El Salvador,2019,6.455,9.108,0.764,64.900,0.877,-0.116,0.682,0.826,0.271 +El Salvador,2020,5.462,9.023,0.696,65.250,0.924,-0.132,0.583,0.811,0.329 +El Salvador,2021,6.431,9.126,0.796,65.600,0.915,-0.085,0.663,0.826,0.290 +El Salvador,2022,6.492,9.148,0.772,65.950,0.914,-0.116,0.621,0.823,0.296 +El Salvador,2023,6.482,9.167,0.744,66.300,0.942,-0.104,0.496,0.812,0.318 +Estonia,2006,5.371,10.269,0.910,65.780,0.749,-0.270,0.797,0.589,0.215 +Estonia,2007,5.332,10.346,0.896,66.060,0.712,-0.252,0.743,0.589,0.176 +Estonia,2008,5.452,10.296,0.904,66.340,0.642,-0.223,0.663,0.595,0.218 +Estonia,2009,5.138,10.140,0.874,66.620,0.611,-0.235,0.793,0.591,0.243 +Estonia,2011,5.487,10.240,0.909,67.180,0.735,-0.173,0.687,0.641,0.205 +Estonia,2012,5.364,10.275,0.889,67.460,0.697,-0.197,0.793,0.627,0.199 +Estonia,2013,5.367,10.293,0.901,67.740,0.754,-0.206,0.726,0.651,0.199 +Estonia,2014,5.556,10.325,0.917,68.020,0.773,-0.158,0.652,0.620,0.203 +Estonia,2015,5.629,10.343,0.918,68.300,0.815,-0.169,0.569,0.649,0.183 +Estonia,2016,5.650,10.374,0.938,68.525,0.843,-0.155,0.639,0.657,0.177 +Estonia,2017,5.938,10.429,0.936,68.750,0.862,-0.107,0.668,0.740,0.160 +Estonia,2018,6.091,10.463,0.933,68.975,0.886,-0.147,0.621,0.730,0.163 +Estonia,2019,6.035,10.496,0.934,69.200,0.887,-0.101,0.576,0.738,0.156 +Estonia,2020,6.453,10.488,0.958,69.425,0.954,-0.090,0.398,0.762,0.188 +Estonia,2021,6.554,10.564,0.946,69.650,0.926,0.046,0.441,0.761,0.176 +Estonia,2022,6.357,10.541,0.933,69.875,0.904,0.136,0.390,0.767,0.187 +Estonia,2023,6.430,10.517,0.958,70.100,0.915,0.032,0.334,0.765,0.182 +Eswatini,2011,4.867,8.902,0.837,42.500,0.607,-0.069,0.917,0.756,0.251 +Eswatini,2018,4.212,9.029,0.779,49.300,0.710,-0.182,0.692,0.739,0.252 +Eswatini,2019,4.396,9.048,0.759,50.100,0.597,-0.195,0.724,0.726,0.280 +Eswatini,2022,3.502,9.119,0.712,52.500,0.539,-0.149,0.774,0.661,0.394 +Ethiopia,2012,4.561,7.252,0.659,56.320,0.776,-0.047,,0.556,0.137 +Ethiopia,2013,4.445,7.325,0.602,56.980,0.707,-0.011,0.750,0.570,0.213 +Ethiopia,2014,4.507,7.396,0.640,57.640,0.694,0.076,0.702,0.644,0.303 +Ethiopia,2015,4.573,7.468,0.626,58.300,0.803,0.109,0.567,0.623,0.237 +Ethiopia,2016,4.298,7.531,0.719,58.700,0.744,0.035,0.703,0.627,0.254 +Ethiopia,2017,4.180,7.595,0.734,59.100,0.717,-0.002,0.757,0.514,0.304 +Ethiopia,2018,4.379,7.634,0.740,59.500,0.740,0.036,0.799,0.562,0.272 +Ethiopia,2019,4.100,7.688,0.748,59.900,0.754,0.049,0.732,0.519,0.283 +Ethiopia,2020,4.549,7.720,0.823,60.300,0.769,0.183,0.784,0.615,0.252 +Ethiopia,2022,3.628,7.775,0.740,61.100,0.674,0.357,0.793,0.560,0.335 +Ethiopia,2023,4.093,7.809,0.670,61.500,0.631,0.212,0.800,0.538,0.299 +Finland,2006,7.672,10.745,0.965,68.720,0.969,-0.011,0.132,0.683,0.172 +Finland,2008,7.671,10.796,0.951,69.160,0.934,0.022,0.217,0.691,0.144 +Finland,2010,7.393,10.734,0.935,69.600,0.916,0.085,0.413,0.758,0.202 +Finland,2011,7.354,10.754,0.938,69.820,0.936,0.095,0.320,0.709,0.205 +Finland,2012,7.420,10.735,0.928,70.040,0.921,-0.007,0.361,0.742,0.202 +Finland,2013,7.445,10.722,0.941,70.260,0.919,0.034,0.306,0.752,0.195 +Finland,2014,7.385,10.714,0.952,70.480,0.933,-0.007,0.265,0.766,0.199 +Finland,2015,7.448,10.716,0.948,70.700,0.930,0.105,0.223,0.736,0.191 +Finland,2016,7.660,10.741,0.954,70.775,0.948,-0.033,0.250,0.769,0.182 +Finland,2017,7.788,10.770,0.964,70.850,0.962,-0.008,0.192,0.756,0.176 +Finland,2018,7.858,10.780,0.962,70.925,0.938,-0.133,0.199,0.749,0.182 +Finland,2019,7.780,10.791,0.937,71.000,0.948,-0.058,0.195,0.732,0.181 +Finland,2020,7.889,10.766,0.962,71.075,0.962,-0.123,0.164,0.748,0.193 +Finland,2021,7.794,10.794,0.970,71.150,0.963,-0.039,0.192,0.752,0.175 +Finland,2022,7.729,10.811,0.974,71.225,0.959,0.101,0.190,0.741,0.191 +Finland,2023,7.699,10.808,0.947,71.300,0.943,-0.001,0.185,0.717,0.173 +France,2005,7.093,10.637,0.940,70.700,0.895,,0.688,0.681,0.225 +France,2006,6.583,10.654,0.944,70.800,0.789,0.120,0.699,0.694,0.289 +France,2008,7.008,10.669,0.935,71.000,0.833,-0.037,0.669,0.702,0.281 +France,2009,6.283,10.635,0.918,71.100,0.798,-0.088,0.654,0.691,0.303 +France,2010,6.798,10.649,0.943,71.200,0.850,-0.109,0.623,0.729,0.261 +France,2011,6.959,10.666,0.921,71.300,0.903,-0.108,0.627,0.718,0.281 +France,2012,6.649,10.664,0.937,71.400,0.841,-0.155,0.608,0.705,0.253 +France,2013,6.667,10.665,0.908,71.500,0.878,-0.130,0.699,0.741,0.205 +France,2014,6.467,10.669,0.878,71.600,0.803,-0.124,0.656,0.759,0.216 +France,2015,6.358,10.677,0.896,71.700,0.817,-0.145,0.641,0.740,0.215 +France,2016,6.475,10.685,0.885,71.800,0.787,-0.097,0.623,0.715,0.270 +France,2017,6.635,10.705,0.931,71.900,0.834,-0.129,0.601,0.716,0.242 +France,2018,6.666,10.720,0.921,72.000,0.816,-0.143,0.582,0.705,0.282 +France,2019,6.690,10.735,0.958,72.100,0.827,-0.139,0.568,0.693,0.250 +France,2020,6.714,10.651,0.947,72.200,0.823,-0.176,0.565,0.690,0.231 +France,2021,6.656,10.714,0.915,72.300,0.837,-0.104,0.561,0.685,0.268 +France,2022,6.614,10.737,0.866,72.400,0.798,-0.027,0.533,0.688,0.249 +France,2023,6.557,10.742,0.850,72.500,0.776,0.010,0.558,0.676,0.228 +Gabon,2011,4.255,9.557,0.653,54.460,0.772,-0.213,0.851,0.564,0.264 +Gabon,2012,3.972,9.573,0.736,54.920,0.566,-0.197,0.810,0.504,0.266 +Gabon,2013,3.800,9.593,0.733,55.380,0.682,-0.148,0.780,0.519,0.287 +Gabon,2014,3.918,9.601,0.829,55.840,0.607,-0.201,0.782,0.533,0.293 +Gabon,2015,4.661,9.609,0.756,56.300,0.671,-0.196,0.867,0.600,0.372 +Gabon,2016,4.832,9.601,0.780,56.625,0.699,-0.207,0.817,0.625,0.432 +Gabon,2017,4.782,9.580,0.807,56.950,0.652,-0.231,0.868,0.638,0.446 +Gabon,2018,4.783,9.565,0.785,57.275,0.719,-0.200,0.823,0.614,0.418 +Gabon,2019,4.914,9.580,0.763,57.600,0.736,-0.206,0.846,0.638,0.413 +Gabon,2020,4.887,9.540,0.701,57.925,0.528,-0.194,0.789,0.568,0.416 +Gabon,2021,5.075,9.533,0.754,58.250,0.699,-0.207,0.766,0.620,0.362 +Gabon,2022,5.140,9.543,0.775,58.575,0.699,-0.167,0.803,0.661,0.414 +Gabon,2023,5.104,9.554,0.735,58.900,0.722,-0.160,0.822,0.620,0.424 +Gambia,2017,4.118,7.564,0.697,56.400,0.812,0.111,0.572,0.770,0.277 +Gambia,2018,4.922,7.607,0.685,56.700,0.719,0.440,0.691,0.759,0.379 +Gambia,2019,5.164,7.642,0.694,57.000,0.677,0.409,0.798,0.718,0.401 +Gambia,2022,4.279,7.662,0.588,57.900,0.599,0.360,0.884,0.722,0.438 +Gambia,2023,4.691,7.686,0.651,58.200,0.727,0.430,0.852,0.719,0.291 +Georgia,2006,3.675,8.993,0.647,63.300,0.553,-0.273,0.752,0.353,0.269 +Georgia,2007,3.707,9.117,0.548,63.400,0.464,-0.272,0.697,0.351,0.236 +Georgia,2008,4.156,9.144,0.608,63.500,0.614,-0.230,0.498,0.371,0.262 +Georgia,2009,3.801,9.116,0.544,63.600,0.495,-0.238,0.535,0.391,0.242 +Georgia,2010,4.102,9.184,0.540,63.700,0.558,-0.253,0.460,0.402,0.243 +Georgia,2011,4.203,9.263,0.503,63.800,0.632,-0.260,0.353,0.421,0.247 +Georgia,2012,4.254,9.332,0.533,63.900,0.659,-0.275,0.321,0.443,0.250 +Georgia,2013,4.349,9.371,0.559,64.000,0.722,-0.260,0.349,0.467,0.200 +Georgia,2014,4.288,9.414,0.558,64.100,0.720,-0.239,0.416,0.458,0.204 +Georgia,2015,4.122,9.442,0.517,64.200,0.640,-0.210,0.502,0.448,0.233 +Georgia,2016,4.448,9.470,0.533,64.325,0.606,-0.255,0.561,0.475,0.223 +Georgia,2017,4.451,9.517,0.590,64.450,0.821,-0.250,0.590,0.496,0.210 +Georgia,2018,4.659,9.565,0.617,64.575,0.775,-0.238,0.755,0.479,0.244 +Georgia,2019,4.892,9.615,0.675,64.700,0.811,-0.265,0.647,0.503,0.244 +Georgia,2020,5.123,9.544,0.718,64.825,0.764,-0.225,0.583,0.573,0.295 +Georgia,2021,4.911,9.648,0.671,64.950,0.777,-0.290,0.723,0.510,0.240 +Georgia,2022,5.293,9.743,0.754,65.075,0.821,-0.255,0.655,0.503,0.233 +Georgia,2023,5.351,9.785,0.779,65.200,0.877,-0.268,0.706,0.542,0.231 +Germany,2005,6.620,10.691,0.963,69.900,0.847,,0.781,0.685,0.197 +Germany,2007,6.417,10.760,0.926,69.940,0.801,0.161,0.792,0.647,0.231 +Germany,2008,6.522,10.771,0.923,69.960,0.766,,0.758,0.672,0.220 +Germany,2009,6.641,10.715,0.935,69.980,0.844,0.121,0.690,0.684,0.206 +Germany,2010,6.725,10.758,0.939,70.000,0.843,0.089,0.688,0.698,0.182 +Germany,2011,6.621,10.815,0.947,70.020,0.906,0.027,0.677,0.686,0.165 +Germany,2012,6.702,10.817,0.926,70.040,0.904,0.065,0.679,0.699,0.170 +Germany,2013,6.965,10.819,0.931,70.060,0.894,0.018,0.566,0.693,0.205 +Germany,2014,6.984,10.837,0.938,70.080,0.899,0.082,0.474,0.739,0.188 +Germany,2015,7.037,10.843,0.926,70.100,0.889,0.172,0.412,0.722,0.203 +Germany,2016,6.874,10.857,0.906,70.300,0.871,0.142,0.446,0.709,0.187 +Germany,2017,7.074,10.879,0.892,70.500,0.841,0.139,0.414,0.707,0.196 +Germany,2018,7.118,10.886,0.920,70.700,0.877,0.028,0.496,0.740,0.243 +Germany,2019,7.035,10.894,0.886,70.900,0.885,0.051,0.462,0.712,0.226 +Germany,2020,7.312,10.856,0.905,71.100,0.864,-0.068,0.424,0.698,0.206 +Germany,2021,6.755,10.881,0.868,71.300,0.778,0.074,0.418,0.703,0.251 +Germany,2022,6.608,10.889,0.916,71.500,0.895,0.080,0.417,0.668,0.201 +Germany,2023,6.792,10.878,0.895,71.700,0.845,0.106,0.460,0.706,0.231 +Ghana,2006,4.535,8.067,0.728,52.540,0.849,0.208,0.814,0.637,0.198 +Ghana,2007,5.220,8.084,0.730,52.980,0.891,0.133,0.771,0.658,0.217 +Ghana,2008,4.965,8.145,0.622,53.420,0.838,0.115,0.863,0.674,0.172 +Ghana,2009,4.198,8.167,0.633,53.860,0.757,0.000,0.890,0.714,0.198 +Ghana,2010,4.606,8.219,0.739,54.300,0.891,0.069,0.875,0.693,0.184 +Ghana,2011,5.608,8.326,0.724,54.740,0.852,0.006,0.790,0.658,0.209 +Ghana,2012,5.057,8.390,0.685,55.180,0.679,0.035,0.898,0.709,0.152 +Ghana,2013,4.965,8.436,0.676,55.620,0.794,-0.070,0.880,0.660,0.211 +Ghana,2014,3.860,8.440,0.651,56.060,0.677,-0.004,0.913,0.682,0.280 +Ghana,2015,3.986,8.437,0.687,56.500,0.852,-0.043,0.945,0.675,0.265 +Ghana,2016,4.514,8.447,0.647,56.875,0.751,0.085,0.894,0.659,0.305 +Ghana,2017,5.481,8.503,0.669,57.250,0.783,0.074,0.839,0.715,0.248 +Ghana,2018,5.004,8.542,0.761,57.625,0.817,0.058,0.846,0.716,0.250 +Ghana,2019,4.967,8.584,0.746,58.000,0.787,0.111,0.857,0.645,0.270 +Ghana,2020,5.319,8.569,0.643,58.375,0.824,0.196,0.847,0.675,0.253 +Ghana,2021,4.378,8.601,0.633,58.750,0.730,0.105,0.888,0.588,0.295 +Ghana,2022,4.191,8.613,0.628,59.125,0.786,0.114,0.909,0.620,0.292 +Ghana,2023,4.298,8.610,0.661,59.500,0.834,0.093,0.892,0.638,0.254 +Greece,2005,6.006,10.454,0.837,69.600,0.734,,0.861,0.598,0.264 +Greece,2007,6.647,10.535,0.808,69.760,0.575,-0.196,0.845,0.629,0.222 +Greece,2009,6.039,10.483,0.793,69.920,0.443,-0.298,0.959,0.614,0.254 +Greece,2010,5.840,10.425,0.868,70.000,0.484,-0.308,0.954,0.581,0.292 +Greece,2011,5.372,10.320,0.852,70.080,0.528,-0.321,0.941,0.552,0.323 +Greece,2012,5.096,10.251,0.812,70.160,0.373,-0.310,0.959,0.544,0.352 +Greece,2013,4.720,10.233,0.687,70.240,0.426,-0.277,0.941,0.571,0.482 +Greece,2014,4.756,10.245,0.832,70.320,0.369,-0.293,0.930,0.597,0.385 +Greece,2015,5.623,10.249,0.835,70.400,0.532,-0.277,0.824,0.637,0.277 +Greece,2016,5.303,10.248,0.803,70.525,0.482,-0.265,0.898,0.594,0.336 +Greece,2017,5.148,10.261,0.753,70.650,0.438,-0.295,0.872,0.516,0.333 +Greece,2018,5.409,10.280,0.794,70.775,0.564,-0.340,0.860,0.564,0.255 +Greece,2019,5.952,10.300,0.891,70.900,0.614,-0.293,0.848,0.560,0.236 +Greece,2020,5.788,10.207,0.779,71.025,0.565,-0.246,0.764,0.629,0.322 +Greece,2021,6.104,10.294,0.850,71.150,0.574,-0.161,0.752,0.624,0.311 +Greece,2022,5.900,10.358,0.875,71.275,0.563,-0.318,0.874,0.589,0.183 +Greece,2023,5.796,10.387,0.818,71.400,0.589,-0.223,0.805,0.608,0.311 +Guatemala,2006,5.901,8.850,0.830,58.980,0.663,0.167,0.706,0.789,0.287 +Guatemala,2007,6.330,8.891,0.866,59.260,0.628,0.130,0.810,0.790,0.224 +Guatemala,2008,6.414,8.905,0.866,59.540,0.630,0.200,0.796,0.800,0.234 +Guatemala,2009,6.452,8.890,0.834,59.820,0.643,0.191,0.755,0.814,0.240 +Guatemala,2010,6.290,8.901,0.859,60.100,0.696,0.161,0.795,0.805,0.236 +Guatemala,2011,5.743,8.923,0.768,60.380,0.763,0.003,0.863,0.792,0.289 +Guatemala,2012,5.856,8.935,0.802,60.660,0.865,0.015,0.821,0.808,0.349 +Guatemala,2013,5.985,8.953,0.830,60.940,0.884,0.039,0.817,0.822,0.333 +Guatemala,2014,6.536,8.980,0.834,61.220,0.843,0.102,0.804,0.816,0.305 +Guatemala,2015,6.465,9.003,0.823,61.500,0.869,0.046,0.822,0.826,0.311 +Guatemala,2016,6.359,9.013,0.811,61.700,0.863,0.006,0.812,0.815,0.321 +Guatemala,2017,6.325,9.027,0.826,61.900,0.915,-0.064,0.800,0.819,0.308 +Guatemala,2018,6.627,9.044,0.841,62.100,0.910,-0.016,0.765,0.827,0.262 +Guatemala,2019,6.262,9.068,0.774,62.300,0.901,-0.068,0.773,0.820,0.311 +Guatemala,2022,6.150,9.123,0.806,62.900,0.856,-0.060,0.835,0.835,0.263 +Guatemala,2023,6.421,9.140,0.796,63.100,0.873,-0.049,0.812,0.843,0.303 +Guinea,2011,4.045,7.556,0.598,51.020,0.797,0.036,0.743,0.670,0.260 +Guinea,2012,3.652,7.589,0.542,51.140,0.646,-0.003,0.794,0.657,0.285 +Guinea,2013,3.902,7.604,0.567,51.260,0.693,0.087,0.815,0.606,0.348 +Guinea,2014,3.412,7.615,0.638,51.380,0.684,0.002,0.705,0.643,0.351 +Guinea,2015,3.505,7.627,0.579,51.500,0.666,0.003,0.762,0.658,0.268 +Guinea,2016,3.603,7.704,0.675,51.950,0.726,-0.060,0.803,0.676,0.374 +Guinea,2017,4.874,7.776,0.634,52.400,0.738,0.034,0.750,0.702,0.422 +Guinea,2018,5.252,7.813,0.630,52.850,0.731,0.088,0.778,0.727,0.440 +Guinea,2019,4.768,7.842,0.655,53.300,0.691,0.092,0.756,0.670,0.473 +Guinea,2020,4.972,7.865,0.732,53.750,0.598,0.075,0.790,0.706,0.346 +Guinea,2021,4.945,7.879,0.627,54.200,0.676,0.157,0.784,0.672,0.450 +Guinea,2022,5.317,7.901,0.582,54.650,0.729,0.136,0.770,0.699,0.492 +Guinea,2023,4.827,7.932,0.577,55.100,0.743,0.187,0.791,0.652,0.516 +Guyana,2007,5.993,9.089,0.849,56.240,0.694,0.082,0.836,0.761,0.296 +Haiti,2006,3.754,7.976,0.694,6.720,0.449,0.355,0.854,0.583,0.332 +Haiti,2008,3.846,8.016,0.679,17.360,0.465,0.213,0.812,0.573,0.256 +Haiti,2010,3.766,7.987,0.554,28.000,0.373,0.167,0.848,0.495,0.293 +Haiti,2011,4.845,8.026,0.567,33.320,0.413,0.194,0.682,0.550,0.245 +Haiti,2012,4.413,8.015,0.749,38.640,0.482,0.243,0.717,0.557,0.284 +Haiti,2013,4.622,8.043,0.648,43.960,0.610,0.243,0.669,0.528,0.327 +Haiti,2014,3.889,8.057,0.554,49.280,0.509,0.238,0.708,0.573,0.327 +Haiti,2015,3.570,8.056,0.564,54.600,0.398,0.259,0.777,0.598,0.333 +Haiti,2016,3.352,8.060,0.584,54.900,0.304,0.244,0.839,0.532,0.367 +Haiti,2017,3.824,8.071,0.647,55.200,0.484,0.333,0.647,0.570,0.322 +Haiti,2018,3.615,8.074,0.538,55.500,0.591,0.374,0.720,0.581,0.359 +Honduras,2006,5.397,8.448,0.933,63.100,0.650,0.085,0.844,0.837,0.155 +Honduras,2007,5.097,8.485,0.819,62.900,0.676,0.226,0.826,0.712,0.199 +Honduras,2008,5.420,8.504,0.828,62.700,0.687,0.219,0.863,0.719,0.206 +Honduras,2009,6.033,8.458,0.824,62.500,0.661,0.114,0.857,0.745,0.261 +Honduras,2010,5.866,8.474,0.803,62.300,0.646,0.101,0.820,0.745,0.260 +Honduras,2011,4.961,8.492,0.766,62.100,0.783,0.091,0.884,0.757,0.307 +Honduras,2012,4.602,8.513,0.779,61.900,0.700,-0.007,0.871,0.796,0.294 +Honduras,2013,4.713,8.521,0.792,61.700,0.698,-0.031,0.868,0.795,0.283 +Honduras,2014,5.056,8.533,0.790,61.500,0.696,0.011,0.834,0.794,0.299 +Honduras,2015,4.845,8.553,0.772,61.300,0.534,-0.101,0.848,0.829,0.311 +Honduras,2016,5.648,8.573,0.774,61.725,0.850,0.076,0.793,0.790,0.297 +Honduras,2017,6.020,8.603,0.843,62.150,0.898,0.068,0.783,0.796,0.248 +Honduras,2018,5.908,8.624,0.827,62.575,0.872,0.095,0.804,0.822,0.287 +Honduras,2019,5.930,8.633,0.797,63.000,0.846,0.059,0.815,0.789,0.279 +Honduras,2021,6.114,8.626,0.806,63.850,0.835,0.111,0.847,0.808,0.269 +Honduras,2022,5.932,8.650,0.729,64.275,0.851,0.078,0.834,0.775,0.289 +Honduras,2023,5.861,8.670,0.731,64.700,0.878,0.079,0.784,0.767,0.285 +Hong Kong S.A.R. of China,2006,5.511,10.746,0.812,,0.910,0.150,0.356,0.591,0.236 +Hong Kong S.A.R. of China,2008,5.137,10.816,0.840,,0.922,0.290,0.274,0.575,0.237 +Hong Kong S.A.R. of China,2009,5.397,10.788,0.835,,0.918,0.302,0.272,0.606,0.210 +Hong Kong S.A.R. of China,2010,5.643,10.847,0.857,,0.890,0.326,0.256,0.601,0.183 +Hong Kong S.A.R. of China,2011,5.474,10.887,0.846,,0.894,0.228,0.245,0.582,0.196 +Hong Kong S.A.R. of China,2012,5.484,10.893,0.826,,0.880,0.216,0.380,0.580,0.183 +Hong Kong S.A.R. of China,2014,5.458,10.939,0.834,,0.843,0.218,0.423,0.602,0.243 +Hong Kong S.A.R. of China,2016,5.498,10.970,0.832,,0.800,0.094,0.403,0.569,0.213 +Hong Kong S.A.R. of China,2017,5.362,10.999,0.831,,0.831,0.134,0.416,0.536,0.201 +Hong Kong S.A.R. of China,2019,5.659,10.995,0.856,,0.727,0.062,0.432,0.519,0.358 +Hong Kong S.A.R. of China,2020,5.295,10.931,0.813,,0.705,-0.076,0.380,0.522,0.210 +Hong Kong S.A.R. of China,2021,5.322,11.003,0.821,,0.669,0.021,0.390,0.534,0.224 +Hong Kong S.A.R. of China,2022,5.311,10.976,0.803,,0.697,0.040,0.383,0.549,0.204 +Hungary,2005,5.194,10.103,0.930,65.000,0.697,,0.903,0.578,0.290 +Hungary,2007,4.954,10.147,0.931,65.320,0.538,-0.166,0.895,0.600,0.230 +Hungary,2009,4.895,10.092,0.901,65.640,0.464,-0.131,0.915,0.575,0.228 +Hungary,2010,4.725,10.105,0.896,65.800,0.514,-0.151,0.983,0.574,0.235 +Hungary,2011,4.918,10.127,0.894,65.960,0.631,-0.095,0.940,0.586,0.305 +Hungary,2012,4.683,10.119,0.906,66.120,0.569,-0.142,0.930,0.582,0.315 +Hungary,2013,4.914,10.140,0.877,66.280,0.674,-0.119,0.912,0.647,0.307 +Hungary,2014,5.181,10.184,0.845,66.440,0.494,-0.156,0.855,0.578,0.238 +Hungary,2015,5.344,10.223,0.859,66.600,0.558,-0.204,0.908,0.650,0.245 +Hungary,2016,5.449,10.248,0.900,66.750,0.554,-0.193,0.924,0.590,0.243 +Hungary,2017,6.065,10.292,0.877,66.900,0.661,-0.145,0.886,0.644,0.181 +Hungary,2018,5.936,10.346,0.941,67.050,0.693,-0.249,0.911,0.595,0.201 +Hungary,2019,6.000,10.393,0.947,67.200,0.798,-0.201,0.884,0.653,0.180 +Hungary,2020,6.038,10.349,0.943,67.350,0.771,-0.127,0.836,0.662,0.240 +Hungary,2021,6.227,10.423,0.948,67.500,0.727,-0.046,0.832,0.668,0.192 +Hungary,2022,5.861,10.470,0.937,67.650,0.776,-0.009,0.848,0.628,0.250 +Hungary,2023,5.965,10.473,0.954,67.800,0.755,-0.002,0.847,0.673,0.189 +Iceland,2008,6.888,10.878,0.977,71.200,0.885,0.265,0.708,0.851,0.153 +Iceland,2012,7.591,10.788,0.979,71.600,0.905,0.235,0.759,0.817,0.157 +Iceland,2013,7.501,10.823,0.967,71.700,0.923,0.299,0.713,0.802,0.156 +Iceland,2015,7.498,10.862,0.980,71.900,0.940,0.294,0.639,0.794,0.180 +Iceland,2016,7.510,10.909,0.985,71.925,0.952,0.274,0.719,0.808,0.158 +Iceland,2017,7.476,10.927,0.967,71.950,0.939,0.240,0.727,0.823,0.148 +Iceland,2019,7.533,10.943,0.982,72.000,0.959,,0.699,0.787,0.178 +Iceland,2020,7.575,10.852,0.983,72.025,0.949,0.152,0.644,0.808,0.172 +Iceland,2021,7.565,10.878,0.980,72.050,0.923,0.257,0.664,0.806,0.159 +Iceland,2022,7.449,10.916,0.985,72.075,0.936,0.222,0.692,0.768,0.178 +Iceland,2023,7.562,10.934,0.979,72.100,0.918,0.299,0.697,0.793,0.185 +India,2006,5.348,8.141,0.707,55.860,0.774,,0.855,0.576,0.199 +India,2007,5.027,8.200,0.569,56.220,0.729,-0.056,0.862,0.541,0.253 +India,2008,5.146,8.216,0.684,56.580,0.756,-0.077,0.891,0.573,0.259 +India,2009,4.522,8.278,0.653,56.940,0.679,-0.031,0.895,0.639,0.301 +India,2010,4.989,8.346,0.605,57.300,0.783,0.053,0.863,0.579,0.267 +India,2011,4.635,8.383,0.553,57.660,0.838,-0.043,0.908,0.480,0.232 +India,2012,4.720,8.423,0.511,58.020,0.609,0.062,0.830,0.544,0.295 +India,2013,4.428,8.472,0.553,58.380,0.740,0.079,0.832,0.608,0.330 +India,2014,4.424,8.531,0.621,58.740,0.809,-0.031,0.832,0.651,0.285 +India,2015,4.342,8.596,0.610,59.100,0.777,-0.010,0.776,0.657,0.322 +India,2016,4.179,8.664,0.614,59.400,0.820,0.041,0.765,0.646,0.346 +India,2017,4.046,8.718,0.607,59.700,0.886,-0.046,0.781,0.579,0.318 +India,2018,3.818,8.770,0.638,60.000,0.890,0.080,0.805,0.591,0.357 +India,2019,3.249,8.797,0.561,60.300,0.876,0.108,0.752,0.560,0.466 +India,2020,4.224,8.728,0.616,60.600,0.906,0.068,0.780,0.686,0.383 +India,2021,3.558,8.806,0.570,60.900,0.866,0.052,0.757,0.547,0.429 +India,2022,3.930,8.867,0.608,61.200,0.893,0.085,0.771,0.596,0.432 +India,2023,4.676,8.919,0.633,61.500,0.900,0.121,0.770,0.699,0.389 +Indonesia,2006,4.947,8.839,0.771,60.320,0.713,0.343,0.915,0.715,0.266 +Indonesia,2007,5.101,8.888,0.704,60.540,0.603,0.307,0.960,0.696,0.242 +Indonesia,2008,4.815,8.933,0.675,60.760,0.596,0.160,0.968,0.675,0.239 +Indonesia,2009,5.472,8.966,0.779,60.980,0.784,0.186,0.911,0.768,0.193 +Indonesia,2010,5.457,9.013,0.816,61.200,0.700,0.443,0.954,0.717,0.218 +Indonesia,2011,5.173,9.061,0.825,61.420,0.878,0.433,0.962,0.748,0.273 +Indonesia,2012,5.368,9.107,0.834,61.640,0.770,0.349,0.962,0.764,0.229 +Indonesia,2013,5.292,9.149,0.794,61.860,0.781,0.371,0.973,0.777,0.249 +Indonesia,2014,5.597,9.186,0.905,62.080,0.719,0.403,0.970,0.757,0.242 +Indonesia,2015,5.043,9.222,0.809,62.300,0.779,0.466,0.946,0.796,0.274 +Indonesia,2016,5.136,9.261,0.792,62.425,0.830,0.494,0.890,0.748,0.342 +Indonesia,2017,5.098,9.300,0.796,62.550,0.865,0.482,0.900,0.781,0.319 +Indonesia,2018,5.340,9.341,0.809,62.675,0.879,0.506,0.868,0.796,0.296 +Indonesia,2019,5.347,9.381,0.802,62.800,0.866,0.549,0.861,0.800,0.302 +Indonesia,2020,4.828,9.351,0.751,62.925,0.853,0.529,0.914,0.742,0.351 +Indonesia,2021,5.433,9.381,0.817,63.050,0.885,0.540,0.845,0.799,0.273 +Indonesia,2022,5.585,9.426,0.834,63.175,0.903,0.516,0.862,0.818,0.269 +Indonesia,2023,5.695,9.466,0.781,63.300,0.900,0.590,0.866,0.814,0.289 +Iran,2005,5.308,9.498,0.766,64.300,0.651,,0.636,0.515,0.456 +Iran,2007,5.336,9.595,0.718,64.580,0.533,0.043,0.872,0.553,0.361 +Iran,2008,5.129,9.584,0.633,64.720,0.601,0.040,0.868,0.541,0.345 +Iran,2011,4.768,9.636,0.582,65.140,0.798,0.188,0.665,0.513,0.359 +Iran,2012,4.609,9.585,0.600,65.280,0.764,,0.678,0.529,0.525 +Iran,2013,5.140,9.555,0.664,65.420,0.730,0.202,0.685,0.575,0.552 +Iran,2014,4.682,9.585,0.644,65.560,0.767,0.227,0.640,0.550,0.512 +Iran,2015,4.750,9.548,0.572,65.700,0.780,0.164,0.699,0.548,0.520 +Iran,2016,4.653,9.614,0.566,65.850,0.773,0.176,0.713,0.592,0.526 +Iran,2017,4.717,9.627,0.714,66.000,0.731,0.210,0.715,0.590,0.439 +Iran,2018,4.278,9.591,0.674,66.150,0.603,0.073,0.703,0.482,0.493 +Iran,2019,5.006,9.553,0.698,66.300,0.623,0.128,0.728,0.525,0.449 +Iran,2020,4.865,9.577,0.757,66.450,0.600,0.130,0.710,0.505,0.470 +Iran,2021,4.788,9.616,0.771,66.600,0.609,0.172,0.761,0.518,0.427 +Iran,2022,4.977,9.636,0.800,66.750,0.570,0.209,0.766,0.521,0.466 +Iran,2023,5.004,9.651,0.809,66.900,0.615,0.254,0.764,0.533,0.425 +Iraq,2008,4.590,8.982,0.744,60.940,0.386,-0.061,0.910,0.532,0.448 +Iraq,2009,4.775,8.979,0.862,60.920,0.431,-0.198,0.854,0.504,0.404 +Iraq,2010,5.065,9.009,0.854,60.900,0.419,-0.123,0.859,0.497,0.431 +Iraq,2011,4.725,9.047,0.751,60.880,0.347,-0.068,0.780,0.473,0.557 +Iraq,2012,4.660,9.133,0.730,60.860,0.315,-0.018,0.789,0.410,0.449 +Iraq,2013,4.725,9.159,0.728,60.840,,-0.047,0.710,,0.554 +Iraq,2014,4.542,9.126,0.725,60.820,0.646,0.002,0.726,0.539,0.564 +Iraq,2015,4.493,9.145,0.684,60.800,0.599,0.021,0.762,0.478,0.581 +Iraq,2016,4.413,9.250,0.719,61.275,0.666,-0.050,0.799,0.471,0.570 +Iraq,2017,4.462,9.208,0.695,61.750,0.628,0.001,0.757,0.487,0.591 +Iraq,2018,4.886,9.210,0.764,62.225,0.598,-0.069,0.887,0.552,0.482 +Iraq,2020,4.785,9.088,0.708,63.175,0.700,-0.021,0.849,0.585,0.532 +Iraq,2021,5.094,9.081,0.730,63.650,0.594,0.006,0.901,0.577,0.474 +Iraq,2022,4.928,9.127,0.753,64.125,0.661,0.068,0.855,0.565,0.499 +Iraq,2023,5.475,9.093,0.734,64.600,0.658,-0.017,0.851,0.587,0.469 +Ireland,2006,7.144,10.985,0.967,69.620,0.943,0.235,0.473,0.815,0.209 +Ireland,2008,7.568,10.941,0.983,69.860,0.894,0.315,0.487,0.745,0.148 +Ireland,2009,7.046,10.879,0.959,69.980,0.835,0.308,0.580,0.745,0.233 +Ireland,2010,7.257,10.890,0.973,70.100,0.856,0.341,0.618,0.763,0.201 +Ireland,2011,7.007,10.894,0.977,70.220,0.952,0.376,0.590,0.786,0.190 +Ireland,2012,6.965,10.890,0.962,70.340,0.902,0.295,0.573,0.721,0.237 +Ireland,2013,6.760,10.896,0.955,70.460,0.884,0.325,0.558,0.744,0.245 +Ireland,2014,7.018,10.971,0.968,70.580,0.922,0.257,0.406,0.736,0.229 +Ireland,2015,6.830,11.180,0.953,70.700,0.892,0.226,0.409,0.748,0.225 +Ireland,2016,7.041,11.189,0.958,70.800,0.875,0.169,0.399,0.744,0.211 +Ireland,2017,7.060,11.264,0.943,70.900,0.905,0.210,0.337,0.771,0.213 +Ireland,2018,6.962,11.334,0.938,71.000,0.861,0.138,0.362,0.754,0.213 +Ireland,2019,7.255,11.373,0.944,71.100,0.892,0.067,0.373,0.758,0.223 +Ireland,2020,7.035,11.423,0.960,71.200,0.882,0.000,0.356,0.753,0.246 +Ireland,2021,6.828,11.540,0.850,71.300,0.846,0.131,0.360,0.733,0.245 +Ireland,2022,6.870,11.643,0.906,71.400,0.895,0.138,0.358,0.738,0.234 +Ireland,2023,6.817,11.676,0.921,71.500,0.903,0.182,0.373,0.742,0.245 +Israel,2006,7.173,10.368,0.927,71.080,0.817,,0.905,0.639,0.308 +Israel,2007,6.841,10.408,0.868,71.160,0.683,0.215,0.868,0.642,0.320 +Israel,2008,7.261,10.423,0.859,71.240,0.663,0.134,0.898,0.635,0.349 +Israel,2009,7.353,10.408,0.937,71.320,0.593,0.167,0.923,0.620,0.327 +Israel,2010,7.359,10.444,0.882,71.400,0.561,0.145,0.902,0.628,0.362 +Israel,2011,7.433,10.480,0.893,71.480,0.722,0.136,0.891,0.654,0.384 +Israel,2012,7.111,10.487,0.903,71.560,0.681,0.147,0.862,0.611,0.319 +Israel,2013,7.321,10.512,0.909,71.640,0.739,0.145,0.849,0.649,0.409 +Israel,2014,7.401,10.531,0.889,71.720,0.707,0.088,0.818,0.567,0.271 +Israel,2015,7.079,10.536,0.864,71.800,0.753,0.103,0.789,0.652,0.256 +Israel,2016,7.159,10.560,0.890,71.950,0.772,0.147,0.804,0.602,0.263 +Israel,2017,7.331,10.583,0.916,72.100,0.768,0.138,0.793,0.621,0.276 +Israel,2018,6.927,10.603,0.910,72.250,0.725,0.048,0.770,0.612,0.282 +Israel,2019,7.332,10.625,0.946,72.400,0.834,0.078,0.743,0.598,0.266 +Israel,2020,7.195,10.589,0.959,72.550,0.831,-0.059,0.748,0.564,0.243 +Israel,2021,7.578,10.655,0.917,72.700,0.820,-0.008,0.726,0.558,0.217 +Israel,2022,7.662,10.698,0.954,72.850,0.775,-0.007,0.655,0.583,0.183 +Israel,2023,6.783,10.707,0.952,73.000,0.797,0.146,0.636,0.484,0.516 +Italy,2005,6.854,10.698,0.928,70.600,0.802,,0.944,0.606,0.295 +Italy,2007,6.574,10.722,0.912,70.800,0.684,0.108,0.922,0.650,0.303 +Italy,2008,6.780,10.706,0.880,70.900,0.543,0.044,0.946,0.588,0.268 +Italy,2009,6.334,10.647,0.880,71.000,0.701,0.235,0.890,0.715,0.279 +Italy,2010,6.354,10.661,0.872,71.100,0.738,-0.065,0.921,0.535,0.236 +Italy,2011,6.057,10.666,0.913,71.200,0.568,-0.023,0.933,0.610,0.266 +Italy,2012,5.839,10.633,0.869,71.300,0.570,0.107,0.908,0.651,0.388 +Italy,2013,6.009,10.603,0.916,71.400,0.499,-0.108,0.943,0.702,0.357 +Italy,2014,6.027,10.594,0.898,71.500,0.624,-0.071,0.920,0.659,0.356 +Italy,2015,5.848,10.603,0.909,71.600,0.575,-0.070,0.913,0.646,0.329 +Italy,2016,5.955,10.617,0.927,71.675,0.624,-0.086,0.903,0.632,0.339 +Italy,2017,6.199,10.635,0.920,71.750,0.633,-0.041,0.867,0.613,0.323 +Italy,2018,6.517,10.647,0.913,71.825,0.650,-0.027,0.888,0.598,0.403 +Italy,2019,6.445,10.663,0.838,71.900,0.709,-0.088,0.866,0.569,0.328 +Italy,2020,6.488,10.574,0.890,71.975,0.718,-0.157,0.844,0.614,0.311 +Italy,2021,6.467,10.647,0.886,72.050,0.703,-0.096,0.862,0.634,0.318 +Italy,2022,6.258,10.687,0.869,72.125,0.711,0.026,0.819,0.624,0.298 +Italy,2023,6.245,10.703,0.851,72.200,0.699,-0.053,0.819,0.636,0.293 +Ivory Coast,2009,4.197,8.181,0.667,48.900,0.760,-0.157,0.902,0.555,0.186 +Ivory Coast,2013,3.739,8.285,0.709,51.300,0.739,-0.037,0.691,0.661,0.306 +Ivory Coast,2014,3.570,8.351,0.711,51.900,0.781,-0.087,0.671,0.603,0.291 +Ivory Coast,2015,4.445,8.395,0.704,52.500,0.800,-0.059,0.744,0.614,0.347 +Ivory Coast,2016,4.543,8.438,0.617,53.075,0.769,-0.048,0.757,0.693,0.378 +Ivory Coast,2017,5.038,8.484,0.661,53.650,0.732,-0.116,0.771,0.662,0.357 +Ivory Coast,2018,5.268,8.505,0.621,54.225,0.713,-0.054,0.791,0.659,0.386 +Ivory Coast,2019,5.392,8.543,0.679,54.800,0.736,-0.021,0.799,0.663,0.425 +Ivory Coast,2020,5.257,8.535,0.613,55.375,0.770,0.012,0.777,0.655,0.340 +Ivory Coast,2021,5.056,8.579,0.554,55.950,0.717,-0.004,0.716,0.626,0.345 +Ivory Coast,2022,4.849,8.619,0.536,56.525,0.713,-0.009,0.743,0.629,0.399 +Ivory Coast,2023,5.337,8.656,0.623,57.100,0.753,-0.057,0.676,0.670,0.307 +Jamaica,2006,6.208,9.249,0.909,66.600,0.738,-0.011,0.946,0.753,0.201 +Jamaica,2011,5.374,9.193,0.855,66.600,0.796,-0.071,0.909,0.764,0.237 +Jamaica,2013,5.709,9.182,0.865,66.600,0.793,-0.029,0.931,0.694,0.312 +Jamaica,2014,5.311,9.185,0.874,66.600,0.809,-0.008,0.861,0.708,0.310 +Jamaica,2017,5.890,9.209,0.913,66.600,0.861,-0.138,0.883,0.700,0.243 +Jamaica,2019,6.309,9.234,0.878,66.600,0.891,-0.146,0.885,0.722,0.195 +Jamaica,2020,5.425,9.128,0.870,66.600,0.865,-0.152,0.836,0.712,0.266 +Jamaica,2021,5.814,9.170,0.857,66.600,0.731,-0.084,0.883,0.689,0.308 +Jamaica,2022,5.870,9.212,0.868,66.600,0.874,-0.091,0.910,0.718,0.269 +Japan,2005,6.516,10.552,0.928,72.400,0.868,,0.699,0.686,0.153 +Japan,2007,6.238,10.578,0.938,72.640,0.796,-0.097,0.809,0.683,0.207 +Japan,2008,5.911,10.566,0.887,72.760,0.772,-0.142,0.816,0.705,0.191 +Japan,2009,5.845,10.507,0.888,72.880,0.730,-0.217,0.740,0.713,0.169 +Japan,2010,6.057,10.547,0.902,73.000,0.772,-0.147,0.770,0.779,0.188 +Japan,2011,6.263,10.549,0.917,73.120,0.814,-0.059,0.734,0.714,0.181 +Japan,2012,5.968,10.565,0.905,73.240,0.753,,0.692,0.708,0.171 +Japan,2013,5.959,10.586,0.924,73.360,0.821,-0.154,0.650,0.719,0.175 +Japan,2014,5.923,10.590,0.900,73.480,0.838,-0.146,0.617,0.687,0.189 +Japan,2015,5.880,10.607,0.923,73.600,0.832,-0.162,0.654,0.702,0.176 +Japan,2016,5.955,10.615,0.900,73.725,0.836,-0.069,0.698,0.690,0.192 +Japan,2017,5.911,10.632,0.882,73.850,0.849,-0.213,0.659,0.692,0.176 +Japan,2018,5.794,10.640,0.886,73.975,0.773,-0.268,0.687,0.649,0.185 +Japan,2019,5.908,10.637,0.878,74.100,0.806,-0.261,0.617,0.693,0.194 +Japan,2020,6.118,10.596,0.887,74.225,0.806,-0.266,0.609,0.681,0.186 +Japan,2021,6.091,10.622,0.896,74.350,0.801,-0.213,0.670,0.674,0.189 +Japan,2022,6.178,10.637,0.899,74.475,0.789,-0.237,0.643,0.670,0.165 +Japan,2023,5.910,10.654,0.842,74.600,0.777,-0.222,0.594,0.638,0.178 +Jordan,2005,6.295,9.283,0.920,65.800,,,0.670,0.630,0.240 +Jordan,2007,5.598,9.308,0.841,66.160,0.646,-0.117,0.664,,0.240 +Jordan,2008,4.930,9.354,0.766,66.340,,-0.134,0.709,0.656,0.331 +Jordan,2009,6.000,9.381,0.899,66.520,0.771,-0.083,0.739,0.587,0.265 +Jordan,2010,5.570,9.382,0.918,66.700,0.788,-0.057,,0.564,0.343 +Jordan,2011,5.539,9.383,0.878,66.880,0.760,-0.155,,0.551,0.260 +Jordan,2012,5.132,9.393,0.829,67.060,0.693,-0.175,,0.469,0.345 +Jordan,2013,5.172,9.354,0.840,67.240,0.692,-0.131,,0.597,0.286 +Jordan,2014,5.333,9.269,0.816,67.420,0.729,-0.113,,0.602,0.313 +Jordan,2015,5.405,9.202,0.830,67.600,0.767,-0.051,,0.617,0.305 +Jordan,2016,5.271,9.173,0.820,67.600,0.771,-0.042,,0.598,0.312 +Jordan,2017,4.808,9.173,0.815,67.600,0.766,-0.156,,0.554,0.392 +Jordan,2018,4.639,9.168,0.800,67.600,0.762,-0.189,,, +Jordan,2019,4.453,9.163,0.793,67.600,0.726,-0.168,,, +Jordan,2020,4.094,9.125,0.709,67.600,0.779,-0.154,,, +Jordan,2021,3.909,9.127,0.703,67.600,0.773,-0.148,0.656,0.480,0.429 +Jordan,2022,4.356,9.140,0.774,67.600,0.759,-0.156,0.715,0.521,0.435 +Jordan,2023,4.292,9.151,0.721,67.600,0.754,-0.143,0.651,0.518,0.442 +Kazakhstan,2006,5.476,9.804,0.872,58.000,0.731,-0.280,0.865,0.602,0.185 +Kazakhstan,2007,5.719,9.878,0.861,58.600,0.806,-0.251,0.865,0.557,0.179 +Kazakhstan,2008,5.886,9.892,0.839,59.200,0.727,-0.226,0.899,0.613,0.160 +Kazakhstan,2009,5.383,9.884,0.893,59.800,0.856,-0.255,0.845,0.595,0.129 +Kazakhstan,2010,5.514,9.940,0.904,60.400,0.785,-0.221,0.823,0.655,0.149 +Kazakhstan,2011,5.736,9.997,0.905,61.000,0.878,-0.241,0.802,0.622,0.154 +Kazakhstan,2012,5.759,10.030,0.892,61.600,0.840,-0.177,0.877,0.667,0.184 +Kazakhstan,2013,5.835,10.074,0.889,62.200,0.782,-0.235,0.820,0.629,0.164 +Kazakhstan,2014,5.970,10.101,0.795,62.800,0.799,-0.002,0.805,0.671,0.169 +Kazakhstan,2015,5.950,10.098,0.931,63.400,0.740,-0.043,0.714,0.682,0.174 +Kazakhstan,2016,5.534,10.095,0.928,63.800,0.783,-0.042,0.702,0.641,0.155 +Kazakhstan,2017,5.882,10.121,0.914,64.200,0.745,-0.041,0.755,0.698,0.171 +Kazakhstan,2018,6.008,10.148,0.937,64.600,0.840,-0.104,0.824,0.611,0.162 +Kazakhstan,2019,6.272,10.179,0.951,65.000,0.852,-0.061,0.708,0.711,0.139 +Kazakhstan,2020,6.168,10.141,0.966,65.400,0.872,-0.062,0.661,0.620,0.150 +Kazakhstan,2021,6.260,10.170,0.906,65.800,0.807,0.034,0.782,0.663,0.122 +Kazakhstan,2022,6.006,10.169,0.923,66.200,0.883,0.022,0.720,0.652,0.132 +Kazakhstan,2023,6.299,10.172,0.929,66.600,0.901,0.050,0.812,0.626,0.114 +Kenya,2006,4.223,8.164,0.909,51.420,0.616,-0.034,0.860,0.657,0.198 +Kenya,2007,4.576,8.201,0.841,51.940,0.750,0.040,0.799,0.698,0.162 +Kenya,2008,4.015,8.173,0.827,52.460,0.620,-0.026,0.909,0.733,0.149 +Kenya,2009,4.270,8.176,0.789,52.980,0.584,0.086,0.913,0.679,0.183 +Kenya,2010,4.256,8.226,0.805,53.500,0.635,0.005,0.918,0.758,0.123 +Kenya,2011,4.405,8.249,0.846,54.020,0.709,0.009,0.923,0.706,0.228 +Kenya,2012,4.547,8.269,0.831,54.540,0.628,0.053,0.911,0.667,0.194 +Kenya,2013,3.795,8.282,0.825,55.060,0.708,0.201,0.861,0.729,0.161 +Kenya,2014,4.905,8.308,0.765,55.580,0.819,0.161,0.849,0.779,0.221 +Kenya,2015,4.358,8.334,0.777,56.100,0.793,0.209,0.853,0.673,0.172 +Kenya,2016,4.396,8.353,0.706,56.500,0.749,0.288,0.828,0.730,0.226 +Kenya,2017,4.476,8.369,0.715,56.900,0.853,0.225,0.854,0.754,0.230 +Kenya,2018,4.656,8.404,0.707,57.300,0.821,0.282,0.844,0.747,0.237 +Kenya,2019,4.619,8.434,0.676,57.700,0.818,0.300,0.794,0.728,0.251 +Kenya,2020,4.547,8.411,0.674,58.100,0.702,0.251,0.837,0.738,0.297 +Kenya,2021,4.465,8.465,0.702,58.500,0.678,0.313,0.841,0.745,0.253 +Kenya,2022,4.448,8.493,0.691,58.900,0.706,0.292,0.878,0.725,0.281 +Kenya,2023,4.496,8.523,0.703,59.300,0.736,0.316,0.800,0.756,0.245 +Kosovo,2007,5.104,,0.848,,0.381,,0.894,0.614,0.237 +Kosovo,2008,5.522,8.858,0.884,,,0.094,0.849,0.500,0.318 +Kosovo,2009,5.891,8.899,0.830,,0.506,0.203,0.968,0.528,0.169 +Kosovo,2010,5.177,8.940,0.708,,0.451,0.171,0.967,0.673,0.118 +Kosovo,2011,4.860,8.992,0.759,,0.589,0.004,0.919,0.604,0.124 +Kosovo,2012,5.640,9.000,0.757,,0.636,0.028,0.950,0.562,0.100 +Kosovo,2013,6.126,9.046,0.721,,0.568,0.114,0.935,0.650,0.203 +Kosovo,2014,5.000,9.082,0.706,,0.441,0.010,0.775,0.552,0.206 +Kosovo,2015,5.077,9.153,0.805,,0.561,0.177,0.851,0.685,0.180 +Kosovo,2016,5.759,9.213,0.824,,0.827,0.120,0.941,0.588,0.150 +Kosovo,2017,6.149,9.253,0.792,,0.858,0.112,0.925,0.617,0.186 +Kosovo,2018,6.392,9.283,0.822,,0.890,0.264,0.922,0.642,0.170 +Kosovo,2019,6.425,9.334,0.843,,0.841,0.242,0.920,0.612,0.141 +Kosovo,2020,6.294,9.279,0.792,,0.880,0.302,0.910,0.593,0.201 +Kosovo,2021,6.648,9.383,0.849,,0.840,0.258,0.842,0.578,0.116 +Kosovo,2022,6.160,9.431,0.888,,0.865,0.208,0.846,0.549,0.142 +Kosovo,2023,6.878,9.480,0.807,,0.900,0.285,0.811,0.682,0.140 +Kuwait,2006,6.076,11.233,0.919,68.400,0.769,-0.242,0.328,0.788,0.182 +Kuwait,2009,6.585,11.074,0.926,69.000,0.819,0.000,0.675,0.694,0.252 +Kuwait,2010,6.798,10.998,0.893,69.200,0.703,-0.039,0.486,0.687,0.203 +Kuwait,2011,6.378,11.024,0.882,69.400,0.769,,0.560,0.726,0.177 +Kuwait,2012,6.221,11.012,0.889,69.600,0.934,,,0.794,0.095 +Kuwait,2013,6.480,10.952,0.862,69.800,0.751,,,0.686,0.283 +Kuwait,2014,6.180,10.926,,70.000,,,,, +Kuwait,2015,6.146,10.893,0.823,70.200,0.822,0.077,,0.678,0.324 +Kuwait,2016,5.947,10.887,0.845,70.175,0.841,-0.080,,0.643,0.315 +Kuwait,2017,6.094,10.820,0.853,70.150,0.884,-0.010,,0.649,0.307 +Kuwait,2019,6.106,10.765,0.842,70.100,0.867,-0.106,,0.643,0.303 +Kuwait,2022,6.758,10.803,0.874,70.025,0.969,0.142,,0.738,0.156 +Kuwait,2023,7.130,10.812,0.890,70.000,0.898,0.136,,0.729,0.207 +Kyrgyzstan,2006,4.641,8.185,0.844,59.920,0.678,-0.145,0.879,0.555,0.159 +Kyrgyzstan,2007,4.698,8.258,0.833,60.340,0.684,-0.097,0.929,0.590,0.130 +Kyrgyzstan,2008,4.737,8.329,0.792,60.760,0.719,-0.105,0.923,0.594,0.147 +Kyrgyzstan,2009,5.069,8.345,0.855,61.180,0.699,-0.145,0.896,0.554,0.165 +Kyrgyzstan,2010,4.996,8.329,0.885,61.600,0.720,-0.077,0.926,0.516,0.123 +Kyrgyzstan,2011,4.921,8.374,0.891,62.020,0.748,-0.160,0.932,0.579,0.151 +Kyrgyzstan,2012,5.208,8.357,0.856,62.440,0.703,-0.084,0.892,0.580,0.182 +Kyrgyzstan,2013,5.402,8.441,0.851,62.860,0.755,-0.090,0.900,0.595,0.135 +Kyrgyzstan,2014,5.252,8.460,0.898,63.280,0.736,0.350,0.897,0.617,0.185 +Kyrgyzstan,2015,4.905,8.477,0.857,63.700,0.813,0.194,0.858,0.658,0.173 +Kyrgyzstan,2016,4.857,8.500,0.914,64.225,0.814,0.051,0.917,0.668,0.126 +Kyrgyzstan,2017,5.630,8.526,0.883,64.750,0.859,0.138,0.874,0.640,0.160 +Kyrgyzstan,2018,5.297,8.543,0.898,65.275,0.945,0.262,0.907,0.617,0.203 +Kyrgyzstan,2019,5.685,8.568,0.877,65.800,0.920,-0.008,0.885,0.625,0.207 +Kyrgyzstan,2020,6.250,8.461,0.902,66.325,0.935,0.101,0.931,0.672,0.258 +Kyrgyzstan,2021,5.564,8.504,0.904,66.850,0.918,0.199,0.903,0.660,0.226 +Kyrgyzstan,2022,5.668,8.555,0.927,67.375,0.948,0.230,0.876,0.646,0.204 +Kyrgyzstan,2023,5.910,8.573,0.946,67.900,0.943,0.145,0.899,0.681,0.165 +Laos,2006,5.076,8.234,0.807,55.880,0.925,0.435,0.688,0.790,0.163 +Laos,2007,5.364,8.291,0.790,56.260,0.867,0.474,0.580,0.752,0.136 +Laos,2008,5.044,8.351,0.807,56.640,0.886,0.412,0.637,0.728,0.202 +Laos,2011,4.704,8.538,0.691,57.780,0.882,0.454,0.587,0.746,0.225 +Laos,2012,4.876,8.601,0.693,58.160,,0.227,,0.741,0.387 +Laos,2017,4.623,8.883,0.707,59.900,0.891,0.068,0.592,0.712,0.344 +Laos,2018,4.859,8.929,0.705,60.200,0.907,0.136,0.634,0.711,0.332 +Laos,2019,5.197,8.967,0.729,60.500,0.906,0.055,0.620,0.718,0.306 +Laos,2020,5.284,8.957,0.660,60.800,0.915,0.136,0.748,0.714,0.358 +Laos,2021,4.927,8.968,0.650,61.100,0.927,0.037,0.668,0.702,0.292 +Laos,2022,4.962,8.981,0.659,61.400,0.891,0.091,0.706,0.675,0.334 +Laos,2023,5.486,9.005,0.678,61.700,0.904,0.099,0.724,0.679,0.335 +Latvia,2006,4.710,10.042,0.884,63.100,0.641,-0.236,0.937,0.590,0.234 +Latvia,2007,4.667,10.145,0.836,63.400,0.700,-0.173,0.924,0.594,0.247 +Latvia,2008,5.145,10.123,0.855,63.700,0.630,-0.210,0.926,0.633,0.215 +Latvia,2009,4.669,9.985,0.807,64.000,0.437,-0.187,0.942,0.537,0.242 +Latvia,2011,4.967,10.004,0.836,64.600,0.564,-0.006,0.934,0.563,0.222 +Latvia,2012,5.125,10.085,0.851,64.900,0.564,-0.044,0.895,0.588,0.232 +Latvia,2013,5.070,10.115,0.834,65.200,0.631,-0.079,0.837,0.605,0.227 +Latvia,2014,5.729,10.143,0.881,65.500,0.671,-0.049,0.804,0.605,0.226 +Latvia,2015,5.881,10.190,0.879,65.800,0.656,-0.084,0.808,0.559,0.228 +Latvia,2016,5.940,10.222,0.917,65.900,0.685,-0.163,0.868,0.583,0.231 +Latvia,2017,5.978,10.264,0.895,66.000,0.700,-0.161,0.798,0.565,0.232 +Latvia,2018,5.901,10.311,0.913,66.100,0.608,-0.218,0.799,0.521,0.192 +Latvia,2019,5.970,10.343,0.936,66.200,0.698,-0.200,0.789,0.537,0.212 +Latvia,2020,6.229,10.328,0.928,66.300,0.820,-0.086,0.809,0.674,0.202 +Latvia,2021,6.353,10.376,0.954,66.400,0.815,-0.104,0.840,0.716,0.186 +Latvia,2022,6.055,10.396,0.928,66.500,0.817,0.018,0.844,0.632,0.161 +Latvia,2023,6.296,10.408,0.932,66.600,0.816,0.059,0.800,0.671,0.257 +Lebanon,2005,5.491,9.571,0.796,65.100,0.703,,0.945,0.558,0.292 +Lebanon,2006,4.653,9.570,0.853,65.160,0.670,0.064,0.902,0.501,0.320 +Lebanon,2008,4.595,9.711,0.717,65.280,0.524,0.031,0.927,0.475,0.365 +Lebanon,2009,5.206,9.796,0.736,65.340,0.665,0.067,0.937,0.472,0.401 +Lebanon,2010,5.032,9.864,0.721,65.400,0.678,0.068,0.949,0.457,0.341 +Lebanon,2011,5.188,9.862,0.733,65.460,0.657,-0.002,0.911,0.506,0.320 +Lebanon,2012,4.573,9.862,0.713,65.520,0.621,-0.016,0.856,0.442,0.339 +Lebanon,2013,4.983,9.807,0.708,65.580,0.655,-0.012,0.921,0.446,0.409 +Lebanon,2014,5.233,9.732,0.759,65.640,0.657,-0.017,0.939,0.525,0.267 +Lebanon,2015,5.172,9.717,0.742,65.700,0.597,0.066,0.889,0.524,0.243 +Lebanon,2016,5.271,9.754,0.828,65.775,0.657,0.021,0.853,0.513,0.263 +Lebanon,2017,5.154,9.787,0.777,65.850,0.605,-0.088,0.911,0.469,0.244 +Lebanon,2018,5.167,9.795,0.829,65.925,0.607,-0.081,0.907,0.415,0.271 +Lebanon,2019,4.024,9.752,0.866,66.000,0.447,-0.098,0.890,0.308,0.494 +Lebanon,2020,2.634,9.532,0.547,66.075,0.552,-0.139,0.884,0.352,0.482 +Lebanon,2021,2.179,9.472,0.507,66.150,0.423,-0.164,0.905,0.263,0.569 +Lebanon,2022,2.352,9.458,0.535,66.225,0.450,-0.130,0.883,0.298,0.430 +Lebanon,2023,3.588,9.471,0.686,66.300,0.499,-0.102,0.895,0.373,0.385 +Lesotho,2011,4.898,7.785,0.824,41.520,0.618,-0.093,0.768,0.754,0.170 +Lesotho,2016,3.808,7.897,0.798,42.250,0.729,-0.100,0.743,0.685,0.270 +Lesotho,2017,3.795,7.852,0.769,42.900,0.757,-0.144,0.797,0.706,0.255 +Lesotho,2019,3.512,7.805,0.790,44.200,0.716,-0.127,0.915,0.707,0.273 +Lesotho,2022,3.186,7.733,0.680,46.150,0.709,-0.102,0.815,0.709,0.288 +Liberia,2007,3.701,7.179,0.594,51.860,0.790,0.111,0.776,0.600,0.435 +Liberia,2008,4.221,7.207,0.619,51.940,0.724,-0.038,0.840,0.629,0.261 +Liberia,2010,4.196,7.257,0.827,52.100,0.819,-0.043,0.818,0.549,0.217 +Liberia,2014,4.571,7.386,0.708,52.420,0.590,-0.035,0.869,0.565,0.443 +Liberia,2015,2.702,7.366,0.638,52.500,0.671,-0.067,0.903,0.519,0.388 +Liberia,2016,3.355,7.330,0.643,53.100,0.763,0.028,0.901,0.625,0.509 +Liberia,2017,4.424,7.335,0.685,53.700,0.733,-0.018,0.867,0.674,0.391 +Liberia,2018,4.135,7.328,0.727,54.300,0.766,0.044,0.868,0.664,0.436 +Liberia,2019,5.121,7.283,0.712,54.900,0.706,0.044,0.828,0.645,0.389 +Liberia,2022,4.042,7.287,0.597,56.700,0.732,0.150,0.828,0.637,0.439 +Liberia,2023,4.494,7.309,0.630,57.300,0.720,0.039,0.834,0.608,0.428 +Libya,2012,5.754,10.380,0.855,65.140,0.712,-0.076,0.791,0.633,0.316 +Libya,2015,5.615,9.858,0.868,64.300,0.775,-0.089,,0.652,0.369 +Libya,2016,5.434,9.828,0.876,64.525,0.822,-0.135,,0.645,0.383 +Libya,2017,5.647,10.095,0.823,64.750,0.779,-0.068,0.673,0.643,0.379 +Libya,2018,5.494,10.156,0.824,64.975,0.781,-0.146,0.646,0.635,0.399 +Libya,2019,5.330,10.023,0.827,65.200,0.762,-0.107,0.686,0.629,0.401 +Libya,2022,5.760,9.893,0.813,65.875,0.761,-0.043,0.668,0.627,0.399 +Libya,2023,5.970,,0.748,66.100,0.762,,0.644,0.585,0.372 +Lithuania,2006,5.954,10.042,0.930,63.500,0.567,-0.301,0.967,0.567,0.254 +Lithuania,2007,5.808,10.160,0.941,63.700,0.590,-0.287,0.966,0.523,0.279 +Lithuania,2008,5.554,10.196,0.914,63.900,0.621,-0.265,0.961,0.501,0.276 +Lithuania,2009,5.467,10.046,0.933,64.100,0.496,-0.309,0.979,0.525,0.271 +Lithuania,2010,5.066,10.083,0.882,64.300,0.519,-0.281,0.962,0.463,0.272 +Lithuania,2011,5.432,10.165,0.911,64.500,0.566,-0.154,0.964,0.556,0.275 +Lithuania,2012,5.771,10.216,0.919,64.700,0.503,-0.279,0.957,0.557,0.277 +Lithuania,2013,5.596,10.261,0.913,64.900,0.556,-0.242,0.936,0.540,0.294 +Lithuania,2014,6.126,10.304,0.908,65.100,0.508,-0.269,0.956,0.565,0.287 +Lithuania,2015,5.711,10.334,0.929,65.300,0.641,-0.259,0.924,0.534,0.276 +Lithuania,2016,5.866,10.371,0.938,65.650,0.614,-0.272,0.949,0.553,0.250 +Lithuania,2017,6.273,10.427,0.926,66.000,0.749,-0.179,0.790,0.590,0.195 +Lithuania,2018,6.309,10.476,0.929,66.350,0.699,-0.243,0.852,0.518,0.214 +Lithuania,2019,6.064,10.524,0.918,66.700,0.780,-0.258,0.783,0.568,0.276 +Lithuania,2020,6.391,10.523,0.953,67.050,0.824,-0.129,0.829,0.626,0.202 +Lithuania,2021,6.865,10.579,0.928,67.400,0.707,-0.121,0.878,0.667,0.191 +Lithuania,2022,7.038,10.586,0.937,67.750,0.710,-0.192,0.685,0.471,0.132 +Lithuania,2023,6.553,10.575,0.881,68.100,0.734,-0.232,0.751,0.493,0.201 +Luxembourg,2009,6.958,11.628,0.939,70.300,0.939,0.116,0.432,0.713,0.238 +Luxembourg,2010,7.097,11.647,0.952,70.500,0.908,0.086,0.423,0.718,0.216 +Luxembourg,2011,7.101,11.635,0.934,70.700,0.962,0.097,0.388,0.744,0.200 +Luxembourg,2012,6.964,11.627,0.914,70.900,0.917,0.048,0.403,0.726,0.227 +Luxembourg,2013,7.131,11.636,0.917,71.100,0.790,-0.065,0.301,0.601,0.185 +Luxembourg,2014,6.891,11.638,0.875,71.300,0.938,0.097,0.366,0.760,0.170 +Luxembourg,2015,6.702,11.637,0.934,71.500,0.932,0.044,0.375,0.728,0.193 +Luxembourg,2016,6.967,11.664,0.941,71.525,0.882,0.011,0.356,0.706,0.192 +Luxembourg,2017,7.061,11.653,0.905,71.550,0.903,0.036,0.330,0.726,0.184 +Luxembourg,2018,7.243,11.645,0.902,71.575,0.884,-0.028,0.385,0.715,0.202 +Luxembourg,2019,7.404,11.649,0.912,71.600,0.930,-0.051,0.390,0.742,0.212 +Luxembourg,2022,7.228,11.657,0.878,71.675,0.915,0.023,0.345,0.718,0.218 +Luxembourg,2023,7.016,11.649,0.879,71.700,0.911,0.033,0.343,0.751,0.194 +Madagascar,2006,3.980,7.351,0.711,54.140,,-0.042,,0.563,0.161 +Madagascar,2008,4.640,7.413,0.776,54.620,0.332,-0.103,0.773,0.583,0.215 +Madagascar,2011,4.381,7.309,0.818,55.340,0.546,-0.065,0.897,0.516,0.235 +Madagascar,2012,3.551,7.311,0.673,55.580,0.487,-0.058,0.854,0.588,0.194 +Madagascar,2013,3.816,7.307,0.673,55.820,0.480,-0.022,0.868,0.600,0.241 +Madagascar,2014,3.676,7.314,0.655,56.060,0.529,-0.026,0.791,0.641,0.192 +Madagascar,2015,3.593,7.319,0.647,56.300,0.545,-0.044,0.861,0.674,0.226 +Madagascar,2016,3.663,7.332,0.746,56.550,0.570,-0.072,0.864,0.670,0.204 +Madagascar,2017,4.079,7.345,0.626,56.800,0.570,-0.037,0.847,0.701,0.375 +Madagascar,2018,4.071,7.351,0.666,57.050,0.551,0.000,0.889,0.723,0.362 +Madagascar,2019,4.339,7.369,0.701,57.300,0.550,-0.015,0.720,0.699,0.304 +Madagascar,2022,4.019,7.315,0.642,58.050,0.523,0.070,0.740,0.687,0.345 +Madagascar,2023,4.433,7.333,0.692,58.300,0.504,0.096,0.784,0.718,0.389 +Malawi,2006,3.830,7.015,0.554,45.360,0.767,0.171,0.676,0.609,0.222 +Malawi,2007,4.891,7.078,0.600,46.420,0.910,0.173,0.691,0.691,0.176 +Malawi,2009,5.148,7.174,0.718,48.540,0.879,0.147,0.689,0.694,0.130 +Malawi,2011,3.946,7.231,0.613,50.660,0.733,0.070,0.853,0.620,0.268 +Malawi,2012,4.279,7.221,0.604,51.720,0.637,0.140,0.886,0.717,0.200 +Malawi,2013,4.035,7.246,0.563,52.780,0.752,0.049,0.857,0.699,0.248 +Malawi,2014,4.563,7.273,0.512,53.840,0.786,0.032,0.824,0.653,0.263 +Malawi,2015,3.868,7.273,0.494,54.900,0.801,0.029,0.835,0.602,0.260 +Malawi,2016,3.476,7.270,0.524,55.450,0.810,0.037,0.824,0.584,0.325 +Malawi,2017,3.417,7.283,0.555,56.000,0.848,-0.004,0.735,0.592,0.312 +Malawi,2018,3.335,7.299,0.528,56.550,0.799,0.043,0.766,0.548,0.365 +Malawi,2019,3.869,7.325,0.549,57.100,0.765,-0.027,0.680,0.517,0.348 +Malawi,2021,3.635,7.307,0.558,58.200,0.757,-0.014,0.740,0.551,0.326 +Malawi,2022,3.356,7.291,0.503,58.750,0.744,0.017,0.755,0.536,0.329 +Malawi,2023,3.272,7.279,0.470,59.300,0.738,0.014,0.745,0.520,0.338 +Malaysia,2006,6.012,9.827,0.866,65.080,0.837,0.196,0.740,0.687,0.243 +Malaysia,2007,6.239,9.867,0.871,65.160,0.844,0.085,0.799,0.719,0.162 +Malaysia,2008,5.807,9.893,0.803,65.240,0.780,0.040,0.884,0.728,0.186 +Malaysia,2009,5.385,9.858,0.792,65.320,0.874,-0.013,0.858,0.740,0.164 +Malaysia,2010,5.580,9.912,0.839,65.400,0.769,0.028,0.844,0.752,0.192 +Malaysia,2011,5.786,9.948,0.770,65.480,0.840,-0.021,0.842,0.785,0.155 +Malaysia,2012,5.914,9.985,0.841,65.560,0.848,0.013,0.847,0.744,0.177 +Malaysia,2013,5.770,10.015,0.831,65.640,0.791,0.260,0.755,0.664,0.317 +Malaysia,2014,5.963,10.057,0.863,65.720,0.808,0.235,0.845,0.711,0.261 +Malaysia,2015,6.322,10.092,0.818,65.800,0.675,0.218,0.838,0.733,0.314 +Malaysia,2018,5.339,10.197,0.789,65.725,0.875,0.123,0.894,0.716,0.200 +Malaysia,2019,5.428,10.228,0.842,65.700,0.916,0.119,0.782,0.735,0.176 +Malaysia,2020,6.014,10.159,0.797,65.675,0.878,0.096,0.747,0.721,0.288 +Malaysia,2021,6.010,10.179,0.794,65.650,0.878,0.218,0.769,0.728,0.183 +Malaysia,2022,6.048,10.251,0.815,65.625,0.957,0.208,0.789,0.767,0.191 +Malaysia,2023,5.868,10.283,0.779,65.600,0.965,0.154,0.754,0.761,0.195 +Maldives,2018,5.198,9.893,0.913,69.775,0.855,0.013,,, +Mali,2006,4.014,7.561,0.761,49.940,0.555,-0.075,0.761,0.748,0.209 +Mali,2008,4.115,7.576,0.747,50.620,0.495,-0.015,0.918,0.717,0.164 +Mali,2009,3.977,7.591,0.733,50.960,0.634,0.005,0.819,0.729,0.150 +Mali,2010,3.762,7.610,0.751,51.300,0.749,-0.031,0.811,0.764,0.162 +Mali,2011,4.667,7.609,0.796,51.640,0.823,-0.103,0.726,0.752,0.132 +Mali,2012,4.313,7.572,0.823,51.980,0.704,-0.091,0.787,0.647,0.109 +Mali,2013,3.676,7.565,0.820,52.320,0.665,-0.056,0.755,0.717,0.193 +Mali,2014,3.975,7.602,0.843,52.660,0.652,-0.040,0.658,0.722,0.186 +Mali,2015,4.582,7.631,0.830,53.000,0.634,-0.070,0.800,0.696,0.243 +Mali,2016,4.016,7.655,0.836,53.400,0.696,-0.072,0.862,0.738,0.305 +Mali,2017,4.742,7.675,0.741,53.800,0.753,-0.072,0.863,0.665,0.393 +Mali,2018,4.416,7.690,0.692,54.200,0.737,-0.036,0.793,0.689,0.370 +Mali,2019,4.988,7.705,0.755,54.600,0.670,-0.040,0.846,0.646,0.358 +Mali,2020,4.269,7.661,0.568,55.000,0.645,-0.069,0.895,0.648,0.440 +Mali,2021,4.113,7.659,0.573,55.400,0.673,-0.004,0.902,0.640,0.438 +Mali,2022,4.211,7.665,0.642,55.800,0.818,-0.024,0.746,0.655,0.408 +Mali,2023,4.370,7.673,0.641,56.200,0.776,-0.043,0.790,0.660,0.324 +Malta,2009,6.328,10.353,0.916,70.220,0.803,0.456,,0.626,0.358 +Malta,2010,5.774,10.402,0.908,70.400,0.802,0.278,,0.624,0.375 +Malta,2011,6.155,10.402,0.923,70.580,0.882,0.288,,0.638,0.340 +Malta,2012,5.963,10.433,0.922,70.760,0.861,0.343,,0.639,0.391 +Malta,2013,6.380,10.473,0.942,70.940,0.909,0.400,,0.629,0.370 +Malta,2014,6.452,10.526,0.941,71.120,0.904,0.395,0.670,0.606,0.352 +Malta,2015,6.613,10.594,0.919,71.300,0.912,0.339,0.664,0.641,0.355 +Malta,2016,6.591,10.604,0.930,71.350,0.916,0.339,0.696,0.645,0.355 +Malta,2017,6.676,10.681,0.937,71.400,0.924,0.244,0.690,0.666,0.302 +Malta,2018,6.910,10.705,0.932,71.450,0.927,0.170,0.595,0.666,0.296 +Malta,2019,6.733,10.734,0.922,71.500,0.924,0.077,0.689,0.642,0.356 +Malta,2020,6.157,10.622,0.938,71.550,0.931,-0.005,0.675,0.576,0.411 +Malta,2021,6.444,10.727,0.897,71.600,0.889,0.239,0.753,0.635,0.375 +Malta,2022,6.299,10.784,0.932,71.650,0.838,0.246,0.758,0.671,0.370 +Malta,2023,6.295,,0.912,71.700,0.851,,0.780,0.644,0.361 +Mauritania,2007,4.149,8.528,0.682,56.500,0.573,-0.077,0.586,0.732,0.174 +Mauritania,2008,4.248,8.500,0.670,56.800,0.593,-0.023,0.841,0.747,0.176 +Mauritania,2009,4.500,8.474,0.819,57.100,0.735,0.034,0.848,0.717,0.170 +Mauritania,2010,4.772,8.471,0.857,57.400,0.669,0.050,0.727,0.737,0.129 +Mauritania,2011,4.785,8.482,0.750,57.700,0.567,0.047,0.747,0.729,0.175 +Mauritania,2012,4.673,8.494,0.763,58.000,0.487,-0.026,0.707,0.749,0.164 +Mauritania,2013,4.199,8.506,0.741,58.300,0.603,-0.084,0.676,0.743,0.196 +Mauritania,2014,4.483,8.521,0.853,58.600,0.468,-0.060,0.589,0.743,0.163 +Mauritania,2015,3.923,8.547,0.875,58.900,0.447,0.050,0.715,0.798,0.194 +Mauritania,2016,4.472,8.533,0.785,59.125,0.467,-0.181,0.842,0.710,0.222 +Mauritania,2017,4.678,8.568,0.779,59.350,0.527,-0.161,0.777,0.631,0.272 +Mauritania,2018,4.314,8.588,0.802,59.575,0.467,-0.121,0.711,0.665,0.276 +Mauritania,2019,4.153,8.614,0.798,59.800,0.628,-0.111,0.743,0.686,0.260 +Mauritania,2022,4.724,8.602,0.648,60.475,0.624,-0.016,0.657,0.631,0.389 +Mauritania,2023,4.292,8.620,0.606,60.700,0.540,0.018,0.669,0.708,0.329 +Mauritius,2011,5.477,9.797,0.800,63.520,0.848,0.184,0.847,0.653,0.253 +Mauritius,2014,5.648,9.895,0.785,63.880,0.824,0.168,0.879,0.741,0.222 +Mauritius,2016,5.610,9.968,0.836,63.975,0.819,0.131,0.891,0.706,0.246 +Mauritius,2017,6.174,10.005,0.910,63.950,0.912,0.079,0.818,0.682,0.169 +Mauritius,2018,5.882,10.044,0.909,63.925,0.867,-0.081,0.785,0.710,0.158 +Mauritius,2019,6.241,10.072,0.913,63.900,0.893,-0.061,0.810,0.735,0.149 +Mauritius,2020,6.015,9.914,0.893,63.875,0.843,-0.038,0.772,0.700,0.138 +Mauritius,2021,5.949,9.948,0.887,63.850,0.802,-0.013,0.784,0.666,0.136 +Mauritius,2022,5.741,10.034,0.887,63.825,0.798,-0.042,0.769,0.725,0.168 +Mauritius,2023,5.759,10.083,0.868,63.800,0.797,-0.002,0.769,0.664,0.160 +Mexico,2005,6.581,9.792,0.903,64.400,0.814,,0.764,0.763,0.219 +Mexico,2007,6.525,9.831,0.879,64.680,0.670,-0.101,0.747,0.754,0.248 +Mexico,2008,6.829,9.830,0.876,64.820,0.677,-0.134,0.785,0.774,0.201 +Mexico,2009,6.963,9.764,0.868,64.960,0.682,-0.082,0.764,0.763,0.196 +Mexico,2010,6.802,9.800,0.876,65.100,0.778,-0.055,0.693,0.745,0.215 +Mexico,2011,6.910,9.822,0.824,65.240,0.831,-0.106,0.698,0.700,0.228 +Mexico,2012,7.320,9.844,0.767,65.380,0.788,-0.099,0.633,0.722,0.278 +Mexico,2013,7.443,9.844,0.759,65.520,0.739,-0.171,0.615,0.750,0.223 +Mexico,2014,6.680,9.860,0.782,65.660,0.779,-0.101,0.630,0.760,0.229 +Mexico,2015,6.236,9.880,0.761,65.800,0.719,-0.158,0.708,0.706,0.237 +Mexico,2016,6.824,9.895,0.893,65.800,0.752,-0.160,0.809,0.802,0.220 +Mexico,2017,6.410,9.905,0.800,65.800,0.861,-0.208,0.801,0.775,0.231 +Mexico,2018,6.550,9.917,0.858,65.800,0.816,-0.186,0.809,0.815,0.213 +Mexico,2019,6.432,9.907,0.852,65.800,0.903,-0.148,0.809,0.803,0.252 +Mexico,2020,5.964,9.816,0.779,65.800,0.873,-0.128,0.778,0.745,0.292 +Mexico,2021,5.991,9.857,0.779,65.800,0.837,-0.037,0.745,0.750,0.305 +Mexico,2022,7.038,9.881,0.858,65.800,0.861,-0.123,0.780,0.818,0.205 +Mexico,2023,7.006,9.900,0.868,65.800,0.870,-0.124,0.756,0.809,0.233 +Moldova,2006,5.102,8.922,0.812,59.480,0.554,-0.169,0.926,0.553,0.255 +Moldova,2007,4.775,8.954,0.804,59.860,0.696,-0.190,0.930,0.519,0.306 +Moldova,2008,5.503,9.031,0.872,60.240,0.641,-0.060,0.926,0.565,0.284 +Moldova,2009,5.554,8.970,0.856,60.620,0.551,-0.103,0.925,0.539,0.306 +Moldova,2010,5.590,9.040,0.847,61.000,0.598,-0.093,0.929,0.564,0.278 +Moldova,2011,5.792,9.097,0.869,61.380,0.628,-0.086,0.957,0.553,0.285 +Moldova,2012,5.996,9.091,0.826,61.760,0.602,-0.054,0.955,0.564,0.314 +Moldova,2013,5.756,9.178,0.803,62.140,0.658,-0.073,0.941,0.548,0.261 +Moldova,2014,5.917,9.227,0.805,62.520,0.623,-0.118,0.925,0.547,0.260 +Moldova,2015,6.017,9.232,0.840,62.900,0.595,-0.094,0.943,0.556,0.281 +Moldova,2016,5.578,9.289,0.837,63.300,0.557,-0.052,0.969,0.586,0.275 +Moldova,2017,5.326,9.347,0.831,63.700,0.553,-0.057,0.926,0.563,0.259 +Moldova,2018,5.682,9.404,0.892,64.100,0.824,-0.089,0.929,0.584,0.270 +Moldova,2019,5.803,9.455,0.809,64.500,0.784,-0.097,0.884,0.600,0.262 +Moldova,2020,5.812,9.380,0.874,64.900,0.859,-0.058,0.941,0.698,0.268 +Moldova,2021,5.959,9.518,0.880,65.300,0.833,-0.096,0.875,0.630,0.270 +Moldova,2022,5.687,9.465,0.817,65.700,0.829,-0.084,0.885,0.552,0.276 +Moldova,2023,5.801,9.492,0.842,66.100,0.844,-0.157,0.860,0.578,0.251 +Mongolia,2007,4.609,8.827,0.881,56.540,0.781,0.059,0.918,0.483,0.203 +Mongolia,2008,4.493,8.902,0.920,56.960,0.484,0.062,0.962,0.514,0.173 +Mongolia,2010,4.586,8.925,0.904,57.800,0.631,0.093,0.928,0.559,0.150 +Mongolia,2011,5.031,9.069,0.948,58.220,0.700,0.145,0.931,0.561,0.153 +Mongolia,2012,4.885,9.168,0.919,58.640,0.688,0.100,0.932,0.524,0.181 +Mongolia,2013,4.913,9.260,0.935,59.060,0.748,0.130,0.928,0.549,0.179 +Mongolia,2014,4.825,9.315,0.943,59.480,0.752,0.140,0.909,0.512,0.170 +Mongolia,2015,4.983,9.318,0.906,59.900,0.686,0.167,0.900,0.533,0.208 +Mongolia,2016,5.057,9.311,0.947,60.000,0.760,0.083,0.900,0.555,0.171 +Mongolia,2017,5.334,9.344,0.924,60.100,0.675,0.112,0.865,0.552,0.214 +Mongolia,2018,5.465,9.397,0.942,60.200,0.696,0.048,0.849,0.525,0.192 +Mongolia,2019,5.563,9.430,0.946,60.300,0.711,0.142,0.873,0.562,0.167 +Mongolia,2020,6.011,9.365,0.918,60.400,0.718,0.138,0.843,0.575,0.260 +Mongolia,2021,5.721,9.365,0.927,60.500,0.667,0.215,0.851,0.560,0.202 +Mongolia,2022,5.788,9.397,0.951,60.600,0.717,0.211,0.847,0.550,0.209 +Mongolia,2023,5.580,9.433,0.938,60.700,0.699,0.220,0.871,0.545,0.197 +Montenegro,2007,5.196,9.696,0.832,65.960,0.512,-0.139,0.815,0.536,0.340 +Montenegro,2009,4.801,9.702,0.816,66.120,0.556,-0.107,0.838,0.533,0.423 +Montenegro,2010,5.455,9.727,0.805,66.200,0.552,-0.212,0.757,0.510,0.410 +Montenegro,2011,5.223,9.758,0.818,66.280,0.546,-0.232,0.762,0.510,0.378 +Montenegro,2012,5.219,9.729,0.704,66.360,0.462,-0.198,0.755,0.468,0.379 +Montenegro,2013,5.074,9.763,0.736,66.440,0.502,-0.182,0.693,0.493,0.331 +Montenegro,2014,5.283,9.780,0.863,66.520,0.503,0.091,0.768,0.545,0.368 +Montenegro,2015,5.125,9.813,0.740,66.600,0.583,-0.150,0.781,0.534,0.337 +Montenegro,2016,5.304,9.842,0.866,66.700,0.569,-0.093,0.849,0.547,0.337 +Montenegro,2017,5.615,9.887,0.881,66.800,0.626,-0.089,0.756,0.493,0.350 +Montenegro,2018,5.650,9.937,0.856,66.900,0.626,-0.057,0.769,0.527,0.355 +Montenegro,2019,5.386,9.977,0.832,67.000,0.694,-0.111,0.820,0.547,0.366 +Montenegro,2020,5.722,9.812,0.887,67.100,0.802,0.061,0.845,0.560,0.411 +Montenegro,2022,5.600,10.002,0.875,67.300,0.778,-0.022,0.802,0.485,0.317 +Montenegro,2023,5.813,10.041,0.853,67.400,0.799,-0.066,0.706,0.481,0.318 +Morocco,2010,4.383,8.821,,62.500,0.663,-0.173,0.900,, +Morocco,2011,5.085,8.861,0.833,62.660,0.579,-0.229,0.875,0.687,0.187 +Morocco,2012,4.970,8.877,0.676,62.820,0.757,-0.198,0.845,0.641,0.281 +Morocco,2013,5.142,8.904,0.597,62.980,0.572,-0.221,0.771,0.707,0.239 +Morocco,2015,5.163,8.947,0.606,63.300,0.713,-0.239,0.842,0.596,0.262 +Morocco,2016,5.386,8.940,0.655,63.400,0.817,-0.248,0.717,0.658,0.205 +Morocco,2017,5.312,8.977,0.641,63.500,0.814,-0.227,0.841,0.501,0.323 +Morocco,2018,4.897,8.996,0.554,63.600,0.773,-0.246,0.843,0.575,0.416 +Morocco,2019,5.057,9.014,0.535,63.700,0.757,-0.256,0.757,0.535,0.410 +Morocco,2020,4.803,8.929,0.553,63.800,0.819,-0.238,0.803,0.548,0.256 +Morocco,2021,5.326,8.994,0.505,63.900,0.762,-0.204,0.817,0.554,0.341 +Morocco,2022,4.596,8.995,0.564,64.000,0.795,-0.257,0.802,0.573,0.414 +Morocco,2023,4.487,9.009,0.500,64.100,0.821,-0.094,0.831,0.549,0.415 +Mozambique,2006,4.595,6.792,0.879,44.820,0.684,0.035,0.758,0.602,0.327 +Mozambique,2007,4.833,6.840,0.748,45.240,0.643,0.068,0.854,0.627,0.240 +Mozambique,2008,4.654,6.885,0.756,45.660,0.514,0.000,0.864,0.611,0.280 +Mozambique,2011,4.971,6.996,0.818,46.920,0.639,-0.030,0.719,0.565,0.243 +Mozambique,2015,4.550,7.148,0.666,48.600,0.813,0.083,0.632,0.560,0.340 +Mozambique,2017,4.280,7.160,0.678,49.500,0.823,-0.035,0.682,0.642,0.353 +Mozambique,2018,4.654,7.165,0.738,49.950,0.897,0.043,0.691,0.620,0.397 +Mozambique,2019,4.932,7.159,0.742,50.400,0.870,0.068,0.682,0.588,0.384 +Mozambique,2021,5.178,7.112,0.664,51.300,0.838,0.042,0.627,0.576,0.383 +Mozambique,2022,4.740,7.125,0.711,51.750,0.884,0.043,0.688,0.629,0.351 +Mozambique,2023,5.704,7.147,0.701,52.200,0.867,0.071,0.678,0.625,0.335 +Myanmar,2012,4.439,8.067,0.612,58.160,0.691,0.646,0.695,0.574,0.205 +Myanmar,2013,4.176,8.134,0.757,58.640,0.775,0.691,0.638,0.675,0.217 +Myanmar,2014,4.786,8.205,0.774,59.120,0.870,0.700,0.592,0.713,0.112 +Myanmar,2015,4.224,8.229,0.752,59.600,0.808,0.692,0.633,0.729,0.272 +Myanmar,2016,4.623,8.321,0.793,59.925,0.877,0.680,0.607,0.671,0.302 +Myanmar,2017,4.154,8.369,0.795,60.250,0.886,0.651,0.619,0.617,0.282 +Myanmar,2018,4.411,8.424,0.774,60.575,0.906,0.492,0.647,0.640,0.300 +Myanmar,2019,4.434,8.483,0.763,60.900,0.899,0.560,0.682,0.638,0.286 +Myanmar,2020,4.431,8.507,0.796,61.225,0.825,0.468,0.647,0.700,0.289 +Myanmar,2021,4.314,8.302,0.780,61.550,0.631,0.508,0.671,0.636,0.268 +Myanmar,2022,4.359,8.325,0.746,61.875,0.646,0.600,0.729,0.669,0.353 +Myanmar,2023,4.391,8.347,0.685,62.200,0.695,0.548,0.686,0.634,0.358 +Namibia,2007,4.886,9.073,0.828,51.880,0.781,-0.107,0.839,0.769,0.160 +Namibia,2014,4.574,9.264,0.763,54.260,0.849,-0.191,0.790,0.723,0.239 +Namibia,2017,4.441,9.243,0.828,55.350,0.810,-0.198,0.831,0.697,0.277 +Namibia,2018,4.834,9.237,0.864,55.725,0.754,-0.177,0.846,0.696,0.240 +Namibia,2019,4.436,9.211,0.845,56.100,0.739,-0.182,0.879,0.644,0.256 +Namibia,2020,4.451,9.110,0.741,56.475,0.666,-0.110,0.810,0.652,0.248 +Namibia,2021,4.491,9.128,0.808,56.850,0.659,-0.153,0.829,0.644,0.230 +Namibia,2022,4.949,9.158,0.808,57.225,0.683,-0.124,0.849,0.676,0.261 +Namibia,2023,5.055,9.167,0.852,57.600,0.674,-0.113,0.873,0.635,0.208 +Nepal,2006,4.567,7.734,0.874,59.660,0.689,,0.897,0.583,0.171 +Nepal,2007,4.748,7.761,0.787,59.720,0.413,0.303,0.891,0.502,0.152 +Nepal,2008,4.441,7.814,0.818,59.780,0.618,0.276,0.900,0.589,0.153 +Nepal,2009,4.917,7.853,0.813,59.840,0.616,0.029,0.950,0.484,0.215 +Nepal,2010,4.350,7.895,0.779,59.900,0.519,0.077,0.911,0.538,0.226 +Nepal,2011,3.809,7.924,0.741,59.960,0.525,-0.024,0.935,0.530,0.207 +Nepal,2012,4.233,7.968,0.734,60.020,0.638,0.056,0.883,0.538,0.231 +Nepal,2013,4.605,8.000,0.740,60.080,0.722,0.137,0.877,0.496,0.279 +Nepal,2014,4.975,8.056,0.786,60.140,0.712,0.108,0.841,0.492,0.287 +Nepal,2015,4.812,8.089,0.748,60.200,0.763,0.214,0.824,0.444,0.358 +Nepal,2016,5.100,8.085,0.837,60.475,0.839,0.155,0.817,0.523,0.370 +Nepal,2017,4.737,8.159,0.816,60.750,0.845,0.120,0.770,0.463,0.376 +Nepal,2018,4.910,8.221,0.768,61.025,0.770,0.107,0.742,0.457,0.387 +Nepal,2019,5.449,8.274,0.772,61.300,0.790,0.152,0.712,0.444,0.357 +Nepal,2020,5.982,8.233,0.787,61.575,0.772,0.135,0.812,0.480,0.337 +Nepal,2021,4.622,8.257,0.699,61.850,0.818,0.144,0.770,0.414,0.354 +Nepal,2022,5.474,8.294,0.753,62.125,0.844,0.149,0.760,0.473,0.342 +Nepal,2023,5.389,8.318,0.749,62.400,0.765,0.184,0.792,0.461,0.350 +Netherlands,2005,7.464,10.809,0.947,70.700,0.901,,0.571,0.701,0.233 +Netherlands,2007,7.452,10.876,0.944,70.780,0.896,0.339,0.445,0.718,0.213 +Netherlands,2008,7.631,10.894,0.944,70.820,0.883,0.359,0.419,0.679,0.182 +Netherlands,2010,7.502,10.860,0.957,70.900,0.921,0.344,0.399,0.745,0.206 +Netherlands,2011,7.564,10.870,0.938,70.940,0.925,0.330,0.359,0.770,0.181 +Netherlands,2012,7.471,10.856,0.939,70.980,0.877,0.282,0.434,0.753,0.226 +Netherlands,2013,7.407,10.852,0.925,71.020,0.919,0.299,0.505,0.765,0.235 +Netherlands,2014,7.321,10.863,0.909,71.060,0.910,0.326,0.457,0.776,0.221 +Netherlands,2015,7.324,10.878,0.879,71.100,0.904,0.256,0.412,0.742,0.202 +Netherlands,2016,7.541,10.894,0.926,71.175,0.907,0.233,0.433,0.737,0.215 +Netherlands,2017,7.459,10.917,0.937,71.250,0.920,0.245,0.363,0.729,0.185 +Netherlands,2018,7.463,10.934,0.939,71.325,0.920,0.156,0.371,0.748,0.205 +Netherlands,2019,7.425,10.947,0.941,71.400,0.886,0.207,0.360,0.728,0.231 +Netherlands,2020,7.504,10.902,0.944,71.475,0.935,0.145,0.281,0.691,0.247 +Netherlands,2021,7.314,10.944,0.919,71.550,0.856,0.266,0.397,0.714,0.201 +Netherlands,2022,7.390,10.978,0.929,71.625,0.868,0.223,0.459,0.711,0.198 +Netherlands,2023,7.255,10.977,0.915,71.700,0.847,0.223,0.424,0.693,0.202 +New Zealand,2006,7.305,10.541,0.946,69.720,0.932,0.304,0.224,0.825,0.219 +New Zealand,2007,7.604,10.562,0.967,69.740,0.878,0.272,0.295,0.803,0.238 +New Zealand,2008,7.381,10.541,0.944,69.760,0.893,0.291,0.334,0.784,0.232 +New Zealand,2010,7.224,10.534,0.976,69.800,0.918,0.247,0.321,0.783,0.235 +New Zealand,2011,7.191,10.548,0.954,69.820,0.935,0.278,0.269,0.784,0.210 +New Zealand,2012,7.250,10.565,0.930,69.840,0.902,0.280,0.289,0.786,0.207 +New Zealand,2013,7.280,10.585,0.958,69.860,0.944,0.230,0.312,0.778,0.151 +New Zealand,2014,7.306,10.605,0.942,69.880,0.932,0.341,0.273,0.807,0.199 +New Zealand,2015,7.418,10.622,0.987,69.900,0.942,0.322,0.186,0.795,0.160 +New Zealand,2016,7.226,10.637,0.937,69.975,0.927,0.259,0.278,0.777,0.207 +New Zealand,2017,7.327,10.650,0.955,70.050,0.942,0.287,0.222,0.763,0.172 +New Zealand,2018,7.370,10.667,0.954,70.125,0.949,0.113,0.207,0.785,0.168 +New Zealand,2019,7.205,10.675,0.939,70.200,0.912,0.150,0.234,0.765,0.191 +New Zealand,2020,7.257,10.647,0.952,70.275,0.918,0.116,0.283,0.796,0.209 +New Zealand,2021,7.137,10.693,0.950,70.350,0.910,0.216,0.252,0.747,0.206 +New Zealand,2022,6.975,10.712,0.956,70.425,0.831,0.183,0.281,0.706,0.210 +New Zealand,2023,6.976,10.720,0.933,70.500,0.877,0.181,0.304,0.738,0.229 +Nicaragua,2006,4.460,8.395,0.877,64.300,0.745,0.005,0.844,0.780,0.294 +Nicaragua,2007,4.944,8.431,0.866,64.400,0.836,0.135,0.826,0.787,0.287 +Nicaragua,2008,5.104,8.450,0.857,64.500,0.791,0.070,0.819,0.770,0.289 +Nicaragua,2009,5.353,8.402,0.835,64.600,0.746,0.065,0.794,0.740,0.299 +Nicaragua,2010,5.687,8.431,0.863,64.700,0.792,0.013,0.802,0.749,0.268 +Nicaragua,2011,5.386,8.478,0.800,64.800,0.779,-0.024,0.760,0.747,0.309 +Nicaragua,2012,5.448,8.526,0.894,64.900,0.850,0.012,0.644,0.762,0.255 +Nicaragua,2013,5.772,8.559,0.868,65.000,0.859,0.034,0.636,0.800,0.271 +Nicaragua,2014,6.275,8.591,0.839,65.100,0.817,0.099,0.699,0.782,0.334 +Nicaragua,2015,5.924,8.624,0.827,65.200,0.809,0.073,0.728,0.771,0.346 +Nicaragua,2016,6.013,8.654,0.853,65.275,0.717,0.035,0.731,0.787,0.380 +Nicaragua,2017,6.476,8.685,0.838,65.350,0.922,0.006,0.673,0.793,0.308 +Nicaragua,2018,5.819,8.637,0.854,65.425,0.797,0.004,0.713,0.743,0.408 +Nicaragua,2019,6.113,8.594,0.874,65.500,0.883,0.024,0.622,0.790,0.337 +Nicaragua,2020,6.287,8.562,0.856,65.575,0.818,0.037,0.631,0.775,0.316 +Nicaragua,2021,6.095,8.647,0.848,65.650,0.905,0.020,0.675,0.799,0.293 +Nicaragua,2022,6.392,8.669,0.844,65.725,0.914,-0.004,0.570,0.787,0.339 +Nicaragua,2023,6.362,8.685,0.836,65.800,0.906,-0.008,0.532,0.772,0.340 +Niger,2006,3.737,6.872,0.677,50.140,0.750,0.073,0.755,0.746,0.179 +Niger,2007,4.277,6.867,0.726,50.580,0.584,-0.060,0.748,0.723,0.158 +Niger,2008,4.236,6.905,0.607,51.020,0.649,-0.059,0.749,0.689,0.194 +Niger,2009,4.267,6.887,0.771,51.460,0.880,-0.013,0.483,0.714,0.115 +Niger,2010,4.101,6.932,0.655,51.900,0.817,-0.027,0.529,0.715,0.126 +Niger,2011,4.556,6.918,0.818,52.340,0.780,-0.060,0.549,0.710,0.166 +Niger,2012,3.798,6.980,0.700,52.780,0.734,-0.068,0.777,0.582,0.142 +Niger,2013,3.716,6.994,0.696,53.220,0.825,-0.082,0.711,0.639,0.208 +Niger,2014,4.181,7.020,0.753,53.660,0.688,-0.051,0.605,0.629,0.205 +Niger,2015,3.671,7.025,0.713,54.100,0.728,-0.037,0.703,0.665,0.218 +Niger,2016,4.235,7.042,0.683,54.450,0.702,-0.020,0.814,0.646,0.325 +Niger,2017,4.616,7.053,0.582,54.800,0.684,-0.035,0.778,0.699,0.427 +Niger,2018,5.164,7.084,0.612,55.150,0.791,0.004,0.637,0.759,0.503 +Niger,2019,5.004,7.105,0.677,55.500,0.831,0.021,0.729,0.794,0.304 +Niger,2022,4.501,7.151,0.587,56.550,0.793,0.024,0.740,0.787,0.366 +Niger,2023,4.609,7.181,0.638,56.900,0.767,0.029,,0.747,0.417 +Nigeria,2006,4.710,8.314,0.735,50.220,0.649,0.080,0.871,0.772,0.178 +Nigeria,2007,4.890,8.350,0.718,50.540,0.635,0.132,0.918,0.815,0.141 +Nigeria,2008,4.939,8.389,0.780,50.860,0.584,0.115,0.892,0.755,0.244 +Nigeria,2009,4.980,8.439,0.722,51.180,0.537,0.063,0.913,0.730,0.225 +Nigeria,2010,4.760,8.488,0.824,51.500,0.565,0.062,0.911,0.759,0.190 +Nigeria,2012,5.493,8.526,0.818,52.140,0.652,0.062,0.900,0.782,0.209 +Nigeria,2013,4.818,8.564,0.663,52.460,0.622,0.046,0.905,0.652,0.286 +Nigeria,2015,4.933,8.600,0.812,53.100,0.680,-0.040,0.926,0.715,0.251 +Nigeria,2016,5.220,8.558,0.805,53.425,0.798,0.039,0.905,0.745,0.252 +Nigeria,2017,5.322,8.541,0.733,53.750,0.826,0.120,0.835,0.682,0.236 +Nigeria,2018,5.252,8.535,0.741,54.075,0.790,-0.015,0.866,0.762,0.256 +Nigeria,2019,4.266,8.532,0.735,54.400,0.746,0.019,0.873,0.698,0.229 +Nigeria,2020,5.503,8.490,0.739,54.725,0.713,0.094,0.913,0.737,0.316 +Nigeria,2021,4.479,8.502,0.742,55.050,0.726,0.047,0.912,0.666,0.188 +Nigeria,2022,5.294,8.510,0.785,55.375,0.776,0.172,0.935,0.760,0.253 +Nigeria,2023,4.869,8.514,0.781,55.700,0.720,0.209,0.877,0.721,0.266 +North Macedonia,2007,4.494,9.434,0.811,64.660,0.439,0.073,0.870,0.558,0.251 +North Macedonia,2009,4.428,9.481,0.734,64.820,0.552,-0.049,0.844,0.488,0.370 +North Macedonia,2010,4.180,9.512,0.687,64.900,0.513,-0.065,0.856,0.473,0.314 +North Macedonia,2011,4.898,9.533,0.784,64.980,0.607,-0.094,0.865,0.503,0.363 +North Macedonia,2012,4.640,9.527,0.798,65.060,0.613,-0.091,0.920,0.551,0.422 +North Macedonia,2013,5.186,9.555,0.832,65.140,0.641,0.018,0.861,0.521,0.331 +North Macedonia,2014,5.204,9.589,0.793,65.220,0.645,0.028,0.861,0.583,0.307 +North Macedonia,2015,4.976,9.625,0.766,65.300,0.660,-0.053,0.824,0.551,0.299 +North Macedonia,2016,5.346,9.652,0.871,65.500,0.706,0.073,0.870,0.587,0.292 +North Macedonia,2017,5.234,9.662,0.800,65.700,0.752,-0.065,0.856,0.447,0.299 +North Macedonia,2018,5.240,9.689,0.849,65.900,0.745,-0.048,0.910,0.512,0.298 +North Macedonia,2019,5.015,9.728,0.815,66.100,0.725,0.018,0.923,0.515,0.304 +North Macedonia,2020,5.054,9.666,0.750,66.300,0.787,0.127,0.877,0.542,0.365 +North Macedonia,2021,5.535,9.724,0.809,66.500,0.793,0.188,0.884,0.563,0.303 +North Macedonia,2022,5.167,9.749,0.850,66.700,0.723,0.068,0.937,0.555,0.277 +North Macedonia,2023,5.403,9.776,0.883,66.900,0.738,0.123,0.917,0.517,0.272 +Norway,2006,7.416,11.056,0.959,69.400,0.960,0.101,0.397,0.767,0.197 +Norway,2008,7.632,11.066,0.936,69.800,0.947,0.010,0.503,0.763,0.155 +Norway,2012,7.678,11.041,0.948,70.600,0.947,0.139,0.368,0.798,0.213 +Norway,2014,7.444,11.048,0.941,71.000,0.956,0.173,0.405,0.802,0.194 +Norway,2015,7.603,11.057,0.947,71.200,0.948,0.249,0.299,0.796,0.209 +Norway,2016,7.596,11.060,0.960,71.250,0.954,0.125,0.410,0.809,0.209 +Norway,2017,7.579,11.076,0.950,71.300,0.953,0.228,0.250,0.800,0.203 +Norway,2018,7.444,11.077,0.966,71.350,0.960,0.086,0.268,0.786,0.212 +Norway,2019,7.442,11.082,0.942,71.400,0.954,0.103,0.271,0.782,0.195 +Norway,2020,7.290,11.063,0.956,71.450,0.965,0.068,0.271,0.777,0.216 +Norway,2021,7.362,11.096,0.948,71.500,0.936,0.166,0.263,0.769,0.207 +Norway,2022,7.295,11.119,0.927,71.550,0.939,0.182,0.314,0.759,0.211 +Norway,2023,7.249,11.125,0.952,71.600,0.938,0.219,0.245,0.756,0.228 +Oman,2011,6.853,10.539,,62.340,0.916,0.008,,,0.295 +Pakistan,2005,5.225,8.252,0.591,53.200,0.630,,0.844,,0.237 +Pakistan,2007,5.671,8.314,0.479,53.720,0.396,0.081,0.794,0.583,0.310 +Pakistan,2008,4.414,8.309,0.373,53.980,0.335,0.092,0.848,0.533,0.321 +Pakistan,2009,5.208,8.315,0.522,54.240,0.388,0.069,0.874,0.516,0.349 +Pakistan,2010,5.786,8.308,0.571,54.500,0.364,0.292,0.852,0.527,0.372 +Pakistan,2011,5.267,8.314,0.510,54.760,0.376,0.022,0.857,0.473,0.358 +Pakistan,2012,5.132,8.331,0.542,55.020,0.367,0.157,0.842,0.510,0.332 +Pakistan,2013,5.138,8.359,0.607,55.280,0.448,0.091,0.792,0.474,0.274 +Pakistan,2014,5.436,8.390,0.552,55.540,0.543,0.131,0.677,0.475,0.295 +Pakistan,2015,4.823,8.423,0.562,55.800,0.587,0.076,0.717,0.469,0.329 +Pakistan,2016,5.549,8.465,0.627,56.075,0.634,0.084,0.793,0.503,0.332 +Pakistan,2017,5.831,8.495,0.690,56.350,0.713,0.035,0.714,0.489,0.308 +Pakistan,2018,5.472,8.540,0.685,56.625,0.773,0.058,0.799,0.470,0.377 +Pakistan,2019,4.443,8.548,0.617,56.900,0.685,0.112,0.776,0.489,0.424 +Pakistan,2020,4.624,8.518,0.594,57.175,0.767,0.003,0.833,0.470,0.376 +Pakistan,2021,4.487,8.563,0.608,57.450,0.764,0.007,0.743,0.518,0.307 +Pakistan,2022,4.931,8.604,0.590,57.725,0.745,0.000,0.865,0.469,0.368 +Pakistan,2023,4.549,8.588,0.553,58.000,0.661,0.070,0.889,0.504,0.417 +Panama,2006,6.128,9.806,0.951,66.860,0.882,-0.056,0.912,0.826,0.232 +Panama,2007,6.894,9.901,0.937,67.020,0.640,0.074,0.915,0.789,0.149 +Panama,2008,6.931,9.977,0.922,67.180,0.707,0.051,0.881,0.776,0.150 +Panama,2009,7.034,9.971,0.905,67.340,0.721,0.006,0.889,0.839,0.144 +Panama,2010,7.321,10.010,0.928,67.500,0.755,-0.017,0.880,0.841,0.146 +Panama,2011,7.248,10.099,0.876,67.660,0.829,0.000,0.840,0.853,0.180 +Panama,2012,6.860,10.174,0.897,67.820,0.783,-0.011,0.796,0.838,0.207 +Panama,2013,6.866,10.224,0.896,67.980,0.811,0.010,0.814,0.860,0.226 +Panama,2014,6.631,10.256,0.873,68.140,0.894,-0.007,0.847,0.799,0.254 +Panama,2015,6.606,10.294,0.883,68.300,0.847,-0.016,0.810,0.777,0.264 +Panama,2016,6.118,10.325,0.882,68.400,0.884,-0.111,0.837,0.813,0.244 +Panama,2017,6.568,10.362,0.912,68.500,0.900,-0.178,0.841,0.795,0.242 +Panama,2018,6.281,10.382,0.904,68.600,0.861,-0.139,0.837,0.841,0.223 +Panama,2019,6.086,10.398,0.886,68.700,0.883,-0.208,0.869,0.841,0.244 +Panama,2021,6.553,10.323,0.899,68.900,0.811,-0.152,0.861,0.834,0.218 +Panama,2022,5.979,10.412,0.891,69.000,0.899,-0.128,0.887,0.821,0.259 +Panama,2023,6.543,10.455,0.887,69.100,0.852,-0.147,0.871,0.829,0.257 +Paraguay,2006,4.730,9.154,0.895,64.880,0.691,0.056,0.841,0.752,0.303 +Paraguay,2007,5.272,9.197,0.863,64.960,0.699,0.121,0.930,0.812,0.219 +Paraguay,2008,5.570,9.250,0.889,65.040,0.649,0.046,0.891,0.798,0.259 +Paraguay,2009,5.576,9.237,0.900,65.120,0.718,0.016,0.857,0.803,0.186 +Paraguay,2010,5.841,9.331,0.889,65.200,0.726,0.065,0.780,0.826,0.176 +Paraguay,2011,5.677,9.360,0.869,65.280,0.666,0.179,0.756,0.823,0.190 +Paraguay,2012,5.820,9.339,0.931,65.360,0.748,0.188,0.774,0.849,0.213 +Paraguay,2013,5.936,9.405,0.939,65.440,0.909,0.034,0.903,0.874,0.224 +Paraguay,2014,5.119,9.443,0.959,65.520,0.759,-0.013,0.762,0.876,0.216 +Paraguay,2015,5.560,9.458,0.914,65.600,0.806,-0.019,0.863,0.832,0.219 +Paraguay,2016,5.801,9.485,0.940,65.650,0.854,-0.082,0.756,0.833,0.197 +Paraguay,2017,5.713,9.518,0.902,65.700,0.891,-0.008,0.810,0.820,0.232 +Paraguay,2019,5.653,9.519,0.892,65.800,0.876,0.017,0.882,0.790,0.275 +Paraguay,2020,5.501,9.497,0.907,65.850,0.865,0.054,0.829,0.767,0.269 +Paraguay,2021,5.576,9.523,0.908,65.900,0.888,0.015,0.857,0.806,0.248 +Paraguay,2022,6.138,9.513,0.899,65.950,0.922,-0.014,0.839,0.821,0.238 +Paraguay,2023,6.214,9.549,0.889,66.000,0.902,-0.004,0.835,0.833,0.240 +Peru,2006,4.811,8.979,0.875,66.460,0.668,-0.076,0.895,0.675,0.420 +Peru,2007,5.214,9.054,0.756,66.720,0.638,-0.082,0.931,0.730,0.361 +Peru,2008,5.129,9.134,0.777,66.980,0.638,-0.072,0.896,0.701,0.354 +Peru,2009,5.519,9.138,0.799,67.240,0.638,-0.084,0.880,0.758,0.320 +Peru,2010,5.613,9.210,0.812,67.500,0.757,-0.066,0.881,0.744,0.330 +Peru,2011,5.892,9.263,0.756,67.760,0.773,-0.128,0.824,0.742,0.331 +Peru,2012,5.825,9.313,0.764,68.020,0.703,-0.084,0.867,0.705,0.398 +Peru,2013,5.783,9.361,0.797,68.280,0.703,-0.071,0.870,0.741,0.390 +Peru,2014,5.866,9.374,0.819,68.540,0.722,-0.141,0.878,0.743,0.319 +Peru,2015,5.577,9.394,0.798,68.800,0.802,-0.095,0.884,0.744,0.378 +Peru,2016,5.701,9.419,0.803,68.975,0.830,-0.139,0.866,0.791,0.338 +Peru,2017,5.711,9.429,0.830,69.150,0.827,-0.160,0.895,0.768,0.394 +Peru,2018,5.680,9.449,0.845,69.325,0.830,-0.184,0.906,0.783,0.380 +Peru,2019,5.999,9.452,0.809,69.500,0.815,-0.135,0.874,0.794,0.375 +Peru,2020,4.994,9.323,0.749,69.675,0.806,-0.094,0.912,0.736,0.481 +Peru,2021,5.694,9.436,0.819,69.850,0.812,-0.090,0.880,0.784,0.369 +Peru,2022,5.892,9.453,0.823,70.025,0.764,-0.180,0.884,0.755,0.378 +Peru,2023,5.936,9.459,0.787,70.200,0.757,-0.061,0.919,0.765,0.370 +Philippines,2006,4.670,8.562,0.795,61.360,0.828,0.058,0.841,0.756, +Philippines,2007,5.074,8.606,0.801,61.420,0.852,-0.027,0.880,0.736,0.378 +Philippines,2008,4.589,8.630,0.798,61.480,0.861,0.078,0.817,0.774,0.384 +Philippines,2009,4.880,8.626,0.775,61.540,0.874,-0.001,0.805,0.791,0.311 +Philippines,2010,4.942,8.679,0.805,61.600,0.893,0.028,0.812,0.829,0.294 +Philippines,2011,4.994,8.699,0.789,61.660,0.883,0.068,0.783,0.808,0.358 +Philippines,2012,5.002,8.748,0.813,61.720,0.914,0.048,0.771,0.811,0.351 +Philippines,2013,4.977,8.796,0.846,61.780,0.907,0.016,0.756,0.796,0.332 +Philippines,2014,5.313,8.842,0.813,61.840,0.902,-0.020,0.787,0.787,0.334 +Philippines,2015,5.547,8.887,0.854,61.900,0.912,-0.056,0.755,0.796,0.351 +Philippines,2016,5.431,8.938,0.821,61.925,0.908,-0.076,0.792,0.807,0.290 +Philippines,2017,5.594,8.987,0.851,61.950,0.926,-0.146,0.711,0.753,0.341 +Philippines,2018,5.869,9.032,0.846,61.975,0.918,-0.112,0.726,0.756,0.393 +Philippines,2019,6.268,9.075,0.845,62.000,0.910,-0.087,0.748,0.765,0.341 +Philippines,2020,5.080,8.958,0.781,62.025,0.932,-0.114,0.744,0.793,0.327 +Philippines,2021,5.965,8.999,0.778,62.050,0.905,-0.012,0.721,0.790,0.323 +Philippines,2022,5.995,9.057,0.819,62.075,0.952,-0.155,0.757,0.833,0.301 +Philippines,2023,6.184,9.102,0.796,62.100,0.932,-0.038,0.768,0.800,0.324 +Poland,2005,5.587,9.844,0.922,66.200,0.782,,0.983,0.611,0.282 +Poland,2007,5.886,9.973,0.913,66.560,0.772,-0.053,0.925,0.665,0.238 +Poland,2009,5.772,10.041,0.917,66.920,0.821,0.068,0.898,0.649,0.246 +Poland,2010,5.887,10.073,0.955,67.100,0.795,-0.003,0.905,0.686,0.234 +Poland,2011,5.646,10.122,0.905,67.280,0.868,-0.072,0.908,0.659,0.224 +Poland,2012,5.876,10.137,0.936,67.460,0.811,-0.032,0.888,0.711,0.267 +Poland,2013,5.746,10.146,0.912,67.640,0.776,-0.142,0.916,0.675,0.242 +Poland,2014,5.750,10.184,0.924,67.820,0.875,-0.069,0.898,0.681,0.223 +Poland,2015,6.007,10.228,0.893,68.000,0.793,-0.098,0.810,0.631,0.240 +Poland,2016,6.162,10.258,0.917,68.175,0.871,-0.096,0.848,0.666,0.224 +Poland,2017,6.201,10.308,0.882,68.350,0.831,-0.127,0.639,0.566,0.203 +Poland,2018,6.111,10.365,0.863,68.525,0.870,-0.260,0.720,0.622,0.176 +Poland,2019,6.242,10.409,0.878,68.700,0.883,-0.237,0.696,0.613,0.168 +Poland,2020,6.139,10.390,0.953,68.875,0.767,-0.014,0.787,0.677,0.329 +Poland,2021,5.978,10.461,0.936,69.050,0.732,0.122,0.744,0.700,0.277 +Poland,2022,6.666,10.513,0.886,69.225,0.800,-0.209,0.667,0.594,0.140 +Poland,2023,6.685,10.527,0.890,69.400,0.775,-0.232,0.662,0.556,0.155 +Portugal,2006,5.405,10.359,0.905,68.340,0.882,-0.184,0.880,0.647,0.333 +Portugal,2008,5.717,10.383,0.886,68.820,0.646,-0.223,0.933,0.667,0.309 +Portugal,2010,5.095,10.367,0.864,69.300,0.721,-0.112,0.948,0.681,0.265 +Portugal,2011,5.220,10.352,0.856,69.540,0.875,-0.179,0.962,0.671,0.279 +Portugal,2012,4.994,10.314,0.866,69.780,0.774,-0.103,0.959,0.631,0.370 +Portugal,2013,5.158,10.310,0.867,70.020,0.788,-0.124,0.946,0.665,0.348 +Portugal,2014,5.127,10.324,0.862,70.260,0.847,-0.132,0.941,0.663,0.358 +Portugal,2015,5.081,10.346,0.866,70.500,0.800,-0.169,0.941,0.629,0.371 +Portugal,2016,5.447,10.369,0.905,70.625,0.838,-0.231,0.922,0.659,0.326 +Portugal,2017,5.711,10.406,0.900,70.750,0.905,-0.182,0.881,0.608,0.294 +Portugal,2018,5.920,10.435,0.887,70.875,0.877,-0.267,0.880,0.646,0.318 +Portugal,2019,6.095,10.462,0.876,71.000,0.882,-0.240,0.915,0.675,0.300 +Portugal,2020,5.768,10.374,0.875,71.125,0.913,-0.244,0.867,0.614,0.383 +Portugal,2021,6.183,10.425,0.895,71.250,0.892,-0.211,0.872,0.629,0.284 +Portugal,2022,5.953,10.484,0.862,71.375,0.903,-0.139,0.893,0.638,0.316 +Portugal,2023,5.954,10.504,0.895,71.500,0.847,-0.176,0.889,0.661,0.309 +Qatar,2009,6.418,11.434,0.894,64.360,0.865,0.230,0.184,0.673,0.258 +Qatar,2010,6.850,11.551,,64.700,,0.095,,, +Qatar,2011,6.592,11.625,0.857,65.040,0.905,0.000,,0.661,0.328 +Qatar,2012,6.611,11.617,0.838,65.380,0.924,0.149,,0.683,0.322 +Qatar,2015,6.375,11.532,,66.400,,,,, +Romania,2005,5.049,9.733,0.838,64.500,0.800,,0.957,0.576,0.346 +Romania,2007,5.394,9.901,0.736,64.860,0.686,-0.194,0.949,0.575,0.277 +Romania,2009,5.368,9.958,0.812,65.220,0.606,-0.203,0.967,0.545,0.270 +Romania,2010,4.909,9.924,0.689,65.400,0.566,-0.091,0.974,0.539,0.344 +Romania,2011,5.023,9.973,0.753,65.580,0.650,-0.148,0.964,0.501,0.294 +Romania,2012,5.167,9.997,0.740,65.760,0.645,-0.120,0.959,0.520,0.343 +Romania,2013,5.082,10.003,0.778,65.940,0.655,-0.135,0.952,0.541,0.329 +Romania,2014,5.727,10.047,0.753,66.120,0.754,-0.107,0.958,0.565,0.331 +Romania,2015,5.777,10.083,0.787,66.300,0.796,-0.147,0.962,0.627,0.312 +Romania,2016,5.969,10.117,0.809,66.425,0.822,-0.120,0.949,0.607,0.258 +Romania,2017,6.090,10.201,0.811,66.550,0.839,-0.165,0.926,0.632,0.231 +Romania,2018,6.151,10.266,0.818,66.675,0.845,-0.224,0.921,0.649,0.298 +Romania,2019,6.130,10.309,0.842,66.800,0.848,-0.228,0.954,0.605,0.244 +Romania,2020,6.785,10.277,0.869,66.925,0.863,-0.161,0.918,0.668,0.256 +Romania,2021,6.549,10.341,0.835,67.050,0.871,-0.187,0.928,0.674,0.264 +Romania,2022,6.437,10.396,0.830,67.175,0.836,-0.173,0.941,0.615,0.258 +Romania,2023,6.489,10.431,0.826,67.300,0.849,-0.202,0.905,0.628,0.271 +Russia,2006,4.964,9.988,0.895,58.740,0.643,-0.312,0.935,0.534,0.232 +Russia,2007,5.223,10.071,0.885,59.180,0.593,-0.289,0.933,0.546,0.193 +Russia,2008,5.619,10.122,0.882,59.620,0.643,-0.311,0.924,0.570,0.166 +Russia,2009,5.158,10.041,0.908,60.060,0.617,-0.289,0.954,0.540,0.169 +Russia,2010,5.385,10.084,0.909,60.500,0.613,-0.302,0.937,0.567,0.171 +Russia,2011,5.389,10.126,0.883,60.940,0.626,-0.284,0.935,0.564,0.165 +Russia,2012,5.621,10.163,0.901,61.380,0.609,-0.298,0.938,0.563,0.174 +Russia,2013,5.537,10.179,0.881,61.820,0.661,-0.295,0.934,0.592,0.180 +Russia,2014,6.037,10.168,0.932,62.260,0.744,-0.270,0.869,0.617,0.151 +Russia,2015,5.996,10.146,0.924,62.700,0.685,-0.177,0.913,0.609,0.130 +Russia,2016,5.855,10.146,0.911,63.075,0.714,-0.187,0.925,0.587,0.142 +Russia,2017,5.579,10.163,0.896,63.450,0.731,-0.151,0.862,0.651,0.195 +Russia,2018,5.514,10.191,0.909,63.825,0.729,-0.153,0.865,0.615,0.199 +Russia,2019,5.441,10.213,0.910,64.200,0.715,-0.122,0.848,0.632,0.200 +Russia,2020,5.495,10.188,0.887,64.575,0.714,-0.078,0.823,0.621,0.190 +Russia,2021,5.448,10.247,0.862,64.950,0.671,0.053,0.808,0.590,0.190 +Russia,2022,6.044,10.225,0.920,65.325,0.776,-0.074,0.767,0.614,0.211 +Russia,2023,5.865,10.209,0.854,65.700,0.750,0.056,0.733,0.616,0.190 +Rwanda,2006,4.215,7.087,0.718,53.500,0.915,,0.299,0.701,0.189 +Rwanda,2008,4.363,7.213,0.486,54.700,0.752,0.014,0.286,0.633,0.221 +Rwanda,2009,4.030,7.247,0.559,55.300,0.766,-0.004,0.410,0.658,0.112 +Rwanda,2011,4.097,7.343,0.570,56.500,0.829,-0.042,0.161,0.608,0.154 +Rwanda,2012,3.333,7.401,0.637,57.100,0.835,-0.015,0.081,0.624,0.132 +Rwanda,2013,3.466,7.423,0.750,57.700,0.904,-0.031,0.117,0.728,0.167 +Rwanda,2014,3.596,7.459,0.748,58.300,0.894,-0.026,0.078,0.748,0.134 +Rwanda,2015,3.483,7.520,0.678,58.900,0.908,0.022,0.095,0.692,0.206 +Rwanda,2016,3.333,7.554,0.665,59.225,0.911,0.022,0.159,0.715,0.285 +Rwanda,2017,3.108,7.568,0.517,59.550,0.908,0.048,0.214,0.724,0.358 +Rwanda,2018,3.561,7.625,0.616,59.875,0.924,0.053,0.164,0.765,0.308 +Rwanda,2019,3.268,7.692,0.489,60.200,0.869,0.060,0.168,0.717,0.418 +Saudi Arabia,2005,7.080,10.679,0.868,61.200,,,0.505,0.681,0.243 +Saudi Arabia,2007,7.267,10.646,0.892,61.600,0.622,0.002,,0.718,0.232 +Saudi Arabia,2008,6.811,10.668,0.823,61.800,0.532,-0.024,0.508,0.607,0.202 +Saudi Arabia,2009,6.148,10.610,0.921,62.000,0.639,-0.111,0.445,0.683,0.319 +Saudi Arabia,2010,6.307,10.627,0.880,62.200,0.678,-0.034,,0.645,0.297 +Saudi Arabia,2011,6.700,10.706,0.830,62.400,0.603,-0.144,,0.699,0.240 +Saudi Arabia,2012,6.396,10.737,0.867,62.600,0.560,-0.123,,0.692,0.225 +Saudi Arabia,2013,6.495,10.744,0.827,62.800,0.661,-0.085,,0.691,0.276 +Saudi Arabia,2014,6.278,10.763,0.818,63.000,0.762,-0.077,,0.663,0.313 +Saudi Arabia,2015,6.345,10.790,0.820,63.200,0.820,-0.050,,0.668,0.327 +Saudi Arabia,2016,6.474,10.793,0.890,63.400,0.774,-0.138,,0.725,0.266 +Saudi Arabia,2017,6.294,10.770,0.840,63.600,0.814,-0.138,,0.703,0.306 +Saudi Arabia,2018,6.356,10.773,0.868,63.800,0.855,-0.198,,0.696,0.288 +Saudi Arabia,2019,6.561,10.758,0.912,64.000,0.891,-0.153,,0.674,0.238 +Saudi Arabia,2020,6.560,10.709,0.890,64.200,0.884,-0.117,,0.702,0.251 +Saudi Arabia,2021,6.445,10.749,0.859,64.400,0.902,-0.108,,0.728,0.228 +Saudi Arabia,2022,6.382,10.820,0.900,64.600,,-0.032,,0.677,0.205 +Saudi Arabia,2023,6.953,10.829,0.884,64.800,,0.028,,0.737,0.240 +Senegal,2006,4.417,7.930,0.760,55.500,0.736,-0.059,0.805,0.687,0.225 +Senegal,2007,4.680,7.931,0.718,55.800,0.698,-0.009,0.827,0.718,0.199 +Senegal,2008,4.683,7.941,0.756,56.100,0.612,-0.037,0.879,0.669,0.252 +Senegal,2009,4.335,7.942,0.810,56.400,0.557,-0.044,0.918,0.708,0.228 +Senegal,2010,4.372,7.948,0.760,56.700,0.777,-0.085,0.851,0.670,0.143 +Senegal,2011,3.834,7.934,0.602,57.000,0.641,-0.168,0.870,0.696,0.180 +Senegal,2012,3.669,7.946,0.711,57.300,0.668,-0.042,0.852,0.722,0.214 +Senegal,2013,3.647,7.943,0.823,57.600,0.636,-0.058,0.837,0.694,0.165 +Senegal,2014,4.395,7.976,0.856,57.900,0.692,-0.052,0.700,0.696,0.157 +Senegal,2015,4.617,8.010,0.702,58.200,0.720,-0.117,0.765,0.710,0.208 +Senegal,2016,4.595,8.045,0.839,58.500,0.744,-0.092,0.794,0.781,0.245 +Senegal,2017,4.683,8.089,0.744,58.800,0.687,-0.050,0.825,0.751,0.291 +Senegal,2018,4.769,8.122,0.739,59.100,0.629,-0.080,0.805,0.724,0.247 +Senegal,2019,5.489,8.140,0.688,59.400,0.759,-0.025,0.796,0.768,0.332 +Senegal,2020,4.757,8.127,0.621,59.700,0.797,-0.052,0.855,0.816,0.268 +Senegal,2021,4.903,8.164,0.645,60.000,0.759,0.026,0.821,0.812,0.265 +Senegal,2022,4.907,8.179,0.609,60.300,0.758,0.049,0.854,0.813,0.287 +Senegal,2023,5.093,8.200,0.668,60.600,0.798,0.048,0.836,0.825,0.258 +Serbia,2007,4.750,9.536,0.844,65.280,0.453,-0.171,0.905,0.528,0.334 +Serbia,2009,4.380,9.571,0.770,65.560,0.373,-0.184,0.961,0.466,0.435 +Serbia,2010,4.461,9.583,0.726,65.700,0.463,-0.176,0.965,0.446,0.415 +Serbia,2011,4.815,9.611,0.773,65.840,0.440,-0.191,0.977,0.458,0.410 +Serbia,2012,5.155,9.609,0.819,65.980,0.461,-0.136,0.952,0.447,0.371 +Serbia,2013,5.102,9.642,0.828,66.120,0.533,-0.106,0.908,0.505,0.403 +Serbia,2014,5.113,9.631,0.783,66.260,0.532,0.066,0.912,0.473,0.326 +Serbia,2015,5.318,9.654,0.816,66.400,0.546,-0.068,0.859,0.472,0.303 +Serbia,2016,5.753,9.692,0.895,66.525,0.614,-0.074,0.890,0.492,0.298 +Serbia,2017,5.122,9.718,0.884,66.650,0.685,-0.084,0.851,0.485,0.326 +Serbia,2018,5.936,9.767,0.853,66.775,0.740,-0.106,0.864,0.527,0.296 +Serbia,2019,6.241,9.815,0.903,66.900,0.753,-0.046,0.813,0.474,0.242 +Serbia,2020,6.042,9.813,0.852,67.025,0.843,0.142,0.824,0.579,0.358 +Serbia,2021,6.245,9.895,0.890,67.150,0.850,0.261,0.806,0.568,0.311 +Serbia,2022,6.546,9.928,0.896,67.275,0.782,0.074,0.801,0.514,0.275 +Serbia,2023,6.441,9.961,0.895,67.400,0.807,0.085,0.782,0.526,0.206 +Sierra Leone,2006,3.628,7.122,0.561,46.280,0.679,0.097,0.836,0.535,0.381 +Sierra Leone,2007,3.585,7.177,0.686,46.660,0.720,0.243,0.830,0.635,0.290 +Sierra Leone,2008,2.997,7.205,0.591,47.040,0.716,0.144,0.925,0.588,0.370 +Sierra Leone,2010,4.134,7.245,0.812,47.800,0.726,0.008,0.910,0.497,0.290 +Sierra Leone,2011,4.502,7.277,0.782,48.180,0.770,0.001,0.855,0.495,0.300 +Sierra Leone,2013,4.514,7.557,0.708,48.940,0.720,-0.075,0.856,0.540,0.423 +Sierra Leone,2014,4.500,7.577,0.869,49.320,0.681,0.030,0.786,0.622,0.334 +Sierra Leone,2015,4.909,7.324,0.611,49.700,0.624,0.047,0.825,0.626,0.414 +Sierra Leone,2016,4.733,7.361,0.657,50.500,0.681,0.103,0.863,0.616,0.456 +Sierra Leone,2017,4.090,7.374,0.652,51.300,0.711,0.076,0.848,0.607,0.495 +Sierra Leone,2018,4.306,7.384,0.650,52.100,0.716,0.093,0.856,0.533,0.466 +Sierra Leone,2019,3.447,7.412,0.611,52.900,0.718,0.072,0.874,0.521,0.438 +Sierra Leone,2021,3.714,7.387,0.609,54.500,0.659,0.106,0.851,0.538,0.448 +Sierra Leone,2022,2.560,7.400,0.502,55.300,0.660,0.097,0.862,0.494,0.505 +Sierra Leone,2023,3.467,7.412,0.601,56.100,0.694,0.101,0.866,0.504,0.430 +Singapore,2006,6.463,11.168,0.904,71.580,0.757,0.132,,0.689,0.267 +Singapore,2007,6.834,11.213,0.921,71.760,0.867,0.287,0.064,0.588,0.114 +Singapore,2008,6.642,11.178,0.845,71.940,0.661,0.040,0.066,0.627,0.256 +Singapore,2009,6.145,11.149,0.866,72.120,0.776,-0.081,0.035,0.450,0.208 +Singapore,2010,6.531,11.267,0.864,72.300,0.846,-0.024,0.060,0.527,0.131 +Singapore,2011,6.561,11.306,0.904,72.480,0.822,-0.155,0.099,0.404,0.144 +Singapore,2013,6.533,11.356,0.808,72.840,0.827,0.109,0.242,0.663,0.148 +Singapore,2014,7.062,11.382,0.822,73.020,0.835,0.148,0.133,0.774,0.180 +Singapore,2015,6.620,11.399,0.866,73.200,0.887,0.144,0.099,0.736,0.142 +Singapore,2016,6.033,11.422,0.925,73.300,0.904,0.137,0.047,0.745,0.111 +Singapore,2017,6.378,11.465,0.897,73.400,0.926,0.129,0.162,0.750,0.179 +Singapore,2018,6.375,11.496,0.903,73.500,0.916,-0.073,0.097,0.731,0.107 +Singapore,2019,6.378,11.497,0.925,73.600,0.938,0.020,0.070,0.674,0.138 +Singapore,2021,6.587,11.587,0.876,73.800,0.879,0.060,0.145,0.697,0.160 +Singapore,2022,6.333,11.590,0.852,73.900,0.873,0.088,,0.688,0.209 +Singapore,2023,6.654,,0.916,74.000,0.861,,0.153,0.667,0.190 +Slovakia,2006,5.265,9.989,0.954,65.620,0.542,-0.054,0.946,0.586,0.308 +Slovakia,2010,6.052,10.152,0.920,66.500,0.636,-0.106,0.907,0.603,0.277 +Slovakia,2011,5.945,10.177,0.917,66.720,0.727,0.006,0.907,0.588,0.287 +Slovakia,2012,5.911,10.188,0.926,66.940,0.620,-0.032,0.907,0.585,0.302 +Slovakia,2013,5.937,10.193,0.909,67.160,0.598,-0.055,0.915,0.612,0.277 +Slovakia,2014,6.139,10.219,0.924,67.380,0.635,-0.130,0.914,0.619,0.267 +Slovakia,2015,6.162,10.268,0.943,67.600,0.587,-0.132,0.928,0.632,0.269 +Slovakia,2016,5.993,10.286,0.945,67.825,0.700,-0.065,0.917,0.688,0.232 +Slovakia,2017,6.366,10.314,0.913,68.050,0.714,-0.059,0.920,0.709,0.213 +Slovakia,2018,6.235,10.352,0.922,68.275,0.758,-0.172,0.910,0.670,0.253 +Slovakia,2019,6.243,10.375,0.933,68.500,0.771,-0.133,0.926,0.676,0.252 +Slovakia,2020,6.519,10.340,0.954,68.725,0.762,-0.081,0.901,0.695,0.274 +Slovakia,2021,6.419,10.390,0.951,68.950,0.742,0.042,0.896,0.692,0.241 +Slovakia,2022,6.091,10.409,0.961,69.175,0.732,-0.129,0.841,0.665,0.263 +Slovakia,2023,6.261,10.425,0.941,69.400,0.753,-0.136,0.825,0.647,0.235 +Slovenia,2006,5.811,10.399,0.936,68.560,0.936,0.037,0.708,0.608,0.307 +Slovenia,2009,5.830,10.406,0.919,69.040,0.896,-0.025,0.804,0.583,0.303 +Slovenia,2010,6.083,10.415,0.917,69.200,0.896,0.024,0.845,0.592,0.295 +Slovenia,2011,6.036,10.421,0.931,69.360,0.907,-0.031,0.893,0.587,0.285 +Slovenia,2012,6.063,10.392,0.925,69.520,0.904,-0.025,0.891,0.598,0.284 +Slovenia,2013,5.975,10.381,0.932,69.680,0.890,0.030,0.918,0.625,0.274 +Slovenia,2014,5.678,10.407,0.908,69.840,0.888,0.047,0.909,0.594,0.291 +Slovenia,2015,5.741,10.428,0.901,70.000,0.896,0.002,0.892,0.644,0.261 +Slovenia,2016,5.937,10.459,0.934,70.175,0.904,-0.060,0.838,0.597,0.272 +Slovenia,2017,6.167,10.505,0.928,70.350,0.921,-0.031,0.829,0.582,0.286 +Slovenia,2018,6.249,10.545,0.941,70.525,0.942,-0.125,0.839,0.601,0.275 +Slovenia,2019,6.665,10.572,0.949,70.700,0.945,-0.108,0.785,0.622,0.228 +Slovenia,2020,6.462,10.521,0.953,70.875,0.958,-0.090,0.797,0.575,0.314 +Slovenia,2021,6.761,10.598,0.955,71.050,0.851,0.026,0.754,0.643,0.261 +Slovenia,2022,6.723,10.650,0.942,71.225,0.930,0.099,0.762,0.625,0.242 +Slovenia,2023,6.746,10.664,0.911,71.400,0.931,0.031,0.750,0.615,0.256 +Somalia,2014,5.528,6.830,0.611,47.660,0.874,0.020,0.456,0.689,0.207 +Somalia,2015,5.354,6.937,0.599,48.100,0.968,0.016,0.410,0.764,0.187 +Somalia,2016,4.668,6.981,0.594,48.500,0.917,0.069,0.441,0.773,0.193 +Somaliland region,2009,4.991,,0.880,,0.746,,0.513,0.708,0.112 +Somaliland region,2010,4.657,,0.829,,0.820,,0.471,0.632,0.083 +Somaliland region,2011,4.931,,0.788,,0.858,,0.357,0.691,0.122 +Somaliland region,2012,5.057,,0.786,,0.758,,0.334,0.687,0.152 +South Africa,2006,5.084,9.455,0.913,46.000,0.649,-0.094,,0.724,0.223 +South Africa,2007,5.204,9.497,0.788,46.900,0.690,-0.169,0.859,0.658,0.210 +South Africa,2008,5.346,9.518,0.810,47.800,0.749,-0.106,0.866,0.712,0.206 +South Africa,2009,5.218,9.490,0.877,48.700,0.739,-0.165,0.904,0.656,0.231 +South Africa,2010,4.652,9.508,0.917,49.600,0.739,-0.213,0.791,0.698,0.124 +South Africa,2011,4.931,9.527,0.858,50.500,0.835,-0.166,0.819,0.720,0.230 +South Africa,2012,5.134,9.537,0.907,51.400,0.590,-0.175,0.838,0.711,0.178 +South Africa,2013,3.661,9.548,0.839,52.300,0.714,-0.089,0.800,0.740,0.167 +South Africa,2014,4.828,9.546,0.881,53.200,0.794,-0.128,0.820,0.730,0.243 +South Africa,2015,4.887,9.539,0.898,54.100,0.862,-0.138,0.853,0.717,0.161 +South Africa,2016,4.770,9.536,0.875,54.625,0.774,-0.082,0.813,0.743,0.301 +South Africa,2017,4.514,9.543,0.870,55.150,0.787,-0.141,0.865,0.709,0.268 +South Africa,2018,4.884,9.546,0.841,55.675,0.753,-0.063,0.841,0.736,0.283 +South Africa,2019,5.035,9.536,0.848,56.200,0.738,-0.147,0.820,0.727,0.268 +South Africa,2020,4.947,9.458,0.891,56.725,0.757,-0.030,0.912,0.761,0.294 +South Africa,2021,5.599,9.496,0.922,57.250,0.704,-0.148,0.892,0.784,0.173 +South Africa,2022,5.581,9.508,0.887,57.775,0.713,-0.071,0.908,0.744,0.239 +South Africa,2023,5.076,9.503,0.839,58.300,0.748,-0.109,0.861,0.708,0.255 +South Korea,2006,5.332,10.309,0.775,70.020,0.715,-0.058,0.799,0.545,0.338 +South Korea,2007,5.767,10.360,0.827,70.240,0.656,-0.065,0.803,0.612,0.226 +South Korea,2008,5.390,10.382,0.754,70.460,0.524,-0.108,0.771,0.554,0.239 +South Korea,2009,5.648,10.385,0.811,70.680,0.600,-0.102,0.787,0.596,0.209 +South Korea,2010,6.116,10.446,0.816,70.900,0.677,-0.039,0.752,0.626,0.130 +South Korea,2011,6.947,10.474,0.809,71.120,0.682,-0.054,0.827,0.587,0.168 +South Korea,2012,6.003,10.493,0.775,71.340,0.618,,0.844,0.610,0.206 +South Korea,2013,5.959,10.519,0.797,71.560,0.642,-0.056,0.832,0.589,0.189 +South Korea,2014,5.801,10.544,0.738,71.780,0.623,-0.049,0.834,0.575,0.283 +South Korea,2015,5.780,10.567,0.768,72.000,0.616,-0.041,0.841,0.561,0.244 +South Korea,2016,5.971,10.592,0.811,72.275,0.591,0.020,0.862,0.583,0.233 +South Korea,2017,5.874,10.620,0.807,72.550,0.538,0.008,0.851,0.546,0.235 +South Korea,2018,5.840,10.645,0.798,72.825,0.600,-0.095,0.797,0.579,0.217 +South Korea,2019,5.903,10.663,0.783,73.100,0.706,-0.061,0.718,0.593,0.236 +South Korea,2020,5.793,10.655,0.808,73.375,0.711,-0.112,0.665,0.550,0.247 +South Korea,2021,6.113,10.697,0.811,73.650,0.717,-0.033,0.685,0.566,0.221 +South Korea,2022,5.950,10.725,0.810,73.925,0.723,0.002,0.747,0.585,0.233 +South Korea,2023,6.112,10.742,0.799,74.200,0.762,-0.004,0.714,0.603,0.245 +South Sudan,2014,3.832,,0.545,52.880,0.567,,0.742,0.578,0.428 +South Sudan,2015,4.071,,0.585,53.000,0.512,,0.710,0.553,0.450 +South Sudan,2016,2.888,,0.532,53.175,0.440,,0.785,0.594,0.549 +South Sudan,2017,2.817,,0.557,53.350,0.456,,0.761,0.565,0.517 +Spain,2005,7.153,10.544,0.961,70.400,0.916,,0.777,0.694,0.241 +Spain,2007,6.995,10.585,0.957,70.640,0.782,-0.099,0.784,0.717,0.264 +Spain,2008,7.294,10.577,0.948,70.760,0.834,-0.155,0.683,0.649,0.260 +Spain,2009,6.199,10.530,0.929,70.880,0.749,-0.133,0.798,0.645,0.336 +Spain,2010,6.188,10.527,0.950,71.000,0.796,-0.144,0.840,0.645,0.322 +Spain,2011,6.518,10.516,0.944,71.120,0.819,-0.128,0.846,0.667,0.356 +Spain,2012,6.291,10.485,0.937,71.240,0.755,-0.065,0.844,0.644,0.366 +Spain,2013,6.150,10.474,0.929,71.360,0.759,-0.107,0.916,0.663,0.372 +Spain,2014,6.456,10.491,0.948,71.480,0.738,-0.034,0.854,0.683,0.335 +Spain,2015,6.381,10.529,0.956,71.600,0.732,-0.078,0.822,0.705,0.285 +Spain,2016,6.319,10.558,0.942,71.725,0.768,-0.054,0.819,0.630,0.301 +Spain,2017,6.230,10.585,0.903,71.850,0.756,-0.038,0.791,0.601,0.302 +Spain,2018,6.513,10.604,0.910,71.975,0.722,-0.081,0.777,0.636,0.357 +Spain,2019,6.457,10.616,0.949,72.100,0.778,-0.054,0.730,0.636,0.316 +Spain,2020,6.502,10.491,0.935,72.225,0.783,-0.127,0.730,0.671,0.317 +Spain,2021,6.470,10.544,0.926,72.350,0.782,-0.076,0.729,0.639,0.324 +Spain,2022,6.337,10.592,0.934,72.475,0.781,-0.001,0.673,0.636,0.320 +Spain,2023,6.456,10.609,0.912,72.600,0.779,-0.004,0.675,0.655,0.325 +Sri Lanka,2006,4.345,8.937,0.864,62.280,0.724,0.055,0.838,0.639,0.216 +Sri Lanka,2007,4.415,8.992,0.838,62.760,0.736,0.103,0.847,0.590,0.220 +Sri Lanka,2008,4.431,9.040,0.816,63.240,0.834,0.156,0.861,0.656,0.153 +Sri Lanka,2009,4.212,9.065,0.830,63.720,0.799,0.299,0.690,0.661,0.172 +Sri Lanka,2010,3.977,9.133,0.814,64.200,0.738,0.252,0.769,0.704,0.163 +Sri Lanka,2011,4.181,9.207,0.842,64.680,0.823,0.138,0.760,0.730,0.175 +Sri Lanka,2012,4.225,9.282,0.824,65.160,0.800,0.155,0.823,0.761,0.197 +Sri Lanka,2013,4.365,9.316,0.809,65.640,0.834,0.262,0.842,0.776,0.208 +Sri Lanka,2014,4.268,9.373,0.805,66.120,0.868,0.291,0.791,0.785,0.187 +Sri Lanka,2015,4.612,9.410,0.863,66.600,0.902,0.312,0.859,0.789,0.235 +Sri Lanka,2017,4.331,9.514,0.823,66.800,0.827,0.083,0.844,0.729,0.270 +Sri Lanka,2018,4.435,9.529,0.833,66.900,0.859,0.096,0.856,0.773,0.302 +Sri Lanka,2019,4.213,9.521,0.815,67.000,0.824,0.043,0.863,0.753,0.315 +Sri Lanka,2020,4.778,9.468,0.842,67.100,0.803,-0.050,0.768,0.758,0.285 +Sri Lanka,2021,4.103,9.492,0.812,67.200,0.771,-0.013,0.849,0.733,0.312 +Sri Lanka,2022,3.985,9.409,0.825,67.300,0.740,0.038,0.900,0.715,0.321 +Sri Lanka,2023,3.602,9.364,0.790,67.400,0.754,0.050,0.922,0.709,0.353 +State of Palestine,2006,4.716,8.201,0.818,,0.547,,0.858,0.492,0.431 +State of Palestine,2007,4.151,8.181,0.712,,0.365,-0.083,0.844,0.515,0.412 +State of Palestine,2008,4.386,8.275,0.666,,0.358,-0.075,0.753,0.513,0.403 +State of Palestine,2009,4.470,8.337,0.738,,0.468,-0.091,0.797,0.474,0.466 +State of Palestine,2010,4.703,8.363,0.822,,0.504,-0.121,0.752,0.553,0.381 +State of Palestine,2011,4.751,8.452,0.751,,0.522,-0.131,0.750,0.499,0.388 +State of Palestine,2012,4.647,8.598,0.782,,0.542,-0.163,0.730,0.560,0.379 +State of Palestine,2013,4.844,8.595,0.761,,0.454,-0.163,0.780,0.537,0.365 +State of Palestine,2014,4.722,8.618,0.775,,0.657,-0.163,0.804,0.505,0.380 +State of Palestine,2015,4.695,8.683,0.766,,0.556,-0.173,0.774,0.536,0.369 +State of Palestine,2016,4.907,8.738,0.818,,0.608,-0.151,0.812,0.544,0.378 +State of Palestine,2017,4.628,8.734,0.824,,0.632,-0.186,0.831,0.534,0.416 +State of Palestine,2018,4.554,8.718,0.819,,0.655,-0.163,0.814,0.528,0.419 +State of Palestine,2019,4.483,8.716,0.833,,0.653,-0.135,0.829,0.538,0.400 +State of Palestine,2022,4.908,,0.860,,0.695,,0.836,0.584,0.362 +State of Palestine,2023,4.851,,0.831,,0.708,,0.808,0.580,0.378 +Sudan,2009,4.455,8.457,0.911,57.460,0.710,0.046,0.701,0.688,0.245 +Sudan,2010,4.435,8.465,0.855,57.700,0.648,-0.073,0.737,0.589,0.221 +Sudan,2011,4.314,8.527,0.818,57.940,0.583,-0.053,0.663,0.532,0.249 +Sudan,2012,4.550,8.458,0.813,58.180,0.412,-0.072,0.734,0.511,0.242 +Sudan,2014,4.139,8.471,0.811,58.660,0.390,-0.080,0.794,0.461,0.303 +Suriname,2012,6.269,9.874,0.797,62.840,0.885,-0.088,0.751,0.730,0.250 +Sweden,2005,7.376,10.724,0.951,71.000,0.964,,,0.742,0.151 +Sweden,2007,7.241,10.791,0.917,71.080,0.910,0.141,0.289,0.735,0.177 +Sweden,2008,7.516,10.778,0.923,71.120,0.912,0.120,0.314,0.763,0.134 +Sweden,2009,7.266,10.725,0.903,71.160,0.864,0.216,0.292,0.761,0.151 +Sweden,2010,7.496,10.775,0.970,71.200,0.905,0.136,0.253,0.788,0.200 +Sweden,2011,7.382,10.799,0.921,71.240,0.941,0.156,0.269,0.762,0.179 +Sweden,2012,7.560,10.785,0.929,71.280,0.944,0.127,0.254,0.796,0.170 +Sweden,2013,7.434,10.789,0.916,71.320,0.936,0.154,0.324,0.782,0.184 +Sweden,2014,7.239,10.805,0.933,71.360,0.945,0.197,0.250,0.793,0.208 +Sweden,2015,7.289,10.838,0.929,71.400,0.935,0.206,0.232,0.766,0.191 +Sweden,2016,7.369,10.846,0.912,71.525,0.918,0.141,0.246,0.752,0.201 +Sweden,2017,7.287,10.858,0.914,71.650,0.935,0.165,0.239,0.756,0.175 +Sweden,2018,7.375,10.866,0.931,71.775,0.942,0.072,0.263,0.747,0.161 +Sweden,2019,7.398,10.875,0.934,71.900,0.942,0.085,0.250,0.775,0.202 +Sweden,2020,7.314,10.846,0.936,72.025,0.951,0.084,0.203,0.717,0.222 +Sweden,2021,7.439,10.893,0.932,72.150,0.953,0.172,0.191,0.763,0.190 +Sweden,2022,7.431,10.912,0.949,72.275,0.939,0.232,0.213,0.750,0.163 +Sweden,2023,7.161,10.902,0.927,72.400,0.926,0.147,0.253,0.739,0.194 +Switzerland,2006,7.473,11.056,0.951,71.160,0.919,0.284,0.408,0.742,0.212 +Switzerland,2009,7.525,11.065,0.938,71.340,0.891,0.118,0.342,0.741,0.202 +Switzerland,2012,7.776,11.094,0.947,71.520,0.945,0.131,0.323,0.793,0.176 +Switzerland,2014,7.493,11.111,0.959,71.640,0.949,0.053,0.283,0.788,0.189 +Switzerland,2015,7.572,11.116,0.938,71.700,0.928,0.102,0.210,0.794,0.166 +Switzerland,2016,7.459,11.126,0.928,71.900,0.934,0.081,0.302,0.758,0.206 +Switzerland,2017,7.474,11.130,0.950,72.100,0.925,0.173,0.316,0.734,0.196 +Switzerland,2018,7.509,11.151,0.930,72.300,0.926,0.094,0.301,0.756,0.192 +Switzerland,2019,7.694,11.155,0.949,72.500,0.913,0.029,0.294,0.743,0.171 +Switzerland,2020,7.508,11.124,0.946,72.700,0.917,-0.073,0.280,0.730,0.193 +Switzerland,2021,7.328,11.158,0.934,72.900,0.908,0.024,0.287,0.747,0.183 +Switzerland,2022,6.884,11.170,0.881,73.100,0.848,0.128,0.235,0.710,0.180 +Switzerland,2023,6.969,11.169,0.904,73.300,0.891,0.104,0.247,0.745,0.185 +Syria,2008,5.323,8.658,0.712,68.620,0.661,0.116,0.680,0.562,0.338 +Syria,2009,4.979,8.656,0.842,66.860,0.748,0.076,0.688,0.491,0.292 +Syria,2010,4.465,8.733,0.934,65.100,0.647,0.002,0.743,0.489,0.225 +Syria,2011,4.038,8.735,0.576,63.340,0.530,0.125,0.741,0.521,0.496 +Syria,2012,3.164,8.578,0.588,61.580,0.467,0.310,0.673,0.451,0.705 +Syria,2013,2.688,8.419,0.585,59.820,0.455,0.219,0.663,0.354,0.622 +Syria,2015,3.462,8.492,0.464,56.300,0.448,0.036,0.685,0.363,0.643 +Taiwan Province of China,2006,6.189,10.602,0.882,68.680,0.630,-0.035,0.846,0.683,0.094 +Taiwan Province of China,2008,5.548,10.600,0.830,69.140,0.642,-0.022,0.785,0.682,0.169 +Taiwan Province of China,2010,6.229,10.681,0.831,69.600,0.677,-0.001,0.821,0.738,0.136 +Taiwan Province of China,2011,6.309,10.693,0.863,,0.761,0.030,0.755,0.727,0.112 +Taiwan Province of China,2012,6.126,10.718,0.825,,0.698,0.016,0.803,0.702,0.140 +Taiwan Province of China,2013,6.340,10.724,0.817,,0.690,-0.003,0.841,0.754,0.124 +Taiwan Province of China,2014,6.363,10.749,0.870,,0.693,0.089,0.866,0.767,0.108 +Taiwan Province of China,2015,6.450,10.779,0.885,,0.701,0.017,0.857,0.750,0.129 +Taiwan Province of China,2016,6.513,10.768,0.895,,0.719,-0.049,0.811,0.743,0.108 +Taiwan Province of China,2017,6.359,10.774,0.891,,0.760,-0.070,0.743,0.715,0.114 +Taiwan Province of China,2018,6.467,10.781,0.896,,0.741,-0.179,0.736,0.746,0.093 +Taiwan Province of China,2019,6.537,10.797,0.893,,0.814,-0.131,0.718,0.762,0.093 +Taiwan Province of China,2020,6.751,,0.901,,0.799,,0.711,0.743,0.083 +Taiwan Province of China,2021,6.247,,0.866,,0.818,,0.675,0.667,0.123 +Taiwan Province of China,2022,6.607,,0.883,,0.800,,0.658,0.717,0.095 +Taiwan Province of China,2023,6.655,,0.872,,0.795,,0.641,0.748,0.111 +Tajikistan,2006,4.613,7.591,0.724,60.500,0.702,-0.096,0.768,0.494,0.195 +Tajikistan,2007,4.432,7.648,0.727,60.600,0.818,-0.007,0.659,0.619,0.133 +Tajikistan,2008,5.064,7.705,0.701,60.700,0.816,0.010,0.723,0.488,0.160 +Tajikistan,2009,4.575,7.724,0.676,60.800,0.744,-0.007,0.792,0.475,0.203 +Tajikistan,2010,4.381,7.766,0.759,60.900,0.784,0.054,0.679,0.483,0.192 +Tajikistan,2011,4.263,7.817,0.751,61.000,0.776,-0.127,0.672,0.573,0.166 +Tajikistan,2012,4.497,7.867,0.729,61.100,0.749,-0.081,0.717,0.583,0.198 +Tajikistan,2013,4.967,7.916,0.701,61.200,0.693,0.055,0.764,0.578,0.170 +Tajikistan,2014,4.896,7.958,0.810,61.300,0.853,-0.007,0.698,0.587,0.196 +Tajikistan,2015,5.124,7.993,0.844,61.400,0.847,0.013,0.742,0.633,0.196 +Tajikistan,2016,5.104,8.036,0.857,61.550,0.703,0.001,0.632,0.587,0.220 +Tajikistan,2017,5.829,8.082,0.663,61.700,0.832,0.116,0.718,0.581,0.278 +Tajikistan,2018,5.497,8.133,0.875,61.850,,-0.074,0.578,0.632,0.220 +Tajikistan,2019,5.464,8.182,0.880,62.000,,-0.054,0.490,0.663,0.178 +Tajikistan,2020,5.373,8.203,0.790,62.150,,-0.054,0.550,0.652,0.344 +Tajikistan,2021,5.287,8.271,0.883,62.300,,-0.071,0.499,0.655,0.240 +Tajikistan,2022,5.176,8.328,0.865,62.450,,-0.003,0.397,0.710,0.220 +Tajikistan,2023,5.379,8.371,0.871,62.600,,-0.054,0.482,0.638,0.231 +Tanzania,2006,3.922,7.459,0.783,50.760,0.787,-0.030,0.649,0.725,0.209 +Tanzania,2007,4.318,7.497,0.708,51.420,0.716,-0.016,0.707,0.702,0.220 +Tanzania,2008,4.385,7.525,0.774,52.080,0.562,0.253,0.930,0.740,0.178 +Tanzania,2009,3.408,7.551,0.837,52.740,0.607,0.305,0.903,0.733,0.161 +Tanzania,2010,3.229,7.587,0.813,53.400,0.597,0.135,0.866,0.667,0.146 +Tanzania,2011,4.074,7.632,0.883,54.060,0.736,-0.050,0.816,0.720,0.145 +Tanzania,2012,4.007,7.647,0.832,54.720,0.577,0.209,0.887,0.641,0.195 +Tanzania,2013,3.852,7.683,0.803,55.380,0.654,0.051,0.859,0.707,0.191 +Tanzania,2014,3.483,7.717,0.789,56.040,0.654,0.107,0.878,0.693,0.241 +Tanzania,2015,3.661,7.743,0.790,56.700,0.759,0.145,0.906,0.607,0.192 +Tanzania,2016,2.903,7.775,0.638,57.150,0.775,0.175,0.739,0.649,0.246 +Tanzania,2017,3.347,7.807,0.705,57.600,0.800,0.112,0.654,0.662,0.255 +Tanzania,2018,3.445,7.828,0.675,58.050,0.807,0.150,0.612,0.702,0.221 +Tanzania,2019,3.640,7.855,0.687,58.500,0.850,0.097,0.589,0.679,0.243 +Tanzania,2020,3.786,7.844,0.740,58.950,0.830,0.293,0.521,0.667,0.271 +Tanzania,2021,3.681,7.857,0.619,59.400,0.822,0.110,0.546,0.648,0.246 +Tanzania,2022,3.616,7.872,0.600,59.850,0.856,0.133,0.584,0.707,0.195 +Tanzania,2023,4.042,7.893,0.663,60.300,0.862,0.122,0.609,0.702,0.210 +Thailand,2006,5.885,9.452,0.894,66.380,0.863,0.326,0.935,0.750,0.164 +Thailand,2007,5.784,9.498,0.889,66.560,0.870,0.386,0.898,0.784,0.180 +Thailand,2008,5.636,9.507,0.832,66.740,0.868,0.421,0.933,0.777,0.145 +Thailand,2009,5.476,9.493,0.893,66.920,0.868,0.520,0.904,0.808,0.166 +Thailand,2010,6.217,9.559,0.898,67.100,0.860,0.532,0.917,0.821,0.182 +Thailand,2011,6.664,9.561,0.884,67.280,0.927,0.396,0.923,0.834,0.117 +Thailand,2012,6.300,9.624,0.906,67.460,0.847,0.376,0.909,0.733,0.138 +Thailand,2013,6.231,9.645,0.926,67.640,0.781,0.452,0.925,0.782,0.141 +Thailand,2014,6.985,9.649,0.933,67.820,0.900,0.548,0.920,0.768,0.169 +Thailand,2015,6.202,9.675,0.866,68.000,0.885,0.312,0.914,0.884,0.174 +Thailand,2016,6.074,9.705,0.908,68.075,0.924,0.352,0.878,0.811,0.218 +Thailand,2017,5.939,9.741,0.877,68.150,0.923,0.208,0.884,0.776,0.232 +Thailand,2018,6.012,9.780,0.873,68.225,0.905,0.255,0.907,0.783,0.198 +Thailand,2019,6.022,9.798,0.903,68.300,0.898,0.305,0.877,0.792,0.208 +Thailand,2020,5.885,9.733,0.867,68.375,0.840,0.270,0.918,0.770,0.326 +Thailand,2021,5.638,9.746,0.883,68.450,0.836,0.290,0.943,0.719,0.298 +Thailand,2022,6.007,9.770,0.867,68.525,0.881,0.299,0.868,0.773,0.218 +Thailand,2023,6.282,9.807,0.873,68.600,0.926,0.338,0.889,0.811,0.217 +Togo,2006,3.202,7.342,0.435,50.240,0.628,-0.030,0.850,0.571,0.348 +Togo,2008,2.808,7.312,0.291,51.120,0.287,-0.078,0.932,0.398,0.379 +Togo,2011,2.936,7.406,0.303,52.440,0.584,-0.093,0.832,0.479,0.395 +Togo,2014,2.839,7.509,0.444,53.760,0.663,-0.108,0.795,0.537,0.443 +Togo,2015,3.768,7.540,0.479,54.200,0.772,-0.092,0.733,0.597,0.416 +Togo,2016,3.879,7.569,0.509,54.700,0.730,-0.031,0.815,0.610,0.483 +Togo,2017,4.361,7.587,0.508,55.200,0.717,-0.066,0.726,0.614,0.426 +Togo,2018,4.023,7.613,0.596,55.700,0.612,-0.031,0.809,0.602,0.446 +Togo,2019,4.179,7.637,0.539,56.200,0.617,0.041,0.737,0.606,0.444 +Togo,2021,4.037,7.667,0.603,57.200,0.619,0.037,0.766,0.628,0.417 +Togo,2022,4.239,7.700,0.579,57.700,0.696,0.002,0.713,0.594,0.414 +Togo,2023,4.365,7.725,0.547,58.200,0.665,-0.071,0.685,0.546,0.362 +Trinidad and Tobago,2006,5.832,10.172,0.887,61.780,0.840,0.139,0.917,0.750,0.229 +Trinidad and Tobago,2008,6.696,10.240,0.858,62.540,0.838,0.085,0.959,0.802,0.184 +Trinidad and Tobago,2011,6.519,10.206,0.863,63.680,0.775,0.076,0.900,0.827,0.134 +Trinidad and Tobago,2013,6.168,10.293,0.883,64.440,0.847,0.121,0.948,0.764,0.286 +Trinidad and Tobago,2017,6.192,10.174,0.916,65.700,0.859,0.010,0.911,0.763,0.248 +Tunisia,2009,5.025,9.238,,66.220,0.781,-0.127,0.722,, +Tunisia,2010,5.131,9.257,0.863,66.300,0.624,-0.143,0.732,0.697,0.249 +Tunisia,2011,4.876,9.224,0.715,66.380,0.603,-0.207,0.913,0.513,0.248 +Tunisia,2012,4.464,9.252,0.614,66.460,0.568,-0.184,0.899,0.490,0.327 +Tunisia,2013,5.246,9.265,0.648,66.540,0.536,-0.214,0.886,0.435,0.239 +Tunisia,2014,4.764,9.284,0.680,66.620,0.589,-0.239,0.783,0.424,0.321 +Tunisia,2015,5.132,9.283,0.609,66.700,0.711,-0.233,0.815,0.514,0.320 +Tunisia,2016,4.521,9.283,0.702,66.750,0.614,-0.172,0.811,0.532,0.378 +Tunisia,2017,4.124,9.294,0.717,66.800,0.478,-0.226,0.869,0.367,0.377 +Tunisia,2018,4.741,9.310,0.733,66.850,0.650,-0.199,0.840,0.536,0.365 +Tunisia,2019,4.315,9.316,0.610,66.900,0.659,-0.217,0.889,0.459,0.433 +Tunisia,2020,4.731,9.214,0.719,66.950,0.668,-0.206,0.877,0.519,0.439 +Tunisia,2021,4.499,9.249,0.711,67.000,0.591,-0.206,0.933,0.451,0.336 +Tunisia,2022,4.261,9.267,0.755,67.050,0.474,-0.233,0.908,0.458,0.304 +Tunisia,2023,4.505,9.282,0.702,67.100,0.482,-0.226,0.882,0.461,0.364 +Turkmenistan,2009,6.568,8.955,0.924,59.780,,-0.105,,0.695,0.152 +Turkmenistan,2011,5.792,9.146,0.964,60.420,,0.015,,0.577,0.122 +Turkmenistan,2012,5.464,9.233,0.946,60.740,0.786,-0.126,,0.541,0.117 +Turkmenistan,2013,5.392,9.312,0.846,61.060,0.705,-0.075,,0.552,0.160 +Turkmenistan,2014,5.787,9.392,0.909,61.380,0.805,0.029,,0.614,0.154 +Turkmenistan,2015,5.791,9.437,0.960,61.700,0.701,0.090,,0.633,0.301 +Turkmenistan,2016,5.887,9.479,0.929,61.800,0.749,0.002,,0.560,0.255 +Turkmenistan,2017,5.229,9.525,0.908,61.900,0.720,0.063,,0.488,0.350 +Turkmenistan,2018,4.621,9.569,0.984,62.000,0.858,0.257,,0.567,0.189 +Turkmenistan,2019,5.474,9.615,0.982,62.100,0.892,0.282,,0.494,0.183 +Türkiye,2005,4.719,9.800,0.820,66.100,0.623,,0.877,0.479, +Türkiye,2007,5.623,9.891,0.792,66.420,0.459,-0.183,0.800,0.592,0.395 +Türkiye,2008,5.118,9.887,0.645,66.580,0.415,-0.194,0.785,0.510,0.345 +Türkiye,2009,5.213,9.825,0.755,66.740,0.456,-0.232,0.853,0.454,0.316 +Türkiye,2010,5.490,9.893,0.795,66.900,0.515,-0.192,0.811,0.532,0.327 +Türkiye,2011,5.272,9.986,0.692,67.060,0.446,-0.247,0.649,0.512,0.380 +Türkiye,2012,5.309,10.018,0.739,67.220,0.471,-0.221,0.702,0.506,0.335 +Türkiye,2013,4.888,10.082,0.795,67.380,0.541,-0.235,0.698,0.551,0.392 +Türkiye,2014,5.580,10.111,0.863,67.540,0.649,-0.029,0.764,0.410,0.377 +Türkiye,2015,5.514,10.150,0.851,67.700,0.653,-0.021,0.806,0.391,0.382 +Türkiye,2016,5.326,10.166,0.880,67.875,0.644,-0.070,0.764,0.414,0.390 +Türkiye,2017,5.607,10.225,0.876,68.050,0.644,-0.242,0.671,0.393,0.313 +Türkiye,2018,5.186,10.246,0.847,68.225,0.529,-0.181,0.805,0.379,0.351 +Türkiye,2019,4.872,10.245,0.792,68.400,0.631,-0.141,0.760,0.347,0.368 +Türkiye,2020,4.862,10.257,0.857,68.575,0.510,-0.119,0.774,0.332,0.440 +Türkiye,2021,4.367,10.357,0.736,68.750,0.447,-0.039,0.810,0.297,0.471 +Türkiye,2022,5.093,10.404,0.830,68.925,0.470,-0.195,0.767,0.311,0.390 +Türkiye,2023,5.463,10.429,0.860,69.100,0.523,-0.159,0.748,0.344,0.349 +Uganda,2006,3.734,7.370,0.760,48.740,0.747,-0.046,0.807,0.552,0.254 +Uganda,2007,4.456,7.422,0.845,49.580,0.708,-0.006,0.881,0.670,0.228 +Uganda,2008,4.569,7.476,0.813,50.420,0.578,-0.060,0.848,0.623,0.240 +Uganda,2009,4.612,7.513,0.852,51.260,0.760,-0.043,0.840,0.594,0.296 +Uganda,2010,4.193,7.538,0.830,52.100,0.801,-0.020,0.855,0.628,0.251 +Uganda,2011,4.826,7.599,0.882,52.940,0.733,0.026,0.830,0.618,0.254 +Uganda,2012,4.309,7.608,0.885,53.780,0.649,0.075,0.838,0.709,0.265 +Uganda,2013,3.710,7.614,0.878,54.620,0.763,0.046,0.820,0.647,0.346 +Uganda,2014,3.770,7.634,0.821,55.460,0.834,0.003,0.898,0.635,0.397 +Uganda,2015,4.238,7.654,0.747,56.300,0.758,0.128,0.873,0.679,0.353 +Uganda,2016,4.233,7.667,0.754,56.775,0.739,0.125,0.811,0.665,0.410 +Uganda,2017,4.001,7.663,0.740,57.250,0.772,0.053,0.816,0.689,0.400 +Uganda,2018,4.322,7.690,0.740,57.725,0.729,0.072,0.856,0.687,0.390 +Uganda,2019,4.948,7.719,0.805,58.200,0.704,0.132,0.826,0.689,0.385 +Uganda,2020,4.641,7.714,0.800,58.675,0.687,0.140,0.878,0.705,0.425 +Uganda,2021,4.225,7.717,0.793,59.150,0.711,0.081,0.835,0.699,0.359 +Uganda,2022,4.425,7.733,0.781,59.625,0.720,0.135,0.836,0.708,0.439 +Uganda,2023,4.467,7.759,0.827,60.100,0.848,0.067,0.912,0.726,0.376 +Ukraine,2006,4.804,9.414,0.852,60.920,0.624,-0.265,0.929,0.551,0.249 +Ukraine,2007,5.252,9.499,0.820,61.240,0.494,-0.249,0.968,0.559,0.208 +Ukraine,2008,5.172,9.527,0.860,61.560,0.487,-0.273,0.929,0.545,0.186 +Ukraine,2009,5.166,9.367,0.845,61.880,0.460,-0.249,0.962,0.545,0.189 +Ukraine,2010,5.058,9.411,0.884,62.200,0.484,-0.197,0.954,0.472,0.227 +Ukraine,2011,5.083,9.468,0.859,62.520,0.579,-0.236,0.933,0.539,0.220 +Ukraine,2012,5.030,9.472,0.898,62.840,0.564,-0.231,0.896,0.509,0.193 +Ukraine,2013,4.711,9.474,0.897,63.160,0.569,-0.225,0.937,0.572,0.225 +Ukraine,2014,4.297,9.424,0.877,63.480,0.533,0.078,0.927,0.543,0.249 +Ukraine,2015,3.965,9.325,0.909,63.800,0.431,-0.039,0.952,0.531,0.241 +Ukraine,2016,4.029,9.353,0.885,63.925,0.503,0.005,0.891,0.550,0.220 +Ukraine,2017,4.311,9.381,0.858,64.050,0.599,-0.008,0.937,0.528,0.235 +Ukraine,2018,4.662,9.420,0.901,64.175,0.663,-0.080,0.943,0.550,0.222 +Ukraine,2019,4.702,9.458,0.883,64.300,0.715,-0.087,0.885,0.549,0.201 +Ukraine,2020,5.270,9.426,0.885,64.425,0.784,0.121,0.946,0.629,0.285 +Ukraine,2021,5.311,9.469,0.879,64.550,0.770,0.166,0.922,0.575,0.250 +Ukraine,2022,4.637,9.281,0.863,64.675,0.829,0.408,0.852,0.527,0.390 +Ukraine,2023,4.672,9.423,0.839,64.800,0.772,0.370,0.922,0.490,0.385 +United Arab Emirates,2006,6.734,11.433,0.903,64.860,0.898,-0.043,0.203,0.694,0.275 +United Arab Emirates,2009,6.866,10.952,0.885,65.040,0.849,0.015,0.339,0.718,0.287 +United Arab Emirates,2010,7.097,10.909,0.912,65.100,0.878,0.051,0.355,0.701,0.233 +United Arab Emirates,2011,7.119,10.965,0.881,65.160,0.889,0.063,,0.702,0.216 +United Arab Emirates,2012,7.218,11.001,0.856,65.220,0.920,,,0.719,0.224 +United Arab Emirates,2013,6.621,11.041,0.864,65.280,0.936,,,,0.291 +United Arab Emirates,2014,6.540,11.072,,65.340,,,,, +United Arab Emirates,2015,6.568,11.128,0.824,65.400,0.915,0.192,,0.722,0.296 +United Arab Emirates,2016,6.831,11.174,0.849,65.550,0.949,0.120,,0.739,0.245 +United Arab Emirates,2017,7.039,11.173,0.836,65.700,0.962,0.206,,0.737,0.208 +United Arab Emirates,2018,6.604,11.178,0.851,65.850,0.944,0.043,,0.723,0.302 +United Arab Emirates,2019,6.711,11.181,0.862,66.000,0.911,0.118,,0.730,0.284 +United Arab Emirates,2020,6.458,11.122,0.827,66.150,0.942,0.049,,0.702,0.298 +United Arab Emirates,2021,6.733,11.152,0.826,66.300,0.951,0.150,,0.697,0.217 +United Arab Emirates,2022,6.738,11.216,0.798,66.450,0.932,0.168,,0.715,0.242 +United Arab Emirates,2023,6.728,11.236,0.776,66.600,0.886,0.155,,0.655,0.304 +United Kingdom,2005,6.984,10.661,0.979,69.100,0.922,,0.398,0.779,0.262 +United Kingdom,2007,6.802,10.693,0.970,69.220,0.838,0.331,0.498,0.686,0.241 +United Kingdom,2008,6.986,10.684,0.954,69.280,0.759,0.325,0.548,0.724,0.218 +United Kingdom,2009,6.907,10.630,0.964,69.340,0.816,0.336,0.559,0.739,0.231 +United Kingdom,2010,7.029,10.646,0.955,69.400,0.841,0.397,0.587,0.753,0.176 +United Kingdom,2011,6.869,10.649,0.949,69.460,0.900,0.331,0.438,0.742,0.174 +United Kingdom,2012,6.881,10.656,0.935,69.520,0.889,0.366,0.425,0.739,0.184 +United Kingdom,2013,6.918,10.668,0.937,69.580,0.905,0.341,0.568,0.719,0.252 +United Kingdom,2014,6.758,10.692,0.910,69.640,0.857,0.349,0.484,0.740,0.251 +United Kingdom,2015,6.515,10.707,0.936,69.700,0.833,0.294,0.456,0.740,0.219 +United Kingdom,2016,6.824,10.721,0.954,69.800,0.821,0.244,0.458,0.732,0.230 +United Kingdom,2017,7.103,10.739,0.937,69.900,0.813,0.285,0.419,0.712,0.210 +United Kingdom,2018,7.233,10.750,0.928,70.000,0.838,0.220,0.404,0.736,0.228 +United Kingdom,2019,7.157,10.760,0.943,70.100,0.854,0.264,0.485,0.739,0.251 +United Kingdom,2020,6.798,10.639,0.929,70.200,0.885,0.196,0.490,0.717,0.225 +United Kingdom,2021,6.867,10.713,0.854,70.300,0.815,0.252,0.448,0.684,0.266 +United Kingdom,2022,6.722,10.754,0.863,70.400,0.857,0.308,0.426,0.723,0.270 +United Kingdom,2023,6.658,10.759,0.886,70.500,0.874,0.270,0.490,0.719,0.272 +United States,2006,7.182,10.921,0.965,66.780,0.911,,0.600,0.775,0.261 +United States,2007,7.513,10.931,,66.760,0.872,0.191,0.633,0.756,0.232 +United States,2008,7.280,10.923,0.953,66.740,0.878,0.249,0.668,0.774,0.227 +United States,2009,7.158,10.888,0.912,66.720,0.831,0.195,0.665,0.753,0.262 +United States,2010,7.164,10.906,0.926,66.700,0.828,0.238,0.690,0.776,0.231 +United States,2011,7.115,10.914,0.922,66.680,0.863,0.155,0.697,0.737,0.273 +United States,2012,7.026,10.929,0.903,66.660,0.823,0.208,0.710,0.765,0.260 +United States,2013,7.249,10.941,0.925,66.640,0.792,0.268,0.747,0.776,0.260 +United States,2014,7.151,10.956,0.902,66.620,0.866,0.215,0.702,0.786,0.281 +United States,2015,6.864,10.975,0.904,66.600,0.849,0.213,0.698,0.769,0.275 +United States,2016,6.804,10.985,0.897,66.475,0.758,0.138,0.739,0.737,0.264 +United States,2017,6.992,11.001,0.921,66.350,0.868,0.191,0.681,0.755,0.268 +United States,2018,6.883,11.024,0.904,66.225,0.825,0.110,0.710,0.757,0.292 +United States,2019,6.944,11.042,0.917,66.100,0.836,0.138,0.707,0.755,0.244 +United States,2020,7.028,11.005,0.937,65.975,0.850,0.028,0.678,0.722,0.295 +United States,2021,6.959,11.061,0.920,65.850,0.816,0.188,0.687,0.740,0.277 +United States,2022,6.693,11.078,0.900,65.725,0.736,0.189,0.701,0.712,0.267 +United States,2023,6.521,11.089,0.861,65.600,0.721,0.185,0.722,0.706,0.284 +Uruguay,2006,5.786,9.640,0.912,66.780,0.807,-0.125,0.477,0.701,0.306 +Uruguay,2007,5.694,9.702,0.875,66.860,0.786,-0.178,0.614,0.710,0.274 +Uruguay,2008,5.664,9.769,0.879,66.940,0.808,-0.156,0.597,0.685,0.264 +Uruguay,2009,6.296,9.808,0.924,67.020,0.825,-0.131,0.544,0.722,0.255 +Uruguay,2010,6.062,9.880,0.893,67.100,0.832,-0.171,0.471,0.738,0.231 +Uruguay,2011,6.554,9.928,0.891,67.180,0.851,-0.093,0.556,0.702,0.252 +Uruguay,2012,6.450,9.960,0.865,67.260,0.871,0.054,0.615,0.692,0.214 +Uruguay,2013,6.444,10.002,0.917,67.340,0.888,-0.056,0.586,0.743,0.253 +Uruguay,2014,6.561,10.031,0.902,67.420,0.904,-0.086,0.533,0.788,0.251 +Uruguay,2015,6.628,10.032,0.891,67.500,0.917,-0.045,0.673,0.812,0.300 +Uruguay,2016,6.171,10.045,0.900,67.500,0.886,-0.085,0.676,0.735,0.283 +Uruguay,2017,6.336,10.060,0.914,67.500,0.898,-0.104,0.627,0.742,0.280 +Uruguay,2018,6.372,10.060,0.917,67.500,0.876,-0.109,0.683,0.775,0.275 +Uruguay,2019,6.600,10.067,0.933,67.500,0.903,-0.107,0.599,0.764,0.222 +Uruguay,2020,6.310,10.002,0.921,67.500,0.908,-0.094,0.491,0.721,0.265 +Uruguay,2021,6.502,10.054,0.914,67.500,0.899,-0.054,0.606,0.746,0.263 +Uruguay,2022,6.671,10.103,0.905,67.500,0.878,-0.055,0.631,0.775,0.267 +Uruguay,2023,6.662,10.122,0.908,67.500,0.904,-0.050,0.662,0.753,0.265 +Uzbekistan,2006,5.232,8.256,0.903,61.340,0.784,-0.125,0.609,0.650,0.195 +Uzbekistan,2008,5.311,8.402,0.894,61.820,0.831,-0.033,,0.647,0.187 +Uzbekistan,2009,5.261,8.463,0.905,62.060,,0.003,0.610,0.646,0.159 +Uzbekistan,2010,5.095,8.508,0.903,62.300,,-0.040,0.519,0.665,0.152 +Uzbekistan,2011,5.739,8.554,0.924,62.540,0.934,0.032,0.522,0.663,0.123 +Uzbekistan,2012,6.019,8.608,0.933,62.780,0.914,-0.047,0.463,0.650,0.118 +Uzbekistan,2013,5.940,8.662,0.963,63.020,0.950,-0.043,0.434,0.686,0.130 +Uzbekistan,2014,6.049,8.712,0.952,63.260,0.954,0.052,0.536,0.713,0.106 +Uzbekistan,2015,5.972,8.764,0.968,63.500,0.980,0.366,0.471,0.778,0.103 +Uzbekistan,2016,5.893,8.804,0.945,63.800,0.984,0.199,,0.771,0.147 +Uzbekistan,2017,6.421,8.831,0.942,64.100,0.985,0.114,0.465,0.745,0.203 +Uzbekistan,2018,6.205,8.870,0.921,64.400,0.970,0.308,0.520,0.746,0.209 +Uzbekistan,2019,6.154,8.910,0.915,64.700,0.970,0.295,0.511,0.751,0.220 +Uzbekistan,2020,5.842,8.910,0.850,65.000,0.928,0.190,0.642,0.678,0.279 +Uzbekistan,2021,6.185,8.962,0.896,65.300,0.927,0.183,0.662,0.698,0.233 +Uzbekistan,2022,6.016,8.996,0.879,65.600,0.959,0.306,0.616,0.741,0.225 +Uzbekistan,2023,6.385,9.026,0.909,65.900,0.927,0.247,0.650,0.752,0.202 +Venezuela,2005,7.170,9.316,0.955,65.500,0.838,,0.720,0.803,0.233 +Venezuela,2006,6.525,9.467,0.946,65.460,0.798,-0.037,0.646,0.837,0.178 +Venezuela,2008,6.258,9.719,0.922,65.380,0.678,-0.232,0.776,0.818,0.224 +Venezuela,2009,7.189,9.567,0.945,65.340,0.677,-0.124,0.828,0.792,0.180 +Venezuela,2010,7.478,9.748,0.932,65.300,0.768,-0.163,0.754,0.847,0.130 +Venezuela,2011,6.580,9.859,0.931,65.260,0.766,-0.235,0.772,0.823,0.199 +Venezuela,2012,7.067,9.862,0.932,65.220,0.804,-0.201,0.743,0.844,0.176 +Venezuela,2013,6.553,9.802,0.896,65.180,0.642,-0.230,0.837,0.812,0.238 +Venezuela,2014,6.136,9.366,0.904,65.140,0.570,-0.191,0.827,0.797,0.244 +Venezuela,2015,5.569,8.532,0.911,65.100,0.512,-0.089,0.813,0.837,0.223 +Venezuela,2016,4.041,7.602,0.902,64.925,0.458,-0.060,0.890,0.676,0.392 +Venezuela,2017,5.071,5.943,0.896,64.750,0.636,0.050,0.844,0.697,0.363 +Venezuela,2018,5.006,5.935,0.887,64.575,0.611,0.068,0.828,0.723,0.374 +Venezuela,2019,5.081,5.527,0.888,64.400,0.626,0.124,0.839,0.730,0.351 +Venezuela,2020,4.574,,0.805,64.225,0.612,,0.811,0.689,0.396 +Venezuela,2021,5.108,,0.812,64.050,0.596,,0.824,0.698,0.389 +Venezuela,2022,5.949,,0.899,63.875,0.770,,0.798,0.754,0.292 +Venezuela,2023,5.765,,0.885,63.700,0.757,,0.825,0.758,0.300 +Vietnam,2006,5.294,8.554,0.888,64.180,0.886,-0.006,,0.657,0.204 +Vietnam,2007,5.422,8.613,0.856,64.260,0.918,0.068,0.754,,0.206 +Vietnam,2008,5.480,8.658,0.805,64.340,0.889,0.180,0.789,0.624,0.218 +Vietnam,2009,5.304,8.701,0.815,64.420,0.834,-0.083,0.838,0.481,0.190 +Vietnam,2010,5.296,8.752,0.787,64.500,0.831,-0.027,0.743,0.671,0.216 +Vietnam,2011,5.767,8.804,0.898,64.580,0.818,0.084,0.742,0.494,0.193 +Vietnam,2012,5.535,8.847,0.775,64.660,0.856,-0.131,0.815,0.546,0.221 +Vietnam,2013,5.023,8.890,0.759,64.740,0.920,-0.048,0.771,0.689,0.165 +Vietnam,2014,5.085,8.941,0.792,64.820,,-0.022,,0.634,0.241 +Vietnam,2015,5.076,8.999,0.849,64.900,,0.064,,0.583,0.232 +Vietnam,2016,5.062,9.053,0.876,65.000,0.894,-0.112,0.799,0.487,0.223 +Vietnam,2017,5.175,9.111,,65.100,,,,, +Vietnam,2018,5.296,9.173,0.832,65.200,0.909,-0.063,0.808,0.614,0.191 +Vietnam,2019,5.467,9.235,0.848,65.300,0.952,-0.148,0.788,0.658,0.186 +Vietnam,2020,5.462,9.254,0.765,65.400,0.945,0.063,0.791,0.699,0.286 +Vietnam,2021,5.540,9.271,0.799,65.500,0.897,0.104,0.798,0.651,0.280 +Vietnam,2022,6.267,9.341,0.879,65.600,0.975,-0.182,0.703,0.774,0.108 +Vietnam,2023,6.325,9.392,0.845,65.700,0.956,-0.159,0.655,0.710,0.120 +Yemen,2007,4.477,8.212,0.825,58.720,0.673,0.006,,0.524,0.379 +Yemen,2009,4.809,8.250,0.756,58.640,0.644,-0.056,0.832,0.511,0.374 +Yemen,2010,4.350,8.414,0.727,58.600,0.659,-0.107,0.853,0.514,0.308 +Yemen,2011,3.746,8.264,0.663,58.560,0.638,-0.174,0.754,0.416,0.285 +Yemen,2012,4.061,8.179,0.682,58.520,0.706,-0.172,0.793,0.413,0.263 +Yemen,2013,4.218,8.166,0.694,58.480,0.543,-0.179,0.885,0.478,0.266 +Yemen,2014,3.968,8.159,0.638,58.440,0.664,-0.166,0.885,0.527,0.276 +Yemen,2015,2.983,7.772,0.669,58.400,0.610,-0.138,0.829,0.458,0.321 +Yemen,2016,3.826,7.552,0.775,58.175,0.533,-0.144,,0.401,0.228 +Yemen,2017,3.254,7.243,0.790,57.950,0.595,-0.128,,0.368,0.295 +Yemen,2018,3.058,7.444,0.789,57.725,0.553,-0.127,0.793,0.409,0.315 +Yemen,2019,4.197,7.448,0.870,57.500,0.651,-0.106,0.798,0.481,0.213 +Yemen,2022,3.590,,0.872,56.825,0.607,,0.788,0.460,0.255 +Yemen,2023,3.532,,0.825,56.600,0.583,,0.771,0.447,0.341 +Zambia,2006,4.824,7.834,0.798,46.760,0.721,-0.012,0.785,0.664,0.226 +Zambia,2007,3.998,7.879,0.688,47.420,0.682,-0.073,0.948,0.653,0.246 +Zambia,2008,4.730,7.918,0.624,48.080,0.717,0.051,0.890,0.707,0.206 +Zambia,2009,5.260,7.971,0.782,48.740,0.696,-0.101,0.917,0.693,0.123 +Zambia,2011,4.999,8.054,0.864,50.060,0.663,-0.001,0.882,0.771,0.204 +Zambia,2012,5.013,8.094,0.780,50.720,0.788,0.004,0.806,0.676,0.250 +Zambia,2013,5.244,8.111,0.761,51.380,0.770,-0.108,0.732,0.727,0.308 +Zambia,2014,4.346,8.124,0.706,52.040,0.812,-0.014,0.809,0.639,0.327 +Zambia,2015,4.843,8.121,0.691,52.700,0.759,-0.042,0.871,0.634,0.382 +Zambia,2016,4.348,8.127,0.767,53.125,0.812,0.119,0.771,0.688,0.372 +Zambia,2017,3.933,8.130,0.744,53.550,0.823,0.137,0.740,0.660,0.387 +Zambia,2018,4.041,8.139,0.718,53.975,0.791,0.045,0.811,0.662,0.351 +Zambia,2019,3.307,8.123,0.638,54.400,0.811,0.074,0.832,0.674,0.394 +Zambia,2020,4.838,8.066,0.767,54.825,0.750,0.054,0.810,0.679,0.345 +Zambia,2021,3.082,8.082,0.619,55.250,0.833,0.138,0.824,0.656,0.349 +Zambia,2022,3.728,8.101,0.717,55.675,0.889,-0.009,0.716,0.660,0.309 +Zambia,2023,3.686,8.115,0.664,56.100,0.854,0.092,0.814,0.653,0.359 +Zimbabwe,2006,3.826,7.460,0.822,40.400,0.431,-0.063,0.905,0.669,0.297 +Zimbabwe,2007,3.280,7.413,0.828,41.600,0.456,-0.069,0.946,0.589,0.265 +Zimbabwe,2008,3.174,7.210,0.843,42.800,0.344,-0.077,0.964,0.571,0.250 +Zimbabwe,2009,4.056,7.313,0.806,44.000,0.411,-0.065,0.931,0.660,0.218 +Zimbabwe,2010,4.682,7.495,0.857,45.200,0.665,-0.081,0.828,0.699,0.122 +Zimbabwe,2011,4.846,7.617,0.865,46.400,0.633,-0.077,0.830,0.699,0.211 +Zimbabwe,2012,4.955,7.745,0.896,47.600,0.470,-0.091,0.859,0.613,0.177 +Zimbabwe,2013,4.690,7.755,0.799,48.800,0.576,-0.093,0.831,0.624,0.182 +Zimbabwe,2014,4.184,7.748,0.766,50.000,0.642,-0.062,0.820,0.661,0.239 +Zimbabwe,2015,3.703,7.747,0.736,51.200,0.667,-0.111,0.810,0.639,0.179 +Zimbabwe,2016,3.735,7.735,0.768,51.675,0.733,-0.082,0.724,0.685,0.209 +Zimbabwe,2017,3.638,7.754,0.754,52.150,0.753,-0.084,0.751,0.734,0.224 +Zimbabwe,2018,3.616,7.783,0.775,52.625,0.763,-0.055,0.844,0.658,0.212 +Zimbabwe,2019,2.694,7.698,0.759,53.100,0.632,-0.051,0.831,0.658,0.235 +Zimbabwe,2020,3.160,7.596,0.717,53.575,0.643,0.003,0.789,0.661,0.346 +Zimbabwe,2021,3.155,7.657,0.685,54.050,0.668,-0.079,0.757,0.610,0.242 +Zimbabwe,2022,3.296,7.670,0.666,54.525,0.652,-0.073,0.753,0.641,0.191 +Zimbabwe,2023,3.572,7.679,0.694,55.000,0.735,-0.069,0.757,0.610,0.179 diff --git a/data/plotly_intro/bubbly.py b/data/plotly_intro/bubbly.py new file mode 100644 index 00000000..ee6f6cde --- /dev/null +++ b/data/plotly_intro/bubbly.py @@ -0,0 +1,605 @@ +import numpy as np +import pandas as pd + + +def bubbleplot( + dataset, + x_column, + y_column, + bubble_column, + z_column=None, + time_column=None, + size_column=None, + color_column=None, + x_logscale=False, + y_logscale=False, + z_logscale=False, + x_range=None, + y_range=None, + z_range=None, + x_title=None, + y_title=None, + z_title=None, + title=None, + colorbar_title=None, + scale_bubble=1, + colorscale=None, + marker_opacity=None, + marker_border_width=None, + show_slider=True, + show_button=True, + show_colorbar=True, + show_legend=None, + width=None, + height=None, +): + """Makes the animated and interactive bubble charts from a given dataset.""" + + # Set category_column as None and update it as color_column only in case + # color_column is not None and categorical, in which case set color_column as None + category_column = None + if color_column: # Can be numerical or categorical + if dataset[color_column].dtype.name in ["category", "object", "bool"]: + category_column = color_column + color_column = None + + # Set the variables for making the grid + if time_column: + years = dataset[time_column].unique() + else: + years = None + show_slider = False + show_button = False + + column_names = [x_column, y_column] + + if z_column: + column_names.append(z_column) + axes3d = True + else: + axes3d = False + + column_names.append(bubble_column) + + if size_column: + column_names.append(size_column) + + if color_column: + column_names.append(color_column) + + # Make the grid + if category_column: + categories = dataset[category_column].unique() + col_name_template = "{}+{}+{}_grid" + grid = make_grid_with_categories( + dataset, column_names, time_column, category_column, years, categories + ) + if show_legend is None: + showlegend = True + else: + showlegend = show_legend + else: + col_name_template = "{}+{}_grid" + grid = make_grid(dataset, column_names, time_column, years) + if show_legend is None: + showlegend = False + else: + showlegend = show_legend + + # Set the layout + if show_slider: + slider_scale = years + else: + slider_scale = None + + figure, sliders_dict = set_layout( + x_title, + y_title, + z_title, + title, + x_logscale, + y_logscale, + z_logscale, + axes3d, + show_slider, + slider_scale, + show_button, + showlegend, + width, + height, + ) + + if size_column: + sizeref = ( + 2.0 * max(dataset[size_column]) / (scale_bubble * 80**2) + ) # Set the reference size for the bubbles + else: + sizeref = None + + # Add the frames + if category_column: + # Add the base frame + for category in categories: + if time_column: + year = min(years) # The earliest year for the base frame + col_name_template_year = col_name_template.format(year, {}, {}) + else: + col_name_template_year = "{}+{}_grid" + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + category=category, + ) + if z_column: + trace["type"] = "scatter3d" + figure["data"].append(trace) + + # Add time frames + if time_column: # Only if time_column is not None + for year in years: + frame = {"data": [], "name": str(year)} + for category in categories: + col_name_template_year = col_name_template.format(year, {}, {}) + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + category=category, + ) + if z_column: + trace["type"] = "scatter3d" + frame["data"].append(trace) + + figure["frames"].append(frame) + + if show_slider: + add_slider_steps(sliders_dict, year) + + else: + # Add the base frame + if time_column: + year = min(years) # The earliest year for the base frame + col_name_template_year = col_name_template.format(year, {}) + else: + col_name_template_year = "{}_grid" + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + color_column, + colorscale, + show_colorbar, + colorbar_title, + ) + if z_column: + trace["type"] = "scatter3d" + figure["data"].append(trace) + + # Add time frames + if time_column: # Only if time_column is not None + for year in years: + col_name_template_year = col_name_template.format(year, {}) + frame = {"data": [], "name": str(year)} + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + color_column, + colorscale, + show_colorbar, + colorbar_title, + ) + if z_column: + trace["type"] = "scatter3d" + frame["data"].append(trace) + figure["frames"].append(frame) + if show_slider: + add_slider_steps(sliders_dict, year) + + # Set ranges for the axes + if x_range is None: + x_range = set_range(dataset[x_column], x_logscale) + + if y_range is None: + y_range = set_range(dataset[y_column], y_logscale) + + if axes3d: + if z_range is None: + z_range = set_range(dataset[z_column], z_logscale) + figure["layout"]["scene"]["xaxis"]["range"] = x_range + figure["layout"]["scene"]["yaxis"]["range"] = y_range + figure["layout"]["scene"]["zaxis"]["range"] = z_range + else: + figure["layout"]["xaxis"]["range"] = x_range + figure["layout"]["yaxis"]["range"] = y_range + + if show_slider: + figure["layout"]["sliders"] = [sliders_dict] + + return figure + + +def make_grid(dataset, column_names, time_column, years=None): + """Makes the grid for the plot as a pandas DataFrame by-passing the use of `plotly.grid_objs` + that is unavailable in the offline mode for `plotly`. The grids are designed using the `col_name_template` + from the `column_names` of the `dataset`.""" + + grid = pd.DataFrame() + if time_column: + col_name_template = "{}+{}_grid" + if years is None: + years = dataset[time_column].unique() + + for year in years: + dataset_by_year = dataset[(dataset[time_column] == int(year))] + for col_name in column_names: + # Each column name is unique + temp = col_name_template.format(year, col_name) + if dataset_by_year[col_name].size != 0: + grid = grid.append( + {"value": list(dataset_by_year[col_name]), "key": temp}, + ignore_index=True, + ) + else: + # Check if this can be simplified + for col_name in column_names: + # Each column name is unique + grid = grid.append( + {"value": list(dataset[col_name]), "key": col_name + "_grid"}, + ignore_index=True, + ) + + return grid + + +def make_grid_with_categories( + dataset, column_names, time_column, category_column, years=None, categories=None +): + """Makes the grid for the plot as a pandas DataFrame by-passing the use of plotly.grid_objs + that is unavailable in the offline mode for plotly. The grids are designed using the `col_name_template` + from the `column_names` of the `dataset` using the `category_column` for catergories.""" + + grid = pd.DataFrame() + if categories is None: + categories = dataset[category_column].unique() + if time_column: + col_name_template = "{}+{}+{}_grid" + if years is None: + years = dataset[time_column].unique() + + for year in years: + for category in categories: + dataset_by_year_and_cat = dataset[ + (dataset[time_column] == int(year)) + & (dataset[category_column] == category) + ] + for col_name in column_names: + # Each column name is unique + temp = col_name_template.format(year, col_name, category) + if dataset_by_year_and_cat[col_name].size != 0: + grid = grid.append( + { + "value": list(dataset_by_year_and_cat[col_name]), + "key": temp, + }, + ignore_index=True, + ) + else: + col_name_template = "{}+{}_grid" + for category in categories: + dataset_by_cat = dataset[(dataset[category_column] == category)] + for col_name in column_names: + # Each column name is unique + temp = col_name_template.format(col_name, category) + if dataset_by_cat[col_name].size != 0: + grid = grid.append( + {"value": list(dataset_by_cat[col_name]), "key": temp}, + ignore_index=True, + ) + + return grid + + +def set_layout( + x_title=None, + y_title=None, + z_title=None, + title=None, + x_logscale=False, + y_logscale=False, + z_logscale=False, + axes3d=False, + show_slider=True, + slider_scale=None, + show_button=True, + show_legend=False, + width=None, + height=None, +): + """Sets the layout for the figure.""" + + # Define the figure object as a dictionary + figure = {"data": [], "layout": {}, "frames": []} + + # Start with filling the layout first + if axes3d: + figure = set_3daxes( + figure, x_title, y_title, z_title, x_logscale, y_logscale, z_logscale + ) + else: + figure = set_2daxes(figure, x_title, y_title, x_logscale, y_logscale) + + figure["layout"]["title"] = title + figure["layout"]["hovermode"] = "closest" + figure["layout"]["showlegend"] = show_legend + figure["layout"]["margin"] = {"b": 50, "t": 50, "pad": 5} + + if width: + figure["layout"]["width"] = width + if height: + figure["layout"]["height"] = height + + # Add slider for the time scale + if show_slider: + sliders_dict = add_slider(figure, slider_scale) + else: + sliders_dict = {} + + # Add a pause-play button + if show_button: + add_button(figure) + + # Return the figure object + return figure, sliders_dict + + +def set_2daxes(figure, x_title=None, y_title=None, x_logscale=False, y_logscale=False): + """Sets 2D axes""" + + figure["layout"]["xaxis"] = {"title": x_title, "autorange": False} + figure["layout"]["yaxis"] = {"title": y_title, "autorange": False} + + if x_logscale: + figure["layout"]["xaxis"]["type"] = "log" + if y_logscale: + figure["layout"]["yaxis"]["type"] = "log" + + return figure + + +def set_3daxes( + figure, + x_title=None, + y_title=None, + z_title=None, + x_logscale=False, + y_logscale=False, + z_logscale=False, +): + """Sets 3D axes""" + + figure["layout"]["scene"] = {} + figure["layout"]["scene"]["xaxis"] = {"title": x_title, "autorange": False} + figure["layout"]["scene"]["yaxis"] = {"title": y_title, "autorange": False} + figure["layout"]["scene"]["zaxis"] = {"title": z_title, "autorange": False} + + if x_logscale: + figure["layout"]["scene"]["xaxis"]["type"] = "log" + if y_logscale: + figure["layout"]["scene"]["yaxis"]["type"] = "log" + if z_logscale: + figure["layout"]["scene"]["zaxis"]["type"] = "log" + + return figure + + +def add_slider(figure, slider_scale): + """Adds slider for animation""" + + figure["layout"]["sliders"] = { + "args": ["slider.value", {"duration": 400, "ease": "cubic-in-out"}], + "initialValue": min(slider_scale), + "plotlycommand": "animate", + "values": slider_scale, + "visible": True, + } + + sliders_dict = { + "active": 0, + "yanchor": "top", + "xanchor": "left", + "currentvalue": { + "font": {"size": 20}, + "prefix": "Year:", + "visible": True, + "xanchor": "right", + }, + "transition": {"duration": 300, "easing": "cubic-in-out"}, + "pad": {"b": 10, "t": 50}, + "len": 0.9, + "x": 0.1, + "y": 0, + "steps": [], + } + + return sliders_dict + + +def add_slider_steps(sliders_dict, year): + """Adds the slider steps.""" + + slider_step = { + "args": [ + [year], + { + "frame": {"duration": 300, "redraw": False}, + "mode": "immediate", + "transition": {"duration": 300}, + }, + ], + "label": str(year), + "method": "animate", + } + sliders_dict["steps"].append(slider_step) + + +def add_button(figure): + """Adds the pause-play button for animation""" + + figure["layout"]["updatemenus"] = [ + { + "buttons": [ + { + "args": [ + None, + { + "frame": {"duration": 500, "redraw": False}, + "fromcurrent": True, + "transition": { + "duration": 300, + "easing": "quadratic-in-out", + }, + }, + ], + "label": "Play", + "method": "animate", + }, + { + "args": [ + [None], + { + "frame": {"duration": 0, "redraw": False}, + "mode": "immediate", + "transition": {"duration": 0}, + }, + ], + "label": "Pause", + "method": "animate", + }, + ], + "direction": "left", + "pad": {"r": 10, "t": 87}, + "showactive": False, + "type": "buttons", + "x": 0.1, + "xanchor": "right", + "y": 0, + "yanchor": "top", + } + ] + + +def set_range(values, logscale=False): + """Finds the axis range for the figure.""" + + if logscale: + rmin = min(np.log10(values)) * 0.97 + rmax = max(np.log10(values)) * 1.04 + else: + rmin = min(values) * 0.7 + rmax = max(values) * 1.4 + + return [rmin, rmax] + + +def get_trace( + grid, + col_name_template, + x_column, + y_column, + bubble_column, + z_column=None, + size_column=None, + sizeref=200000, + scale_bubble=1, + marker_opacity=None, + marker_border_width=None, + color_column=None, + colorscale=None, + show_colorbar=True, + colorbar_title=None, + category=None, +): + """Makes the trace for the data as a dictionary object that can be added to the figure or time frames.""" + + trace = { + "x": grid.loc[ + grid["key"] == col_name_template.format(x_column, category), "value" + ].values[0], + "y": grid.loc[ + grid["key"] == col_name_template.format(y_column, category), "value" + ].values[0], + "text": grid.loc[ + grid["key"] == col_name_template.format(bubble_column, category), "value" + ].values[0], + "mode": "markers", + } + + if z_column: + trace["z"] = grid.loc[ + grid["key"] == col_name_template.format(z_column, category), "value" + ].values[0] + + if size_column: + trace["marker"] = { + "sizemode": "area", + "sizeref": sizeref, + "size": grid.loc[ + grid["key"] == col_name_template.format(size_column, category), "value" + ].values[0], + } + else: + trace["marker"] = { + "size": 10 * scale_bubble, + } + + if marker_opacity: + trace["marker"]["opacity"] = marker_opacity + + if marker_border_width: + trace["marker"]["line"] = {"width": marker_border_width} + + if color_column: + trace["marker"]["color"] = grid.loc[ + grid["key"] == col_name_template.format(color_column), "value" + ].values[0] + trace["marker"]["colorbar"] = {"title": colorbar_title} + trace["marker"]["colorscale"] = colorscale + + if category: + trace["name"] = category + + return trace diff --git a/data/plotly_intro/country_region_mapping.csv b/data/plotly_intro/country_region_mapping.csv new file mode 100644 index 00000000..f28c9203 --- /dev/null +++ b/data/plotly_intro/country_region_mapping.csv @@ -0,0 +1,144 @@ +Country name,Regional indicator,Ladder score,upperwhisker,lowerwhisker,Log GDP per capita,Social support,Healthy life expectancy,Freedom to make life choices,Generosity,Perceptions of corruption,Dystopia + residual +Finland,Western Europe,7.741,7.815,7.667,1.844,1.572,0.695,0.859,0.142,0.546,2.082 +Denmark,Western Europe,7.583,7.665,7.500,1.908,1.520,0.699,0.823,0.204,0.548,1.881 +Iceland,Western Europe,7.525,7.618,7.433,1.881,1.617,0.718,0.819,0.258,0.182,2.050 +Sweden,Western Europe,7.344,7.422,7.267,1.878,1.501,0.724,0.838,0.221,0.524,1.658 +Israel,Middle East and North Africa,7.341,7.405,7.277,1.803,1.513,0.740,0.641,0.153,0.193,2.298 +Netherlands,Western Europe,7.319,7.383,7.256,1.901,1.462,0.706,0.725,0.247,0.372,1.906 +Norway,Western Europe,7.302,7.389,7.215,1.952,1.517,0.704,0.835,0.224,0.484,1.586 +Luxembourg,Western Europe,7.122,7.213,7.031,2.141,1.355,0.708,0.801,0.146,0.432,1.540 +Switzerland,Western Europe,7.060,7.147,6.973,1.970,1.425,0.747,0.759,0.173,0.498,1.488 +Australia,North America and ANZ,7.057,7.141,6.973,1.854,1.461,0.692,0.756,0.225,0.323,1.745 +New Zealand,North America and ANZ,7.029,7.105,6.954,1.810,1.527,0.673,0.746,0.226,0.480,1.567 +Costa Rica,Latin America and Caribbean,6.955,7.051,6.860,1.561,1.373,0.661,0.797,0.109,0.123,2.333 +Kuwait,Middle East and North Africa,6.951,7.060,6.843,1.845,1.364,0.661,0.827,0.200,0.172,1.884 +Austria,Western Europe,6.905,6.986,6.824,1.885,1.336,0.696,0.703,0.214,0.305,1.766 +Canada,North America and ANZ,6.900,6.984,6.815,1.840,1.459,0.701,0.730,0.230,0.368,1.572 +Belgium,Western Europe,6.894,6.961,6.827,1.868,1.440,0.690,0.729,0.170,0.311,1.686 +Ireland,Western Europe,6.838,6.927,6.749,2.129,1.390,0.700,0.758,0.205,0.418,1.239 +Czechia,Central and Eastern Europe,6.822,6.903,6.741,1.783,1.511,0.638,0.787,0.177,0.068,1.858 +Lithuania,Central and Eastern Europe,6.818,6.896,6.739,1.766,1.454,0.598,0.533,0.044,0.116,2.307 +United Kingdom,Western Europe,6.749,6.833,6.665,1.822,1.326,0.672,0.713,0.267,0.351,1.598 +Slovenia,Central and Eastern Europe,6.743,6.843,6.643,1.786,1.502,0.695,0.789,0.157,0.131,1.683 +United Arab Emirates,Middle East and North Africa,6.733,6.823,6.643,1.983,1.164,0.563,0.815,0.209,0.258,1.741 +United States,North America and ANZ,6.725,6.818,6.631,1.939,1.392,0.542,0.586,0.223,0.169,1.873 +Germany,Western Europe,6.719,6.815,6.622,1.871,1.390,0.702,0.700,0.174,0.368,1.513 +Mexico,Latin America and Caribbean,6.678,6.781,6.575,1.521,1.241,0.544,0.722,0.086,0.127,2.437 +Uruguay,Latin America and Caribbean,6.611,6.696,6.527,1.596,1.431,0.592,0.775,0.106,0.220,1.891 +France,Western Europe,6.609,6.685,6.533,1.818,1.348,0.727,0.650,0.112,0.281,1.672 +Saudi Arabia,Middle East and North Africa,6.594,6.707,6.480,1.842,1.361,0.511,0.787,0.114,0.188,1.790 +Kosovo,Central and Eastern Europe,6.561,6.667,6.455,1.364,1.277,0.599,0.739,0.254,0.073,2.255 +Singapore,Southeast Asia,6.523,6.605,6.440,2.118,1.361,0.769,0.743,0.168,0.575,0.788 +Taiwan Province of China,East Asia,6.503,6.597,6.410,1.842,1.346,0.650,0.649,0.068,0.202,1.747 +Romania,Central and Eastern Europe,6.491,6.592,6.390,1.699,1.236,0.583,0.717,0.041,0.006,2.210 +El Salvador,Latin America and Caribbean,6.469,6.599,6.338,1.265,1.080,0.549,0.816,0.083,0.253,2.424 +Estonia,Central and Eastern Europe,6.448,6.524,6.371,1.752,1.527,0.657,0.805,0.166,0.401,1.138 +Poland,Central and Eastern Europe,6.442,6.513,6.370,1.738,1.417,0.639,0.600,0.081,0.175,1.791 +Spain,Western Europe,6.421,6.502,6.339,1.766,1.471,0.729,0.619,0.119,0.177,1.540 +Serbia,Central and Eastern Europe,6.411,6.522,6.300,1.538,1.391,0.585,0.663,0.200,0.101,1.932 +Chile,Latin America and Caribbean,6.360,6.448,6.273,1.616,1.369,0.673,0.651,0.117,0.075,1.858 +Panama,Latin America and Caribbean,6.358,6.489,6.227,1.702,1.392,0.633,0.720,0.063,0.043,1.806 +Malta,Western Europe,6.346,6.430,6.261,1.827,1.444,0.707,0.727,0.250,0.125,1.267 +Italy,Western Europe,6.324,6.436,6.211,1.800,1.328,0.720,0.513,0.112,0.074,1.777 +Guatemala,Latin America and Caribbean,6.287,6.457,6.117,1.260,1.169,0.467,0.735,0.105,0.078,2.473 +Nicaragua,Latin America and Caribbean,6.284,6.433,6.135,1.097,1.263,0.542,0.793,0.133,0.251,2.203 +Brazil,Latin America and Caribbean,6.272,6.390,6.154,1.430,1.269,0.548,0.685,0.130,0.142,2.068 +Slovakia,Central and Eastern Europe,6.257,6.332,6.182,1.706,1.540,0.638,0.566,0.096,0.058,1.653 +Latvia,Central and Eastern Europe,6.234,6.314,6.155,1.700,1.508,0.564,0.666,0.127,0.078,1.590 +Uzbekistan,Commonwealth of Independent States,6.195,6.303,6.087,1.212,1.394,0.539,0.835,0.251,0.215,1.749 +Argentina,Latin America and Caribbean,6.188,6.306,6.070,1.562,1.381,0.585,0.681,0.087,0.080,1.812 +Kazakhstan,Commonwealth of Independent States,6.188,6.278,6.097,1.622,1.457,0.556,0.733,0.149,0.120,1.551 +Cyprus,Western Europe,6.068,6.182,5.954,1.794,1.217,0.744,0.529,0.124,0.049,1.611 +Japan,East Asia,6.060,6.144,5.976,1.786,1.354,0.785,0.632,0.023,0.219,1.261 +South Korea,East Asia,6.058,6.148,5.968,1.815,1.178,0.770,0.555,0.126,0.158,1.456 +Philippines,Southeast Asia,6.048,6.166,5.929,1.232,1.146,0.441,0.826,0.099,0.136,2.167 +Vietnam,Southeast Asia,6.043,6.138,5.948,1.331,1.267,0.539,0.843,0.094,0.160,1.810 +Portugal,Western Europe,6.030,6.134,5.925,1.728,1.368,0.699,0.757,0.047,0.035,1.397 +Hungary,Central and Eastern Europe,6.017,6.124,5.910,1.722,1.528,0.596,0.581,0.123,0.067,1.400 +Paraguay,Latin America and Caribbean,5.977,6.085,5.868,1.398,1.408,0.549,0.788,0.131,0.065,1.637 +Thailand,Southeast Asia,5.976,6.094,5.858,1.484,1.347,0.620,0.756,0.283,0.024,1.463 +Malaysia,Southeast Asia,5.975,6.078,5.872,1.646,1.143,0.540,0.829,0.226,0.119,1.473 +China,East Asia,5.973,6.061,5.885,1.497,1.239,0.629,0.704,0.132,0.164,1.608 +Honduras,Latin America and Caribbean,5.968,6.114,5.822,1.091,1.035,0.502,0.720,0.175,0.081,2.364 +Bahrain,Middle East and North Africa,5.959,6.153,5.766,,,,,,, +Croatia,Central and Eastern Europe,5.942,6.047,5.837,1.710,1.445,0.637,0.469,0.064,0.043,1.574 +Greece,Western Europe,5.934,6.027,5.840,1.684,1.276,0.696,0.337,0.018,0.093,1.830 +Bosnia and Herzegovina,Central and Eastern Europe,5.877,5.979,5.775,1.465,1.318,0.587,0.621,0.246,0.000,1.640 +Libya,Middle East and North Africa,5.866,5.987,5.746,1.526,1.100,0.550,0.592,0.111,0.204,1.785 +Jamaica,Latin America and Caribbean,5.842,6.059,5.624,1.280,1.324,0.567,0.647,0.089,0.028,1.907 +Peru,Latin America and Caribbean,5.841,5.946,5.736,1.371,1.180,0.662,0.615,0.078,0.029,1.907 +Dominican Republic,Latin America and Caribbean,5.823,5.967,5.679,1.517,1.272,0.511,0.730,0.086,0.196,1.512 +Mauritius,Sub-Saharan Africa,5.816,5.927,5.706,1.570,1.358,0.490,0.641,0.123,0.118,1.517 +Moldova,Commonwealth of Independent States,5.816,5.930,5.702,1.385,1.277,0.542,0.695,0.077,0.044,1.795 +Russia,Commonwealth of Independent States,5.785,5.859,5.712,1.642,1.351,0.531,0.551,0.138,0.121,1.451 +Bolivia,Latin America and Caribbean,5.784,5.895,5.674,1.217,1.179,0.488,0.719,0.100,0.061,2.020 +Ecuador,Latin America and Caribbean,5.725,5.850,5.599,1.315,1.151,0.640,0.606,0.087,0.078,1.846 +Kyrgyzstan,Commonwealth of Independent States,5.714,5.795,5.632,1.054,1.477,0.588,0.834,0.225,0.030,1.505 +Montenegro,Central and Eastern Europe,5.707,5.815,5.599,1.571,1.318,0.587,0.632,0.110,0.132,1.357 +Mongolia,East Asia,5.696,5.783,5.610,1.353,1.511,0.400,0.501,0.237,0.055,1.640 +Colombia,Latin America and Caribbean,5.695,5.806,5.584,1.437,1.241,0.648,0.644,0.072,0.059,1.596 +Venezuela,Latin America and Caribbean,5.607,5.725,5.489,0.000,1.321,0.491,0.518,0.192,0.086,2.998 +Indonesia,Southeast Asia,5.568,5.670,5.466,1.361,1.184,0.472,0.779,0.399,0.055,1.318 +Bulgaria,Central and Eastern Europe,5.463,5.569,5.357,1.629,1.469,0.567,0.620,0.083,0.006,1.088 +Armenia,Commonwealth of Independent States,5.455,5.560,5.350,1.444,1.154,0.603,0.650,0.051,0.173,1.379 +South Africa,Sub-Saharan Africa,5.422,5.549,5.295,1.389,1.369,0.322,0.537,0.078,0.034,1.693 +North Macedonia,Central and Eastern Europe,5.369,5.468,5.270,1.475,1.277,0.569,0.580,0.194,0.015,1.260 +Algeria,Middle East and North Africa,5.364,5.476,5.251,1.324,1.191,0.568,0.247,0.091,0.200,1.743 +Hong Kong S.A.R. of China,East Asia,5.316,5.403,5.229,1.909,1.184,0.857,0.485,0.147,0.402,0.333 +Albania,Central and Eastern Europe,5.304,5.440,5.168,1.438,0.924,0.638,0.690,0.138,0.049,1.428 +Tajikistan,Commonwealth of Independent States,5.281,5.361,5.201,,,,,,, +Congo (Brazzaville),Sub-Saharan Africa,5.221,5.396,5.047,0.892,0.622,0.306,0.523,0.124,0.138,2.617 +Mozambique,Sub-Saharan Africa,5.216,5.406,5.027,0.560,0.883,0.156,0.728,0.158,0.196,2.536 +Georgia,Commonwealth of Independent States,5.185,5.283,5.087,1.467,0.990,0.524,0.680,0.000,0.174,1.349 +Iraq,Middle East and North Africa,5.166,5.283,5.049,1.249,0.996,0.498,0.425,0.141,0.048,1.809 +Nepal,South Asia,5.158,5.290,5.027,0.965,0.990,0.443,0.653,0.209,0.115,1.783 +Laos,Southeast Asia,5.139,5.261,5.017,1.208,0.846,0.423,0.796,0.170,0.167,1.529 +Gabon,Sub-Saharan Africa,5.106,5.243,4.969,1.403,1.038,0.344,0.516,0.045,0.100,1.660 +Ivory Coast,Sub-Saharan Africa,5.080,5.224,4.936,1.080,0.578,0.288,0.547,0.120,0.164,2.303 +Guinea,Sub-Saharan Africa,5.023,5.166,4.881,0.831,0.622,0.236,0.521,0.210,0.107,2.497 +Turkiye,Middle East and North Africa,4.975,5.085,4.866,1.702,1.175,0.631,0.202,0.068,0.115,1.083 +Senegal,Sub-Saharan Africa,4.969,5.096,4.841,0.927,0.751,0.392,0.607,0.152,0.069,2.071 +Iran,Middle East and North Africa,4.923,5.024,4.822,1.435,1.136,0.571,0.366,0.235,0.123,1.057 +Azerbaijan,Commonwealth of Independent States,4.893,5.018,4.768,1.433,0.876,0.496,0.668,0.112,0.199,1.110 +Nigeria,Sub-Saharan Africa,4.881,5.018,4.744,1.042,1.075,0.256,0.566,0.201,0.019,1.722 +State of Palestine,Middle East and North Africa,4.879,5.006,4.753,,,,,,, +Cameroon,Sub-Saharan Africa,4.874,4.996,4.753,0.943,0.856,0.288,0.521,0.126,0.060,2.080 +Ukraine,Commonwealth of Independent States,4.873,4.988,4.758,1.350,1.315,0.513,0.631,0.285,0.025,0.753 +Namibia,Sub-Saharan Africa,4.832,4.958,4.705,1.266,1.212,0.307,0.470,0.069,0.061,1.446 +Morocco,Middle East and North Africa,4.795,4.912,4.677,1.213,0.471,0.495,0.631,0.042,0.082,1.861 +Pakistan,South Asia,4.657,4.779,4.535,1.069,0.600,0.321,0.542,0.144,0.074,1.907 +Niger,Sub-Saharan Africa,4.556,4.712,4.401,0.573,0.677,0.293,0.615,0.145,0.147,2.107 +Burkina Faso,Sub-Saharan Africa,4.548,4.686,4.410,0.756,0.685,0.274,0.483,0.173,0.179,1.999 +Mauritania,Sub-Saharan Africa,4.505,4.673,4.337,1.078,0.705,0.400,0.343,0.133,0.198,1.649 +Gambia,Sub-Saharan Africa,4.485,4.625,4.344,0.750,0.684,0.330,0.459,0.324,0.048,1.890 +Chad,Sub-Saharan Africa,4.471,4.630,4.313,0.603,0.805,0.199,0.411,0.218,0.113,2.122 +Kenya,Sub-Saharan Africa,4.470,4.595,4.344,1.037,0.895,0.353,0.519,0.282,0.069,1.316 +Tunisia,Middle East and North Africa,4.422,4.505,4.338,1.306,0.955,0.579,0.254,0.024,0.018,1.285 +Benin,Sub-Saharan Africa,4.377,4.510,4.245,0.914,0.128,0.284,0.567,0.112,0.252,2.121 +Uganda,Sub-Saharan Africa,4.372,4.501,4.243,0.772,1.151,0.373,0.587,0.178,0.054,1.256 +Myanmar,Southeast Asia,4.354,4.501,4.208,0.978,0.988,0.436,0.450,0.401,0.174,0.928 +Cambodia,Southeast Asia,4.341,4.446,4.236,1.011,1.019,0.442,0.863,0.170,0.071,0.765 +Ghana,Sub-Saharan Africa,4.289,4.396,4.182,1.077,0.747,0.360,0.623,0.183,0.028,1.273 +Liberia,Sub-Saharan Africa,4.269,4.474,4.063,0.619,0.673,0.301,0.546,0.178,0.075,1.878 +Mali,Sub-Saharan Africa,4.232,4.347,4.117,0.747,0.688,0.267,0.586,0.120,0.090,1.734 +Madagascar,Sub-Saharan Africa,4.228,4.359,4.097,0.628,0.823,0.333,0.250,0.172,0.123,1.897 +Togo,Sub-Saharan Africa,4.214,4.330,4.098,0.758,0.586,0.320,0.453,0.127,0.156,1.814 +Jordan,Middle East and North Africa,4.186,4.306,4.066,1.262,0.983,0.594,0.593,0.059,0.189,0.504 +India,South Asia,4.054,4.123,3.985,1.166,0.653,0.417,0.767,0.174,0.122,0.756 +Egypt,Middle East and North Africa,3.977,4.066,3.887,1.370,0.996,0.488,0.490,0.025,0.259,0.349 +Sri Lanka,South Asia,3.898,4.018,3.778,1.361,1.179,0.586,0.583,0.144,0.031,0.014 +Bangladesh,South Asia,3.886,3.994,3.778,1.122,0.249,0.513,0.775,0.140,0.167,0.919 +Ethiopia,Sub-Saharan Africa,3.861,3.997,3.725,0.792,0.915,0.420,0.441,0.270,0.101,0.923 +Tanzania,Sub-Saharan Africa,3.781,3.917,3.644,0.820,0.706,0.380,0.709,0.191,0.257,0.717 +Comoros,Sub-Saharan Africa,3.566,3.754,3.378,0.896,0.328,0.370,0.172,0.128,0.160,1.512 +Yemen,Middle East and North Africa,3.561,3.714,3.408,0.671,1.281,0.293,0.362,0.080,0.113,0.760 +Zambia,Sub-Saharan Africa,3.502,3.636,3.368,0.899,0.809,0.264,0.727,0.168,0.109,0.526 +Eswatini,Sub-Saharan Africa,3.502,3.673,3.331,1.255,0.925,0.176,0.284,0.059,0.116,0.686 +Malawi,Sub-Saharan Africa,3.421,3.561,3.281,0.617,0.410,0.349,0.571,0.135,0.136,1.203 +Botswana,Sub-Saharan Africa,3.383,3.558,3.209,1.445,0.969,0.241,0.567,0.014,0.082,0.066 +Zimbabwe,Sub-Saharan Africa,3.341,3.457,3.226,0.748,0.850,0.232,0.487,0.096,0.131,0.797 +Congo (Kinshasa),Sub-Saharan Africa,3.295,3.462,3.128,0.534,0.665,0.262,0.473,0.189,0.072,1.102 +Sierra Leone,Sub-Saharan Africa,3.245,3.366,3.124,0.654,0.566,0.253,0.469,0.181,0.053,1.068 +Lesotho,Sub-Saharan Africa,3.186,3.469,2.904,0.771,0.851,0.000,0.523,0.082,0.085,0.875 +Lebanon,Middle East and North Africa,2.707,2.797,2.616,1.377,0.577,0.556,0.173,0.068,0.029,-0.073 +Afghanistan,South Asia,1.721,1.775,1.667,0.628,0.000,0.242,0.000,0.091,0.088,0.672 diff --git a/data/plotly_intro/gapminder.tsv b/data/plotly_intro/gapminder.tsv new file mode 100644 index 00000000..83c5ce6d --- /dev/null +++ b/data/plotly_intro/gapminder.tsv @@ -0,0 +1,1705 @@ +country continent year lifeExp pop gdpPercap +Afghanistan Asia 1952 28.801 8425333 779.4453145 +Afghanistan Asia 1957 30.332 9240934 820.8530296 +Afghanistan Asia 1962 31.997 10267083 853.10071 +Afghanistan Asia 1967 34.02 11537966 836.1971382 +Afghanistan Asia 1972 36.088 13079460 739.9811058 +Afghanistan Asia 1977 38.438 14880372 786.11336 +Afghanistan Asia 1982 39.854 12881816 978.0114388 +Afghanistan Asia 1987 40.822 13867957 852.3959448 +Afghanistan Asia 1992 41.674 16317921 649.3413952 +Afghanistan Asia 1997 41.763 22227415 635.341351 +Afghanistan Asia 2002 42.129 25268405 726.7340548 +Afghanistan Asia 2007 43.828 31889923 974.5803384 +Albania Europe 1952 55.23 1282697 1601.056136 +Albania Europe 1957 59.28 1476505 1942.284244 +Albania Europe 1962 64.82 1728137 2312.888958 +Albania Europe 1967 66.22 1984060 2760.196931 +Albania Europe 1972 67.69 2263554 3313.422188 +Albania Europe 1977 68.93 2509048 3533.00391 +Albania Europe 1982 70.42 2780097 3630.880722 +Albania Europe 1987 72 3075321 3738.932735 +Albania Europe 1992 71.581 3326498 2497.437901 +Albania Europe 1997 72.95 3428038 3193.054604 +Albania Europe 2002 75.651 3508512 4604.211737 +Albania Europe 2007 76.423 3600523 5937.029526 +Algeria Africa 1952 43.077 9279525 2449.008185 +Algeria Africa 1957 45.685 10270856 3013.976023 +Algeria Africa 1962 48.303 11000948 2550.81688 +Algeria Africa 1967 51.407 12760499 3246.991771 +Algeria Africa 1972 54.518 14760787 4182.663766 +Algeria Africa 1977 58.014 17152804 4910.416756 +Algeria Africa 1982 61.368 20033753 5745.160213 +Algeria Africa 1987 65.799 23254956 5681.358539 +Algeria Africa 1992 67.744 26298373 5023.216647 +Algeria Africa 1997 69.152 29072015 4797.295051 +Algeria Africa 2002 70.994 31287142 5288.040382 +Algeria Africa 2007 72.301 33333216 6223.367465 +Angola Africa 1952 30.015 4232095 3520.610273 +Angola Africa 1957 31.999 4561361 3827.940465 +Angola Africa 1962 34 4826015 4269.276742 +Angola Africa 1967 35.985 5247469 5522.776375 +Angola Africa 1972 37.928 5894858 5473.288005 +Angola Africa 1977 39.483 6162675 3008.647355 +Angola Africa 1982 39.942 7016384 2756.953672 +Angola Africa 1987 39.906 7874230 2430.208311 +Angola Africa 1992 40.647 8735988 2627.845685 +Angola Africa 1997 40.963 9875024 2277.140884 +Angola Africa 2002 41.003 10866106 2773.287312 +Angola Africa 2007 42.731 12420476 4797.231267 +Argentina Americas 1952 62.485 17876956 5911.315053 +Argentina Americas 1957 64.399 19610538 6856.856212 +Argentina Americas 1962 65.142 21283783 7133.166023 +Argentina Americas 1967 65.634 22934225 8052.953021 +Argentina Americas 1972 67.065 24779799 9443.038526 +Argentina Americas 1977 68.481 26983828 10079.02674 +Argentina Americas 1982 69.942 29341374 8997.897412 +Argentina Americas 1987 70.774 31620918 9139.671389 +Argentina Americas 1992 71.868 33958947 9308.41871 +Argentina Americas 1997 73.275 36203463 10967.28195 +Argentina Americas 2002 74.34 38331121 8797.640716 +Argentina Americas 2007 75.32 40301927 12779.37964 +Australia Oceania 1952 69.12 8691212 10039.59564 +Australia Oceania 1957 70.33 9712569 10949.64959 +Australia Oceania 1962 70.93 10794968 12217.22686 +Australia Oceania 1967 71.1 11872264 14526.12465 +Australia Oceania 1972 71.93 13177000 16788.62948 +Australia Oceania 1977 73.49 14074100 18334.19751 +Australia Oceania 1982 74.74 15184200 19477.00928 +Australia Oceania 1987 76.32 16257249 21888.88903 +Australia Oceania 1992 77.56 17481977 23424.76683 +Australia Oceania 1997 78.83 18565243 26997.93657 +Australia Oceania 2002 80.37 19546792 30687.75473 +Australia Oceania 2007 81.235 20434176 34435.36744 +Austria Europe 1952 66.8 6927772 6137.076492 +Austria Europe 1957 67.48 6965860 8842.59803 +Austria Europe 1962 69.54 7129864 10750.72111 +Austria Europe 1967 70.14 7376998 12834.6024 +Austria Europe 1972 70.63 7544201 16661.6256 +Austria Europe 1977 72.17 7568430 19749.4223 +Austria Europe 1982 73.18 7574613 21597.08362 +Austria Europe 1987 74.94 7578903 23687.82607 +Austria Europe 1992 76.04 7914969 27042.01868 +Austria Europe 1997 77.51 8069876 29095.92066 +Austria Europe 2002 78.98 8148312 32417.60769 +Austria Europe 2007 79.829 8199783 36126.4927 +Bahrain Asia 1952 50.939 120447 9867.084765 +Bahrain Asia 1957 53.832 138655 11635.79945 +Bahrain Asia 1962 56.923 171863 12753.27514 +Bahrain Asia 1967 59.923 202182 14804.6727 +Bahrain Asia 1972 63.3 230800 18268.65839 +Bahrain Asia 1977 65.593 297410 19340.10196 +Bahrain Asia 1982 69.052 377967 19211.14731 +Bahrain Asia 1987 70.75 454612 18524.02406 +Bahrain Asia 1992 72.601 529491 19035.57917 +Bahrain Asia 1997 73.925 598561 20292.01679 +Bahrain Asia 2002 74.795 656397 23403.55927 +Bahrain Asia 2007 75.635 708573 29796.04834 +Bangladesh Asia 1952 37.484 46886859 684.2441716 +Bangladesh Asia 1957 39.348 51365468 661.6374577 +Bangladesh Asia 1962 41.216 56839289 686.3415538 +Bangladesh Asia 1967 43.453 62821884 721.1860862 +Bangladesh Asia 1972 45.252 70759295 630.2336265 +Bangladesh Asia 1977 46.923 80428306 659.8772322 +Bangladesh Asia 1982 50.009 93074406 676.9818656 +Bangladesh Asia 1987 52.819 103764241 751.9794035 +Bangladesh Asia 1992 56.018 113704579 837.8101643 +Bangladesh Asia 1997 59.412 123315288 972.7700352 +Bangladesh Asia 2002 62.013 135656790 1136.39043 +Bangladesh Asia 2007 64.062 150448339 1391.253792 +Belgium Europe 1952 68 8730405 8343.105127 +Belgium Europe 1957 69.24 8989111 9714.960623 +Belgium Europe 1962 70.25 9218400 10991.20676 +Belgium Europe 1967 70.94 9556500 13149.04119 +Belgium Europe 1972 71.44 9709100 16672.14356 +Belgium Europe 1977 72.8 9821800 19117.97448 +Belgium Europe 1982 73.93 9856303 20979.84589 +Belgium Europe 1987 75.35 9870200 22525.56308 +Belgium Europe 1992 76.46 10045622 25575.57069 +Belgium Europe 1997 77.53 10199787 27561.19663 +Belgium Europe 2002 78.32 10311970 30485.88375 +Belgium Europe 2007 79.441 10392226 33692.60508 +Benin Africa 1952 38.223 1738315 1062.7522 +Benin Africa 1957 40.358 1925173 959.6010805 +Benin Africa 1962 42.618 2151895 949.4990641 +Benin Africa 1967 44.885 2427334 1035.831411 +Benin Africa 1972 47.014 2761407 1085.796879 +Benin Africa 1977 49.19 3168267 1029.161251 +Benin Africa 1982 50.904 3641603 1277.897616 +Benin Africa 1987 52.337 4243788 1225.85601 +Benin Africa 1992 53.919 4981671 1191.207681 +Benin Africa 1997 54.777 6066080 1232.975292 +Benin Africa 2002 54.406 7026113 1372.877931 +Benin Africa 2007 56.728 8078314 1441.284873 +Bolivia Americas 1952 40.414 2883315 2677.326347 +Bolivia Americas 1957 41.89 3211738 2127.686326 +Bolivia Americas 1962 43.428 3593918 2180.972546 +Bolivia Americas 1967 45.032 4040665 2586.886053 +Bolivia Americas 1972 46.714 4565872 2980.331339 +Bolivia Americas 1977 50.023 5079716 3548.097832 +Bolivia Americas 1982 53.859 5642224 3156.510452 +Bolivia Americas 1987 57.251 6156369 2753.69149 +Bolivia Americas 1992 59.957 6893451 2961.699694 +Bolivia Americas 1997 62.05 7693188 3326.143191 +Bolivia Americas 2002 63.883 8445134 3413.26269 +Bolivia Americas 2007 65.554 9119152 3822.137084 +Bosnia and Herzegovina Europe 1952 53.82 2791000 973.5331948 +Bosnia and Herzegovina Europe 1957 58.45 3076000 1353.989176 +Bosnia and Herzegovina Europe 1962 61.93 3349000 1709.683679 +Bosnia and Herzegovina Europe 1967 64.79 3585000 2172.352423 +Bosnia and Herzegovina Europe 1972 67.45 3819000 2860.16975 +Bosnia and Herzegovina Europe 1977 69.86 4086000 3528.481305 +Bosnia and Herzegovina Europe 1982 70.69 4172693 4126.613157 +Bosnia and Herzegovina Europe 1987 71.14 4338977 4314.114757 +Bosnia and Herzegovina Europe 1992 72.178 4256013 2546.781445 +Bosnia and Herzegovina Europe 1997 73.244 3607000 4766.355904 +Bosnia and Herzegovina Europe 2002 74.09 4165416 6018.975239 +Bosnia and Herzegovina Europe 2007 74.852 4552198 7446.298803 +Botswana Africa 1952 47.622 442308 851.2411407 +Botswana Africa 1957 49.618 474639 918.2325349 +Botswana Africa 1962 51.52 512764 983.6539764 +Botswana Africa 1967 53.298 553541 1214.709294 +Botswana Africa 1972 56.024 619351 2263.611114 +Botswana Africa 1977 59.319 781472 3214.857818 +Botswana Africa 1982 61.484 970347 4551.14215 +Botswana Africa 1987 63.622 1151184 6205.88385 +Botswana Africa 1992 62.745 1342614 7954.111645 +Botswana Africa 1997 52.556 1536536 8647.142313 +Botswana Africa 2002 46.634 1630347 11003.60508 +Botswana Africa 2007 50.728 1639131 12569.85177 +Brazil Americas 1952 50.917 56602560 2108.944355 +Brazil Americas 1957 53.285 65551171 2487.365989 +Brazil Americas 1962 55.665 76039390 3336.585802 +Brazil Americas 1967 57.632 88049823 3429.864357 +Brazil Americas 1972 59.504 100840058 4985.711467 +Brazil Americas 1977 61.489 114313951 6660.118654 +Brazil Americas 1982 63.336 128962939 7030.835878 +Brazil Americas 1987 65.205 142938076 7807.095818 +Brazil Americas 1992 67.057 155975974 6950.283021 +Brazil Americas 1997 69.388 168546719 7957.980824 +Brazil Americas 2002 71.006 179914212 8131.212843 +Brazil Americas 2007 72.39 190010647 9065.800825 +Bulgaria Europe 1952 59.6 7274900 2444.286648 +Bulgaria Europe 1957 66.61 7651254 3008.670727 +Bulgaria Europe 1962 69.51 8012946 4254.337839 +Bulgaria Europe 1967 70.42 8310226 5577.0028 +Bulgaria Europe 1972 70.9 8576200 6597.494398 +Bulgaria Europe 1977 70.81 8797022 7612.240438 +Bulgaria Europe 1982 71.08 8892098 8224.191647 +Bulgaria Europe 1987 71.34 8971958 8239.854824 +Bulgaria Europe 1992 71.19 8658506 6302.623438 +Bulgaria Europe 1997 70.32 8066057 5970.38876 +Bulgaria Europe 2002 72.14 7661799 7696.777725 +Bulgaria Europe 2007 73.005 7322858 10680.79282 +Burkina Faso Africa 1952 31.975 4469979 543.2552413 +Burkina Faso Africa 1957 34.906 4713416 617.1834648 +Burkina Faso Africa 1962 37.814 4919632 722.5120206 +Burkina Faso Africa 1967 40.697 5127935 794.8265597 +Burkina Faso Africa 1972 43.591 5433886 854.7359763 +Burkina Faso Africa 1977 46.137 5889574 743.3870368 +Burkina Faso Africa 1982 48.122 6634596 807.1985855 +Burkina Faso Africa 1987 49.557 7586551 912.0631417 +Burkina Faso Africa 1992 50.26 8878303 931.7527731 +Burkina Faso Africa 1997 50.324 10352843 946.2949618 +Burkina Faso Africa 2002 50.65 12251209 1037.645221 +Burkina Faso Africa 2007 52.295 14326203 1217.032994 +Burundi Africa 1952 39.031 2445618 339.2964587 +Burundi Africa 1957 40.533 2667518 379.5646281 +Burundi Africa 1962 42.045 2961915 355.2032273 +Burundi Africa 1967 43.548 3330989 412.9775136 +Burundi Africa 1972 44.057 3529983 464.0995039 +Burundi Africa 1977 45.91 3834415 556.1032651 +Burundi Africa 1982 47.471 4580410 559.603231 +Burundi Africa 1987 48.211 5126023 621.8188189 +Burundi Africa 1992 44.736 5809236 631.6998778 +Burundi Africa 1997 45.326 6121610 463.1151478 +Burundi Africa 2002 47.36 7021078 446.4035126 +Burundi Africa 2007 49.58 8390505 430.0706916 +Cambodia Asia 1952 39.417 4693836 368.4692856 +Cambodia Asia 1957 41.366 5322536 434.0383364 +Cambodia Asia 1962 43.415 6083619 496.9136476 +Cambodia Asia 1967 45.415 6960067 523.4323142 +Cambodia Asia 1972 40.317 7450606 421.6240257 +Cambodia Asia 1977 31.22 6978607 524.9721832 +Cambodia Asia 1982 50.957 7272485 624.4754784 +Cambodia Asia 1987 53.914 8371791 683.8955732 +Cambodia Asia 1992 55.803 10150094 682.3031755 +Cambodia Asia 1997 56.534 11782962 734.28517 +Cambodia Asia 2002 56.752 12926707 896.2260153 +Cambodia Asia 2007 59.723 14131858 1713.778686 +Cameroon Africa 1952 38.523 5009067 1172.667655 +Cameroon Africa 1957 40.428 5359923 1313.048099 +Cameroon Africa 1962 42.643 5793633 1399.607441 +Cameroon Africa 1967 44.799 6335506 1508.453148 +Cameroon Africa 1972 47.049 7021028 1684.146528 +Cameroon Africa 1977 49.355 7959865 1783.432873 +Cameroon Africa 1982 52.961 9250831 2367.983282 +Cameroon Africa 1987 54.985 10780667 2602.664206 +Cameroon Africa 1992 54.314 12467171 1793.163278 +Cameroon Africa 1997 52.199 14195809 1694.337469 +Cameroon Africa 2002 49.856 15929988 1934.011449 +Cameroon Africa 2007 50.43 17696293 2042.09524 +Canada Americas 1952 68.75 14785584 11367.16112 +Canada Americas 1957 69.96 17010154 12489.95006 +Canada Americas 1962 71.3 18985849 13462.48555 +Canada Americas 1967 72.13 20819767 16076.58803 +Canada Americas 1972 72.88 22284500 18970.57086 +Canada Americas 1977 74.21 23796400 22090.88306 +Canada Americas 1982 75.76 25201900 22898.79214 +Canada Americas 1987 76.86 26549700 26626.51503 +Canada Americas 1992 77.95 28523502 26342.88426 +Canada Americas 1997 78.61 30305843 28954.92589 +Canada Americas 2002 79.77 31902268 33328.96507 +Canada Americas 2007 80.653 33390141 36319.23501 +Central African Republic Africa 1952 35.463 1291695 1071.310713 +Central African Republic Africa 1957 37.464 1392284 1190.844328 +Central African Republic Africa 1962 39.475 1523478 1193.068753 +Central African Republic Africa 1967 41.478 1733638 1136.056615 +Central African Republic Africa 1972 43.457 1927260 1070.013275 +Central African Republic Africa 1977 46.775 2167533 1109.374338 +Central African Republic Africa 1982 48.295 2476971 956.7529907 +Central African Republic Africa 1987 50.485 2840009 844.8763504 +Central African Republic Africa 1992 49.396 3265124 747.9055252 +Central African Republic Africa 1997 46.066 3696513 740.5063317 +Central African Republic Africa 2002 43.308 4048013 738.6906068 +Central African Republic Africa 2007 44.741 4369038 706.016537 +Chad Africa 1952 38.092 2682462 1178.665927 +Chad Africa 1957 39.881 2894855 1308.495577 +Chad Africa 1962 41.716 3150417 1389.817618 +Chad Africa 1967 43.601 3495967 1196.810565 +Chad Africa 1972 45.569 3899068 1104.103987 +Chad Africa 1977 47.383 4388260 1133.98495 +Chad Africa 1982 49.517 4875118 797.9081006 +Chad Africa 1987 51.051 5498955 952.386129 +Chad Africa 1992 51.724 6429417 1058.0643 +Chad Africa 1997 51.573 7562011 1004.961353 +Chad Africa 2002 50.525 8835739 1156.18186 +Chad Africa 2007 50.651 10238807 1704.063724 +Chile Americas 1952 54.745 6377619 3939.978789 +Chile Americas 1957 56.074 7048426 4315.622723 +Chile Americas 1962 57.924 7961258 4519.094331 +Chile Americas 1967 60.523 8858908 5106.654313 +Chile Americas 1972 63.441 9717524 5494.024437 +Chile Americas 1977 67.052 10599793 4756.763836 +Chile Americas 1982 70.565 11487112 5095.665738 +Chile Americas 1987 72.492 12463354 5547.063754 +Chile Americas 1992 74.126 13572994 7596.125964 +Chile Americas 1997 75.816 14599929 10118.05318 +Chile Americas 2002 77.86 15497046 10778.78385 +Chile Americas 2007 78.553 16284741 13171.63885 +China Asia 1952 44 556263527 400.448611 +China Asia 1957 50.54896 637408000 575.9870009 +China Asia 1962 44.50136 665770000 487.6740183 +China Asia 1967 58.38112 754550000 612.7056934 +China Asia 1972 63.11888 862030000 676.9000921 +China Asia 1977 63.96736 943455000 741.2374699 +China Asia 1982 65.525 1000281000 962.4213805 +China Asia 1987 67.274 1084035000 1378.904018 +China Asia 1992 68.69 1164970000 1655.784158 +China Asia 1997 70.426 1230075000 2289.234136 +China Asia 2002 72.028 1280400000 3119.280896 +China Asia 2007 72.961 1318683096 4959.114854 +Colombia Americas 1952 50.643 12350771 2144.115096 +Colombia Americas 1957 55.118 14485993 2323.805581 +Colombia Americas 1962 57.863 17009885 2492.351109 +Colombia Americas 1967 59.963 19764027 2678.729839 +Colombia Americas 1972 61.623 22542890 3264.660041 +Colombia Americas 1977 63.837 25094412 3815.80787 +Colombia Americas 1982 66.653 27764644 4397.575659 +Colombia Americas 1987 67.768 30964245 4903.2191 +Colombia Americas 1992 68.421 34202721 5444.648617 +Colombia Americas 1997 70.313 37657830 6117.361746 +Colombia Americas 2002 71.682 41008227 5755.259962 +Colombia Americas 2007 72.889 44227550 7006.580419 +Comoros Africa 1952 40.715 153936 1102.990936 +Comoros Africa 1957 42.46 170928 1211.148548 +Comoros Africa 1962 44.467 191689 1406.648278 +Comoros Africa 1967 46.472 217378 1876.029643 +Comoros Africa 1972 48.944 250027 1937.577675 +Comoros Africa 1977 50.939 304739 1172.603047 +Comoros Africa 1982 52.933 348643 1267.100083 +Comoros Africa 1987 54.926 395114 1315.980812 +Comoros Africa 1992 57.939 454429 1246.90737 +Comoros Africa 1997 60.66 527982 1173.618235 +Comoros Africa 2002 62.974 614382 1075.811558 +Comoros Africa 2007 65.152 710960 986.1478792 +Congo, Dem. Rep. Africa 1952 39.143 14100005 780.5423257 +Congo, Dem. Rep. Africa 1957 40.652 15577932 905.8602303 +Congo, Dem. Rep. Africa 1962 42.122 17486434 896.3146335 +Congo, Dem. Rep. Africa 1967 44.056 19941073 861.5932424 +Congo, Dem. Rep. Africa 1972 45.989 23007669 904.8960685 +Congo, Dem. Rep. Africa 1977 47.804 26480870 795.757282 +Congo, Dem. Rep. Africa 1982 47.784 30646495 673.7478181 +Congo, Dem. Rep. Africa 1987 47.412 35481645 672.774812 +Congo, Dem. Rep. Africa 1992 45.548 41672143 457.7191807 +Congo, Dem. Rep. Africa 1997 42.587 47798986 312.188423 +Congo, Dem. Rep. Africa 2002 44.966 55379852 241.1658765 +Congo, Dem. Rep. Africa 2007 46.462 64606759 277.5518587 +Congo, Rep. Africa 1952 42.111 854885 2125.621418 +Congo, Rep. Africa 1957 45.053 940458 2315.056572 +Congo, Rep. Africa 1962 48.435 1047924 2464.783157 +Congo, Rep. Africa 1967 52.04 1179760 2677.939642 +Congo, Rep. Africa 1972 54.907 1340458 3213.152683 +Congo, Rep. Africa 1977 55.625 1536769 3259.178978 +Congo, Rep. Africa 1982 56.695 1774735 4879.507522 +Congo, Rep. Africa 1987 57.47 2064095 4201.194937 +Congo, Rep. Africa 1992 56.433 2409073 4016.239529 +Congo, Rep. Africa 1997 52.962 2800947 3484.164376 +Congo, Rep. Africa 2002 52.97 3328795 3484.06197 +Congo, Rep. Africa 2007 55.322 3800610 3632.557798 +Costa Rica Americas 1952 57.206 926317 2627.009471 +Costa Rica Americas 1957 60.026 1112300 2990.010802 +Costa Rica Americas 1962 62.842 1345187 3460.937025 +Costa Rica Americas 1967 65.424 1588717 4161.727834 +Costa Rica Americas 1972 67.849 1834796 5118.146939 +Costa Rica Americas 1977 70.75 2108457 5926.876967 +Costa Rica Americas 1982 73.45 2424367 5262.734751 +Costa Rica Americas 1987 74.752 2799811 5629.915318 +Costa Rica Americas 1992 75.713 3173216 6160.416317 +Costa Rica Americas 1997 77.26 3518107 6677.045314 +Costa Rica Americas 2002 78.123 3834934 7723.447195 +Costa Rica Americas 2007 78.782 4133884 9645.06142 +Cote d'Ivoire Africa 1952 40.477 2977019 1388.594732 +Cote d'Ivoire Africa 1957 42.469 3300000 1500.895925 +Cote d'Ivoire Africa 1962 44.93 3832408 1728.869428 +Cote d'Ivoire Africa 1967 47.35 4744870 2052.050473 +Cote d'Ivoire Africa 1972 49.801 6071696 2378.201111 +Cote d'Ivoire Africa 1977 52.374 7459574 2517.736547 +Cote d'Ivoire Africa 1982 53.983 9025951 2602.710169 +Cote d'Ivoire Africa 1987 54.655 10761098 2156.956069 +Cote d'Ivoire Africa 1992 52.044 12772596 1648.073791 +Cote d'Ivoire Africa 1997 47.991 14625967 1786.265407 +Cote d'Ivoire Africa 2002 46.832 16252726 1648.800823 +Cote d'Ivoire Africa 2007 48.328 18013409 1544.750112 +Croatia Europe 1952 61.21 3882229 3119.23652 +Croatia Europe 1957 64.77 3991242 4338.231617 +Croatia Europe 1962 67.13 4076557 5477.890018 +Croatia Europe 1967 68.5 4174366 6960.297861 +Croatia Europe 1972 69.61 4225310 9164.090127 +Croatia Europe 1977 70.64 4318673 11305.38517 +Croatia Europe 1982 70.46 4413368 13221.82184 +Croatia Europe 1987 71.52 4484310 13822.58394 +Croatia Europe 1992 72.527 4494013 8447.794873 +Croatia Europe 1997 73.68 4444595 9875.604515 +Croatia Europe 2002 74.876 4481020 11628.38895 +Croatia Europe 2007 75.748 4493312 14619.22272 +Cuba Americas 1952 59.421 6007797 5586.53878 +Cuba Americas 1957 62.325 6640752 6092.174359 +Cuba Americas 1962 65.246 7254373 5180.75591 +Cuba Americas 1967 68.29 8139332 5690.268015 +Cuba Americas 1972 70.723 8831348 5305.445256 +Cuba Americas 1977 72.649 9537988 6380.494966 +Cuba Americas 1982 73.717 9789224 7316.918107 +Cuba Americas 1987 74.174 10239839 7532.924763 +Cuba Americas 1992 74.414 10723260 5592.843963 +Cuba Americas 1997 76.151 10983007 5431.990415 +Cuba Americas 2002 77.158 11226999 6340.646683 +Cuba Americas 2007 78.273 11416987 8948.102923 +Czech Republic Europe 1952 66.87 9125183 6876.14025 +Czech Republic Europe 1957 69.03 9513758 8256.343918 +Czech Republic Europe 1962 69.9 9620282 10136.86713 +Czech Republic Europe 1967 70.38 9835109 11399.44489 +Czech Republic Europe 1972 70.29 9862158 13108.4536 +Czech Republic Europe 1977 70.71 10161915 14800.16062 +Czech Republic Europe 1982 70.96 10303704 15377.22855 +Czech Republic Europe 1987 71.58 10311597 16310.4434 +Czech Republic Europe 1992 72.4 10315702 14297.02122 +Czech Republic Europe 1997 74.01 10300707 16048.51424 +Czech Republic Europe 2002 75.51 10256295 17596.21022 +Czech Republic Europe 2007 76.486 10228744 22833.30851 +Denmark Europe 1952 70.78 4334000 9692.385245 +Denmark Europe 1957 71.81 4487831 11099.65935 +Denmark Europe 1962 72.35 4646899 13583.31351 +Denmark Europe 1967 72.96 4838800 15937.21123 +Denmark Europe 1972 73.47 4991596 18866.20721 +Denmark Europe 1977 74.69 5088419 20422.9015 +Denmark Europe 1982 74.63 5117810 21688.04048 +Denmark Europe 1987 74.8 5127024 25116.17581 +Denmark Europe 1992 75.33 5171393 26406.73985 +Denmark Europe 1997 76.11 5283663 29804.34567 +Denmark Europe 2002 77.18 5374693 32166.50006 +Denmark Europe 2007 78.332 5468120 35278.41874 +Djibouti Africa 1952 34.812 63149 2669.529475 +Djibouti Africa 1957 37.328 71851 2864.969076 +Djibouti Africa 1962 39.693 89898 3020.989263 +Djibouti Africa 1967 42.074 127617 3020.050513 +Djibouti Africa 1972 44.366 178848 3694.212352 +Djibouti Africa 1977 46.519 228694 3081.761022 +Djibouti Africa 1982 48.812 305991 2879.468067 +Djibouti Africa 1987 50.04 311025 2880.102568 +Djibouti Africa 1992 51.604 384156 2377.156192 +Djibouti Africa 1997 53.157 417908 1895.016984 +Djibouti Africa 2002 53.373 447416 1908.260867 +Djibouti Africa 2007 54.791 496374 2082.481567 +Dominican Republic Americas 1952 45.928 2491346 1397.717137 +Dominican Republic Americas 1957 49.828 2923186 1544.402995 +Dominican Republic Americas 1962 53.459 3453434 1662.137359 +Dominican Republic Americas 1967 56.751 4049146 1653.723003 +Dominican Republic Americas 1972 59.631 4671329 2189.874499 +Dominican Republic Americas 1977 61.788 5302800 2681.9889 +Dominican Republic Americas 1982 63.727 5968349 2861.092386 +Dominican Republic Americas 1987 66.046 6655297 2899.842175 +Dominican Republic Americas 1992 68.457 7351181 3044.214214 +Dominican Republic Americas 1997 69.957 7992357 3614.101285 +Dominican Republic Americas 2002 70.847 8650322 4563.808154 +Dominican Republic Americas 2007 72.235 9319622 6025.374752 +Ecuador Americas 1952 48.357 3548753 3522.110717 +Ecuador Americas 1957 51.356 4058385 3780.546651 +Ecuador Americas 1962 54.64 4681707 4086.114078 +Ecuador Americas 1967 56.678 5432424 4579.074215 +Ecuador Americas 1972 58.796 6298651 5280.99471 +Ecuador Americas 1977 61.31 7278866 6679.62326 +Ecuador Americas 1982 64.342 8365850 7213.791267 +Ecuador Americas 1987 67.231 9545158 6481.776993 +Ecuador Americas 1992 69.613 10748394 7103.702595 +Ecuador Americas 1997 72.312 11911819 7429.455877 +Ecuador Americas 2002 74.173 12921234 5773.044512 +Ecuador Americas 2007 74.994 13755680 6873.262326 +Egypt Africa 1952 41.893 22223309 1418.822445 +Egypt Africa 1957 44.444 25009741 1458.915272 +Egypt Africa 1962 46.992 28173309 1693.335853 +Egypt Africa 1967 49.293 31681188 1814.880728 +Egypt Africa 1972 51.137 34807417 2024.008147 +Egypt Africa 1977 53.319 38783863 2785.493582 +Egypt Africa 1982 56.006 45681811 3503.729636 +Egypt Africa 1987 59.797 52799062 3885.46071 +Egypt Africa 1992 63.674 59402198 3794.755195 +Egypt Africa 1997 67.217 66134291 4173.181797 +Egypt Africa 2002 69.806 73312559 4754.604414 +Egypt Africa 2007 71.338 80264543 5581.180998 +El Salvador Americas 1952 45.262 2042865 3048.3029 +El Salvador Americas 1957 48.57 2355805 3421.523218 +El Salvador Americas 1962 52.307 2747687 3776.803627 +El Salvador Americas 1967 55.855 3232927 4358.595393 +El Salvador Americas 1972 58.207 3790903 4520.246008 +El Salvador Americas 1977 56.696 4282586 5138.922374 +El Salvador Americas 1982 56.604 4474873 4098.344175 +El Salvador Americas 1987 63.154 4842194 4140.442097 +El Salvador Americas 1992 66.798 5274649 4444.2317 +El Salvador Americas 1997 69.535 5783439 5154.825496 +El Salvador Americas 2002 70.734 6353681 5351.568666 +El Salvador Americas 2007 71.878 6939688 5728.353514 +Equatorial Guinea Africa 1952 34.482 216964 375.6431231 +Equatorial Guinea Africa 1957 35.983 232922 426.0964081 +Equatorial Guinea Africa 1962 37.485 249220 582.8419714 +Equatorial Guinea Africa 1967 38.987 259864 915.5960025 +Equatorial Guinea Africa 1972 40.516 277603 672.4122571 +Equatorial Guinea Africa 1977 42.024 192675 958.5668124 +Equatorial Guinea Africa 1982 43.662 285483 927.8253427 +Equatorial Guinea Africa 1987 45.664 341244 966.8968149 +Equatorial Guinea Africa 1992 47.545 387838 1132.055034 +Equatorial Guinea Africa 1997 48.245 439971 2814.480755 +Equatorial Guinea Africa 2002 49.348 495627 7703.4959 +Equatorial Guinea Africa 2007 51.579 551201 12154.08975 +Eritrea Africa 1952 35.928 1438760 328.9405571 +Eritrea Africa 1957 38.047 1542611 344.1618859 +Eritrea Africa 1962 40.158 1666618 380.9958433 +Eritrea Africa 1967 42.189 1820319 468.7949699 +Eritrea Africa 1972 44.142 2260187 514.3242082 +Eritrea Africa 1977 44.535 2512642 505.7538077 +Eritrea Africa 1982 43.89 2637297 524.8758493 +Eritrea Africa 1987 46.453 2915959 521.1341333 +Eritrea Africa 1992 49.991 3668440 582.8585102 +Eritrea Africa 1997 53.378 4058319 913.47079 +Eritrea Africa 2002 55.24 4414865 765.3500015 +Eritrea Africa 2007 58.04 4906585 641.3695236 +Ethiopia Africa 1952 34.078 20860941 362.1462796 +Ethiopia Africa 1957 36.667 22815614 378.9041632 +Ethiopia Africa 1962 40.059 25145372 419.4564161 +Ethiopia Africa 1967 42.115 27860297 516.1186438 +Ethiopia Africa 1972 43.515 30770372 566.2439442 +Ethiopia Africa 1977 44.51 34617799 556.8083834 +Ethiopia Africa 1982 44.916 38111756 577.8607471 +Ethiopia Africa 1987 46.684 42999530 573.7413142 +Ethiopia Africa 1992 48.091 52088559 421.3534653 +Ethiopia Africa 1997 49.402 59861301 515.8894013 +Ethiopia Africa 2002 50.725 67946797 530.0535319 +Ethiopia Africa 2007 52.947 76511887 690.8055759 +Finland Europe 1952 66.55 4090500 6424.519071 +Finland Europe 1957 67.49 4324000 7545.415386 +Finland Europe 1962 68.75 4491443 9371.842561 +Finland Europe 1967 69.83 4605744 10921.63626 +Finland Europe 1972 70.87 4639657 14358.8759 +Finland Europe 1977 72.52 4738902 15605.42283 +Finland Europe 1982 74.55 4826933 18533.15761 +Finland Europe 1987 74.83 4931729 21141.01223 +Finland Europe 1992 75.7 5041039 20647.16499 +Finland Europe 1997 77.13 5134406 23723.9502 +Finland Europe 2002 78.37 5193039 28204.59057 +Finland Europe 2007 79.313 5238460 33207.0844 +France Europe 1952 67.41 42459667 7029.809327 +France Europe 1957 68.93 44310863 8662.834898 +France Europe 1962 70.51 47124000 10560.48553 +France Europe 1967 71.55 49569000 12999.91766 +France Europe 1972 72.38 51732000 16107.19171 +France Europe 1977 73.83 53165019 18292.63514 +France Europe 1982 74.89 54433565 20293.89746 +France Europe 1987 76.34 55630100 22066.44214 +France Europe 1992 77.46 57374179 24703.79615 +France Europe 1997 78.64 58623428 25889.78487 +France Europe 2002 79.59 59925035 28926.03234 +France Europe 2007 80.657 61083916 30470.0167 +Gabon Africa 1952 37.003 420702 4293.476475 +Gabon Africa 1957 38.999 434904 4976.198099 +Gabon Africa 1962 40.489 455661 6631.459222 +Gabon Africa 1967 44.598 489004 8358.761987 +Gabon Africa 1972 48.69 537977 11401.94841 +Gabon Africa 1977 52.79 706367 21745.57328 +Gabon Africa 1982 56.564 753874 15113.36194 +Gabon Africa 1987 60.19 880397 11864.40844 +Gabon Africa 1992 61.366 985739 13522.15752 +Gabon Africa 1997 60.461 1126189 14722.84188 +Gabon Africa 2002 56.761 1299304 12521.71392 +Gabon Africa 2007 56.735 1454867 13206.48452 +Gambia Africa 1952 30 284320 485.2306591 +Gambia Africa 1957 32.065 323150 520.9267111 +Gambia Africa 1962 33.896 374020 599.650276 +Gambia Africa 1967 35.857 439593 734.7829124 +Gambia Africa 1972 38.308 517101 756.0868363 +Gambia Africa 1977 41.842 608274 884.7552507 +Gambia Africa 1982 45.58 715523 835.8096108 +Gambia Africa 1987 49.265 848406 611.6588611 +Gambia Africa 1992 52.644 1025384 665.6244126 +Gambia Africa 1997 55.861 1235767 653.7301704 +Gambia Africa 2002 58.041 1457766 660.5855997 +Gambia Africa 2007 59.448 1688359 752.7497265 +Germany Europe 1952 67.5 69145952 7144.114393 +Germany Europe 1957 69.1 71019069 10187.82665 +Germany Europe 1962 70.3 73739117 12902.46291 +Germany Europe 1967 70.8 76368453 14745.62561 +Germany Europe 1972 71 78717088 18016.18027 +Germany Europe 1977 72.5 78160773 20512.92123 +Germany Europe 1982 73.8 78335266 22031.53274 +Germany Europe 1987 74.847 77718298 24639.18566 +Germany Europe 1992 76.07 80597764 26505.30317 +Germany Europe 1997 77.34 82011073 27788.88416 +Germany Europe 2002 78.67 82350671 30035.80198 +Germany Europe 2007 79.406 82400996 32170.37442 +Ghana Africa 1952 43.149 5581001 911.2989371 +Ghana Africa 1957 44.779 6391288 1043.561537 +Ghana Africa 1962 46.452 7355248 1190.041118 +Ghana Africa 1967 48.072 8490213 1125.69716 +Ghana Africa 1972 49.875 9354120 1178.223708 +Ghana Africa 1977 51.756 10538093 993.2239571 +Ghana Africa 1982 53.744 11400338 876.032569 +Ghana Africa 1987 55.729 14168101 847.0061135 +Ghana Africa 1992 57.501 16278738 925.060154 +Ghana Africa 1997 58.556 18418288 1005.245812 +Ghana Africa 2002 58.453 20550751 1111.984578 +Ghana Africa 2007 60.022 22873338 1327.60891 +Greece Europe 1952 65.86 7733250 3530.690067 +Greece Europe 1957 67.86 8096218 4916.299889 +Greece Europe 1962 69.51 8448233 6017.190733 +Greece Europe 1967 71 8716441 8513.097016 +Greece Europe 1972 72.34 8888628 12724.82957 +Greece Europe 1977 73.68 9308479 14195.52428 +Greece Europe 1982 75.24 9786480 15268.42089 +Greece Europe 1987 76.67 9974490 16120.52839 +Greece Europe 1992 77.03 10325429 17541.49634 +Greece Europe 1997 77.869 10502372 18747.69814 +Greece Europe 2002 78.256 10603863 22514.2548 +Greece Europe 2007 79.483 10706290 27538.41188 +Guatemala Americas 1952 42.023 3146381 2428.237769 +Guatemala Americas 1957 44.142 3640876 2617.155967 +Guatemala Americas 1962 46.954 4208858 2750.364446 +Guatemala Americas 1967 50.016 4690773 3242.531147 +Guatemala Americas 1972 53.738 5149581 4031.408271 +Guatemala Americas 1977 56.029 5703430 4879.992748 +Guatemala Americas 1982 58.137 6395630 4820.49479 +Guatemala Americas 1987 60.782 7326406 4246.485974 +Guatemala Americas 1992 63.373 8486949 4439.45084 +Guatemala Americas 1997 66.322 9803875 4684.313807 +Guatemala Americas 2002 68.978 11178650 4858.347495 +Guatemala Americas 2007 70.259 12572928 5186.050003 +Guinea Africa 1952 33.609 2664249 510.1964923 +Guinea Africa 1957 34.558 2876726 576.2670245 +Guinea Africa 1962 35.753 3140003 686.3736739 +Guinea Africa 1967 37.197 3451418 708.7595409 +Guinea Africa 1972 38.842 3811387 741.6662307 +Guinea Africa 1977 40.762 4227026 874.6858643 +Guinea Africa 1982 42.891 4710497 857.2503577 +Guinea Africa 1987 45.552 5650262 805.5724718 +Guinea Africa 1992 48.576 6990574 794.3484384 +Guinea Africa 1997 51.455 8048834 869.4497668 +Guinea Africa 2002 53.676 8807818 945.5835837 +Guinea Africa 2007 56.007 9947814 942.6542111 +Guinea-Bissau Africa 1952 32.5 580653 299.850319 +Guinea-Bissau Africa 1957 33.489 601095 431.7904566 +Guinea-Bissau Africa 1962 34.488 627820 522.0343725 +Guinea-Bissau Africa 1967 35.492 601287 715.5806402 +Guinea-Bissau Africa 1972 36.486 625361 820.2245876 +Guinea-Bissau Africa 1977 37.465 745228 764.7259628 +Guinea-Bissau Africa 1982 39.327 825987 838.1239671 +Guinea-Bissau Africa 1987 41.245 927524 736.4153921 +Guinea-Bissau Africa 1992 43.266 1050938 745.5398706 +Guinea-Bissau Africa 1997 44.873 1193708 796.6644681 +Guinea-Bissau Africa 2002 45.504 1332459 575.7047176 +Guinea-Bissau Africa 2007 46.388 1472041 579.231743 +Haiti Americas 1952 37.579 3201488 1840.366939 +Haiti Americas 1957 40.696 3507701 1726.887882 +Haiti Americas 1962 43.59 3880130 1796.589032 +Haiti Americas 1967 46.243 4318137 1452.057666 +Haiti Americas 1972 48.042 4698301 1654.456946 +Haiti Americas 1977 49.923 4908554 1874.298931 +Haiti Americas 1982 51.461 5198399 2011.159549 +Haiti Americas 1987 53.636 5756203 1823.015995 +Haiti Americas 1992 55.089 6326682 1456.309517 +Haiti Americas 1997 56.671 6913545 1341.726931 +Haiti Americas 2002 58.137 7607651 1270.364932 +Haiti Americas 2007 60.916 8502814 1201.637154 +Honduras Americas 1952 41.912 1517453 2194.926204 +Honduras Americas 1957 44.665 1770390 2220.487682 +Honduras Americas 1962 48.041 2090162 2291.156835 +Honduras Americas 1967 50.924 2500689 2538.269358 +Honduras Americas 1972 53.884 2965146 2529.842345 +Honduras Americas 1977 57.402 3055235 3203.208066 +Honduras Americas 1982 60.909 3669448 3121.760794 +Honduras Americas 1987 64.492 4372203 3023.096699 +Honduras Americas 1992 66.399 5077347 3081.694603 +Honduras Americas 1997 67.659 5867957 3160.454906 +Honduras Americas 2002 68.565 6677328 3099.72866 +Honduras Americas 2007 70.198 7483763 3548.330846 +Hong Kong, China Asia 1952 60.96 2125900 3054.421209 +Hong Kong, China Asia 1957 64.75 2736300 3629.076457 +Hong Kong, China Asia 1962 67.65 3305200 4692.648272 +Hong Kong, China Asia 1967 70 3722800 6197.962814 +Hong Kong, China Asia 1972 72 4115700 8315.928145 +Hong Kong, China Asia 1977 73.6 4583700 11186.14125 +Hong Kong, China Asia 1982 75.45 5264500 14560.53051 +Hong Kong, China Asia 1987 76.2 5584510 20038.47269 +Hong Kong, China Asia 1992 77.601 5829696 24757.60301 +Hong Kong, China Asia 1997 80 6495918 28377.63219 +Hong Kong, China Asia 2002 81.495 6762476 30209.01516 +Hong Kong, China Asia 2007 82.208 6980412 39724.97867 +Hungary Europe 1952 64.03 9504000 5263.673816 +Hungary Europe 1957 66.41 9839000 6040.180011 +Hungary Europe 1962 67.96 10063000 7550.359877 +Hungary Europe 1967 69.5 10223422 9326.64467 +Hungary Europe 1972 69.76 10394091 10168.65611 +Hungary Europe 1977 69.95 10637171 11674.83737 +Hungary Europe 1982 69.39 10705535 12545.99066 +Hungary Europe 1987 69.58 10612740 12986.47998 +Hungary Europe 1992 69.17 10348684 10535.62855 +Hungary Europe 1997 71.04 10244684 11712.7768 +Hungary Europe 2002 72.59 10083313 14843.93556 +Hungary Europe 2007 73.338 9956108 18008.94444 +Iceland Europe 1952 72.49 147962 7267.688428 +Iceland Europe 1957 73.47 165110 9244.001412 +Iceland Europe 1962 73.68 182053 10350.15906 +Iceland Europe 1967 73.73 198676 13319.89568 +Iceland Europe 1972 74.46 209275 15798.06362 +Iceland Europe 1977 76.11 221823 19654.96247 +Iceland Europe 1982 76.99 233997 23269.6075 +Iceland Europe 1987 77.23 244676 26923.20628 +Iceland Europe 1992 78.77 259012 25144.39201 +Iceland Europe 1997 78.95 271192 28061.09966 +Iceland Europe 2002 80.5 288030 31163.20196 +Iceland Europe 2007 81.757 301931 36180.78919 +India Asia 1952 37.373 372000000 546.5657493 +India Asia 1957 40.249 409000000 590.061996 +India Asia 1962 43.605 454000000 658.3471509 +India Asia 1967 47.193 506000000 700.7706107 +India Asia 1972 50.651 567000000 724.032527 +India Asia 1977 54.208 634000000 813.337323 +India Asia 1982 56.596 708000000 855.7235377 +India Asia 1987 58.553 788000000 976.5126756 +India Asia 1992 60.223 872000000 1164.406809 +India Asia 1997 61.765 959000000 1458.817442 +India Asia 2002 62.879 1034172547 1746.769454 +India Asia 2007 64.698 1110396331 2452.210407 +Indonesia Asia 1952 37.468 82052000 749.6816546 +Indonesia Asia 1957 39.918 90124000 858.9002707 +Indonesia Asia 1962 42.518 99028000 849.2897701 +Indonesia Asia 1967 45.964 109343000 762.4317721 +Indonesia Asia 1972 49.203 121282000 1111.107907 +Indonesia Asia 1977 52.702 136725000 1382.702056 +Indonesia Asia 1982 56.159 153343000 1516.872988 +Indonesia Asia 1987 60.137 169276000 1748.356961 +Indonesia Asia 1992 62.681 184816000 2383.140898 +Indonesia Asia 1997 66.041 199278000 3119.335603 +Indonesia Asia 2002 68.588 211060000 2873.91287 +Indonesia Asia 2007 70.65 223547000 3540.651564 +Iran Asia 1952 44.869 17272000 3035.326002 +Iran Asia 1957 47.181 19792000 3290.257643 +Iran Asia 1962 49.325 22874000 4187.329802 +Iran Asia 1967 52.469 26538000 5906.731805 +Iran Asia 1972 55.234 30614000 9613.818607 +Iran Asia 1977 57.702 35480679 11888.59508 +Iran Asia 1982 59.62 43072751 7608.334602 +Iran Asia 1987 63.04 51889696 6642.881371 +Iran Asia 1992 65.742 60397973 7235.653188 +Iran Asia 1997 68.042 63327987 8263.590301 +Iran Asia 2002 69.451 66907826 9240.761975 +Iran Asia 2007 70.964 69453570 11605.71449 +Iraq Asia 1952 45.32 5441766 4129.766056 +Iraq Asia 1957 48.437 6248643 6229.333562 +Iraq Asia 1962 51.457 7240260 8341.737815 +Iraq Asia 1967 54.459 8519282 8931.459811 +Iraq Asia 1972 56.95 10061506 9576.037596 +Iraq Asia 1977 60.413 11882916 14688.23507 +Iraq Asia 1982 62.038 14173318 14517.90711 +Iraq Asia 1987 65.044 16543189 11643.57268 +Iraq Asia 1992 59.461 17861905 3745.640687 +Iraq Asia 1997 58.811 20775703 3076.239795 +Iraq Asia 2002 57.046 24001816 4390.717312 +Iraq Asia 2007 59.545 27499638 4471.061906 +Ireland Europe 1952 66.91 2952156 5210.280328 +Ireland Europe 1957 68.9 2878220 5599.077872 +Ireland Europe 1962 70.29 2830000 6631.597314 +Ireland Europe 1967 71.08 2900100 7655.568963 +Ireland Europe 1972 71.28 3024400 9530.772896 +Ireland Europe 1977 72.03 3271900 11150.98113 +Ireland Europe 1982 73.1 3480000 12618.32141 +Ireland Europe 1987 74.36 3539900 13872.86652 +Ireland Europe 1992 75.467 3557761 17558.81555 +Ireland Europe 1997 76.122 3667233 24521.94713 +Ireland Europe 2002 77.783 3879155 34077.04939 +Ireland Europe 2007 78.885 4109086 40675.99635 +Israel Asia 1952 65.39 1620914 4086.522128 +Israel Asia 1957 67.84 1944401 5385.278451 +Israel Asia 1962 69.39 2310904 7105.630706 +Israel Asia 1967 70.75 2693585 8393.741404 +Israel Asia 1972 71.63 3095893 12786.93223 +Israel Asia 1977 73.06 3495918 13306.61921 +Israel Asia 1982 74.45 3858421 15367.0292 +Israel Asia 1987 75.6 4203148 17122.47986 +Israel Asia 1992 76.93 4936550 18051.52254 +Israel Asia 1997 78.269 5531387 20896.60924 +Israel Asia 2002 79.696 6029529 21905.59514 +Israel Asia 2007 80.745 6426679 25523.2771 +Italy Europe 1952 65.94 47666000 4931.404155 +Italy Europe 1957 67.81 49182000 6248.656232 +Italy Europe 1962 69.24 50843200 8243.58234 +Italy Europe 1967 71.06 52667100 10022.40131 +Italy Europe 1972 72.19 54365564 12269.27378 +Italy Europe 1977 73.48 56059245 14255.98475 +Italy Europe 1982 74.98 56535636 16537.4835 +Italy Europe 1987 76.42 56729703 19207.23482 +Italy Europe 1992 77.44 56840847 22013.64486 +Italy Europe 1997 78.82 57479469 24675.02446 +Italy Europe 2002 80.24 57926999 27968.09817 +Italy Europe 2007 80.546 58147733 28569.7197 +Jamaica Americas 1952 58.53 1426095 2898.530881 +Jamaica Americas 1957 62.61 1535090 4756.525781 +Jamaica Americas 1962 65.61 1665128 5246.107524 +Jamaica Americas 1967 67.51 1861096 6124.703451 +Jamaica Americas 1972 69 1997616 7433.889293 +Jamaica Americas 1977 70.11 2156814 6650.195573 +Jamaica Americas 1982 71.21 2298309 6068.05135 +Jamaica Americas 1987 71.77 2326606 6351.237495 +Jamaica Americas 1992 71.766 2378618 7404.923685 +Jamaica Americas 1997 72.262 2531311 7121.924704 +Jamaica Americas 2002 72.047 2664659 6994.774861 +Jamaica Americas 2007 72.567 2780132 7320.880262 +Japan Asia 1952 63.03 86459025 3216.956347 +Japan Asia 1957 65.5 91563009 4317.694365 +Japan Asia 1962 68.73 95831757 6576.649461 +Japan Asia 1967 71.43 100825279 9847.788607 +Japan Asia 1972 73.42 107188273 14778.78636 +Japan Asia 1977 75.38 113872473 16610.37701 +Japan Asia 1982 77.11 118454974 19384.10571 +Japan Asia 1987 78.67 122091325 22375.94189 +Japan Asia 1992 79.36 124329269 26824.89511 +Japan Asia 1997 80.69 125956499 28816.58499 +Japan Asia 2002 82 127065841 28604.5919 +Japan Asia 2007 82.603 127467972 31656.06806 +Jordan Asia 1952 43.158 607914 1546.907807 +Jordan Asia 1957 45.669 746559 1886.080591 +Jordan Asia 1962 48.126 933559 2348.009158 +Jordan Asia 1967 51.629 1255058 2741.796252 +Jordan Asia 1972 56.528 1613551 2110.856309 +Jordan Asia 1977 61.134 1937652 2852.351568 +Jordan Asia 1982 63.739 2347031 4161.415959 +Jordan Asia 1987 65.869 2820042 4448.679912 +Jordan Asia 1992 68.015 3867409 3431.593647 +Jordan Asia 1997 69.772 4526235 3645.379572 +Jordan Asia 2002 71.263 5307470 3844.917194 +Jordan Asia 2007 72.535 6053193 4519.461171 +Kenya Africa 1952 42.27 6464046 853.540919 +Kenya Africa 1957 44.686 7454779 944.4383152 +Kenya Africa 1962 47.949 8678557 896.9663732 +Kenya Africa 1967 50.654 10191512 1056.736457 +Kenya Africa 1972 53.559 12044785 1222.359968 +Kenya Africa 1977 56.155 14500404 1267.613204 +Kenya Africa 1982 58.766 17661452 1348.225791 +Kenya Africa 1987 59.339 21198082 1361.936856 +Kenya Africa 1992 59.285 25020539 1341.921721 +Kenya Africa 1997 54.407 28263827 1360.485021 +Kenya Africa 2002 50.992 31386842 1287.514732 +Kenya Africa 2007 54.11 35610177 1463.249282 +Korea, Dem. Rep. Asia 1952 50.056 8865488 1088.277758 +Korea, Dem. Rep. Asia 1957 54.081 9411381 1571.134655 +Korea, Dem. Rep. Asia 1962 56.656 10917494 1621.693598 +Korea, Dem. Rep. Asia 1967 59.942 12617009 2143.540609 +Korea, Dem. Rep. Asia 1972 63.983 14781241 3701.621503 +Korea, Dem. Rep. Asia 1977 67.159 16325320 4106.301249 +Korea, Dem. Rep. Asia 1982 69.1 17647518 4106.525293 +Korea, Dem. Rep. Asia 1987 70.647 19067554 4106.492315 +Korea, Dem. Rep. Asia 1992 69.978 20711375 3726.063507 +Korea, Dem. Rep. Asia 1997 67.727 21585105 1690.756814 +Korea, Dem. Rep. Asia 2002 66.662 22215365 1646.758151 +Korea, Dem. Rep. Asia 2007 67.297 23301725 1593.06548 +Korea, Rep. Asia 1952 47.453 20947571 1030.592226 +Korea, Rep. Asia 1957 52.681 22611552 1487.593537 +Korea, Rep. Asia 1962 55.292 26420307 1536.344387 +Korea, Rep. Asia 1967 57.716 30131000 2029.228142 +Korea, Rep. Asia 1972 62.612 33505000 3030.87665 +Korea, Rep. Asia 1977 64.766 36436000 4657.22102 +Korea, Rep. Asia 1982 67.123 39326000 5622.942464 +Korea, Rep. Asia 1987 69.81 41622000 8533.088805 +Korea, Rep. Asia 1992 72.244 43805450 12104.27872 +Korea, Rep. Asia 1997 74.647 46173816 15993.52796 +Korea, Rep. Asia 2002 77.045 47969150 19233.98818 +Korea, Rep. Asia 2007 78.623 49044790 23348.13973 +Kuwait Asia 1952 55.565 160000 108382.3529 +Kuwait Asia 1957 58.033 212846 113523.1329 +Kuwait Asia 1962 60.47 358266 95458.11176 +Kuwait Asia 1967 64.624 575003 80894.88326 +Kuwait Asia 1972 67.712 841934 109347.867 +Kuwait Asia 1977 69.343 1140357 59265.47714 +Kuwait Asia 1982 71.309 1497494 31354.03573 +Kuwait Asia 1987 74.174 1891487 28118.42998 +Kuwait Asia 1992 75.19 1418095 34932.91959 +Kuwait Asia 1997 76.156 1765345 40300.61996 +Kuwait Asia 2002 76.904 2111561 35110.10566 +Kuwait Asia 2007 77.588 2505559 47306.98978 +Lebanon Asia 1952 55.928 1439529 4834.804067 +Lebanon Asia 1957 59.489 1647412 6089.786934 +Lebanon Asia 1962 62.094 1886848 5714.560611 +Lebanon Asia 1967 63.87 2186894 6006.983042 +Lebanon Asia 1972 65.421 2680018 7486.384341 +Lebanon Asia 1977 66.099 3115787 8659.696836 +Lebanon Asia 1982 66.983 3086876 7640.519521 +Lebanon Asia 1987 67.926 3089353 5377.091329 +Lebanon Asia 1992 69.292 3219994 6890.806854 +Lebanon Asia 1997 70.265 3430388 8754.96385 +Lebanon Asia 2002 71.028 3677780 9313.93883 +Lebanon Asia 2007 71.993 3921278 10461.05868 +Lesotho Africa 1952 42.138 748747 298.8462121 +Lesotho Africa 1957 45.047 813338 335.9971151 +Lesotho Africa 1962 47.747 893143 411.8006266 +Lesotho Africa 1967 48.492 996380 498.6390265 +Lesotho Africa 1972 49.767 1116779 496.5815922 +Lesotho Africa 1977 52.208 1251524 745.3695408 +Lesotho Africa 1982 55.078 1411807 797.2631074 +Lesotho Africa 1987 57.18 1599200 773.9932141 +Lesotho Africa 1992 59.685 1803195 977.4862725 +Lesotho Africa 1997 55.558 1982823 1186.147994 +Lesotho Africa 2002 44.593 2046772 1275.184575 +Lesotho Africa 2007 42.592 2012649 1569.331442 +Liberia Africa 1952 38.48 863308 575.5729961 +Liberia Africa 1957 39.486 975950 620.9699901 +Liberia Africa 1962 40.502 1112796 634.1951625 +Liberia Africa 1967 41.536 1279406 713.6036483 +Liberia Africa 1972 42.614 1482628 803.0054535 +Liberia Africa 1977 43.764 1703617 640.3224383 +Liberia Africa 1982 44.852 1956875 572.1995694 +Liberia Africa 1987 46.027 2269414 506.1138573 +Liberia Africa 1992 40.802 1912974 636.6229191 +Liberia Africa 1997 42.221 2200725 609.1739508 +Liberia Africa 2002 43.753 2814651 531.4823679 +Liberia Africa 2007 45.678 3193942 414.5073415 +Libya Africa 1952 42.723 1019729 2387.54806 +Libya Africa 1957 45.289 1201578 3448.284395 +Libya Africa 1962 47.808 1441863 6757.030816 +Libya Africa 1967 50.227 1759224 18772.75169 +Libya Africa 1972 52.773 2183877 21011.49721 +Libya Africa 1977 57.442 2721783 21951.21176 +Libya Africa 1982 62.155 3344074 17364.27538 +Libya Africa 1987 66.234 3799845 11770.5898 +Libya Africa 1992 68.755 4364501 9640.138501 +Libya Africa 1997 71.555 4759670 9467.446056 +Libya Africa 2002 72.737 5368585 9534.677467 +Libya Africa 2007 73.952 6036914 12057.49928 +Madagascar Africa 1952 36.681 4762912 1443.011715 +Madagascar Africa 1957 38.865 5181679 1589.20275 +Madagascar Africa 1962 40.848 5703324 1643.38711 +Madagascar Africa 1967 42.881 6334556 1634.047282 +Madagascar Africa 1972 44.851 7082430 1748.562982 +Madagascar Africa 1977 46.881 8007166 1544.228586 +Madagascar Africa 1982 48.969 9171477 1302.878658 +Madagascar Africa 1987 49.35 10568642 1155.441948 +Madagascar Africa 1992 52.214 12210395 1040.67619 +Madagascar Africa 1997 54.978 14165114 986.2958956 +Madagascar Africa 2002 57.286 16473477 894.6370822 +Madagascar Africa 2007 59.443 19167654 1044.770126 +Malawi Africa 1952 36.256 2917802 369.1650802 +Malawi Africa 1957 37.207 3221238 416.3698064 +Malawi Africa 1962 38.41 3628608 427.9010856 +Malawi Africa 1967 39.487 4147252 495.5147806 +Malawi Africa 1972 41.766 4730997 584.6219709 +Malawi Africa 1977 43.767 5637246 663.2236766 +Malawi Africa 1982 45.642 6502825 632.8039209 +Malawi Africa 1987 47.457 7824747 635.5173634 +Malawi Africa 1992 49.42 10014249 563.2000145 +Malawi Africa 1997 47.495 10419991 692.2758103 +Malawi Africa 2002 45.009 11824495 665.4231186 +Malawi Africa 2007 48.303 13327079 759.3499101 +Malaysia Asia 1952 48.463 6748378 1831.132894 +Malaysia Asia 1957 52.102 7739235 1810.066992 +Malaysia Asia 1962 55.737 8906385 2036.884944 +Malaysia Asia 1967 59.371 10154878 2277.742396 +Malaysia Asia 1972 63.01 11441462 2849.09478 +Malaysia Asia 1977 65.256 12845381 3827.921571 +Malaysia Asia 1982 68 14441916 4920.355951 +Malaysia Asia 1987 69.5 16331785 5249.802653 +Malaysia Asia 1992 70.693 18319502 7277.912802 +Malaysia Asia 1997 71.938 20476091 10132.90964 +Malaysia Asia 2002 73.044 22662365 10206.97794 +Malaysia Asia 2007 74.241 24821286 12451.6558 +Mali Africa 1952 33.685 3838168 452.3369807 +Mali Africa 1957 35.307 4241884 490.3821867 +Mali Africa 1962 36.936 4690372 496.1743428 +Mali Africa 1967 38.487 5212416 545.0098873 +Mali Africa 1972 39.977 5828158 581.3688761 +Mali Africa 1977 41.714 6491649 686.3952693 +Mali Africa 1982 43.916 6998256 618.0140641 +Mali Africa 1987 46.364 7634008 684.1715576 +Mali Africa 1992 48.388 8416215 739.014375 +Mali Africa 1997 49.903 9384984 790.2579846 +Mali Africa 2002 51.818 10580176 951.4097518 +Mali Africa 2007 54.467 12031795 1042.581557 +Mauritania Africa 1952 40.543 1022556 743.1159097 +Mauritania Africa 1957 42.338 1076852 846.1202613 +Mauritania Africa 1962 44.248 1146757 1055.896036 +Mauritania Africa 1967 46.289 1230542 1421.145193 +Mauritania Africa 1972 48.437 1332786 1586.851781 +Mauritania Africa 1977 50.852 1456688 1497.492223 +Mauritania Africa 1982 53.599 1622136 1481.150189 +Mauritania Africa 1987 56.145 1841240 1421.603576 +Mauritania Africa 1992 58.333 2119465 1361.369784 +Mauritania Africa 1997 60.43 2444741 1483.136136 +Mauritania Africa 2002 62.247 2828858 1579.019543 +Mauritania Africa 2007 64.164 3270065 1803.151496 +Mauritius Africa 1952 50.986 516556 1967.955707 +Mauritius Africa 1957 58.089 609816 2034.037981 +Mauritius Africa 1962 60.246 701016 2529.067487 +Mauritius Africa 1967 61.557 789309 2475.387562 +Mauritius Africa 1972 62.944 851334 2575.484158 +Mauritius Africa 1977 64.93 913025 3710.982963 +Mauritius Africa 1982 66.711 992040 3688.037739 +Mauritius Africa 1987 68.74 1042663 4783.586903 +Mauritius Africa 1992 69.745 1096202 6058.253846 +Mauritius Africa 1997 70.736 1149818 7425.705295 +Mauritius Africa 2002 71.954 1200206 9021.815894 +Mauritius Africa 2007 72.801 1250882 10956.99112 +Mexico Americas 1952 50.789 30144317 3478.125529 +Mexico Americas 1957 55.19 35015548 4131.546641 +Mexico Americas 1962 58.299 41121485 4581.609385 +Mexico Americas 1967 60.11 47995559 5754.733883 +Mexico Americas 1972 62.361 55984294 6809.40669 +Mexico Americas 1977 65.032 63759976 7674.929108 +Mexico Americas 1982 67.405 71640904 9611.147541 +Mexico Americas 1987 69.498 80122492 8688.156003 +Mexico Americas 1992 71.455 88111030 9472.384295 +Mexico Americas 1997 73.67 95895146 9767.29753 +Mexico Americas 2002 74.902 102479927 10742.44053 +Mexico Americas 2007 76.195 108700891 11977.57496 +Mongolia Asia 1952 42.244 800663 786.5668575 +Mongolia Asia 1957 45.248 882134 912.6626085 +Mongolia Asia 1962 48.251 1010280 1056.353958 +Mongolia Asia 1967 51.253 1149500 1226.04113 +Mongolia Asia 1972 53.754 1320500 1421.741975 +Mongolia Asia 1977 55.491 1528000 1647.511665 +Mongolia Asia 1982 57.489 1756032 2000.603139 +Mongolia Asia 1987 60.222 2015133 2338.008304 +Mongolia Asia 1992 61.271 2312802 1785.402016 +Mongolia Asia 1997 63.625 2494803 1902.2521 +Mongolia Asia 2002 65.033 2674234 2140.739323 +Mongolia Asia 2007 66.803 2874127 3095.772271 +Montenegro Europe 1952 59.164 413834 2647.585601 +Montenegro Europe 1957 61.448 442829 3682.259903 +Montenegro Europe 1962 63.728 474528 4649.593785 +Montenegro Europe 1967 67.178 501035 5907.850937 +Montenegro Europe 1972 70.636 527678 7778.414017 +Montenegro Europe 1977 73.066 560073 9595.929905 +Montenegro Europe 1982 74.101 562548 11222.58762 +Montenegro Europe 1987 74.865 569473 11732.51017 +Montenegro Europe 1992 75.435 621621 7003.339037 +Montenegro Europe 1997 75.445 692651 6465.613349 +Montenegro Europe 2002 73.981 720230 6557.194282 +Montenegro Europe 2007 74.543 684736 9253.896111 +Morocco Africa 1952 42.873 9939217 1688.20357 +Morocco Africa 1957 45.423 11406350 1642.002314 +Morocco Africa 1962 47.924 13056604 1566.353493 +Morocco Africa 1967 50.335 14770296 1711.04477 +Morocco Africa 1972 52.862 16660670 1930.194975 +Morocco Africa 1977 55.73 18396941 2370.619976 +Morocco Africa 1982 59.65 20198730 2702.620356 +Morocco Africa 1987 62.677 22987397 2755.046991 +Morocco Africa 1992 65.393 25798239 2948.047252 +Morocco Africa 1997 67.66 28529501 2982.101858 +Morocco Africa 2002 69.615 31167783 3258.495584 +Morocco Africa 2007 71.164 33757175 3820.17523 +Mozambique Africa 1952 31.286 6446316 468.5260381 +Mozambique Africa 1957 33.779 7038035 495.5868333 +Mozambique Africa 1962 36.161 7788944 556.6863539 +Mozambique Africa 1967 38.113 8680909 566.6691539 +Mozambique Africa 1972 40.328 9809596 724.9178037 +Mozambique Africa 1977 42.495 11127868 502.3197334 +Mozambique Africa 1982 42.795 12587223 462.2114149 +Mozambique Africa 1987 42.861 12891952 389.8761846 +Mozambique Africa 1992 44.284 13160731 410.8968239 +Mozambique Africa 1997 46.344 16603334 472.3460771 +Mozambique Africa 2002 44.026 18473780 633.6179466 +Mozambique Africa 2007 42.082 19951656 823.6856205 +Myanmar Asia 1952 36.319 20092996 331 +Myanmar Asia 1957 41.905 21731844 350 +Myanmar Asia 1962 45.108 23634436 388 +Myanmar Asia 1967 49.379 25870271 349 +Myanmar Asia 1972 53.07 28466390 357 +Myanmar Asia 1977 56.059 31528087 371 +Myanmar Asia 1982 58.056 34680442 424 +Myanmar Asia 1987 58.339 38028578 385 +Myanmar Asia 1992 59.32 40546538 347 +Myanmar Asia 1997 60.328 43247867 415 +Myanmar Asia 2002 59.908 45598081 611 +Myanmar Asia 2007 62.069 47761980 944 +Namibia Africa 1952 41.725 485831 2423.780443 +Namibia Africa 1957 45.226 548080 2621.448058 +Namibia Africa 1962 48.386 621392 3173.215595 +Namibia Africa 1967 51.159 706640 3793.694753 +Namibia Africa 1972 53.867 821782 3746.080948 +Namibia Africa 1977 56.437 977026 3876.485958 +Namibia Africa 1982 58.968 1099010 4191.100511 +Namibia Africa 1987 60.835 1278184 3693.731337 +Namibia Africa 1992 61.999 1554253 3804.537999 +Namibia Africa 1997 58.909 1774766 3899.52426 +Namibia Africa 2002 51.479 1972153 4072.324751 +Namibia Africa 2007 52.906 2055080 4811.060429 +Nepal Asia 1952 36.157 9182536 545.8657229 +Nepal Asia 1957 37.686 9682338 597.9363558 +Nepal Asia 1962 39.393 10332057 652.3968593 +Nepal Asia 1967 41.472 11261690 676.4422254 +Nepal Asia 1972 43.971 12412593 674.7881296 +Nepal Asia 1977 46.748 13933198 694.1124398 +Nepal Asia 1982 49.594 15796314 718.3730947 +Nepal Asia 1987 52.537 17917180 775.6324501 +Nepal Asia 1992 55.727 20326209 897.7403604 +Nepal Asia 1997 59.426 23001113 1010.892138 +Nepal Asia 2002 61.34 25873917 1057.206311 +Nepal Asia 2007 63.785 28901790 1091.359778 +Netherlands Europe 1952 72.13 10381988 8941.571858 +Netherlands Europe 1957 72.99 11026383 11276.19344 +Netherlands Europe 1962 73.23 11805689 12790.84956 +Netherlands Europe 1967 73.82 12596822 15363.25136 +Netherlands Europe 1972 73.75 13329874 18794.74567 +Netherlands Europe 1977 75.24 13852989 21209.0592 +Netherlands Europe 1982 76.05 14310401 21399.46046 +Netherlands Europe 1987 76.83 14665278 23651.32361 +Netherlands Europe 1992 77.42 15174244 26790.94961 +Netherlands Europe 1997 78.03 15604464 30246.13063 +Netherlands Europe 2002 78.53 16122830 33724.75778 +Netherlands Europe 2007 79.762 16570613 36797.93332 +New Zealand Oceania 1952 69.39 1994794 10556.57566 +New Zealand Oceania 1957 70.26 2229407 12247.39532 +New Zealand Oceania 1962 71.24 2488550 13175.678 +New Zealand Oceania 1967 71.52 2728150 14463.91893 +New Zealand Oceania 1972 71.89 2929100 16046.03728 +New Zealand Oceania 1977 72.22 3164900 16233.7177 +New Zealand Oceania 1982 73.84 3210650 17632.4104 +New Zealand Oceania 1987 74.32 3317166 19007.19129 +New Zealand Oceania 1992 76.33 3437674 18363.32494 +New Zealand Oceania 1997 77.55 3676187 21050.41377 +New Zealand Oceania 2002 79.11 3908037 23189.80135 +New Zealand Oceania 2007 80.204 4115771 25185.00911 +Nicaragua Americas 1952 42.314 1165790 3112.363948 +Nicaragua Americas 1957 45.432 1358828 3457.415947 +Nicaragua Americas 1962 48.632 1590597 3634.364406 +Nicaragua Americas 1967 51.884 1865490 4643.393534 +Nicaragua Americas 1972 55.151 2182908 4688.593267 +Nicaragua Americas 1977 57.47 2554598 5486.371089 +Nicaragua Americas 1982 59.298 2979423 3470.338156 +Nicaragua Americas 1987 62.008 3344353 2955.984375 +Nicaragua Americas 1992 65.843 4017939 2170.151724 +Nicaragua Americas 1997 68.426 4609572 2253.023004 +Nicaragua Americas 2002 70.836 5146848 2474.548819 +Nicaragua Americas 2007 72.899 5675356 2749.320965 +Niger Africa 1952 37.444 3379468 761.879376 +Niger Africa 1957 38.598 3692184 835.5234025 +Niger Africa 1962 39.487 4076008 997.7661127 +Niger Africa 1967 40.118 4534062 1054.384891 +Niger Africa 1972 40.546 5060262 954.2092363 +Niger Africa 1977 41.291 5682086 808.8970728 +Niger Africa 1982 42.598 6437188 909.7221354 +Niger Africa 1987 44.555 7332638 668.3000228 +Niger Africa 1992 47.391 8392818 581.182725 +Niger Africa 1997 51.313 9666252 580.3052092 +Niger Africa 2002 54.496 11140655 601.0745012 +Niger Africa 2007 56.867 12894865 619.6768924 +Nigeria Africa 1952 36.324 33119096 1077.281856 +Nigeria Africa 1957 37.802 37173340 1100.592563 +Nigeria Africa 1962 39.36 41871351 1150.927478 +Nigeria Africa 1967 41.04 47287752 1014.514104 +Nigeria Africa 1972 42.821 53740085 1698.388838 +Nigeria Africa 1977 44.514 62209173 1981.951806 +Nigeria Africa 1982 45.826 73039376 1576.97375 +Nigeria Africa 1987 46.886 81551520 1385.029563 +Nigeria Africa 1992 47.472 93364244 1619.848217 +Nigeria Africa 1997 47.464 106207839 1624.941275 +Nigeria Africa 2002 46.608 119901274 1615.286395 +Nigeria Africa 2007 46.859 135031164 2013.977305 +Norway Europe 1952 72.67 3327728 10095.42172 +Norway Europe 1957 73.44 3491938 11653.97304 +Norway Europe 1962 73.47 3638919 13450.40151 +Norway Europe 1967 74.08 3786019 16361.87647 +Norway Europe 1972 74.34 3933004 18965.05551 +Norway Europe 1977 75.37 4043205 23311.34939 +Norway Europe 1982 75.97 4114787 26298.63531 +Norway Europe 1987 75.89 4186147 31540.9748 +Norway Europe 1992 77.32 4286357 33965.66115 +Norway Europe 1997 78.32 4405672 41283.16433 +Norway Europe 2002 79.05 4535591 44683.97525 +Norway Europe 2007 80.196 4627926 49357.19017 +Oman Asia 1952 37.578 507833 1828.230307 +Oman Asia 1957 40.08 561977 2242.746551 +Oman Asia 1962 43.165 628164 2924.638113 +Oman Asia 1967 46.988 714775 4720.942687 +Oman Asia 1972 52.143 829050 10618.03855 +Oman Asia 1977 57.367 1004533 11848.34392 +Oman Asia 1982 62.728 1301048 12954.79101 +Oman Asia 1987 67.734 1593882 18115.22313 +Oman Asia 1992 71.197 1915208 18616.70691 +Oman Asia 1997 72.499 2283635 19702.05581 +Oman Asia 2002 74.193 2713462 19774.83687 +Oman Asia 2007 75.64 3204897 22316.19287 +Pakistan Asia 1952 43.436 41346560 684.5971438 +Pakistan Asia 1957 45.557 46679944 747.0835292 +Pakistan Asia 1962 47.67 53100671 803.3427418 +Pakistan Asia 1967 49.8 60641899 942.4082588 +Pakistan Asia 1972 51.929 69325921 1049.938981 +Pakistan Asia 1977 54.043 78152686 1175.921193 +Pakistan Asia 1982 56.158 91462088 1443.429832 +Pakistan Asia 1987 58.245 105186881 1704.686583 +Pakistan Asia 1992 60.838 120065004 1971.829464 +Pakistan Asia 1997 61.818 135564834 2049.350521 +Pakistan Asia 2002 63.61 153403524 2092.712441 +Pakistan Asia 2007 65.483 169270617 2605.94758 +Panama Americas 1952 55.191 940080 2480.380334 +Panama Americas 1957 59.201 1063506 2961.800905 +Panama Americas 1962 61.817 1215725 3536.540301 +Panama Americas 1967 64.071 1405486 4421.009084 +Panama Americas 1972 66.216 1616384 5364.249663 +Panama Americas 1977 68.681 1839782 5351.912144 +Panama Americas 1982 70.472 2036305 7009.601598 +Panama Americas 1987 71.523 2253639 7034.779161 +Panama Americas 1992 72.462 2484997 6618.74305 +Panama Americas 1997 73.738 2734531 7113.692252 +Panama Americas 2002 74.712 2990875 7356.031934 +Panama Americas 2007 75.537 3242173 9809.185636 +Paraguay Americas 1952 62.649 1555876 1952.308701 +Paraguay Americas 1957 63.196 1770902 2046.154706 +Paraguay Americas 1962 64.361 2009813 2148.027146 +Paraguay Americas 1967 64.951 2287985 2299.376311 +Paraguay Americas 1972 65.815 2614104 2523.337977 +Paraguay Americas 1977 66.353 2984494 3248.373311 +Paraguay Americas 1982 66.874 3366439 4258.503604 +Paraguay Americas 1987 67.378 3886512 3998.875695 +Paraguay Americas 1992 68.225 4483945 4196.411078 +Paraguay Americas 1997 69.4 5154123 4247.400261 +Paraguay Americas 2002 70.755 5884491 3783.674243 +Paraguay Americas 2007 71.752 6667147 4172.838464 +Peru Americas 1952 43.902 8025700 3758.523437 +Peru Americas 1957 46.263 9146100 4245.256698 +Peru Americas 1962 49.096 10516500 4957.037982 +Peru Americas 1967 51.445 12132200 5788.09333 +Peru Americas 1972 55.448 13954700 5937.827283 +Peru Americas 1977 58.447 15990099 6281.290855 +Peru Americas 1982 61.406 18125129 6434.501797 +Peru Americas 1987 64.134 20195924 6360.943444 +Peru Americas 1992 66.458 22430449 4446.380924 +Peru Americas 1997 68.386 24748122 5838.347657 +Peru Americas 2002 69.906 26769436 5909.020073 +Peru Americas 2007 71.421 28674757 7408.905561 +Philippines Asia 1952 47.752 22438691 1272.880995 +Philippines Asia 1957 51.334 26072194 1547.944844 +Philippines Asia 1962 54.757 30325264 1649.552153 +Philippines Asia 1967 56.393 35356600 1814.12743 +Philippines Asia 1972 58.065 40850141 1989.37407 +Philippines Asia 1977 60.06 46850962 2373.204287 +Philippines Asia 1982 62.082 53456774 2603.273765 +Philippines Asia 1987 64.151 60017788 2189.634995 +Philippines Asia 1992 66.458 67185766 2279.324017 +Philippines Asia 1997 68.564 75012988 2536.534925 +Philippines Asia 2002 70.303 82995088 2650.921068 +Philippines Asia 2007 71.688 91077287 3190.481016 +Poland Europe 1952 61.31 25730551 4029.329699 +Poland Europe 1957 65.77 28235346 4734.253019 +Poland Europe 1962 67.64 30329617 5338.752143 +Poland Europe 1967 69.61 31785378 6557.152776 +Poland Europe 1972 70.85 33039545 8006.506993 +Poland Europe 1977 70.67 34621254 9508.141454 +Poland Europe 1982 71.32 36227381 8451.531004 +Poland Europe 1987 70.98 37740710 9082.351172 +Poland Europe 1992 70.99 38370697 7738.881247 +Poland Europe 1997 72.75 38654957 10159.58368 +Poland Europe 2002 74.67 38625976 12002.23908 +Poland Europe 2007 75.563 38518241 15389.92468 +Portugal Europe 1952 59.82 8526050 3068.319867 +Portugal Europe 1957 61.51 8817650 3774.571743 +Portugal Europe 1962 64.39 9019800 4727.954889 +Portugal Europe 1967 66.6 9103000 6361.517993 +Portugal Europe 1972 69.26 8970450 9022.247417 +Portugal Europe 1977 70.41 9662600 10172.48572 +Portugal Europe 1982 72.77 9859650 11753.84291 +Portugal Europe 1987 74.06 9915289 13039.30876 +Portugal Europe 1992 74.86 9927680 16207.26663 +Portugal Europe 1997 75.97 10156415 17641.03156 +Portugal Europe 2002 77.29 10433867 19970.90787 +Portugal Europe 2007 78.098 10642836 20509.64777 +Puerto Rico Americas 1952 64.28 2227000 3081.959785 +Puerto Rico Americas 1957 68.54 2260000 3907.156189 +Puerto Rico Americas 1962 69.62 2448046 5108.34463 +Puerto Rico Americas 1967 71.1 2648961 6929.277714 +Puerto Rico Americas 1972 72.16 2847132 9123.041742 +Puerto Rico Americas 1977 73.44 3080828 9770.524921 +Puerto Rico Americas 1982 73.75 3279001 10330.98915 +Puerto Rico Americas 1987 74.63 3444468 12281.34191 +Puerto Rico Americas 1992 73.911 3585176 14641.58711 +Puerto Rico Americas 1997 74.917 3759430 16999.4333 +Puerto Rico Americas 2002 77.778 3859606 18855.60618 +Puerto Rico Americas 2007 78.746 3942491 19328.70901 +Reunion Africa 1952 52.724 257700 2718.885295 +Reunion Africa 1957 55.09 308700 2769.451844 +Reunion Africa 1962 57.666 358900 3173.72334 +Reunion Africa 1967 60.542 414024 4021.175739 +Reunion Africa 1972 64.274 461633 5047.658563 +Reunion Africa 1977 67.064 492095 4319.804067 +Reunion Africa 1982 69.885 517810 5267.219353 +Reunion Africa 1987 71.913 562035 5303.377488 +Reunion Africa 1992 73.615 622191 6101.255823 +Reunion Africa 1997 74.772 684810 6071.941411 +Reunion Africa 2002 75.744 743981 6316.1652 +Reunion Africa 2007 76.442 798094 7670.122558 +Romania Europe 1952 61.05 16630000 3144.613186 +Romania Europe 1957 64.1 17829327 3943.370225 +Romania Europe 1962 66.8 18680721 4734.997586 +Romania Europe 1967 66.8 19284814 6470.866545 +Romania Europe 1972 69.21 20662648 8011.414402 +Romania Europe 1977 69.46 21658597 9356.39724 +Romania Europe 1982 69.66 22356726 9605.314053 +Romania Europe 1987 69.53 22686371 9696.273295 +Romania Europe 1992 69.36 22797027 6598.409903 +Romania Europe 1997 69.72 22562458 7346.547557 +Romania Europe 2002 71.322 22404337 7885.360081 +Romania Europe 2007 72.476 22276056 10808.47561 +Rwanda Africa 1952 40 2534927 493.3238752 +Rwanda Africa 1957 41.5 2822082 540.2893983 +Rwanda Africa 1962 43 3051242 597.4730727 +Rwanda Africa 1967 44.1 3451079 510.9637142 +Rwanda Africa 1972 44.6 3992121 590.5806638 +Rwanda Africa 1977 45 4657072 670.0806011 +Rwanda Africa 1982 46.218 5507565 881.5706467 +Rwanda Africa 1987 44.02 6349365 847.991217 +Rwanda Africa 1992 23.599 7290203 737.0685949 +Rwanda Africa 1997 36.087 7212583 589.9445051 +Rwanda Africa 2002 43.413 7852401 785.6537648 +Rwanda Africa 2007 46.242 8860588 863.0884639 +Sao Tome and Principe Africa 1952 46.471 60011 879.5835855 +Sao Tome and Principe Africa 1957 48.945 61325 860.7369026 +Sao Tome and Principe Africa 1962 51.893 65345 1071.551119 +Sao Tome and Principe Africa 1967 54.425 70787 1384.840593 +Sao Tome and Principe Africa 1972 56.48 76595 1532.985254 +Sao Tome and Principe Africa 1977 58.55 86796 1737.561657 +Sao Tome and Principe Africa 1982 60.351 98593 1890.218117 +Sao Tome and Principe Africa 1987 61.728 110812 1516.525457 +Sao Tome and Principe Africa 1992 62.742 125911 1428.777814 +Sao Tome and Principe Africa 1997 63.306 145608 1339.076036 +Sao Tome and Principe Africa 2002 64.337 170372 1353.09239 +Sao Tome and Principe Africa 2007 65.528 199579 1598.435089 +Saudi Arabia Asia 1952 39.875 4005677 6459.554823 +Saudi Arabia Asia 1957 42.868 4419650 8157.591248 +Saudi Arabia Asia 1962 45.914 4943029 11626.41975 +Saudi Arabia Asia 1967 49.901 5618198 16903.04886 +Saudi Arabia Asia 1972 53.886 6472756 24837.42865 +Saudi Arabia Asia 1977 58.69 8128505 34167.7626 +Saudi Arabia Asia 1982 63.012 11254672 33693.17525 +Saudi Arabia Asia 1987 66.295 14619745 21198.26136 +Saudi Arabia Asia 1992 68.768 16945857 24841.61777 +Saudi Arabia Asia 1997 70.533 21229759 20586.69019 +Saudi Arabia Asia 2002 71.626 24501530 19014.54118 +Saudi Arabia Asia 2007 72.777 27601038 21654.83194 +Senegal Africa 1952 37.278 2755589 1450.356983 +Senegal Africa 1957 39.329 3054547 1567.653006 +Senegal Africa 1962 41.454 3430243 1654.988723 +Senegal Africa 1967 43.563 3965841 1612.404632 +Senegal Africa 1972 45.815 4588696 1597.712056 +Senegal Africa 1977 48.879 5260855 1561.769116 +Senegal Africa 1982 52.379 6147783 1518.479984 +Senegal Africa 1987 55.769 7171347 1441.72072 +Senegal Africa 1992 58.196 8307920 1367.899369 +Senegal Africa 1997 60.187 9535314 1392.368347 +Senegal Africa 2002 61.6 10870037 1519.635262 +Senegal Africa 2007 63.062 12267493 1712.472136 +Serbia Europe 1952 57.996 6860147 3581.459448 +Serbia Europe 1957 61.685 7271135 4981.090891 +Serbia Europe 1962 64.531 7616060 6289.629157 +Serbia Europe 1967 66.914 7971222 7991.707066 +Serbia Europe 1972 68.7 8313288 10522.06749 +Serbia Europe 1977 70.3 8686367 12980.66956 +Serbia Europe 1982 70.162 9032824 15181.0927 +Serbia Europe 1987 71.218 9230783 15870.87851 +Serbia Europe 1992 71.659 9826397 9325.068238 +Serbia Europe 1997 72.232 10336594 7914.320304 +Serbia Europe 2002 73.213 10111559 7236.075251 +Serbia Europe 2007 74.002 10150265 9786.534714 +Sierra Leone Africa 1952 30.331 2143249 879.7877358 +Sierra Leone Africa 1957 31.57 2295678 1004.484437 +Sierra Leone Africa 1962 32.767 2467895 1116.639877 +Sierra Leone Africa 1967 34.113 2662190 1206.043465 +Sierra Leone Africa 1972 35.4 2879013 1353.759762 +Sierra Leone Africa 1977 36.788 3140897 1348.285159 +Sierra Leone Africa 1982 38.445 3464522 1465.010784 +Sierra Leone Africa 1987 40.006 3868905 1294.447788 +Sierra Leone Africa 1992 38.333 4260884 1068.696278 +Sierra Leone Africa 1997 39.897 4578212 574.6481576 +Sierra Leone Africa 2002 41.012 5359092 699.489713 +Sierra Leone Africa 2007 42.568 6144562 862.5407561 +Singapore Asia 1952 60.396 1127000 2315.138227 +Singapore Asia 1957 63.179 1445929 2843.104409 +Singapore Asia 1962 65.798 1750200 3674.735572 +Singapore Asia 1967 67.946 1977600 4977.41854 +Singapore Asia 1972 69.521 2152400 8597.756202 +Singapore Asia 1977 70.795 2325300 11210.08948 +Singapore Asia 1982 71.76 2651869 15169.16112 +Singapore Asia 1987 73.56 2794552 18861.53081 +Singapore Asia 1992 75.788 3235865 24769.8912 +Singapore Asia 1997 77.158 3802309 33519.4766 +Singapore Asia 2002 78.77 4197776 36023.1054 +Singapore Asia 2007 79.972 4553009 47143.17964 +Slovak Republic Europe 1952 64.36 3558137 5074.659104 +Slovak Republic Europe 1957 67.45 3844277 6093.26298 +Slovak Republic Europe 1962 70.33 4237384 7481.107598 +Slovak Republic Europe 1967 70.98 4442238 8412.902397 +Slovak Republic Europe 1972 70.35 4593433 9674.167626 +Slovak Republic Europe 1977 70.45 4827803 10922.66404 +Slovak Republic Europe 1982 70.8 5048043 11348.54585 +Slovak Republic Europe 1987 71.08 5199318 12037.26758 +Slovak Republic Europe 1992 71.38 5302888 9498.467723 +Slovak Republic Europe 1997 72.71 5383010 12126.23065 +Slovak Republic Europe 2002 73.8 5410052 13638.77837 +Slovak Republic Europe 2007 74.663 5447502 18678.31435 +Slovenia Europe 1952 65.57 1489518 4215.041741 +Slovenia Europe 1957 67.85 1533070 5862.276629 +Slovenia Europe 1962 69.15 1582962 7402.303395 +Slovenia Europe 1967 69.18 1646912 9405.489397 +Slovenia Europe 1972 69.82 1694510 12383.4862 +Slovenia Europe 1977 70.97 1746919 15277.03017 +Slovenia Europe 1982 71.063 1861252 17866.72175 +Slovenia Europe 1987 72.25 1945870 18678.53492 +Slovenia Europe 1992 73.64 1999210 14214.71681 +Slovenia Europe 1997 75.13 2011612 17161.10735 +Slovenia Europe 2002 76.66 2011497 20660.01936 +Slovenia Europe 2007 77.926 2009245 25768.25759 +Somalia Africa 1952 32.978 2526994 1135.749842 +Somalia Africa 1957 34.977 2780415 1258.147413 +Somalia Africa 1962 36.981 3080153 1369.488336 +Somalia Africa 1967 38.977 3428839 1284.73318 +Somalia Africa 1972 40.973 3840161 1254.576127 +Somalia Africa 1977 41.974 4353666 1450.992513 +Somalia Africa 1982 42.955 5828892 1176.807031 +Somalia Africa 1987 44.501 6921858 1093.244963 +Somalia Africa 1992 39.658 6099799 926.9602964 +Somalia Africa 1997 43.795 6633514 930.5964284 +Somalia Africa 2002 45.936 7753310 882.0818218 +Somalia Africa 2007 48.159 9118773 926.1410683 +South Africa Africa 1952 45.009 14264935 4725.295531 +South Africa Africa 1957 47.985 16151549 5487.104219 +South Africa Africa 1962 49.951 18356657 5768.729717 +South Africa Africa 1967 51.927 20997321 7114.477971 +South Africa Africa 1972 53.696 23935810 7765.962636 +South Africa Africa 1977 55.527 27129932 8028.651439 +South Africa Africa 1982 58.161 31140029 8568.266228 +South Africa Africa 1987 60.834 35933379 7825.823398 +South Africa Africa 1992 61.888 39964159 7225.069258 +South Africa Africa 1997 60.236 42835005 7479.188244 +South Africa Africa 2002 53.365 44433622 7710.946444 +South Africa Africa 2007 49.339 43997828 9269.657808 +Spain Europe 1952 64.94 28549870 3834.034742 +Spain Europe 1957 66.66 29841614 4564.80241 +Spain Europe 1962 69.69 31158061 5693.843879 +Spain Europe 1967 71.44 32850275 7993.512294 +Spain Europe 1972 73.06 34513161 10638.75131 +Spain Europe 1977 74.39 36439000 13236.92117 +Spain Europe 1982 76.3 37983310 13926.16997 +Spain Europe 1987 76.9 38880702 15764.98313 +Spain Europe 1992 77.57 39549438 18603.06452 +Spain Europe 1997 78.77 39855442 20445.29896 +Spain Europe 2002 79.78 40152517 24835.47166 +Spain Europe 2007 80.941 40448191 28821.0637 +Sri Lanka Asia 1952 57.593 7982342 1083.53203 +Sri Lanka Asia 1957 61.456 9128546 1072.546602 +Sri Lanka Asia 1962 62.192 10421936 1074.47196 +Sri Lanka Asia 1967 64.266 11737396 1135.514326 +Sri Lanka Asia 1972 65.042 13016733 1213.39553 +Sri Lanka Asia 1977 65.949 14116836 1348.775651 +Sri Lanka Asia 1982 68.757 15410151 1648.079789 +Sri Lanka Asia 1987 69.011 16495304 1876.766827 +Sri Lanka Asia 1992 70.379 17587060 2153.739222 +Sri Lanka Asia 1997 70.457 18698655 2664.477257 +Sri Lanka Asia 2002 70.815 19576783 3015.378833 +Sri Lanka Asia 2007 72.396 20378239 3970.095407 +Sudan Africa 1952 38.635 8504667 1615.991129 +Sudan Africa 1957 39.624 9753392 1770.337074 +Sudan Africa 1962 40.87 11183227 1959.593767 +Sudan Africa 1967 42.858 12716129 1687.997641 +Sudan Africa 1972 45.083 14597019 1659.652775 +Sudan Africa 1977 47.8 17104986 2202.988423 +Sudan Africa 1982 50.338 20367053 1895.544073 +Sudan Africa 1987 51.744 24725960 1507.819159 +Sudan Africa 1992 53.556 28227588 1492.197043 +Sudan Africa 1997 55.373 32160729 1632.210764 +Sudan Africa 2002 56.369 37090298 1993.398314 +Sudan Africa 2007 58.556 42292929 2602.394995 +Swaziland Africa 1952 41.407 290243 1148.376626 +Swaziland Africa 1957 43.424 326741 1244.708364 +Swaziland Africa 1962 44.992 370006 1856.182125 +Swaziland Africa 1967 46.633 420690 2613.101665 +Swaziland Africa 1972 49.552 480105 3364.836625 +Swaziland Africa 1977 52.537 551425 3781.410618 +Swaziland Africa 1982 55.561 649901 3895.384018 +Swaziland Africa 1987 57.678 779348 3984.839812 +Swaziland Africa 1992 58.474 962344 3553.0224 +Swaziland Africa 1997 54.289 1054486 3876.76846 +Swaziland Africa 2002 43.869 1130269 4128.116943 +Swaziland Africa 2007 39.613 1133066 4513.480643 +Sweden Europe 1952 71.86 7124673 8527.844662 +Sweden Europe 1957 72.49 7363802 9911.878226 +Sweden Europe 1962 73.37 7561588 12329.44192 +Sweden Europe 1967 74.16 7867931 15258.29697 +Sweden Europe 1972 74.72 8122293 17832.02464 +Sweden Europe 1977 75.44 8251648 18855.72521 +Sweden Europe 1982 76.42 8325260 20667.38125 +Sweden Europe 1987 77.19 8421403 23586.92927 +Sweden Europe 1992 78.16 8718867 23880.01683 +Sweden Europe 1997 79.39 8897619 25266.59499 +Sweden Europe 2002 80.04 8954175 29341.63093 +Sweden Europe 2007 80.884 9031088 33859.74835 +Switzerland Europe 1952 69.62 4815000 14734.23275 +Switzerland Europe 1957 70.56 5126000 17909.48973 +Switzerland Europe 1962 71.32 5666000 20431.0927 +Switzerland Europe 1967 72.77 6063000 22966.14432 +Switzerland Europe 1972 73.78 6401400 27195.11304 +Switzerland Europe 1977 75.39 6316424 26982.29052 +Switzerland Europe 1982 76.21 6468126 28397.71512 +Switzerland Europe 1987 77.41 6649942 30281.70459 +Switzerland Europe 1992 78.03 6995447 31871.5303 +Switzerland Europe 1997 79.37 7193761 32135.32301 +Switzerland Europe 2002 80.62 7361757 34480.95771 +Switzerland Europe 2007 81.701 7554661 37506.41907 +Syria Asia 1952 45.883 3661549 1643.485354 +Syria Asia 1957 48.284 4149908 2117.234893 +Syria Asia 1962 50.305 4834621 2193.037133 +Syria Asia 1967 53.655 5680812 1881.923632 +Syria Asia 1972 57.296 6701172 2571.423014 +Syria Asia 1977 61.195 7932503 3195.484582 +Syria Asia 1982 64.59 9410494 3761.837715 +Syria Asia 1987 66.974 11242847 3116.774285 +Syria Asia 1992 69.249 13219062 3340.542768 +Syria Asia 1997 71.527 15081016 4014.238972 +Syria Asia 2002 73.053 17155814 4090.925331 +Syria Asia 2007 74.143 19314747 4184.548089 +Taiwan Asia 1952 58.5 8550362 1206.947913 +Taiwan Asia 1957 62.4 10164215 1507.86129 +Taiwan Asia 1962 65.2 11918938 1822.879028 +Taiwan Asia 1967 67.5 13648692 2643.858681 +Taiwan Asia 1972 69.39 15226039 4062.523897 +Taiwan Asia 1977 70.59 16785196 5596.519826 +Taiwan Asia 1982 72.16 18501390 7426.354774 +Taiwan Asia 1987 73.4 19757799 11054.56175 +Taiwan Asia 1992 74.26 20686918 15215.6579 +Taiwan Asia 1997 75.25 21628605 20206.82098 +Taiwan Asia 2002 76.99 22454239 23235.42329 +Taiwan Asia 2007 78.4 23174294 28718.27684 +Tanzania Africa 1952 41.215 8322925 716.6500721 +Tanzania Africa 1957 42.974 9452826 698.5356073 +Tanzania Africa 1962 44.246 10863958 722.0038073 +Tanzania Africa 1967 45.757 12607312 848.2186575 +Tanzania Africa 1972 47.62 14706593 915.9850592 +Tanzania Africa 1977 49.919 17129565 962.4922932 +Tanzania Africa 1982 50.608 19844382 874.2426069 +Tanzania Africa 1987 51.535 23040630 831.8220794 +Tanzania Africa 1992 50.44 26605473 825.682454 +Tanzania Africa 1997 48.466 30686889 789.1862231 +Tanzania Africa 2002 49.651 34593779 899.0742111 +Tanzania Africa 2007 52.517 38139640 1107.482182 +Thailand Asia 1952 50.848 21289402 757.7974177 +Thailand Asia 1957 53.63 25041917 793.5774148 +Thailand Asia 1962 56.061 29263397 1002.199172 +Thailand Asia 1967 58.285 34024249 1295.46066 +Thailand Asia 1972 60.405 39276153 1524.358936 +Thailand Asia 1977 62.494 44148285 1961.224635 +Thailand Asia 1982 64.597 48827160 2393.219781 +Thailand Asia 1987 66.084 52910342 2982.653773 +Thailand Asia 1992 67.298 56667095 4616.896545 +Thailand Asia 1997 67.521 60216677 5852.625497 +Thailand Asia 2002 68.564 62806748 5913.187529 +Thailand Asia 2007 70.616 65068149 7458.396327 +Togo Africa 1952 38.596 1219113 859.8086567 +Togo Africa 1957 41.208 1357445 925.9083202 +Togo Africa 1962 43.922 1528098 1067.53481 +Togo Africa 1967 46.769 1735550 1477.59676 +Togo Africa 1972 49.759 2056351 1649.660188 +Togo Africa 1977 52.887 2308582 1532.776998 +Togo Africa 1982 55.471 2644765 1344.577953 +Togo Africa 1987 56.941 3154264 1202.201361 +Togo Africa 1992 58.061 3747553 1034.298904 +Togo Africa 1997 58.39 4320890 982.2869243 +Togo Africa 2002 57.561 4977378 886.2205765 +Togo Africa 2007 58.42 5701579 882.9699438 +Trinidad and Tobago Americas 1952 59.1 662850 3023.271928 +Trinidad and Tobago Americas 1957 61.8 764900 4100.3934 +Trinidad and Tobago Americas 1962 64.9 887498 4997.523971 +Trinidad and Tobago Americas 1967 65.4 960155 5621.368472 +Trinidad and Tobago Americas 1972 65.9 975199 6619.551419 +Trinidad and Tobago Americas 1977 68.3 1039009 7899.554209 +Trinidad and Tobago Americas 1982 68.832 1116479 9119.528607 +Trinidad and Tobago Americas 1987 69.582 1191336 7388.597823 +Trinidad and Tobago Americas 1992 69.862 1183669 7370.990932 +Trinidad and Tobago Americas 1997 69.465 1138101 8792.573126 +Trinidad and Tobago Americas 2002 68.976 1101832 11460.60023 +Trinidad and Tobago Americas 2007 69.819 1056608 18008.50924 +Tunisia Africa 1952 44.6 3647735 1468.475631 +Tunisia Africa 1957 47.1 3950849 1395.232468 +Tunisia Africa 1962 49.579 4286552 1660.30321 +Tunisia Africa 1967 52.053 4786986 1932.360167 +Tunisia Africa 1972 55.602 5303507 2753.285994 +Tunisia Africa 1977 59.837 6005061 3120.876811 +Tunisia Africa 1982 64.048 6734098 3560.233174 +Tunisia Africa 1987 66.894 7724976 3810.419296 +Tunisia Africa 1992 70.001 8523077 4332.720164 +Tunisia Africa 1997 71.973 9231669 4876.798614 +Tunisia Africa 2002 73.042 9770575 5722.895655 +Tunisia Africa 2007 73.923 10276158 7092.923025 +Turkey Europe 1952 43.585 22235677 1969.10098 +Turkey Europe 1957 48.079 25670939 2218.754257 +Turkey Europe 1962 52.098 29788695 2322.869908 +Turkey Europe 1967 54.336 33411317 2826.356387 +Turkey Europe 1972 57.005 37492953 3450.69638 +Turkey Europe 1977 59.507 42404033 4269.122326 +Turkey Europe 1982 61.036 47328791 4241.356344 +Turkey Europe 1987 63.108 52881328 5089.043686 +Turkey Europe 1992 66.146 58179144 5678.348271 +Turkey Europe 1997 68.835 63047647 6601.429915 +Turkey Europe 2002 70.845 67308928 6508.085718 +Turkey Europe 2007 71.777 71158647 8458.276384 +Uganda Africa 1952 39.978 5824797 734.753484 +Uganda Africa 1957 42.571 6675501 774.3710692 +Uganda Africa 1962 45.344 7688797 767.2717398 +Uganda Africa 1967 48.051 8900294 908.9185217 +Uganda Africa 1972 51.016 10190285 950.735869 +Uganda Africa 1977 50.35 11457758 843.7331372 +Uganda Africa 1982 49.849 12939400 682.2662268 +Uganda Africa 1987 51.509 15283050 617.7244065 +Uganda Africa 1992 48.825 18252190 644.1707969 +Uganda Africa 1997 44.578 21210254 816.559081 +Uganda Africa 2002 47.813 24739869 927.7210018 +Uganda Africa 2007 51.542 29170398 1056.380121 +United Kingdom Europe 1952 69.18 50430000 9979.508487 +United Kingdom Europe 1957 70.42 51430000 11283.17795 +United Kingdom Europe 1962 70.76 53292000 12477.17707 +United Kingdom Europe 1967 71.36 54959000 14142.85089 +United Kingdom Europe 1972 72.01 56079000 15895.11641 +United Kingdom Europe 1977 72.76 56179000 17428.74846 +United Kingdom Europe 1982 74.04 56339704 18232.42452 +United Kingdom Europe 1987 75.007 56981620 21664.78767 +United Kingdom Europe 1992 76.42 57866349 22705.09254 +United Kingdom Europe 1997 77.218 58808266 26074.53136 +United Kingdom Europe 2002 78.471 59912431 29478.99919 +United Kingdom Europe 2007 79.425 60776238 33203.26128 +United States Americas 1952 68.44 157553000 13990.48208 +United States Americas 1957 69.49 171984000 14847.12712 +United States Americas 1962 70.21 186538000 16173.14586 +United States Americas 1967 70.76 198712000 19530.36557 +United States Americas 1972 71.34 209896000 21806.03594 +United States Americas 1977 73.38 220239000 24072.63213 +United States Americas 1982 74.65 232187835 25009.55914 +United States Americas 1987 75.02 242803533 29884.35041 +United States Americas 1992 76.09 256894189 32003.93224 +United States Americas 1997 76.81 272911760 35767.43303 +United States Americas 2002 77.31 287675526 39097.09955 +United States Americas 2007 78.242 301139947 42951.65309 +Uruguay Americas 1952 66.071 2252965 5716.766744 +Uruguay Americas 1957 67.044 2424959 6150.772969 +Uruguay Americas 1962 68.253 2598466 5603.357717 +Uruguay Americas 1967 68.468 2748579 5444.61962 +Uruguay Americas 1972 68.673 2829526 5703.408898 +Uruguay Americas 1977 69.481 2873520 6504.339663 +Uruguay Americas 1982 70.805 2953997 6920.223051 +Uruguay Americas 1987 71.918 3045153 7452.398969 +Uruguay Americas 1992 72.752 3149262 8137.004775 +Uruguay Americas 1997 74.223 3262838 9230.240708 +Uruguay Americas 2002 75.307 3363085 7727.002004 +Uruguay Americas 2007 76.384 3447496 10611.46299 +Venezuela Americas 1952 55.088 5439568 7689.799761 +Venezuela Americas 1957 57.907 6702668 9802.466526 +Venezuela Americas 1962 60.77 8143375 8422.974165 +Venezuela Americas 1967 63.479 9709552 9541.474188 +Venezuela Americas 1972 65.712 11515649 10505.25966 +Venezuela Americas 1977 67.456 13503563 13143.95095 +Venezuela Americas 1982 68.557 15620766 11152.41011 +Venezuela Americas 1987 70.19 17910182 9883.584648 +Venezuela Americas 1992 71.15 20265563 10733.92631 +Venezuela Americas 1997 72.146 22374398 10165.49518 +Venezuela Americas 2002 72.766 24287670 8605.047831 +Venezuela Americas 2007 73.747 26084662 11415.80569 +Vietnam Asia 1952 40.412 26246839 605.0664917 +Vietnam Asia 1957 42.887 28998543 676.2854478 +Vietnam Asia 1962 45.363 33796140 772.0491602 +Vietnam Asia 1967 47.838 39463910 637.1232887 +Vietnam Asia 1972 50.254 44655014 699.5016441 +Vietnam Asia 1977 55.764 50533506 713.5371196 +Vietnam Asia 1982 58.816 56142181 707.2357863 +Vietnam Asia 1987 62.82 62826491 820.7994449 +Vietnam Asia 1992 67.662 69940728 989.0231487 +Vietnam Asia 1997 70.672 76048996 1385.896769 +Vietnam Asia 2002 73.017 80908147 1764.456677 +Vietnam Asia 2007 74.249 85262356 2441.576404 +West Bank and Gaza Asia 1952 43.16 1030585 1515.592329 +West Bank and Gaza Asia 1957 45.671 1070439 1827.067742 +West Bank and Gaza Asia 1962 48.127 1133134 2198.956312 +West Bank and Gaza Asia 1967 51.631 1142636 2649.715007 +West Bank and Gaza Asia 1972 56.532 1089572 3133.409277 +West Bank and Gaza Asia 1977 60.765 1261091 3682.831494 +West Bank and Gaza Asia 1982 64.406 1425876 4336.032082 +West Bank and Gaza Asia 1987 67.046 1691210 5107.197384 +West Bank and Gaza Asia 1992 69.718 2104779 6017.654756 +West Bank and Gaza Asia 1997 71.096 2826046 7110.667619 +West Bank and Gaza Asia 2002 72.37 3389578 4515.487575 +West Bank and Gaza Asia 2007 73.422 4018332 3025.349798 +Yemen, Rep. Asia 1952 32.548 4963829 781.7175761 +Yemen, Rep. Asia 1957 33.97 5498090 804.8304547 +Yemen, Rep. Asia 1962 35.18 6120081 825.6232006 +Yemen, Rep. Asia 1967 36.984 6740785 862.4421463 +Yemen, Rep. Asia 1972 39.848 7407075 1265.047031 +Yemen, Rep. Asia 1977 44.175 8403990 1829.765177 +Yemen, Rep. Asia 1982 49.113 9657618 1977.55701 +Yemen, Rep. Asia 1987 52.922 11219340 1971.741538 +Yemen, Rep. Asia 1992 55.599 13367997 1879.496673 +Yemen, Rep. Asia 1997 58.02 15826497 2117.484526 +Yemen, Rep. Asia 2002 60.308 18701257 2234.820827 +Yemen, Rep. Asia 2007 62.698 22211743 2280.769906 +Zambia Africa 1952 42.038 2672000 1147.388831 +Zambia Africa 1957 44.077 3016000 1311.956766 +Zambia Africa 1962 46.023 3421000 1452.725766 +Zambia Africa 1967 47.768 3900000 1777.077318 +Zambia Africa 1972 50.107 4506497 1773.498265 +Zambia Africa 1977 51.386 5216550 1588.688299 +Zambia Africa 1982 51.821 6100407 1408.678565 +Zambia Africa 1987 50.821 7272406 1213.315116 +Zambia Africa 1992 46.1 8381163 1210.884633 +Zambia Africa 1997 40.238 9417789 1071.353818 +Zambia Africa 2002 39.193 10595811 1071.613938 +Zambia Africa 2007 42.384 11746035 1271.211593 +Zimbabwe Africa 1952 48.451 3080907 406.8841148 +Zimbabwe Africa 1957 50.469 3646340 518.7642681 +Zimbabwe Africa 1962 52.358 4277736 527.2721818 +Zimbabwe Africa 1967 53.995 4995432 569.7950712 +Zimbabwe Africa 1972 55.635 5861135 799.3621758 +Zimbabwe Africa 1977 57.674 6642107 685.5876821 +Zimbabwe Africa 1982 60.363 7636524 788.8550411 +Zimbabwe Africa 1987 62.351 9216418 706.1573059 +Zimbabwe Africa 1992 60.377 10704340 693.4207856 +Zimbabwe Africa 1997 46.809 11404948 792.4499603 +Zimbabwe Africa 2002 39.989 11926563 672.0386227 +Zimbabwe Africa 2007 43.487 12311143 469.7092981 diff --git a/tutorial/intro_plotly_helper.py b/tutorial/intro_plotly_helper.py new file mode 100644 index 00000000..414fc88e --- /dev/null +++ b/tutorial/intro_plotly_helper.py @@ -0,0 +1,470 @@ +import numpy as np +import pandas as pd +from bubbly.bubbly import bubbleplot + + +def get_happiness_data(): + # Load the dataset + happiness_df = pd.read_csv( + "data/plotly_intro/World-happiness-report-updated_2024.csv", + encoding="latin1", + usecols=[ + "Freedom to make life choices", + "Life Ladder", + "Country name", + "year", + "Log GDP per capita", + ], + ) + + return happiness_df + + +def get_clean_dataset(happiness_df: pd.DataFrame) -> pd.DataFrame: + # Define the range of possible years + min_year = happiness_df["year"].min() + max_year = happiness_df["year"].max() + possible_years = np.arange(min_year, max_year + 1) + + # Create entries for each country for every year + all_years_countries = pd.DataFrame( + [ + (country, year) + for country in happiness_df["Country name"].unique() + for year in possible_years + ], + columns=["Country name", "year"], + ) + # Extend the happiness_df to include all years for each country + + complete_happiness_df = all_years_countries.merge( + happiness_df, on=["Country name", "year"], how="left" + ) + + # Set initial values to 1: + year_2005 = complete_happiness_df["year"] == 2005 + complete_happiness_df.loc[year_2005] = complete_happiness_df.loc[year_2005].fillna( + 1 + ) + # Apply forward fill for any remaining NaNs (shouldn't be any after the previous step, but for robustness) + complete_happiness_df = complete_happiness_df.sort_values( + by=["Country name", "year"] + ).ffill() + + return complete_happiness_df + + +def get_clean_dataset_with_region(happiness_df: pd.DataFrame) -> pd.DataFrame: + # Define the range of possible years + complete_happiness_df = get_clean_dataset(happiness_df) + + # Load the region mapping + region_df = pd.read_csv( + "data/plotly_intro/country_region_mapping.csv", + encoding="latin1", + usecols=["Country name", "Regional indicator"], + ).drop_duplicates() + + # Merge region information into the main dataframe + merged_happiness_df = pd.merge( + complete_happiness_df, region_df, on="Country name", how="left" + ) + + # Fill any missing 'Regional indicator' values + merged_happiness_df["Regional indicator"] = merged_happiness_df[ + "Regional indicator" + ].fillna("Unknown") + + return merged_happiness_df + + +def full_clean_dataset(): + happiness_df = get_happiness_data() + + complete_happiness_df = get_clean_dataset_with_region(happiness_df) + + log_gdp_df = complete_happiness_df[["Country name", "year", "Log GDP per capita"]] + # get global min without 1 + log_gdp_df_without_1 = log_gdp_df[log_gdp_df["Log GDP per capita"] != 1] + global_min_log_gdp_per_country = log_gdp_df_without_1["Log GDP per capita"].min() + # replace 1 with global min + log_gdp_df.loc[log_gdp_df["Log GDP per capita"] == 1, "Log GDP per capita"] = ( + global_min_log_gdp_per_country + ) + # get global max + global_max_log_gdp_per_country = log_gdp_df["Log GDP per capita"].max() + + resized_log_gdp_df = log_gdp_df.copy() + # Scale exponentially between 1 and 500 + resized_log_gdp_df["Resized Log GDP per capita"] = ( + np.exp(log_gdp_df["Log GDP per capita"]) + * 500 + / ( + np.exp(global_max_log_gdp_per_country) + - np.exp(global_min_log_gdp_per_country) + ) + ) + + # append to final_happiness_df + final_happiness_df = pd.merge( + complete_happiness_df, + resized_log_gdp_df[["Country name", "year", "Resized Log GDP per capita"]], + on=["Country name", "year"], + how="left", + ) + + return final_happiness_df + + +def load_bubbleplot_full_happiness_figure(): + final_happiness_df = full_clean_dataset() + + # Load the dataset + figure = bubbleplot( + dataset=final_happiness_df, + x_column="Freedom to make life choices", + y_column="Life Ladder", + bubble_column="Country name", + time_column="year", + size_column="Resized Log GDP per capita", + color_column="Regional indicator", + x_title="Freedom to make life choices", + y_title="Happiness Score", + title="happyness Indicators", + x_logscale=False, + scale_bubble=0.2, + height=650, + ) + return figure + + +def load_full_happiness_figure(): + final_happiness_df = full_clean_dataset() + dataset = final_happiness_df + + x_column = "Freedom to make life choices" + y_column = "Life Ladder" + description_column = "Country name" + bubble_size_column = "Resized Log GDP per capita" + category_column = "Regional indicator" + years = dataset["year"].unique() + years.sort() + + def trace_by_category( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + category, + bubble_size_column, + ): + """Make a trace for a given year with bubble size""" + # Make a trace + trace = { + "x": list( + dataset.loc[ + (dataset["year"] == year) & (dataset[category_column] == category), + x_column, + ] + ), + "y": list( + dataset.loc[ + (dataset["year"] == year) & (dataset[category_column] == category), + y_column, + ] + ), + "mode": "markers", + "text": list(dataset.loc[dataset["year"] == year, description_column]), + "marker": { + "size": list( + dataset.loc[ + (dataset["year"] == year) + & (dataset[category_column] == category), + bubble_size_column, + ] + ), + "sizemode": "area", + "sizeref": 1, + }, + "type": "scatter", + "name": category, + } + return trace + + def frame_by_year_with_size_and_category( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + bubble_size_column, + ): + """Make a frame for a given year with bubble size""" + + frame = { + "data": [ + trace_by_category( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + category, + bubble_size_column, + ) + for category in dataset[category_column].unique() + ], + "name": str(year), + } + return frame + + figure = set_layout( + x_title=x_column, + y_title=y_column, + title="Happiness Indicators", + x_logscale=False, + y_logscale=False, + show_slider=True, + slider_scale=dataset["year"].unique(), + show_button=True, + show_legend=True, + ) + + figure["data"] = [ + trace_by_category( + dataset, + 2005, + x_column, + y_column, + description_column, + category_column, + category, + bubble_size_column, + ) + for category in dataset[category_column].unique() + ] + + figure["layout"]["xaxis"]["range"] = [0, 1.2] + figure["layout"]["yaxis"]["range"] = [0, 9] + figure["layout"]["showlegend"] = True + + # Add time frames + figure["frames"] = [ + frame_by_year_with_size_and_category( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + bubble_size_column, + ) + for year in years + ] + return figure + + +def slider_step(year): + """Creates a slider step.""" + + slider_step = { + "args": [ + [year], + { + "frame": {"duration": 300, "redraw": False}, + "mode": "immediate", + "transition": {"duration": 300}, + }, + ], + "label": str(year), + "method": "animate", + } + return slider_step + + +def create_slider(years): + """Creates a slider.""" + + sliders_dict = { + "active": 0, + "yanchor": "top", + "xanchor": "left", + "currentvalue": { + "font": {"size": 20}, + "prefix": "Year:", + "visible": True, + "xanchor": "right", + }, + "transition": {"duration": 300, "easing": "cubic-in-out"}, + "pad": {"b": 10, "t": 50}, + "len": 0.9, + "x": 0.1, + "y": 0, + "steps": [], + } + sliders_dict["steps"] = [slider_step(year) for year in years] + + return sliders_dict + + +def add_button(figure): + figure["layout"]["updatemenus"] = [ + { + "buttons": [ + { + "args": [ + None, + { + "frame": {"duration": 500, "redraw": False}, + "fromcurrent": True, + "transition": { + "duration": 300, + "easing": "quadratic-in-out", + }, + }, + ], + "label": "Play", + "method": "animate", + }, + { + "args": [ + [None], + { + "frame": {"duration": 0, "redraw": False}, + "mode": "immediate", + "transition": {"duration": 0}, + }, + ], + "label": "Pause", + "method": "animate", + }, + ], + "direction": "left", + "pad": {"r": 10, "t": 87}, + "showactive": False, + "type": "buttons", + "x": 0.1, + "xanchor": "right", + "y": 0, + "yanchor": "top", + } + ] + return figure + + +def set_layout( + x_title=None, + y_title=None, + title=None, + x_logscale=False, + y_logscale=False, + show_slider=True, + slider_scale=None, + show_button=True, + show_legend=False, + width=None, + height=None, +): + """Sets the layout for the figure.""" + + # Define the figure object as a dictionary + figure = {"data": [], "layout": {}, "frames": []} + + figure = set_2daxes(figure, x_title, y_title, x_logscale, y_logscale) + + figure["layout"]["title"] = title + figure["layout"]["hovermode"] = "closest" + figure["layout"]["showlegend"] = show_legend + figure["layout"]["margin"] = {"b": 50, "t": 50, "pad": 5} + + if width: + figure["layout"]["width"] = width + if height: + figure["layout"]["height"] = height + + # Add slider for the time scale + if show_slider: + sliders_dict = create_slider(slider_scale) + figure["layout"]["sliders"] = [sliders_dict] + else: + sliders_dict = {} + + # Add a pause-play button + if show_button: + add_button(figure) + + # Return the figure object + return figure + + +def set_2daxes(figure, x_title=None, y_title=None, x_logscale=False, y_logscale=False): + """Sets 2D axes""" + + figure["layout"]["xaxis"] = {"title": x_title, "autorange": False} + figure["layout"]["yaxis"] = {"title": y_title, "autorange": False} + + if x_logscale: + figure["layout"]["xaxis"]["type"] = "log" + if y_logscale: + figure["layout"]["yaxis"]["type"] = "log" + + return figure + + +def get_scatter_figure(dataset, x_column, y_column, description_column): + """Creates a scatter plot.""" + + # Define figure + figure = {"data": [], "layout": {}, "frames": []} + + # Get a random representative year + year = 2010 + + # Make the trace + trace = { + "x": list(dataset.loc[dataset["year"] == year, x_column]), + "y": list(dataset.loc[dataset["year"] == year, y_column]), + "mode": "markers", + "text": list(dataset.loc[dataset["year"] == year, description_column]), + } + + # Append the trace to the figure + figure["data"] = [trace] + return figure + + +def get_scatter_figure_with_years(dataset, x_column, y_column, description_column): + """Creates a scatter plot with years.""" + + x_column = "Freedom to make life choices" + y_column = "Life Ladder" + description_column = "Country name" + # time_column = 'year' + figure = get_scatter_figure(dataset, x_column, y_column, description_column) + + def frame_by_year(dataset, year, x_column, y_column, description_column): + """Make a trace for a given year""" + # Make a trace + trace = { + "x": list(dataset.loc[dataset["year"] == year, x_column]), + "y": list(dataset.loc[dataset["year"] == year, y_column]), + "mode": "markers", + "text": list(dataset.loc[dataset["year"] == year, description_column]), + "type": "scatter", + } + frame = {"data": [trace], "name": str(year)} + return frame + + # Get the years + years = dataset["year"].unique() + years.sort() + + # Set timestep + figure["frames"] = [ + frame_by_year(dataset, year, x_column, y_column, description_column) + for year in years + ] diff --git a/tutorial/my_bubbly.py b/tutorial/my_bubbly.py new file mode 100644 index 00000000..a3711d0e --- /dev/null +++ b/tutorial/my_bubbly.py @@ -0,0 +1,636 @@ +import numpy as np +import pandas as pd + + +def bubbleplot( + dataset, + x_column, + y_column, + bubble_column, + z_column=None, + time_column=None, + size_column=None, + color_column=None, + x_logscale=False, + y_logscale=False, + z_logscale=False, + x_range=None, + y_range=None, + z_range=None, + x_title=None, + y_title=None, + z_title=None, + title=None, + colorbar_title=None, + scale_bubble=1, + colorscale=None, + marker_opacity=None, + marker_border_width=None, + show_slider=True, + show_button=True, + show_colorbar=True, + show_legend=None, + width=None, + height=None, +): + """Makes the animated and interactive bubble charts from a given dataset.""" + + # Set category_column as None and update it as color_column only in case + # color_column is not None and categorical, in which case set color_column as None + category_column = None + if color_column: # Can be numerical or categorical + if dataset[color_column].dtype.name in ["category", "object", "bool"]: + category_column = color_column + color_column = None + + # Set the variables for making the grid + if time_column: + years = dataset[time_column].unique() + else: + years = None + show_slider = False + show_button = False + + column_names = [x_column, y_column] + + if z_column: + column_names.append(z_column) + axes3d = True + else: + axes3d = False + + column_names.append(bubble_column) + + if size_column: + column_names.append(size_column) + + if color_column: + column_names.append(color_column) + + # Make the grid + if category_column: + categories = dataset[category_column].unique() + col_name_template = "{}+{}+{}_grid" + grid = make_grid_with_categories( + dataset, column_names, time_column, category_column, years, categories + ) + if show_legend is None: + showlegend = True + else: + showlegend = show_legend + else: + col_name_template = "{}+{}_grid" + grid = make_grid(dataset, column_names, time_column, years) + if show_legend is None: + showlegend = False + else: + showlegend = show_legend + + # Set the layout + if show_slider: + slider_scale = years + else: + slider_scale = None + + figure, sliders_dict = set_layout( + x_title, + y_title, + z_title, + title, + x_logscale, + y_logscale, + z_logscale, + axes3d, + show_slider, + slider_scale, + show_button, + showlegend, + width, + height, + ) + + if size_column: + sizeref = ( + 2.0 * max(dataset[size_column]) / (scale_bubble * 80**2) + ) # Set the reference size for the bubbles + else: + sizeref = None + + # Add the frames + if category_column: + # Add the base frame + for category in categories: + if time_column: + year = min(years) # The earliest year for the base frame + col_name_template_year = col_name_template.format(year, {}, {}) + else: + col_name_template_year = "{}+{}_grid" + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + category=category, + ) + if z_column: + trace["type"] = "scatter3d" + figure["data"].append(trace) + + # Add time frames + if time_column: # Only if time_column is not None + for year in years: + frame = {"data": [], "name": str(year)} + for category in categories: + col_name_template_year = col_name_template.format(year, {}, {}) + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + category=category, + ) + if z_column: + trace["type"] = "scatter3d" + frame["data"].append(trace) + + figure["frames"].append(frame) + + if show_slider: + add_slider_steps(sliders_dict, year) + + else: + # Add the base frame + if time_column: + year = min(years) # The earliest year for the base frame + col_name_template_year = col_name_template.format(year, {}) + else: + col_name_template_year = "{}_grid" + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + color_column, + colorscale, + show_colorbar, + colorbar_title, + ) + if z_column: + trace["type"] = "scatter3d" + figure["data"].append(trace) + + # Add time frames + if time_column: # Only if time_column is not None + for year in years: + col_name_template_year = col_name_template.format(year, {}) + frame = {"data": [], "name": str(year)} + trace = get_trace( + grid, + col_name_template_year, + x_column, + y_column, + bubble_column, + z_column, + size_column, + sizeref, + scale_bubble, + marker_opacity, + marker_border_width, + color_column, + colorscale, + show_colorbar, + colorbar_title, + ) + if z_column: + trace["type"] = "scatter3d" + frame["data"].append(trace) + figure["frames"].append(frame) + if show_slider: + add_slider_steps(sliders_dict, year) + + # Set ranges for the axes + if x_range is None: + x_range = set_range(dataset[x_column], x_logscale) + + if y_range is None: + y_range = set_range(dataset[y_column], y_logscale) + + if axes3d: + if z_range is None: + z_range = set_range(dataset[z_column], z_logscale) + figure["layout"]["scene"]["xaxis"]["range"] = x_range + figure["layout"]["scene"]["yaxis"]["range"] = y_range + figure["layout"]["scene"]["zaxis"]["range"] = z_range + else: + figure["layout"]["xaxis"]["range"] = x_range + figure["layout"]["yaxis"]["range"] = y_range + + if show_slider: + figure["layout"]["sliders"] = [sliders_dict] + + return figure + + +def make_grid(dataset, column_names, time_column, years=None): + """Makes the grid for the plot as a pandas DataFrame by-passing the use of `plotly.grid_objs` + that is unavailable in the offline mode for `plotly`. The grids are designed using the `col_name_template` + from the `column_names` of the `dataset`.""" + + grid = pd.DataFrame() + if time_column: + col_name_template = "{}+{}_grid" + if years is None: + years = dataset[time_column].unique() + + for year in years: + dataset_by_year = dataset[(dataset[time_column] == int(year))] + for col_name in column_names: + # Each column name is unique + temp = col_name_template.format(year, col_name) + if dataset_by_year[col_name].size != 0: + grid = pd.concat( + [ + grid, + pd.DataFrame( + { + "value": [list(dataset_by_year[col_name])], + "key": [temp], + } + ), + ], + ignore_index=True, + ) + else: + # Check if this can be simplified + for col_name in column_names: + # Each column name is unique + grid = pd.concat( + [ + grid, + pd.DataFrame( + { + "value": [list(dataset[col_name])], + "key": [col_name + "_grid"], + } + ), + ], + ignore_index=True, + ) + + return grid + + +def make_grid_with_categories( + dataset, column_names, time_column, category_column, years=None, categories=None +): + """Makes the grid for the plot as a pandas DataFrame by-passing the use of plotly.grid_objs + that is unavailable in the offline mode for plotly. The grids are designed using the `col_name_template` + from the `column_names` of the `dataset` using the `category_column` for catergories.""" + + grid = pd.DataFrame() + if categories is None: + categories = dataset[category_column].unique() + if time_column: + col_name_template = "{}+{}+{}_grid" + if years is None: + years = dataset[time_column].unique() + + for year in years: + for category in categories: + dataset_by_year_and_cat = dataset[ + (dataset[time_column] == int(year)) + & (dataset[category_column] == category) + ] + for col_name in column_names: + # Each column name is unique + temp = col_name_template.format(year, col_name, category) + if dataset_by_year_and_cat[col_name].size != 0: + grid = pd.concat( + [ + grid, + pd.DataFrame( + { + "value": [ + list(dataset_by_year_and_cat[col_name]) + ], + "key": [temp], + } + ), + ], + ignore_index=True, + ) + else: + col_name_template = "{}+{}_grid" + for category in categories: + dataset_by_cat = dataset[(dataset[category_column] == category)] + for col_name in column_names: + # Each column name is unique + temp = col_name_template.format(col_name, category) + if dataset_by_cat[col_name].size != 0: + grid = pd.concat( + [ + grid, + pd.DataFrame( + { + "value": [list(dataset_by_cat[col_name])], + "key": [temp], + } + ), + ], + ignore_index=True, + ) + + return grid + + +def set_layout( + x_title=None, + y_title=None, + z_title=None, + title=None, + x_logscale=False, + y_logscale=False, + z_logscale=False, + axes3d=False, + show_slider=True, + slider_scale=None, + show_button=True, + show_legend=False, + width=None, + height=None, +): + """Sets the layout for the figure.""" + + # Define the figure object as a dictionary + figure = {"data": [], "layout": {}, "frames": []} + + # Start with filling the layout first + if axes3d: + figure = set_3daxes( + figure, x_title, y_title, z_title, x_logscale, y_logscale, z_logscale + ) + else: + figure = set_2daxes(figure, x_title, y_title, x_logscale, y_logscale) + + figure["layout"]["title"] = title + figure["layout"]["hovermode"] = "closest" + figure["layout"]["showlegend"] = show_legend + figure["layout"]["margin"] = {"b": 50, "t": 50, "pad": 5} + + if width: + figure["layout"]["width"] = width + if height: + figure["layout"]["height"] = height + + # Add slider for the time scale + if show_slider: + sliders_dict = add_slider(figure, slider_scale) + else: + sliders_dict = {} + + # Add a pause-play button + if show_button: + add_button(figure) + + # Return the figure object + return figure, sliders_dict + + +def set_2daxes(figure, x_title=None, y_title=None, x_logscale=False, y_logscale=False): + """Sets 2D axes""" + + figure["layout"]["xaxis"] = {"title": x_title, "autorange": False} + figure["layout"]["yaxis"] = {"title": y_title, "autorange": False} + + if x_logscale: + figure["layout"]["xaxis"]["type"] = "log" + if y_logscale: + figure["layout"]["yaxis"]["type"] = "log" + + return figure + + +def set_3daxes( + figure, + x_title=None, + y_title=None, + z_title=None, + x_logscale=False, + y_logscale=False, + z_logscale=False, +): + """Sets 3D axes""" + + figure["layout"]["scene"] = {} + figure["layout"]["scene"]["xaxis"] = {"title": x_title, "autorange": False} + figure["layout"]["scene"]["yaxis"] = {"title": y_title, "autorange": False} + figure["layout"]["scene"]["zaxis"] = {"title": z_title, "autorange": False} + + if x_logscale: + figure["layout"]["scene"]["xaxis"]["type"] = "log" + if y_logscale: + figure["layout"]["scene"]["yaxis"]["type"] = "log" + if z_logscale: + figure["layout"]["scene"]["zaxis"]["type"] = "log" + + return figure + + +def add_slider(figure, slider_scale): + """Adds slider for animation""" + + figure["layout"]["sliders"] = { + "args": ["slider.value", {"duration": 400, "ease": "cubic-in-out"}], + "initialValue": min(slider_scale), + "plotlycommand": "animate", + "values": slider_scale, + "visible": True, + } + + sliders_dict = { + "active": 0, + "yanchor": "top", + "xanchor": "left", + "currentvalue": { + "font": {"size": 20}, + "prefix": "Year:", + "visible": True, + "xanchor": "right", + }, + "transition": {"duration": 300, "easing": "cubic-in-out"}, + "pad": {"b": 10, "t": 50}, + "len": 0.9, + "x": 0.1, + "y": 0, + "steps": [], + } + + return sliders_dict + + +def add_slider_steps(sliders_dict, year): + """Adds the slider steps.""" + + slider_step = { + "args": [ + [year], + { + "frame": {"duration": 300, "redraw": False}, + "mode": "immediate", + "transition": {"duration": 300}, + }, + ], + "label": str(year), + "method": "animate", + } + sliders_dict["steps"].append(slider_step) + + +def add_button(figure): + """Adds the pause-play button for animation""" + + figure["layout"]["updatemenus"] = [ + { + "buttons": [ + { + "args": [ + None, + { + "frame": {"duration": 500, "redraw": False}, + "fromcurrent": True, + "transition": { + "duration": 300, + "easing": "quadratic-in-out", + }, + }, + ], + "label": "Play", + "method": "animate", + }, + { + "args": [ + [None], + { + "frame": {"duration": 0, "redraw": False}, + "mode": "immediate", + "transition": {"duration": 0}, + }, + ], + "label": "Pause", + "method": "animate", + }, + ], + "direction": "left", + "pad": {"r": 10, "t": 87}, + "showactive": False, + "type": "buttons", + "x": 0.1, + "xanchor": "right", + "y": 0, + "yanchor": "top", + } + ] + + +def set_range(values, logscale=False): + """Finds the axis range for the figure.""" + + if logscale: + rmin = min(np.log10(values)) * 0.97 + rmax = max(np.log10(values)) * 1.04 + else: + rmin = min(values) * 0.7 + rmax = max(values) * 1.4 + + return [rmin, rmax] + + +def get_trace( + grid, + col_name_template, + x_column, + y_column, + bubble_column, + z_column=None, + size_column=None, + sizeref=200000, + scale_bubble=1, + marker_opacity=None, + marker_border_width=None, + color_column=None, + colorscale=None, + show_colorbar=True, + colorbar_title=None, + category=None, +): + """Makes the trace for the data as a dictionary object that can be added to the figure or time frames.""" + + trace = { + "x": grid.loc[ + grid["key"] == col_name_template.format(x_column, category), "value" + ].values[0], + "y": grid.loc[ + grid["key"] == col_name_template.format(y_column, category), "value" + ].values[0], + "text": grid.loc[ + grid["key"] == col_name_template.format(bubble_column, category), "value" + ].values[0], + "mode": "markers", + } + + if z_column: + trace["z"] = grid.loc[ + grid["key"] == col_name_template.format(z_column, category), "value" + ].values[0] + + if size_column: + trace["marker"] = { + "sizemode": "area", + "sizeref": sizeref, + "size": grid.loc[ + grid["key"] == col_name_template.format(size_column, category), "value" + ].values[0], + } + else: + trace["marker"] = { + "size": 10 * scale_bubble, + } + + if marker_opacity: + trace["marker"]["opacity"] = marker_opacity + + if marker_border_width: + trace["marker"]["line"] = {"width": marker_border_width} + + if color_column: + trace["marker"]["color"] = grid.loc[ + grid["key"] == col_name_template.format(color_column), "value" + ].values[0] + trace["marker"]["colorbar"] = {"title": colorbar_title} + trace["marker"]["colorscale"] = colorscale + + if category: + trace["name"] = category + + return trace diff --git a/tutorial/tests/test_30_plotly_intro_to_libraries.py b/tutorial/tests/test_30_plotly_intro_to_libraries.py new file mode 100644 index 00000000..b610665b --- /dev/null +++ b/tutorial/tests/test_30_plotly_intro_to_libraries.py @@ -0,0 +1,240 @@ +import numpy as np +import pandas as pd + +import pytest +from tutorial.intro_plotly_helper import ( + full_clean_dataset, + get_clean_dataset, + get_happiness_data, + load_full_happiness_figure, +) + +input_args = [1] + + +def reference_read_in_dataframe(path_to_happiness: str) -> pd.DataFrame: + """Read in the data from the csv file""" + # Read in the data + happiness_df = pd.read_csv(path_to_happiness, encoding="latin1") + + return happiness_df + + +@pytest.mark.parametrize("input_arg", input_args) +def test_read_in_dataframe(input_arg, function_to_test): + """The test case(s)""" + # Get the path to the data + path_to_happiness = "data/plotly_intro/World-happiness-report-updated_2024.csv" + + # Read in the data + happiness_df = reference_read_in_dataframe(path_to_happiness) + + # Check if the two DataFrames are equal + assert happiness_df.equals(function_to_test(path_to_happiness)) + + +def reference_clean_dataset(happiness_df: pd.DataFrame) -> pd.DataFrame: + # Define the range of possible years + min_year = happiness_df["year"].min() + max_year = happiness_df["year"].max() + possible_years = np.arange(min_year, max_year + 1) + possible_countries = happiness_df["Country name"].unique() + + # Create entries for each country for every year + all_years_countries = pd.DataFrame( + [(country, year) for country in possible_countries for year in possible_years], + columns=["Country name", "year"], + ) + # Extend the happiness_df to include all years for each country + + complete_happiness_df = all_years_countries.merge( + happiness_df, on=["Country name", "year"], how="left" + ) + + # Set initial values to 1: + year_2005 = complete_happiness_df["year"] == 2005 + complete_happiness_df.loc[year_2005] = complete_happiness_df.loc[year_2005].fillna( + 1 + ) + # Apply forward fill for any remaining NaNs (make sure sorting is in the right order) + complete_happiness_df = complete_happiness_df.sort_values( + by=["Country name", "year"] + ).ffill() + + return complete_happiness_df + + +@pytest.mark.parametrize("input_arg", input_args) +def test_clean_dataset(input_arg, function_to_test): + # raise TypeError("get_happiness_data() should return a DataFrame") + hapiness_df = get_happiness_data() + + clean_ref = reference_clean_dataset(hapiness_df) + clean_sol = function_to_test(hapiness_df) + + # Check if the two DataFrames are equal + assert clean_ref.equals(clean_sol) + + import matplotlib.pyplot as plt + + # Plot the histogram of the years + plt.figure(figsize=(10, 6)) # Adjust figure size for better readability + plt.hist( + clean_ref["year"], bins=2023 - 2005 + 1, edgecolor="grey" + ) # Adjust bins as needed + plt.title("Histogram of Years") + plt.xlabel("Year") + plt.ylabel("Frequency") + plt.grid(True) + plt.show() + + +def reference_add_regional_indicator( + cleaned_happiness_df: pd.DataFrame, region_df: pd.DataFrame +) -> pd.DataFrame: + # Merge region information into the main dataframe + final_happiness_df = pd.merge( + cleaned_happiness_df, region_df, on="Country name", how="left" + ) + + # Fill any missing 'Regional indicator' values + final_happiness_df["Regional indicator"] = final_happiness_df[ + "Regional indicator" + ].fillna("Unknown") + + return final_happiness_df + + +@pytest.mark.parametrize("input_arg", input_args) +def test_add_regional_indicator(input_arg, function_to_test): + # Load the dataset + cleaned_happiness_df = get_clean_dataset(get_happiness_data()) + + # Load the region mapping + region_df = pd.read_csv( + "data/plotly_intro/country_region_mapping.csv", + encoding="latin1", + usecols=["Country name", "Regional indicator"], + ).drop_duplicates() + + clean_ref = reference_add_regional_indicator(cleaned_happiness_df, region_df) + clean_sol = function_to_test(cleaned_happiness_df, region_df) + + # Check if the two DataFrames are equal + assert clean_ref.equals(clean_sol) + + +# solution_frames_with_category + + +def reference_frames_with_category( + dataset: pd.DataFrame, + year: int, + x_column: str, + y_column: str, + description_column: str, + category_column: str, + bubble_size_column: str, +) -> dict: + """Make a frame for a given year with bubble size""" + + def trace_by_category( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + category, + bubble_size_column, + ): + """Make a trace for a given year with bubble size""" + # Make a trace + trace = { + "x": list( + dataset.loc[ + (dataset["year"] == year) & (dataset[category_column] == category), + x_column, + ] + ), + "y": list( + dataset.loc[ + (dataset["year"] == year) & (dataset[category_column] == category), + y_column, + ] + ), + "mode": "markers", + "text": list(dataset.loc[dataset["year"] == year, description_column]), + "marker": { + "size": list( + dataset.loc[ + (dataset["year"] == year) + & (dataset[category_column] == category), + bubble_size_column, + ] + ), + "sizemode": "area", + "sizeref": 1, + }, + "type": "scatter", + "name": category, + } + return trace + + frame = { + "data": [ + trace_by_category( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + category, + bubble_size_column, + ) + for category in dataset[category_column].unique() + ], + "name": str(year), + } + return frame + + +@pytest.mark.parametrize("input_arg", input_args) +def test_frames_with_category(input_arg, function_to_test): + # Load the dataset + dataset = full_clean_dataset() + + year = 2005 + x_column = "Freedom to make life choices" + y_column = "Life Ladder" + description_column = "Country name" + bubble_size_column = "Resized Log GDP per capita" + category_column = "Regional indicator" + + clean_ref = reference_frames_with_category( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + bubble_size_column, + ) + clean_sol = function_to_test( + dataset, + year, + x_column, + y_column, + description_column, + category_column, + bubble_size_column, + ) + + # Check if the two DataFrames are equal + assert clean_ref == clean_sol + + from plotly.offline import iplot + + figure = load_full_happiness_figure() + iplot(figure) From 2ce4ac60aa9822cfb6bd3262edcb146ab208f0e5 Mon Sep 17 00:00:00 2001 From: Snowwpanda Date: Mon, 12 May 2025 02:41:46 +0200 Subject: [PATCH 02/11] fixed import errors --- 30_plotly_intro_to_libraries.ipynb | 14 ++++++++------ tutorial/intro_plotly_helper.py | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/30_plotly_intro_to_libraries.ipynb b/30_plotly_intro_to_libraries.ipynb index ac1b6919..2a783e4e 100644 --- a/30_plotly_intro_to_libraries.ipynb +++ b/30_plotly_intro_to_libraries.ipynb @@ -268,6 +268,10 @@ " Returns:\n", " pd.DataFrame: A DataFrame containing the happiness data.\n", " \"\"\"\n", + " # Read in the data\n", + " happiness_df = pd.read_csv(path_to_happiness, encoding=\"latin1\")\n", + "\n", + " return happiness_df\n", " # Your code starts here\n", " return\n", " # Your code ends here" @@ -345,13 +349,10 @@ "metadata": {}, "outputs": [], "source": [ - "\n", + "import pandas as pd\n", "\n", "happyness = pd.read_csv('data/plotly_intro/World-happiness-report-updated_2024.csv', encoding='latin1')\n", "\n", - "\n", - "import pandas as pd\n", - "\n", "# Assuming your dataframe is loaded into 'df'\n", "df = happyness\n", "print(\"--- First few rows of the dataframe ---\")\n", @@ -459,7 +460,7 @@ "plt.xlabel('Year')\n", "plt.ylabel('Frequency')\n", "plt.grid(True)\n", - "plt.show()\n" + "plt.show()" ] }, { @@ -810,6 +811,7 @@ "outputs": [], "source": [ "from tutorial.intro_plotly_helper import full_clean_dataset, get_scatter_figure_with_years\n", + "from plotly.offline import iplot\n", "\n", "dataset = full_clean_dataset()\n", "x_column = 'Freedom to make life choices'\n", @@ -1201,7 +1203,7 @@ "Last but not least you can try to fix it yourself.\n", "\n", "So as an exercise we exported the bubbly library as a file bubbly.py into the folder data.plotly_intro. It is quite a short library so quite managable.\n", - "Try to figure out what the error is exactly and then fix the library locally until the same code below compiles.\n", + "Try to figure out what the error is exactly and then fix the library locally by modifying only the file `data/plotly_intro/bubbly.py` until the same code below compiles.\n", "\n", "(If you are interested in a solution, we have a fixed version under tutorial.my_bubbly.py, feel free to check the differences.)\n" ] diff --git a/tutorial/intro_plotly_helper.py b/tutorial/intro_plotly_helper.py index 414fc88e..6ce4d365 100644 --- a/tutorial/intro_plotly_helper.py +++ b/tutorial/intro_plotly_helper.py @@ -1,6 +1,7 @@ import numpy as np import pandas as pd -from bubbly.bubbly import bubbleplot + +from tutorial.my_bubbly import bubbleplot def get_happiness_data(): @@ -468,3 +469,4 @@ def frame_by_year(dataset, year, x_column, y_column, description_column): frame_by_year(dataset, year, x_column, y_column, description_column) for year in years ] + return figure From 5aec470dd8dd39294776d0a0aedbb7d7dec7032e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 06:37:48 +0000 Subject: [PATCH 03/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tutorial/tests/test_30_plotly_intro_to_libraries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/tests/test_30_plotly_intro_to_libraries.py b/tutorial/tests/test_30_plotly_intro_to_libraries.py index b610665b..0714fddf 100644 --- a/tutorial/tests/test_30_plotly_intro_to_libraries.py +++ b/tutorial/tests/test_30_plotly_intro_to_libraries.py @@ -1,7 +1,7 @@ import numpy as np import pandas as pd - import pytest + from tutorial.intro_plotly_helper import ( full_clean_dataset, get_clean_dataset, From e5181a838c69ed08229ff62b6cb2464f68c6d03c Mon Sep 17 00:00:00 2001 From: Snowwpanda Date: Mon, 12 May 2025 09:52:53 +0200 Subject: [PATCH 04/11] remove solution --- 30_plotly_intro_to_libraries.ipynb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/30_plotly_intro_to_libraries.ipynb b/30_plotly_intro_to_libraries.ipynb index 2a783e4e..3510259d 100644 --- a/30_plotly_intro_to_libraries.ipynb +++ b/30_plotly_intro_to_libraries.ipynb @@ -268,10 +268,6 @@ " Returns:\n", " pd.DataFrame: A DataFrame containing the happiness data.\n", " \"\"\"\n", - " # Read in the data\n", - " happiness_df = pd.read_csv(path_to_happiness, encoding=\"latin1\")\n", - "\n", - " return happiness_df\n", " # Your code starts here\n", " return\n", " # Your code ends here" From b79c3a5ebb6618379b004c9533089d318a57e2fa Mon Sep 17 00:00:00 2001 From: Edoardo Baldi Date: Mon, 12 May 2025 15:43:49 +0200 Subject: [PATCH 05/11] Update dependencies --- binder/environment.yml | 1 + docker/environment.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/binder/environment.yml b/binder/environment.yml index 27f7e989..0293e453 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -33,3 +33,4 @@ dependencies: - torchvision - albumentations - grad-cam + - plotly diff --git a/docker/environment.yml b/docker/environment.yml index c913a505..6fa594e4 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -28,3 +28,4 @@ dependencies: - opencv-python - albumentations - grad-cam + - plotly From 32f0bf0564d43fb0b990b5daa5bcaa92f1d27ded Mon Sep 17 00:00:00 2001 From: Edoardo Baldi Date: Mon, 12 May 2025 15:46:11 +0200 Subject: [PATCH 06/11] [skip ci] Rename notebooks; update index --- 00_index.ipynb | 10 +++++++++- ...ies.ipynb => 30_introduction_data_exploration.ipynb | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) rename 30_plotly_intro_to_libraries.ipynb => 30_introduction_data_exploration.ipynb (99%) diff --git a/00_index.ipynb b/00_index.ipynb index 1705e4ee..e1c8cdd1 100644 --- a/00_index.ipynb +++ b/00_index.ipynb @@ -34,12 +34,20 @@ "\n", "# Hands-On Projects\n", "\n", + "- [Introduction to data exploration](./30_introduction_data_exploration.ipynb)\n", "- [Image Classification](./31_image_classification.ipynb)\n", "\n", "# Additional Topics\n", "\n", "- [Parallelism and concurrency in Python](./14_threads.ipynb)\n" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -58,7 +66,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.10" + "version": "3.12.10" } }, "nbformat": 4, diff --git a/30_plotly_intro_to_libraries.ipynb b/30_introduction_data_exploration.ipynb similarity index 99% rename from 30_plotly_intro_to_libraries.ipynb rename to 30_introduction_data_exploration.ipynb index 3510259d..cd84936b 100644 --- a/30_plotly_intro_to_libraries.ipynb +++ b/30_introduction_data_exploration.ipynb @@ -1242,7 +1242,7 @@ ], "metadata": { "kernelspec": { - "display_name": "base", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1256,7 +1256,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.4" + "version": "3.12.10" } }, "nbformat": 4, From f38f7218ea89223df98d0ebc8757f5eea054d1d3 Mon Sep 17 00:00:00 2001 From: Snowwpanda Date: Mon, 12 May 2025 19:18:29 +0200 Subject: [PATCH 07/11] finished renaming and smaller fixes --- 30_introduction_data_exploration.ipynb | 36 ++++++++++--------- .../World-happiness-report-updated_2024.csv | 0 .../bubbly.py | 0 .../country_region_mapping.csv | 0 .../gapminder.tsv | 0 ...y_helper.py => data_exploration_helper.py} | 4 +-- ... test_30_introduction_data_exploration.py} | 18 ++++++---- 7 files changed, 33 insertions(+), 25 deletions(-) rename data/{plotly_intro => data_exploration}/World-happiness-report-updated_2024.csv (100%) rename data/{plotly_intro => data_exploration}/bubbly.py (100%) rename data/{plotly_intro => data_exploration}/country_region_mapping.csv (100%) rename data/{plotly_intro => data_exploration}/gapminder.tsv (100%) rename tutorial/{intro_plotly_helper.py => data_exploration_helper.py} (99%) rename tutorial/tests/{test_30_plotly_intro_to_libraries.py => test_30_introduction_data_exploration.py} (92%) diff --git a/30_introduction_data_exploration.ipynb b/30_introduction_data_exploration.ipynb index cd84936b..b856009f 100644 --- a/30_introduction_data_exploration.ipynb +++ b/30_introduction_data_exploration.ipynb @@ -54,7 +54,7 @@ "import pandas as pd\n", "from tutorial.my_bubbly import bubbleplot \n", "from plotly.offline import iplot\n", - "path = \"data/plotly_intro\"\n", + "path = \"data/data_exploration\"\n", "gapminder_indicators = pd.read_csv(path + '/gapminder.tsv', delimiter='\\t')\n", "\n", "figure = bubbleplot(dataset=gapminder_indicators, x_column='gdpPercap', y_column='lifeExp', \n", @@ -258,7 +258,7 @@ " Reads in a CSV file containing happiness data and returns it as a pandas DataFrame.\n", "\n", " Instructions:\n", - " - Use the `path_to_happiness` which will be `data/plotly_intro/World-happiness-report-updated_2024.csv`.\n", + " - Use the `path_to_happiness` which will be `data/data_exploration/World-happiness-report-updated_2024.csv`.\n", " - Read in the CSV into a DataFrame using `pd.read_csv`.\n", " - Ensure the encoding is set to 'latin1' as the file is formatted accordingly.\n", "\n", @@ -286,7 +286,7 @@ "metadata": {}, "outputs": [], "source": [ - "happyness = pd.read_csv('data/plotly_intro/World-happiness-report-updated_2024.csv', encoding='latin1')\n", + "happyness = pd.read_csv('data/data_exploration/World-happiness-report-updated_2024.csv', encoding='latin1')\n", "happyness.describe()\n" ] }, @@ -347,7 +347,7 @@ "source": [ "import pandas as pd\n", "\n", - "happyness = pd.read_csv('data/plotly_intro/World-happiness-report-updated_2024.csv', encoding='latin1')\n", + "happyness = pd.read_csv('data/data_exploration/World-happiness-report-updated_2024.csv', encoding='latin1')\n", "\n", "# Assuming your dataframe is loaded into 'df'\n", "df = happyness\n", @@ -437,7 +437,7 @@ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "\n", - "happiness = pd.read_csv('data/plotly_intro/World-happiness-report-updated_2024.csv', encoding='latin1')\n", + "happiness = pd.read_csv('data/data_exploration/World-happiness-report-updated_2024.csv', encoding='latin1')\n", "years = happiness['year'].unique()\n", "print(f\"Unique years in the dataset: {sorted(years)}\")\n", "\n", @@ -482,7 +482,7 @@ "\n", "In this exercise we want to complete the dataframe with missing values. Complete the function below to \n", "\n", - " 1) Fill in missing years for every country (so we have an entry for every year between 2005 and 2023 and every country). Do this by initializing a DataFrame with `pd.DataFrame()` with a list.\n", + " 1) Fill in missing years for every country (so we have an entry for every year between 2005 and 2023 and every country). Do this by initializing a DataFrame with `pd.DataFrame()` with a list. Then left merge the happiness dataframe to it with `pd.merge()`\n", " 2) Fill all missing values in the year 2005 with the value 1. Use the `.fillna()` function.\n", " 3) Forwardfill all the remaining years with the function `.ffill()`. (To forward fill the order of the dataframe is important! Make sure to sort first.)" ] @@ -681,7 +681,7 @@ "outputs": [], "source": [ "# Define the dataset and the columns\n", - "from tutorial.intro_plotly_helper import get_happiness_data, get_clean_dataset_with_region\n", + "from tutorial.data_exploration_helper import get_happiness_data, get_clean_dataset_with_region\n", "from plotly.offline import iplot\n", "dataset = get_clean_dataset_with_region(get_happiness_data())\n", "x_column = 'Freedom to make life choices'\n", @@ -698,7 +698,7 @@ " 'frames': []\n", "}\n", "\n", - "# Get a random representative year\n", + "# Take a random year present in the dataset\n", "year = 2010\n", "\n", "# Make the trace\n", @@ -743,7 +743,7 @@ }, "outputs": [], "source": [ - "from tutorial.intro_plotly_helper import get_happiness_data, get_clean_dataset_with_region, get_scatter_figure\n", + "from tutorial.data_exploration_helper import get_happiness_data, get_clean_dataset_with_region, get_scatter_figure\n", "from plotly.offline import iplot\n", "\n", "dataset = get_clean_dataset_with_region(get_happiness_data())\n", @@ -806,7 +806,7 @@ }, "outputs": [], "source": [ - "from tutorial.intro_plotly_helper import full_clean_dataset, get_scatter_figure_with_years\n", + "from tutorial.data_exploration_helper import full_clean_dataset, get_scatter_figure_with_years\n", "from plotly.offline import iplot\n", "\n", "dataset = full_clean_dataset()\n", @@ -955,7 +955,7 @@ "metadata": {}, "outputs": [], "source": [ - "from tutorial.intro_plotly_helper import get_happiness_data, get_clean_dataset_with_region\n", + "from tutorial.data_exploration_helper import get_happiness_data, get_clean_dataset_with_region\n", "import pandas as pd\n", "import numpy as np\n", "\n", @@ -993,7 +993,7 @@ }, "outputs": [], "source": [ - "from tutorial.intro_plotly_helper import set_layout, full_clean_dataset\n", + "from tutorial.data_exploration_helper import set_layout, full_clean_dataset\n", "from plotly.offline import iplot\n", "\n", "\n", @@ -1176,7 +1176,7 @@ "metadata": {}, "outputs": [], "source": [ - "from tutorial.intro_plotly_helper import load_full_happiness_figure\n", + "from tutorial.data_exploration_helper import load_full_happiness_figure\n", "from plotly.offline import iplot\n", "\n", "figure = load_full_happiness_figure()\n", @@ -1201,6 +1201,8 @@ "So as an exercise we exported the bubbly library as a file bubbly.py into the folder data.plotly_intro. It is quite a short library so quite managable.\n", "Try to figure out what the error is exactly and then fix the library locally by modifying only the file `data/plotly_intro/bubbly.py` until the same code below compiles.\n", "\n", + "Note: You will need to restart the kernel after changes to the packages.\n", + "\n", "(If you are interested in a solution, we have a fixed version under tutorial.my_bubbly.py, feel free to check the differences.)\n" ] }, @@ -1212,9 +1214,9 @@ "source": [ "import pandas as pd\n", "# from bubbly.bubbly import bubbleplot\n", - "from data.plotly_intro.bubbly import bubbleplot \n", + "from data.data_exploration.bubbly import bubbleplot \n", "from plotly.offline import iplot\n", - "path = \"data/plotly_intro\"\n", + "path = \"data/data_exploration\"\n", "gapminder_indicators = pd.read_csv(path + '/gapminder.tsv', delimiter='\\t')\n", "\n", "figure = bubbleplot(dataset=gapminder_indicators, x_column='gdpPercap', y_column='lifeExp', \n", @@ -1242,7 +1244,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "python-tutorial", "language": "python", "name": "python3" }, @@ -1256,7 +1258,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.10" + "version": "3.10.15" } }, "nbformat": 4, diff --git a/data/plotly_intro/World-happiness-report-updated_2024.csv b/data/data_exploration/World-happiness-report-updated_2024.csv similarity index 100% rename from data/plotly_intro/World-happiness-report-updated_2024.csv rename to data/data_exploration/World-happiness-report-updated_2024.csv diff --git a/data/plotly_intro/bubbly.py b/data/data_exploration/bubbly.py similarity index 100% rename from data/plotly_intro/bubbly.py rename to data/data_exploration/bubbly.py diff --git a/data/plotly_intro/country_region_mapping.csv b/data/data_exploration/country_region_mapping.csv similarity index 100% rename from data/plotly_intro/country_region_mapping.csv rename to data/data_exploration/country_region_mapping.csv diff --git a/data/plotly_intro/gapminder.tsv b/data/data_exploration/gapminder.tsv similarity index 100% rename from data/plotly_intro/gapminder.tsv rename to data/data_exploration/gapminder.tsv diff --git a/tutorial/intro_plotly_helper.py b/tutorial/data_exploration_helper.py similarity index 99% rename from tutorial/intro_plotly_helper.py rename to tutorial/data_exploration_helper.py index 6ce4d365..04080e68 100644 --- a/tutorial/intro_plotly_helper.py +++ b/tutorial/data_exploration_helper.py @@ -7,7 +7,7 @@ def get_happiness_data(): # Load the dataset happiness_df = pd.read_csv( - "data/plotly_intro/World-happiness-report-updated_2024.csv", + "data/data_exploration/World-happiness-report-updated_2024.csv", encoding="latin1", usecols=[ "Freedom to make life choices", @@ -61,7 +61,7 @@ def get_clean_dataset_with_region(happiness_df: pd.DataFrame) -> pd.DataFrame: # Load the region mapping region_df = pd.read_csv( - "data/plotly_intro/country_region_mapping.csv", + "data/data_exploration/country_region_mapping.csv", encoding="latin1", usecols=["Country name", "Regional indicator"], ).drop_duplicates() diff --git a/tutorial/tests/test_30_plotly_intro_to_libraries.py b/tutorial/tests/test_30_introduction_data_exploration.py similarity index 92% rename from tutorial/tests/test_30_plotly_intro_to_libraries.py rename to tutorial/tests/test_30_introduction_data_exploration.py index 0714fddf..07a6d00b 100644 --- a/tutorial/tests/test_30_plotly_intro_to_libraries.py +++ b/tutorial/tests/test_30_introduction_data_exploration.py @@ -1,8 +1,8 @@ import numpy as np import pandas as pd -import pytest -from tutorial.intro_plotly_helper import ( +import pytest +from tutorial.data_exploration_helper import ( full_clean_dataset, get_clean_dataset, get_happiness_data, @@ -24,7 +24,7 @@ def reference_read_in_dataframe(path_to_happiness: str) -> pd.DataFrame: def test_read_in_dataframe(input_arg, function_to_test): """The test case(s)""" # Get the path to the data - path_to_happiness = "data/plotly_intro/World-happiness-report-updated_2024.csv" + path_to_happiness = "data/data_exploration/World-happiness-report-updated_2024.csv" # Read in the data happiness_df = reference_read_in_dataframe(path_to_happiness) @@ -71,9 +71,15 @@ def test_clean_dataset(input_arg, function_to_test): clean_ref = reference_clean_dataset(hapiness_df) clean_sol = function_to_test(hapiness_df) + clean_ref_sorted = clean_ref.sort_values(by=["Country name", "year"]).reset_index( + drop=True + ) + clean_sol_sorted = clean_sol.sort_values(by=["Country name", "year"]).reset_index( + drop=True + ) - # Check if the two DataFrames are equal - assert clean_ref.equals(clean_sol) + # Check if the two DataFrames are equal, ignoring the index + assert clean_ref_sorted.equals(clean_sol_sorted) import matplotlib.pyplot as plt @@ -112,7 +118,7 @@ def test_add_regional_indicator(input_arg, function_to_test): # Load the region mapping region_df = pd.read_csv( - "data/plotly_intro/country_region_mapping.csv", + "data/data_exploration/country_region_mapping.csv", encoding="latin1", usecols=["Country name", "Regional indicator"], ).drop_duplicates() From 234548bc0eacffc97a6cebada7265c3a0e744390 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 17:18:46 +0000 Subject: [PATCH 08/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tutorial/tests/test_30_introduction_data_exploration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/tests/test_30_introduction_data_exploration.py b/tutorial/tests/test_30_introduction_data_exploration.py index 07a6d00b..b9a635cc 100644 --- a/tutorial/tests/test_30_introduction_data_exploration.py +++ b/tutorial/tests/test_30_introduction_data_exploration.py @@ -1,7 +1,7 @@ import numpy as np import pandas as pd - import pytest + from tutorial.data_exploration_helper import ( full_clean_dataset, get_clean_dataset, From 12a6be5c6526a8b3172fa33ef50505e67dd8e70a Mon Sep 17 00:00:00 2001 From: Snowwpanda Date: Tue, 13 May 2025 10:02:59 +0200 Subject: [PATCH 09/11] [skip ci] added toc --- 30_introduction_data_exploration.ipynb | 41 ++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/30_introduction_data_exploration.ipynb b/30_introduction_data_exploration.ipynb index b856009f..129c1beb 100644 --- a/30_introduction_data_exploration.ipynb +++ b/30_introduction_data_exploration.ipynb @@ -9,6 +9,43 @@ "# Introduction to Libraries" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Table of Contents\n", + " - [Introduction to Libraries](#Introduction-to-Libraries)\n", + " - [Why are libraries important?](#Why-are-libraries-important?)\n", + " - [Finding the right Library](#Finding-the-right-Library)\n", + " - [What is Pandas?](#What-is-Pandas?)\n", + " - [Why We Need Pandas with Python](#Why-We-Need-Pandas-with-Python)\n", + " - [How to use a library](#How-to-use-a-library)\n", + " - [Installing a library](#Installing-a-library)\n", + " - [Importing the library](#Importing-the-library)\n", + " - [Accessing its functions](#Accessing-its-functions)\n", + " - [Getting help and inspiration](#Getting-help-and-inspiration)\n", + " - [First step: Data import and exploration](#First-step:-Data-import-and-exploration)\n", + " - [Exercise reading in data](#Exercise-reading-in-data)\n", + " - [Playground](#Playground)\n", + " - [Data exploration](#Data-exploration)\n", + " - [Building the plot from the scratch](#Building-the-plot-from-the-scratch)\n", + " - [Steps:](#Steps:)\n", + " - [Finding the limits ](#Finding-the-limits-)\n", + " - [Cleaning missing values ](#Cleaning-missing-values-)\n", + " - [Exercise: Complete Happiness](#Exercise:-Complete-Happiness)\n", + " - [Adding regional indicator ](#Adding-regional-indicator-)\n", + " - [Exercise: Final Happiness](#Exercise:-Final-Happiness)\n", + " - [Plotting basic scatter plot ](#Plotting-basic-scatter-plot-)\n", + " - [Making frames per year ](#Making-frames-per-year-)\n", + " - [Adding slider bar for time scale ](#Adding-slider-bar-for-time-scale-)\n", + " - [Adding pause-play button ](#Adding-pause-play-button-)\n", + " - [Using bubble size as a variable ](#Using-bubble-size-as-a-variable-)\n", + " - [Classify into categories ](#Classify-into-categories-)\n", + " - [Exercise Frames with category](#Exercise-Frames-with-category)\n", + " - [Bonus Exercise Fixing a library](#Bonus-Exercise-Fixing-a-library)\n", + " - [References:](#References:)" + ] + }, { "cell_type": "markdown", "metadata": { @@ -402,7 +439,7 @@ "source": [ "Lets break down the steps we will go through during this notebook.\n", "\n", - "## Steps:\n", + "## Steps\n", "* [Finding the limits](#limits)\n", "* [Cleaning missing values](#clean)\n", "* [Adding regional indicator](#adding)\n", @@ -1258,7 +1295,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.15" + "version": "3.10.17" } }, "nbformat": 4, From 2bed9cb8e1294a248e826894fb31ff880a429b26 Mon Sep 17 00:00:00 2001 From: Edoardo Baldi Date: Tue, 13 May 2025 10:09:26 +0200 Subject: [PATCH 10/11] [skip ci] Update toc --- 30_introduction_data_exploration.ipynb | 65 +++++++++++++------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/30_introduction_data_exploration.ipynb b/30_introduction_data_exploration.ipynb index 129c1beb..2d4f440c 100644 --- a/30_introduction_data_exploration.ipynb +++ b/30_introduction_data_exploration.ipynb @@ -13,37 +13,36 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Table of Contents\n", - " - [Introduction to Libraries](#Introduction-to-Libraries)\n", - " - [Why are libraries important?](#Why-are-libraries-important?)\n", - " - [Finding the right Library](#Finding-the-right-Library)\n", - " - [What is Pandas?](#What-is-Pandas?)\n", - " - [Why We Need Pandas with Python](#Why-We-Need-Pandas-with-Python)\n", - " - [How to use a library](#How-to-use-a-library)\n", - " - [Installing a library](#Installing-a-library)\n", - " - [Importing the library](#Importing-the-library)\n", - " - [Accessing its functions](#Accessing-its-functions)\n", - " - [Getting help and inspiration](#Getting-help-and-inspiration)\n", - " - [First step: Data import and exploration](#First-step:-Data-import-and-exploration)\n", - " - [Exercise reading in data](#Exercise-reading-in-data)\n", - " - [Playground](#Playground)\n", - " - [Data exploration](#Data-exploration)\n", - " - [Building the plot from the scratch](#Building-the-plot-from-the-scratch)\n", - " - [Steps:](#Steps:)\n", - " - [Finding the limits ](#Finding-the-limits-)\n", - " - [Cleaning missing values ](#Cleaning-missing-values-)\n", - " - [Exercise: Complete Happiness](#Exercise:-Complete-Happiness)\n", - " - [Adding regional indicator ](#Adding-regional-indicator-)\n", - " - [Exercise: Final Happiness](#Exercise:-Final-Happiness)\n", - " - [Plotting basic scatter plot ](#Plotting-basic-scatter-plot-)\n", - " - [Making frames per year ](#Making-frames-per-year-)\n", - " - [Adding slider bar for time scale ](#Adding-slider-bar-for-time-scale-)\n", - " - [Adding pause-play button ](#Adding-pause-play-button-)\n", - " - [Using bubble size as a variable ](#Using-bubble-size-as-a-variable-)\n", - " - [Classify into categories ](#Classify-into-categories-)\n", - " - [Exercise Frames with category](#Exercise-Frames-with-category)\n", - " - [Bonus Exercise Fixing a library](#Bonus-Exercise-Fixing-a-library)\n", - " - [References:](#References:)" + "## Table of Contents\n", + "- [Why are libraries important?](#Why-are-libraries-important?)\n", + "- [Finding the right Library](#Finding-the-right-Library)\n", + " - [What is Pandas?](#What-is-Pandas?)\n", + " - [Why We Need Pandas with Python](#Why-We-Need-Pandas-with-Python)\n", + " - [How to use a library](#How-to-use-a-library)\n", + " - [Installing a library](#Installing-a-library)\n", + " - [Importing the library](#Importing-the-library)\n", + " - [Accessing its functions](#Accessing-its-functions)\n", + " - [Getting help and inspiration](#Getting-help-and-inspiration)\n", + "- [First step: Data import and exploration](#First-step:-Data-import-and-exploration)\n", + "- [Exercise reading in data](#Exercise-reading-in-data)\n", + "- [Playground](#Playground)\n", + " - [Data exploration](#Data-exploration)\n", + "- [Building the plot from the scratch](#Building-the-plot-from-the-scratch)\n", + "- [Steps:](#Steps:)\n", + "- [Finding the limits ](#Finding-the-limits-)\n", + "- [Cleaning missing values ](#Cleaning-missing-values-)\n", + " - [Exercise: Complete Happiness](#Exercise:-Complete-Happiness)\n", + "- [Adding regional indicator ](#Adding-regional-indicator-)\n", + " - [Exercise: Final Happiness](#Exercise:-Final-Happiness)\n", + "- [Plotting basic scatter plot ](#Plotting-basic-scatter-plot-)\n", + "- [Making frames per year ](#Making-frames-per-year-)\n", + " - [Adding slider bar for time scale ](#Adding-slider-bar-for-time-scale-)\n", + "- [Adding pause-play button ](#Adding-pause-play-button-)\n", + "- [Using bubble size as a variable ](#Using-bubble-size-as-a-variable-)\n", + "- [Classify into categories ](#Classify-into-categories-)\n", + " - [Exercise Frames with category](#Exercise-Frames-with-category)\n", + " - [Bonus Exercise Fixing a library](#Bonus-Exercise-Fixing-a-library)\n", + " - [References:](#References:)" ] }, { @@ -1281,7 +1280,7 @@ ], "metadata": { "kernelspec": { - "display_name": "python-tutorial", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1295,7 +1294,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.17" + "version": "3.12.10" } }, "nbformat": 4, From 19d8683b654ee557880103feb69a09dcf2d71cf8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Tue, 13 May 2025 11:25:02 +0200 Subject: [PATCH 11/11] Various little changes: - Add table of content. - Move references to the top. - Fix typos. - Little reformatting. --- 00_index.ipynb | 2 +- 30_introduction_data_exploration.ipynb | 522 ++++++++++++++----------- 2 files changed, 287 insertions(+), 237 deletions(-) diff --git a/00_index.ipynb b/00_index.ipynb index d2a52562..3ff34ba0 100644 --- a/00_index.ipynb +++ b/00_index.ipynb @@ -67,7 +67,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.10" + "version": "3.10.10" } }, "nbformat": 4, diff --git a/30_introduction_data_exploration.ipynb b/30_introduction_data_exploration.ipynb index b856009f..fbcaad47 100644 --- a/30_introduction_data_exploration.ipynb +++ b/30_introduction_data_exploration.ipynb @@ -2,44 +2,88 @@ "cells": [ { "cell_type": "markdown", - "metadata": { - "_uuid": "bf21b194b3a4210fcd20580080ad8ae584e3025a" - }, + "metadata": {}, "source": [ - "# Introduction to Libraries" + "# Table of Contents\n", + " - [References](#References)\n", + " - [Introduction to Libraries](#Introduction-to-Libraries)\n", + " - [Why are libraries important?](#Why-are-libraries-important?)\n", + " - [Finding the right Library](#Finding-the-right-Library)\n", + " - [What is Pandas?](#What-is-Pandas?)\n", + " - [Why We Need Pandas with Python](#Why-We-Need-Pandas-with-Python)\n", + " - [How to use a library](#How-to-use-a-library)\n", + " - [Installing a library](#Installing-a-library)\n", + " - [Importing the library](#Importing-the-library)\n", + " - [Accessing its functions](#Accessing-its-functions)\n", + " - [Getting help and inspiration](#Getting-help-and-inspiration)\n", + " - [First step: Data import and exploration](#First-step:-Data-import-and-exploration)\n", + " - [Exercise reading in data](#Exercise-reading-in-data)\n", + " - [Playground](#Playground)\n", + " - [Data exploration](#Data-exploration)\n", + " - [Building the plot from scratch](#Building-the-plot-from-scratch)\n", + " - [Finding the limits](#Finding-the-limits)\n", + " - [Cleaning missing values](#Cleaning-missing-values)\n", + " - [Exercise: Complete Happiness](#Exercise:-Complete-Happiness)\n", + " - [Adding regional indicator](#Adding-regional-indicator)\n", + " - [Exercise: Final Happiness](#Exercise:-Final-Happiness)\n", + " - [Plotting basic scatter plot](#Plotting-basic-scatter-plot)\n", + " - [Making frames per year](#Making-frames-per-year)\n", + " - [Adding slider bar for time scale](#Adding-slider-bar-for-time-scale)\n", + " - [Adding pause-play button](#Adding-pause-play-button)\n", + " - [Using bubble size as a variable](#Using-bubble-size-as-a-variable)\n", + " - [Classify into categories](#Classify-into-categories)\n", + " - [Exercise Frames with category](#Exercise-Frames-with-category)\n", + " - [Bonus Exercise Fixing a library](#Bonus-Exercise-Fixing-a-library)" ] }, { "cell_type": "markdown", - "metadata": { - "_uuid": "8dadc8c76dafcc26a6b4c4e0ddae581f2f64ccc3" - }, + "metadata": {}, "source": [ - "Welcome! This Jupyter Notebook is designed to introduce you to the power of Python libraries. Here in particular we will have a look at data analysis and visualization. We'll be focusing on two essential libraries:\n", - " - **Pandas**: A versatile library for data manipulation and analysis.\n", - " - **Plotly**: A powerful tool for creating interactive and visually appealing plots.\n", - "\n", - "Through practical examples, you'll learn how to:\n", - "Load and manipulate data using Pandas DataFrames.\n", - "Perform data analysis tasks such as filtering, grouping, and aggregation.\n", - "Create informative and interactive visualizations using Plotly." + "# References\n", + "\n", + "* [Guide to Animated Bubble Charts](https://www.kaggle.com/code/aashita/guide-to-animated-bubble-charts-using-plotly/notebook) using Plotly.\n", + "* World Happiness Report [dataset](https://www.kaggle.com/datasets/unsdsn/world-happiness).\n", + "* [Intro to Animations](https://plot.ly/python/animations/) in Plotly.\n", + "* Create animations online [Stack Overflow](https://stackoverflow.com/questions/45780920/plotly-icreate-animations-offline-on-jupyter-notebook).\n", + "* [Adding Sliders](https://plot.ly/python/gapminder-example/) to Animations in Plotly.\n", + "* [Bubbly package](https://github.com/AashitaK/bubbly) for plotting interactive and animated bubble charts using Plotly." ] }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "_uuid": "bf21b194b3a4210fcd20580080ad8ae584e3025a" + }, "source": [ - "## Why are libraries important?\n", + "# Introduction to Libraries\n", "\n", - "Python libraries are collections of pre-written code that provide reusable functions and tools for specific tasks. They significantly extend the capabilities of Python, allowing you to perform complex operations without writing everything from scratch. This saves time and effort, promotes code reusability, and helps you focus on the higher-level logic of your data analysis and visualization workflows.\n", - "Have a look at the following plot: imagine you'd have to code every detail from scratch! Instead we rely on the help of libraries to do most of the heavy lifting for us. However there is still quite a bit to do before we can reproduce exactly this. Lets have a look at the following plot generated with plotly." + "Welcome!\n", + "This Jupyter Notebook is designed to introduce you to the power of Python libraries.\n", + "Here in particular we will have a look at data analysis and visualization.\n", + "We'll be focusing on two essential libraries:\n", + "\n", + "- **Pandas**: A versatile library for data manipulation and analysis.\n", + "- **Plotly**: A powerful tool for creating interactive and visually appealing plots.\n", + "\n", + "Through practical examples, you'll learn how to:\n", + "- Load and manipulate data using Pandas DataFrames.\n", + "- Perform data analysis tasks such as filtering, grouping, and aggregation.\n", + "- Create informative and interactive visualizations using Plotly." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "```pip install plotly```" + "## Why are libraries important?\n", + "\n", + "Python libraries are collections of pre-written code that provide reusable functions and tools for specific tasks.\n", + "They significantly extend the capabilities of Python, allowing you to perform complex operations without writing everything from scratch.\n", + "This saves time and effort, promotes code reusability, and helps you focus on the higher-level logic of your data analysis and visualization workflows.\n", + "Have a look at the following plot: imagine you'd have to code every detail from scratch! Instead, we rely on the help of libraries to do most of the heavy lifting for us.\n", + "However, there is still quite a bit to do before we can reproduce exactly this.\n", + "Let's have a look at the following plot generated with Plotly." ] }, { @@ -61,7 +105,7 @@ " bubble_column='country', time_column='year', size_column='pop', color_column='continent', \n", " x_title=\"GDP per Capita\", y_title=\"Life Expectancy\", title='Gapminder Global Indicators',\n", " x_logscale=True, scale_bubble=3, height=650)\n", - "iplot(figure, config={'scrollZoom': True})\n" + "iplot(figure, config={'scrollZoom': True})" ] }, { @@ -69,37 +113,20 @@ "metadata": {}, "source": [ "In the graph above, the size corresponds to the population of each country and the values of GDP per capital and life expectency along with the name of the country can be seen by hovering over the cursor on the bubbles.\n", + "Imagine the work you'd have to put in to build this without any libraries.\n", "\n", - "Imagine the work you'd have to put in to build this without any libraries." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This animated bubble chart can convey a great deal of information since it can accomodate upto *six variables* in total, namely:\n", - "* X-axis (GDP per capita)\n", - "* Y-axis (Life Expectancy)\n", - "* Bubbles (Countries, can be seen by hovering the cursor over the dots)\n", - "* Time (in years)\n", - "* Size of bubbles (Population)\n", - "* Color of bubbles (Continents, variable can be categorical or numerical)" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "_uuid": "e64fd356fab6b760bc4294384aa969d4c2ac9e78" - }, - "source": [ - "Using the function `bubbleplot` from the module [`bubbly`(bubble charts with plotly)](https://github.com/AashitaK/bubbly): See references for all source material." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Our goal is to recreate this Visualization but with a different dataset. For this we have already preloaded a data file in the folder `data/introtolibraries/World-happiness-report-updated_2024.csv` which is an open data record which can be found on kaggle.com" + "This animated bubble chart can convey a great deal of information since it can accommodate up to *six variables* in total, namely:\n", + "- X-axis (GDP per capita)\n", + "- Y-axis (Life Expectancy)\n", + "- Bubbles (Countries, can be seen by hovering the cursor over the dots)\n", + "- Time (in years)\n", + "- Size of bubbles (Population)\n", + "- Color of bubbles (Continents, variable can be categorical or numerical)\n", + "\n", + "\n", + "Using the function `bubbleplot` from the module [`bubbly`(bubble charts with plotly)](https://github.com/AashitaK/bubbly): see references for all source material.\n", + "Our goal is to recreate this Visualization but with a different dataset.\n", + "For this, we have already preloaded a data file in the folder `data/introtolibraries/World-happiness-report-updated_2024.csv` which is an open data record which can be found on kaggle.com." ] }, { @@ -108,9 +135,9 @@ "source": [ "## Finding the right Library\n", "\n", - "Finding the right library to use is always tricky and depends on your project requirements, the time you have available and the knowledge you may already have with libraries you already know well. Spending a bit of time at the beginning of a project researching and exploring some options and asking a friend for advice may be time well invested.\n", - "\n", - "For importing and exploring a dataset the most well known python library is Pandas. " + "Finding the right library to use is always tricky and depends on your project requirements, the time you have available and the knowledge you may already have with libraries you already know well.\n", + "Spending a bit of time at the beginning of a project researching and exploring some options and asking a friend for advice may be time well invested.\n", + "For importing and exploring a dataset the most well-known Python library is Pandas." ] }, { @@ -120,10 +147,14 @@ "### What is Pandas?\n", "\n", "[Pandas](https://pandas.pydata.org/docs/index.html) is an open-source data manipulation and analysis library for Python.\n", - "It provides powerful data structures and functions designed to make working with structured data intuitive and efficient. At the heart of Pandas are two primary data structures:\n", + "It provides powerful data structures and functions designed to make working with structured data intuitive and efficient.\n", + "At the heart of Pandas are two primary data structures:\n", "\n", - "- **DataFrame**: A two-dimensional, size-mutable, and potentially heterogeneous tabular data structure with labeled axes (rows and columns). It's similar to a spreadsheet or SQL table and is generally the most commonly used Pandas object.\n", - "- **Series**: A one-dimensional labeled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.).\n", + "- **DataFrame**:\n", + " A two-dimensional, size-mutable, and potentially heterogeneous tabular data structure with labelled axes (rows and columns).\n", + " It's similar to a spreadsheet or SQL table and is generally the most commonly used Pandas object.\n", + "- **Series**:\n", + " A one-dimensional labelled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.).\n", "\n", "Pandas integrates well with various other Python libraries, such as Matplotlib for plotting and NumPy for numerical computations, making it a central library in the Python data science stack." ] @@ -138,22 +169,38 @@ "It lacks built-in, high-level data structures and tools that are intuitive and efficient for these tasks.\n", "Here's where Pandas comes in:\n", "\n", - "- **Data Cleaning and Preparation**: Data scientists spend a significant amount of time cleaning and preparing data. Pandas simplifies these tasks with built-in functions for filtering, selecting, and manipulating data.\n", - "- **Data Analysis**: With Pandas, analyzing and exploring data is more straightforward. It provides functions for aggregating, summarizing, and transforming data, making it easier to derive insights.\n", - "- **Data Visualization**: Though Pandas is not a data visualization library, it seamlessly interfaces with Matplotlib for plotting and visualizing data, allowing quick and informative visual analysis.\n", - "- **Handling Diverse Data Types**: Pandas efficiently handles a variety of data formats, including CSV, Excel files, SQL databases, and HDF5 format, making it a versatile tool for diverse data analysis needs." + "- **Data Cleaning and Preparation**:\n", + " Data scientists spend a significant amount of time cleaning and preparing data.\n", + " Pandas simplifies these tasks with built-in functions for filtering, selecting, and manipulating data.\n", + "- **Data Analysis**:\n", + " With Pandas, analyzing and exploring data is more straightforward.\n", + " It provides functions for aggregating, summarizing, and transforming data, making it easier to derive insights.\n", + "- **Data Visualization**:\n", + " Though Pandas is not a data visualization library, it seamlessly interfaces with Matplotlib for plotting and visualizing data, allowing quick and informative visual analysis.\n", + "- **Handling Diverse Data Types**:\n", + " Pandas efficiently handles a variety of data formats, including CSV, Excel files, SQL databases, and HDF5 format, making it a versatile tool for diverse data analysis needs." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### How to use a library" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### How to use a library\n", - "\n", "#### Installing a library\n", "\n", - "```pip install pandas```\n", - "\n", + "```pip install pandas```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "#### Importing the library\n", "\n", "Just like any code you had written yourself which is located in a different file the code for pandas needs to be imported with the statement\n", @@ -162,49 +209,68 @@ "import pandas as pd\n", "```\n", "\n", - "As a prerequirement you must have the python package pandas installed, e.g. with your favorite package installer like pip. That is for another tutorial, we have preinstalled all the necessary libraries you will need in this environment.\n", - "You will notice also with pandas we immediatly rename the library namespace to pd, which is common for well none libraries to make typing faster. We adopt this practice here so you have have seen it before and aren't confused when it appears again.\n", - "\n", + "As a pre-requirement, you must have the Python package pandas installed, e.g. with your favourite package installer like `pip`.\n", + "That is for another tutorial, we have preinstalled all the necessary libraries you will need in this environment.\n", + "You will notice also with pandas we immediately rename the library namespace to `pd`, which is common for well-known libraries to make typing faster.\n", + "We adopt this practice here so you have seen it before and aren't confused when it appears again." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "#### Accessing its functions\n", "\n", - "Like we said a library is just a collection of useful functions. Now that we have imported the library we can use all the objects within. \n", + "Like we said a library is just a collection of useful functions.\n", + "Now that we have imported the library we can use all the objects within. \n", "As an example some useful functions in Pandas are\n", "\n", "\n", "| Function | Description | Example |\n", "|:---------------------------------|:---------------------------------------------------------------------------------------|:---------------------------------------------------|\n", - "| pd.read_csv() | Reads data from a CSV file and creates a DataFrame. | pd.read_csv('data.csv') |\n", - "| pd.DataFrame() | Creates a DataFrame from various data structures (lists, dictionaries, etc.). | pd.DataFrame({'col1': [1, 2], 'col2': ['a', 'b']}) |\n", - "| pd.DataFrame.head() | Displays the first few rows of the DataFrame (default is 5). | df.head() |\n", - "| pd.DataFrame.tail() | Displays the last few rows of the DataFrame (default is 5). | df.tail(10) |\n", - "| pd.DataFrame.info() | Provides a concise summary of the DataFrame, including data types and non-null values. | df.info() |\n", - "| pd.DataFrame.describe() | Generates descriptive statistics of the numerical columns in the DataFrame. | df.describe() |\n", + "| pd.read_csv() | Reads data from a CSV file and creates a `DataFrame`. | pd.read_csv('data.csv') |\n", + "| pd.DataFrame() | Creates a `DataFrame` from various data structures (lists, dictionaries, etc.). | pd.DataFrame({'col1': [1, 2], 'col2': ['a', 'b']}) |\n", + "| pd.DataFrame.head() | Displays the first few rows of the `DataFrame` (default is 5). | df.head() |\n", + "| pd.DataFrame.tail() | Displays the last few rows of the `DataFrame` (default is 5). | df.tail(10) |\n", + "| pd.DataFrame.info() | Provides a concise summary of the `DataFrame`, including data types and non-null values. | df.info() |\n", + "| pd.DataFrame.describe() | Generates descriptive statistics of the numerical columns in the `DataFrame`. | df.describe() |\n", "| pd.DataFrame['column_name'] | Selects a specific column by its name. | df['Name'] |\n", "| pd.DataFrame.loc[row_label, col_label] | Accesses a group of rows and columns by label(s). | df.loc[0, 'Age'] |\n", "| pd.DataFrame.iloc[row_index, col_index] | Accesses a group of rows and columns by integer position(s). | df.iloc[2, 1] |\n", "| pd.DataFrame.groupby('column_name') | Groups rows based on the values in a specified column for aggregation. | df.groupby('Category')['Value'].mean() |\n", - "| pd.DataFrame.sort_values(by='column_name') | Sorts the DataFrame by the values in one or more columns. | df.sort_values(by='Date', ascending=False) |\n", - "| pd.DataFrame.dropna() | Removes rows with missing values (NaN). | df.dropna() |\n", - "| pd.DataFrame.ffill() | Fills missing values by propagating the last valid observation forward to the next valid observation. | df.ffill() |\n", - "\n", + "| pd.DataFrame.sort_values(by='column_name') | Sorts the `DataFrame` by the values in one or more columns. | df.sort_values(by='Date', ascending=False) |\n", + "| pd.DataFrame.dropna() | Removes rows with missing values (`NaN`). | df.dropna() |\n", + "| pd.DataFrame.ffill() | Fills missing values by propagating the last valid observation forward to the next valid observation. | df.ffill() |" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "#### Getting help and inspiration\n", "\n", - "Of course one of the most important parts is to be able to understand, look-up and get help on any function of a library. Usually we start off with some inspiration, as we gave above with the plot, there might be someone who posted something which you would like to reproduce but with a twist or you would like to change something. This is generally a good starting point. However afterwards you won't have the documentation of all the functions so you need to have the skill to find documentation and understand the requirements for function, sometimes you even need to know more about the inner workings of a functions implementations.\n", + "Of course one of the most important parts is to be able to understand, look up and get help on any function of a library.\n", + "Usually, we start with some inspiration, as we gave above with the plot, there might be someone who posted something which you would like to reproduce but with a twist or you would like to change something.\n", + "This is generally a good starting point.\n", + "However afterwards you won't have the documentation of all the functions so you need to have the skill to find documentation and understand the requirements for function, sometimes you even need to know more about the inner workings of a functions implementations.\n", "\n", - "There are several ways to access documentation. One way, assuming it is a well maintained package online, is to find the documentation website. For pandas this is a great place to find details on functions, changes that may have been made with different versions and exploring alternatives to a given function.\n", + "There are several ways to access documentation.\n", + "One way, assuming it is a well-maintained package online, is to find the documentation website.\n", + "For pandas, this is a great place to find details on functions, and changes that may have been made with different versions and explore alternatives to a given function.\n", "\n", "[Pandas Documentation](https://pandas.pydata.org/docs/index.html)\n", "\n", - "If it is a smaller library you can list all top level functions with `dir` as in \n", + "If it is a smaller library you can list all top-level functions with `dir` as in \n", "```python\n", "print(dir(pd))\n", "```\n", - "However this will only give you top level functions.\n", + "However, this will only give you top-level functions.\n", "\n", "Many environments will have code completion or you may have an AI copilot to find functions.\n", - "And if you are struggling with a specific function you can print out the signature and the docstring with `help(function)`or `function?`\n", + "And if you are struggling with a specific function you can print out the signature and the docstring with `help(function)` or `function?`.\n", "\n", - "When reading the documentation you might get overwhelmed. Keep a lookout for the function parameters, many of which may be optional, and good documentations tend to have an example to get a feel for the function.\n", + "When reading the documentation you might get overwhelmed.\n", + "Keep a lookout for the function parameters, many of which may be optional, and good documentations tend to have an example to get a feel for the function.\n", "\n", "For most of this tutorial we will give you the infos about a function that you need, however if you want to know more or need some extra information then use these tools to inform yourself." ] @@ -215,10 +281,10 @@ "source": [ "## First step: Data import and exploration\n", "\n", - "Already getting you data from a file to a variable you can work with can be a headache. How do I read the file, how do i choose delimiters and what encoding does the file have?\n", + "Already getting your data from a file to a variable you can work with can be a headache.\n", + "How do I read the file, how do I choose delimiters and what encoding does the file have?\n", "\n", - "We will use the pd.read_csv function from pandas to read in the Worlds happiness report which is a report study on how people rate their happiness in different countries.\n", - "\n" + "We will use the `pd.read_csv` function from pandas to read \"The World Happiness Report\" which is a report study on how people rate their happiness in different countries." ] }, { @@ -229,8 +295,8 @@ "\n", "In the cell below you should write the code that solves the first exercise:\n", "\n", - " - Use the `path_to_happiness` which will be `data/plotly_intro/World-happiness-report-updated_2024.csv` which leads to a csv file to read in\n", - " - Read in the csv into a dataframe and output it as `pd.DataFrame`\n", + " - Use the `path_to_happiness` which will be `data/plotly_intro/World-happiness-report-updated_2024.csv` which leads to a CSV file to read in\n", + " - Read in the CSV into a dataframe and output it as `pd.DataFrame`\n", " - Because of how the `.csv`file is formated you must ensure that the encoding is latin1 `encoding='latin1'`" ] }, @@ -287,7 +353,7 @@ "outputs": [], "source": [ "happyness = pd.read_csv('data/data_exploration/World-happiness-report-updated_2024.csv', encoding='latin1')\n", - "happyness.describe()\n" + "happyness.describe()" ] }, { @@ -336,7 +402,8 @@ "source": [ "### Data exploration\n", "\n", - "After playing around a bit with some functions, this is what an initial exploration of the data set could look like. Run the next cell." + "After playing around a bit with some functions, this is what an initial exploration of the data set could look like.\n", + "Run the next cell." ] }, { @@ -391,41 +458,39 @@ "_uuid": "67879155a77056411b701403cf464a2dd144eb7b" }, "source": [ - "# Building the plot from the scratch\n", - "\n", - "The plot you saw at the beginning was a plot that is part of the plotly tutorial. Many parts of this tutorial are heavily inspired by this [`kaggle project`](https://www.kaggle.com/code/aashita/guide-to-animated-bubble-charts-using-plotly). You can find many more on that website or online available in general. For reference see the end of the notebook.\n" + "# Building the plot from scratch\n", + "\n", + "The plot you saw at the beginning was a plot that is part of the Plotly tutorial.\n", + "Many parts of this tutorial are heavily inspired by this [`kaggle project`](https://www.kaggle.com/code/aashita/guide-to-animated-bubble-charts-using-plotly).\n", + "You can find many more on that website or online available in general.\n", + "For reference see the end of the notebook.\n", + "Let's break down the steps we will go through in this notebook:\n", + "\n", + "- [Finding the limits](#Finding-the-limits)\n", + "- [Cleaning missing values](#Cleaning-missing-values)\n", + "- [Adding regional indicator](#Adding-regional-indicator)\n", + "- [Plotting basic scatter plot](#Plotting-basic-scatter-plot)\n", + "- [Making frames per year](#Making-frames-per-year)\n", + "- [Adding pause-play button](#Adding-pause-play-button)\n", + "- [Using bubble size as a variable](#Using-bubble-size-as-a-variable)\n", + "- [Classify into categories](#Classify-into-categories)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Lets break down the steps we will go through during this notebook.\n", - "\n", - "## Steps:\n", - "* [Finding the limits](#limits)\n", - "* [Cleaning missing values](#clean)\n", - "* [Adding regional indicator](#adding)\n", - "* [Plotting basic scatter plot](#scatter)\n", - "* [Making frames per year](#frames)\n", - "* [Adding slider bar for time scale](#slider)\n", - "* [Adding pause-play button](#button)\n", - "* [Using bubble size as a variable](#size)\n", - "* [Classify into categories](#color)\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Finding the limits \n", + "## Finding the limits\n", "\n", - "If we are ploting a function, it is important to know the order of magnitude some of the data is in. In our case for example we want to have an animated plot over some years and it helps to know for which years we actually have data. In a dataframe we can e.g. use the .min() and .max() methods. Optionally, to understand the distribution or \"order of magnitude\" of your time values, you might want to plot out the years and check the rough distribution to identify any anomalies or gaps in the data. This can be done using a histogram or a line plot to visualize the frequency or trend of the time values over the range.\n", + "If we are plotting a function, it is important to know the order of magnitude of some of the data.\n", + "In our case for example we want to have an animated plot over some years and it helps to know for which years we actually have data.\n", + "In a dataframe we can e.g. use the `.min()` and `.max()` methods. \n", + "Optionally, to understand the distribution or \"order of magnitude\" of your time values, you might want to plot out the years and check the rough distribution to identify any anomalies or gaps in the data.\n", + "This can be done using a histogram or a line plot to visualize the frequency or trend of the time values over the range.\n", "\n", - "We want to use matplotlib.pyplot for displaying the histogram because it has a useful function hist which does exactly that. \n", + "We want to use `matplotlib.pyplot` for displaying the histogram because it has a useful function hist which does exactly that. \n", "\n", - "We us the `matplotlib.pyplot as plt` library and there there is `.hist` function which will produce a histogram." + "We use the `matplotlib.pyplot as plt` library and there there is `.hist` function which will produce a histogram." ] }, { @@ -463,15 +528,19 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Cleaning missing values \n", + "## Cleaning missing values\n", "\n", - "Pandas provides several flexible methods for handling missing data, represented as `NaN`. You can identify missing values using `.isna()` or `.isnull()`, and then choose a strategy: `.dropna()` removes rows or columns with missing values, while `.fillna()` replaces them. `.ffill` propagates the last valid observation forward to fill the missing values. For example, `df.ffill` will replace a NaN with the value from the previous row which had a non-`Nan`value. You can also fill with a specific value (like the mean, median, or a constant). For time series data, you might use interpolation with `.interpolate()` to fill gaps. The best approach depends on the nature of the data and the goal of your analysis.\n", + "Pandas provides several flexible methods for handling missing data, represented as `NaN`. \n", + "You can identify missing values using `.isna()` or `.isnull()`, and then choose a strategy: `.dropna()` removes rows or columns with missing values, while `.fillna()` replaces them. `.ffill` propagates the last valid observation forward to fill in the missing values.\n", + "For example, `df.ffill` will replace a `NaN` with the value from the previous row which had a non-`Nan`value.\n", + "You can also fill it with a specific value (like the mean, median, or constant).\n", + "For time series data, you might use interpolation with `.interpolate()` to fill gaps.\n", + "The best approach depends on the nature of the data and the goal of your analysis.\n", "\n", - "For this step we will try to forwardfill the dataframe.\n", + "For this step, we will try to forwardfill the dataframe:\n", "```python\n", " cleaned_happiness = cleaned_happiness.sort_values(by=['Country name', 'year']).ffill()\n", - "```\n", - "\n" + "```" ] }, { @@ -480,11 +549,16 @@ "source": [ "### Exercise: Complete Happiness\n", "\n", - "In this exercise we want to complete the dataframe with missing values. Complete the function below to \n", + "In this exercise, we want to complete the dataframe with missing values.\n", + "Complete the function below to \n", "\n", - " 1) Fill in missing years for every country (so we have an entry for every year between 2005 and 2023 and every country). Do this by initializing a DataFrame with `pd.DataFrame()` with a list. Then left merge the happiness dataframe to it with `pd.merge()`\n", - " 2) Fill all missing values in the year 2005 with the value 1. Use the `.fillna()` function.\n", - " 3) Forwardfill all the remaining years with the function `.ffill()`. (To forward fill the order of the dataframe is important! Make sure to sort first.)" + "1. Fill in missing years for every country (so we have an entry for every year between 2005 and 2023 and every country).\n", + " Do this by initializing a DataFrame with `pd.DataFrame()` with a list.\n", + " Then left-merge the happiness dataframe to it with `pd.merge()`.\n", + "2. Fill all missing values in the year 2005 with the value 1.\n", + " Use the `.fillna()` function.\n", + "3. Forwardfill all the remaining years with the function `.ffill()`.\n", + " (To forward fill the order of the dataframe is important! Make sure to sort first.)" ] }, { @@ -528,36 +602,44 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Data cleaning is crucial in data analysis, but several pitfalls exist. Here's a summary of common mistakes and how to avoid them:\n", - "\n", - "1. Incorrectly Handling Missing Values\n", - "Replacing NaN values with the mean can be misleading, especially with skewed data. Consider using the median or more advanced imputation techniques, and understand the reason for missingness. Pandas tools like fillna(), dropna(), and interpolate() are essential here.\n", - "\n", - "2. Removing Outliers Without Investigation\n", - "Avoid automatically deleting outliers. Visualize the data to determine if outliers are genuine extreme values or errors. If genuine, they may be important for analysis. Use boolean indexing with summary statistics to handle them in Pandas.\n", - "\n", - "3. Ignoring Data Types\n", - "Ensure columns have the correct data type. Use df.info() to check and convert columns with pd.to_numeric(), pd.to_datetime(), or astype().\n", - "\n", - "4. Not Handling Duplicates Carefully\n", - "Investigate the source of duplicate rows before removing them. They may indicate data entry errors or represent significant repeated measurements. Pandas provides duplicated() and drop_duplicates() for this purpose.\n", - "\n", - "5. Applying Transformations Incorrectly\n", - "Scaling data without considering outliers can lead to issues. If scaling is necessary, consider robust scalers (like RobustScaler from scikit-learn) that are less affected by outliers." + "Data cleaning is crucial in data analysis, but several pitfalls exist.\n", + "Here's a summary of common mistakes and how to avoid them:\n", + "\n", + "1. Incorrectly Handling Missing Values.\n", + " Replacing `NaN` values with the mean can be misleading, especially with skewed data.\n", + " Consider using the median or more advanced imputation techniques, and understand the reason for missingness.\n", + " Pandas tools like `fillna()`, `dropna()`, and `interpolate()` are essential here.\n", + "2. Removing Outliers Without Investigation.\n", + " Avoid automatically deleting outliers.\n", + " Visualize the data to determine if outliers are genuine extreme values or errors.\n", + " If genuine, they may be important for analysis. Use boolean indexing with summary statistics to handle them in Pandas.\n", + "3. Ignoring Data Types.\n", + " Ensure columns have the correct data type.\n", + " Use `df.info()` to check and convert columns with `pd.to_numeric()`, `pd.to_datetime()`, or `astype()`.\n", + "4. Not Handling Duplicates Carefully.\n", + " Investigate the source of duplicate rows before removing them.\n", + " They may indicate data entry errors or represent significant repeated measurements.\n", + " Pandas provides `duplicated()` and `drop_duplicates()` for this purpose.\n", + "5. Applying Transformations Incorrectly.\n", + " Scaling data without considering outliers can lead to issues.\n", + " If scaling is necessary, consider robust scalers (like `RobustScaler` from `scikit-learn`) that are less affected by outliers." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Adding regional indicator \n", + "## Adding regional indicator\n", "\n", - "We also want group the countries. \n", - "To add a regional indicator, we'll need another dataset that maps countries to their respective regions. We can then merge this data with our main happiness dataframe based on the 'Country name' column.\n", + "We also want to group the countries. \n", + "To add a regional indicator, we'll need another dataset that maps countries to their respective regions.\n", + "We can then merge this data with our main happiness dataframe based on the 'Country name' column.\n", "\n", - "Let's assume you have a CSV file named `country_region_mapping.csv` in your `data/plotly_intro/` directory with columns `'Country name'` and `'Region indicator'`. Then we could merge the dataframes on the country name and get a regional indicator for all the countries.\n", + "Let's assume you have a CSV file named `country_region_mapping.csv` in your `data/plotly_intro/` directory with columns `'Country name'` and `'Region indicator'`.\n", + "Then we could merge the dataframes on the country name and get a regional indicator for all the countries.\n", "\n", - "Let's explore the `pd.merge` function for that. The merging of tables comes from SQL Table merges and if you are not familiar to those, for now keep in mind we want to do a **left merge** with the happiness table being the left table and the region mapping the right table and we merge **on** a column which they have in common.\n", + "Let's explore the `pd.merge` function for that.\n", + "The merging of tables comes from SQL Table merges and if you are not familiar with those, for now, keep in mind we want to do a **left merge** with the happiness table being the left table and the region mapping the right table and we merge **on** a column which they have in common.\n", "\n", "```python\n", "pd.merge?\n", @@ -587,10 +669,10 @@ "source": [ "### Exercise: Final Happiness\n", "\n", - "In this exercise we want to add the regional indicators to the dataframe\n", + "In this exercise, we want to add the regional indicators to the dataframe\n", "\n", - " 1) Merge the region_df with complete_happiness_df.\n", - " 2) Fill missing falues with 'Unknown'." + " 1) Merge the `region_df` with `complete_happiness_df`.\n", + " 2) Fill in missing values with 'Unknown'." ] }, { @@ -639,11 +721,13 @@ } }, "source": [ - "## Plotting basic scatter plot \n", + "## Plotting basic scatter plot\n", "\n", - "Scatter plots from the plotly library are the most important thing we will be building up on. It magically transforms our data into a visual effect. For that we have to follow the exact rules of what the configuration parameters we need to follow.\n", + "Scatter plots from the Plotly library are the most important thing we will be building upon.\n", + "It magically transforms our data into a visual effect.\n", + "For that, we have to follow the exact rules of the configuration parameters we need to follow.\n", "\n", - "We work with the `iplot` function (interactive plot) from the plotly library, which takes a figure object, which is a dictionary containing the data, the layout and the frames. \n", + "We work with the `iplot` function (interactive plot) from the Plotly library, which takes a figure object, which is a dictionary containing the data, the layout and the frames. \n", "\n", "```python\n", "figure = {\n", @@ -659,7 +743,7 @@ "\n", "The data can be seen as the plot data initially, and the frames are then the animation steps.\n", "\n", - "Lets first try to create a simple scatter plot, for that we populate a figure dictionary data with a trace (dict) which contains an array of values for x, an array of values for y, a mode ('markers') and an array of strings for the text which ist what appears when hovered over.\n", + "Let's first try to create a simple scatter plot, for that we populate a figure dictionary data with a trace (`dict`) which contains an array of values for `x`, an array of values for `y`, a `mode` ('markers') and an array of strings for the text which is what appears when hovered over.\n", "\n", "```python\n", "trace = {\n", @@ -723,16 +807,11 @@ "_uuid": "810d72cd0c9581a9c89c28c14856c4db6887ef61" }, "source": [ - "## Making frames per year " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "_uuid": "12b6cf666ef1ebb3fb8619eff24ff7ae41799296" - }, - "source": [ - "Next we want to make the graph animated with a slider over the years. This is basically the same thing as making a scatter plot for every year and adding the slider. So it makes sense to functionalize the trace step we did before and then fill the frames with all of the traces." + "## Making frames per year\n", + "\n", + "Next, we want to make the graph animated with a slider over the years.\n", + "This is basically the same thing as making a scatter plot for every year and adding the slider.\n", + "So it makes sense to functionalize the trace step we did before and then fill the frames with all of the traces." ] }, { @@ -786,16 +865,11 @@ "_uuid": "cd91579051aec5293b189b8985e41aac1b472880" }, "source": [ - "### Adding slider bar for time scale " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "_uuid": "824af00e3b9905ad341a9050acdf5da4c3334b4a" - }, - "source": [ - "The slider needs configuring, this would require a bit of reading up what exactly you need or if you have an example you can make use of the existing functions. The following is heavily inspired by the module [`bubbly`](https://github.com/AashitaK/bubbly). This is simply a configuration and contains only the years data." + "### Adding slider bar for time scale\n", + "\n", + "The slider needs configuring, this would require a bit of reading up what exactly you need or if you have an example you can make use of the existing functions.\n", + "The following is heavily inspired by the module [`bubbly`](https://github.com/AashitaK/bubbly).\n", + "This is simply a configuration and contains only the years data." ] }, { @@ -873,7 +947,7 @@ "_uuid": "a50ba67250bd23781b19640487c8ec284fb399f4" }, "source": [ - "## Adding pause-play button \n", + "## Adding pause-play button\n", "\n", "Buttons we give for free! (Run the above first)" ] @@ -916,37 +990,30 @@ "iplot(figure)" ] }, - { - "cell_type": "markdown", - "metadata": { - "_uuid": "63258fcf5e60b88262f48c606236d26a45807a20" - }, - "source": [ - "## Using bubble size as a variable " - ] - }, { "cell_type": "markdown", "metadata": { "_uuid": "fa97a15f3242c002ca32e24938d536e1fef4afc4" }, "source": [ + "## Using bubble size as a variable\n", + "\n", "Now we build on the above interactive graph by setting the size of the bubble as another variable we take the `Log GDP per capita`. \n", - "The size of the bubble is controlled by the ```marker``` attribute of each trace. The marker should have the format\n", + "The size of the bubble is controlled by the ```marker``` attribute of each trace.\n", + "The marker should have the format:\n", + "\n", "```python\n", "trace['marker'] = {\n", " 'sizemode': 'area',\n", " 'sizeref': int,\n", " 'size': list[int]\n", "}\n", - "```" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "First we need to make sure that the bubble sizes don't blow up the plot but also that they aren't so tiny we cannot see them. So we probably want sizes from 1 to 500. So we take the `Log GDP per capita` and scale it to a range of 1 to 500. We also add in an exponential scale from numpy library." + "```\n", + "\n", + "First, we need to make sure that the bubble sizes don't blow up the plot but also that they aren't so tiny we cannot see them.\n", + "So we probably want sizes from 1 to 500.\n", + "So we take the `Log GDP per capita` and scale it to a range of 1 to 500.\n", + "We also add in an exponential scale from the numpy library." ] }, { @@ -1070,29 +1137,18 @@ "iplot(figure, config={'scrollZoom': True})" ] }, - { - "cell_type": "markdown", - "metadata": { - "_uuid": "2a3441093b8ce8f92ddeff0e7358411fc7fcb2a5" - }, - "source": [ - "## Classify into categories " - ] - }, { "cell_type": "markdown", "metadata": { "_uuid": "22d5e9e25c7cad813ce9e41cfcdc7960e887d615" }, "source": [ - "Now we add a category variable, namely region indicator in our case. By default if we split the traces into different categories they will all get different colors.\n", - "So the figure structure changes in that the data of a frame or a figure is now a list of traces instead of just one. So we split the data by year for every frame and then by categroy for every trace.\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "## Classify into categories\n", + "\n", + "Now we add a category variable, namely region indicator in our case.\n", + "By default, if we split the traces into different categories they will all get different colours.\n", + "So the figure structure changes in that the data of a frame or a figure is now a list of traces instead of just one.\n", + "So we split the data by year for every frame and then by category for every trace.\n", "\n", "\n", "```python\n", @@ -1117,8 +1173,9 @@ "\n", "In the below exercise, complete the function to output a frame with the above format, so that it is is a dictionary with `'data'` and `'name'` where the\n", "\n", - "1. `'data'` is a list of traces where every trace is the subset containing a specific category in `'Regional indicator'` of the DataFrame. Each trace should now also have the key `'name'` which is the category.\n", - "2. `'name'` is equal to the year as a string.\n", + "1. `'data'` is a list of traces where every trace is the subset containing a specific category in the `'Regional indicator'` of the DataFrame.\n", + " Each trace should now also have the key `'name'` which is the category.\n", + "3. `'name'` is equal to the year as a string.\n", "\n", "Take inspiration from above but now make the trace also a function dependent on the category." ] @@ -1167,7 +1224,8 @@ "_uuid": "00b65071453b5b16a3e67cc68ec6ab822ff331d4" }, "source": [ - "So, we have finally generated the same interactive graph with our own dataset. Below is the full figure again." + "So, we have finally generated the same interactive graph with our own dataset.\n", + "Below is the full figure again." ] }, { @@ -1190,20 +1248,27 @@ "### Bonus Exercise Fixing a library\n", "\n", "\n", - "With huge and well established libraries like pandas or numpy there are many contributers behind them and a lot of effort is spent to find any kind of bugs and mistakes. However if you are browsing through possible libraries to use you might also find less well maintained libraries, ones that may only have a single author and ones that haven't been touched in a while. \n", + "With huge and well-established libraries like pandas or numpy there are many contributers behind them and a lot of effort is spent to find any kind of bugs and mistakes.\n", + "However, if you are browsing through possible libraries to use you might also find less well-maintained libraries, ones that may only have a single author and ones that haven't been touched in a while. \n", "\n", - "Here we give you a direct example, this tutorial was inspired by the [bubbly](https://github.com/AashitaK/bubbly) package. However with an update from the pandas library it is no longer compatible with newer versions of pandas and will through an error (see codeblock below). \n", + "Here we give you a direct example, this tutorial was inspired by the [bubbly](https://github.com/AashitaK/bubbly) package.\n", + "However, with an update from the pandas library it is no longer compatible with newer versions of pandas and will through an error (see codeblock below). \n", "So what to do in that case?\n", "\n", - "There are many options, you can inform the author of this problem on github. Of course they may not have time to fix this. You can find a different library, however it might not be exactly the way you wanted it. You can downgrade your pandas library to be compatible, if you use pip show pandas you will see what version you have, it is possible to uninstall and reinstall a specific version. However this might not be feasable if you need it in other places and is generally not a pretty solution. \n", + "There are many options, you can inform the author of this problem on GitHub.\n", + "Of course, they may not have time to fix this.\n", + "You can find a different library, however, it might not be exactly the way you wanted it.\n", + "You can downgrade your pandas library to be compatible, if you use pip show pandas you will see what version you have, it is possible to uninstall and reinstall a specific version.\n", + "However, this might not be feasible if you need it in other places and is generally not a pretty solution. \n", "Last but not least you can try to fix it yourself.\n", "\n", - "So as an exercise we exported the bubbly library as a file bubbly.py into the folder data.plotly_intro. It is quite a short library so quite managable.\n", + "So as an exercise, we exported the bubbly library as a file `bubbly.py` into the folder `data.plotly_intro`.\n", + "It is quite a short library so quite managable.\n", "Try to figure out what the error is exactly and then fix the library locally by modifying only the file `data/plotly_intro/bubbly.py` until the same code below compiles.\n", "\n", "Note: You will need to restart the kernel after changes to the packages.\n", "\n", - "(If you are interested in a solution, we have a fixed version under tutorial.my_bubbly.py, feel free to check the differences.)\n" + "(If you are interested in a solution, we have a fixed version under tutorial.my_bubbly.py, feel free to check the differences.)" ] }, { @@ -1225,26 +1290,11 @@ " x_logscale=True, scale_bubble=3, height=650)\n", "iplot(figure, config={'scrollZoom': True})\n" ] - }, - { - "cell_type": "markdown", - "metadata": { - "_uuid": "15bcce0fdc611f7ce7d36fcf9bacf6eade5b3561" - }, - "source": [ - "### References:\n", - "* https://www.kaggle.com/code/aashita/guide-to-animated-bubble-charts-using-plotly/notebook\n", - "* https://www.kaggle.com/datasets/unsdsn/world-happiness\n", - "* https://plot.ly/python/animations/\n", - "* https://stackoverflow.com/questions/45780920/plotly-icreate-animations-offline-on-jupyter-notebook\n", - "* https://plot.ly/python/gapminder-example/\n", - "* https://github.com/AashitaK/bubbly\n" - ] } ], "metadata": { "kernelspec": { - "display_name": "python-tutorial", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1258,7 +1308,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.15" + "version": "3.10.10" } }, "nbformat": 4,