diff --git a/sum23/lecture_materials/07_Strings/Exam_1_review.ipynb b/sum23/lecture_materials/07_Strings/Exam_1_review.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..3f101d4030a41e02acc8f1f83430abcaa066acfb --- /dev/null +++ b/sum23/lecture_materials/07_Strings/Exam_1_review.ipynb @@ -0,0 +1,300 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "482016d5", + "metadata": {}, + "source": [ + "# Exam 1 review" + ] + }, + { + "cell_type": "markdown", + "id": "96330469", + "metadata": {}, + "source": [ + "## Arguments" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "138a92cc", + "metadata": {}, + "outputs": [], + "source": [ + "def person(name, age, color='blue', animal='cat'):\n", + " print(name, \" is \", age, \" years old \", end=\"\")\n", + " print(\"their favorite color is \",color, end=\"\")\n", + " print(\" and their favorite animal is \",animal)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a5f2edbc", + "metadata": {}, + "outputs": [], + "source": [ + "# TODO: what are all the ways we can (or cannot) call person()?" + ] + }, + { + "cell_type": "markdown", + "id": "6f623b4b", + "metadata": {}, + "source": [ + "## Function Scope" + ] + }, + { + "cell_type": "markdown", + "id": "e54320ef", + "metadata": {}, + "source": [ + "### Example 1 -- basic function scope" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7e4d570a", + "metadata": {}, + "outputs": [], + "source": [ + "pi = 3.14\n", + "alpha = 4\n", + "\n", + "def my_func(alpha, beta):\n", + " # TODO: what variables are accessible at line 5? what values do they have?\n", + " delta = alpha + beta\n", + " gamma = delta ** 2\n", + " \n", + " return gamma\n", + "\n", + "answer = my_func(alpha, pi)\n", + "\n", + "answer2 = my_func(answer, alpha)\n", + "\n", + "# TODO what variables are accessible here? What values do they have?" + ] + }, + { + "cell_type": "markdown", + "id": "33a302bf", + "metadata": {}, + "source": [ + "### Example 2 -- global vs. local" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7a5ed848", + "metadata": {}, + "outputs": [], + "source": [ + "two = 3.14\n", + "alpha = 4\n", + "\n", + "def my_func1(alpha, beta):\n", + " # TODO: what variables are accessible at line 5? what values do they have?\n", + " delta = alpha + beta\n", + " gamma = delta * two\n", + " \n", + " return gamma\n", + "\n", + "answer = my_func(alpha, two)\n", + "\n", + "# TODO what variables are accessible here? What values do they have?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "04428811", + "metadata": {}, + "outputs": [], + "source": [ + "two = 2\n", + "alpha = 14\n", + "\n", + "def my_func2(alpha, beta):\n", + " # TODO: what variables are accessible at line 5? what values do they have?\n", + " delta = alpha + beta\n", + " two = 7\n", + " gamma = delta * two\n", + " \n", + " return gamma\n", + "\n", + "answer = my_func(alpha, two)\n", + "\n", + "# TODO what variables are accessible here? What values do they have?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "51696c45", + "metadata": {}, + "outputs": [], + "source": [ + "two = 2\n", + "alpha = 14\n", + "\n", + "def my_func3(alpha, beta):\n", + " # TODO: what variables are accessible at line 5? what values do they have?\n", + " delta = alpha + beta\n", + " \n", + " gamma = delta * two\n", + " two = 7\n", + " return gamma\n", + "\n", + "answer = my_func(alpha, two)\n", + "\n", + "# TODO what variables are accessible here? What values do they have?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6cdb7a02", + "metadata": {}, + "outputs": [], + "source": [ + "two = 2\n", + "alpha = 14\n", + "\n", + "def my_func3(alpha, beta):\n", + " # TODO: what variables are accessible at line 5? what values do they have?\n", + " delta = alpha + beta\n", + " \n", + " global two\n", + " gamma = delta * two\n", + " two = 7\n", + " return gamma\n", + "\n", + "answer = my_func(alpha, two)\n", + "\n", + "# TODO what variables are accessible here? What values do they have?" + ] + }, + { + "cell_type": "markdown", + "id": "2ebbfa8b", + "metadata": {}, + "source": [ + "## Refactoring" + ] + }, + { + "cell_type": "markdown", + "id": "c61c0d46", + "metadata": {}, + "source": [ + "### Example 1" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "7e25ba85", + "metadata": {}, + "outputs": [], + "source": [ + "def some_func():\n", + " if some_cond1:\n", + " if some_cond2:\n", + " if some_cond3:\n", + " return True\n", + " return False" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d6dc250a", + "metadata": {}, + "outputs": [], + "source": [ + "# TODO how can we rewrite some_func() to only use 1 line of code? \n", + "def some_func_short():\n", + " pass" + ] + }, + { + "cell_type": "markdown", + "id": "b9da2d00", + "metadata": {}, + "source": [ + "### Example 2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "678f8ec2", + "metadata": {}, + "outputs": [], + "source": [ + "def some_func_1(x, y, z): \n", + " if x >= 7:\n", + " return True\n", + " if y < 18:\n", + " return True\n", + " if z == 32:\n", + " return True\n", + " else:\n", + " return False" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d1bf3938", + "metadata": {}, + "outputs": [], + "source": [ + "# TODO which of these refactoring options is correct?\n", + "def some_func_1a(x, y, z):\n", + " return x >= 7 or y < 18 or z == 32\n", + "\n", + "def some_func_1b(x, y, z):\n", + " return x >= 7 and y < 18 and z == 32" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "063829c0", + "metadata": {}, + "outputs": [], + "source": [ + "# TODO \n", + "# Discuss: given two possible versions of a function (where one is correct),\n", + "# what is the general strategy for figuring out which one is correct?" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.10.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/sum23/projects/p7/README.md b/sum23/projects/p7/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4390f9104a0de5df0c566a862526b7a94c971b70 --- /dev/null +++ b/sum23/projects/p7/README.md @@ -0,0 +1,38 @@ +# Project 7 (P7): Drinking Water Accessibility + + +## Corrections and clarifications: + +* None yet. + +**Find any issues?** Create a post on Piazza + +## Instructions: + +This project will focus on **utilizing lists** and **managing dictionaries**. To start, download [`p7.ipynb`](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/blob/main/sum23/projects/p7/p7.ipynb), [`p7_test.py`](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/blob/main/sum23/projects/p7/p7_test.py), and [`water_accessibility.csv`](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/blob/main/sum23/projects/p7/water_accessibility.csv). + + +**Note:** Please go through [Lab 7](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/labs/lab7) before you start the project. The lab contains some very important information that will be necessary for you to finish the project. + +You will work on `p7.ipynb` and hand it in. You should follow the provided directions for each question. Questions have **specific** directions on what **to do** and what **not to do**. + +After you've downloaded the file to your `p7` directory, open a terminal window and use `cd` to navigate to that directory. To make sure you're in the correct directory in the terminal, type `pwd`. To make sure you've downloaded the notebook file, type `ls` to ensure that `p7.ipynb`, `p7_test.py`, and `water_accessibility.csv` are listed. Then run the command `jupyter notebook` to start Jupyter, and get started on the project! + +**IMPORTANT**: You should **NOT** terminate/close the session where you run the above command. If you need to use any other Terminal/PowerShell commands, open a new window instead. Keep constantly saving your notebook file, by either clicking the "Save and Checkpoint" button (floppy disk) or using the appropriate keyboard shortcut. + +------------------------------ + +## IMPORTANT Submission instructions: +- Review the [Grading Rubric](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/blob/main/sum23/projects/p7/rubric.md), to ensure that you don't lose points during code review. +- You must **save your notebook file** before you run the cell containing **export**. +- Login to [Gradescope](https://www.gradescope.com/) and upload the zip file into the p7 assignment. +- If you completed the project with a **partner**, make sure to **add their name** by clicking "Add Group Member" +in Gradescope when uploading the P7 zip file. + + <img src="images/add_group_member.png" width="400"> + +- It is **your responsibility** to make sure that your project clears auto-grader tests on the Gradescope test system. Otter test results should be available in a few minutes after your submission. You should be able to see both PASS / FAIL results for the 20 test cases and your total score, which is accessible via Gradescope Dashboard (as in the image below): + + <img src="images/gradescope.png" width="400"> + +- If you feel you have been incorrectly graded on a particular question during manual review, then you can submit a regrade request. diff --git a/sum23/projects/p7/images/add_group_member.png b/sum23/projects/p7/images/add_group_member.png new file mode 100644 index 0000000000000000000000000000000000000000..402e5962e3e54ce8349f60ccfe4ce2b60840dd3b Binary files /dev/null and b/sum23/projects/p7/images/add_group_member.png differ diff --git a/sum23/projects/p7/images/autograder_success.png b/sum23/projects/p7/images/autograder_success.png new file mode 100644 index 0000000000000000000000000000000000000000..7fece5968bff83153462f4aa12302d1bab25702f Binary files /dev/null and b/sum23/projects/p7/images/autograder_success.png differ diff --git a/sum23/projects/p7/images/gradescope.png b/sum23/projects/p7/images/gradescope.png new file mode 100644 index 0000000000000000000000000000000000000000..a46c44d2a9b9b8d4b76a9721809d2e81754e946a Binary files /dev/null and b/sum23/projects/p7/images/gradescope.png differ diff --git a/sum23/projects/p7/p7.ipynb b/sum23/projects/p7/p7.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..51fae318e0f563d19735feb6fee6b9333dd6a5ea --- /dev/null +++ b/sum23/projects/p7/p7.ipynb @@ -0,0 +1,2531 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "aa4b9e67", + "metadata": { + "cell_type": "code", + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "# import and initialize otter\n", + "import otter\n", + "grader = otter.Notebook(\"p7.ipynb\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e68a05ee", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "import p7_test" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0bda81e5", + "metadata": {}, + "outputs": [], + "source": [ + "# PLEASE FILL IN THE DETAILS\n", + "# Enter none if you don't have a project partner\n", + "\n", + "# project: p7\n", + "# submitter: NETID1\n", + "# partner: NETID2" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "2bd52538", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "# Project 7: Drinking Water Accessibility" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "6de27486", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Learning Objectives:\n", + "\n", + "In this project you will demonstrate how to:\n", + "\n", + "- Write programs to interpret data present in csv files,\n", + "- Use lists and dictionaries effectively to manage data,\n", + "- **Develop good coding styling habits (points may be deducted for bad coding styles)**" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "1da5578b", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Testing your code:\n", + "\n", + "Along with this notebook, you must have downloaded the file `p7_test.py`. If you are curious about how we test your code, you can explore this file, and specifically the value of the variable `expected_json`, to understand the expected answers to the questions. You can have a look at [P2](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/projects/p2) if you have forgotten how to read the outputs of the `grader.check` function calls." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "07e92321", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Please go through [Lab 7](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/labs/lab7) before starting this project.** The lab introduces some useful techniques necessary for this project." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "f49d4b3d", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Reminder\n", + "\n", + "Under any circumstances, **no more than two students are allowed to work together on a project** as mentioned in the course policies. If your code is flagged by our code similarity detection tools, **both partners will be responsible** for sharing/copying the code, even if the code is shared/copied by one of the partners with/from other non-partner student(s). Note that each case of plagiarism will be reported to the Dean of Students with a zero grade on the project. **If you think that someone cannot be your project partner then don’t make that student your lab partner.**" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "d1d2a7eb", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Project Description:\n", + "\n", + "Universal access to safe drinking water is a fundamental need and human right. Securing access for all would go a long way in reducing illness and death, especially among children. \"Safely managed\" drinking water services represent an ambitious new rung on the ladder used to track progress on drinking water. Since 2000, 2 billion people have gained access to safely managed services (i.e., accessible on-premises, available when needed, and free from contamination). In 2020, 5.8 billion people used safely managed services and a further 2 billion people used basic services. However, 771 million people still lacked even a basic level of service, including 282 million who used a “limited” water service (source from which water collection time exceeds 30 minutes), 367 million who used unimproved sources and 122 million who still collected drinking water directly from rivers, lakes, and other surface water sources. The data reveal pronounced disparities, with the poorest and those living in rural areas least likely to use a basic service. In most countries, the burden of water collection continues to fall mainly to women and girls.\n", + "\n", + "[The Unicef website](https://data.unicef.org/) states that \"consistent, credible data about children’s situations are critical to the improvement of their lives – and indispensable to realizing the rights of every child.\" Data Scientists will play an important role in reaching this goal.\n", + "\n", + "For this project, you'll be analyzing data drawn from multiple sources. Our data is primarily drawn from the report titled [\"Progress on Household Drinking Water, Sanitation and Hygiene\"](https://washdata.org/sites/default/files/2021-07/jmp-2021-wash-households.pdf) data published by the Unicef/WHO Joint Monitoring Programme for Water Supply, Sanitation and Hygiene (2021). The original dataset can be found [here](https://data.unicef.org/topic/water-and-sanitation/drinking-water/) if you are interested in exploring the dataset yourself. Our dataset is further augmented by data from The World Bank on the [income levels of each country](https://datatopics.worldbank.org/world-development-indicators/the-world-by-income-and-region.html)." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "90f93012", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Dataset:\n", + "\n", + "The JMP report defines *people who have access to an [improved source of water](https://www.cdc.gov/healthywater/global/assessing.html#ImprovedDrinking) within 30 minutes round trip collection time* as having [at least basic access](https://www.cdc.gov/healthywater/global/assessing.html#DrinkingWaterSources) to water. For this project, we will focus on the **percentage of population** of each country who had **at least basic** water supply in the years **2015** and **2020**. Open `water_accessibility.csv` with Microsoft Excel or some other Spreadsheet viewer and look at the list of countries in the dataset. Data for each country appears twice, one row for the year *2015* and the other row for year *2020*. Countries which had incomplete data have been **omitted** from the dataset, and we will **ignore** those countries in this project. You do **not** have to deal with any **missing data** in the dataset.\n", + "\n", + "The data shows:\n", + "- `country_code` : the unique country code that consists of three alphabet letters\n", + "- `country_name` : the name of the country\n", + "- `region` : the geographical location of the country (does not equal to its corresponding continents, but follows the administrative groupings from [The World Bank](https://datahelpdesk.worldbank.org/knowledgebase/articles/906519-world-bank-country-and-lending-groups))\n", + "- `year` : the year in which it was subject to data collection\n", + "- `income_level` : the classification of income level based on GNI per capita in US dollars ([The World Bank Atlas Method](https://datahelpdesk.worldbank.org/knowledgebase/articles/378834-how-does-the-world-bank-classify-countries))\n", + "- `pop` : population of the country in a specific year (in thousands)\n", + "- `urban_percent` : the percentage of population in a given country that is urban\n", + "- `national_alb` : the percentage of a country's population that has access to at least basic water supply\n", + "- `urban_alb` : the percentage of a country's urban population that has access to at least basic water supply" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "afd5622a", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Project Requirements:\n", + "\n", + "You **may not** hardcode indices in your code, unless the question explicitly says so. If you open your `.csv` file with Excel, manually count through the rows and use this number to loop through the dataset, this is also considered as hardcoding. We'll **manually deduct** points from your autograder score on Gradescope during code review. You are **allowed** to assume that the dataset is ordered in such a way that the *even indices* (0, 2 .. etc;) corresponds to the rows with information for the year 2015, and the *odd indices* (1, 3 .. etc;) correspond to the rows with information for year 2020. Using this fact about the dataset will **not** be considered hardcoding.\n", + "\n", + "**Store** your final answer for each question in the **variable specified for each question**. This step is important because Otter grades your work by comparing the value of this variable against the correct answer.\n", + "\n", + "For some of the questions, we'll ask you to write (then use) a function to compute the answer. If you compute the answer **without** creating the function we ask you to write, we'll **manually deduct** points from your autograder score on Gradescope, even if the way you did it produced the correct answer. \n", + "\n", + "Required Functions:\n", + "- `cell`\n", + "- `get_col_dict`\n", + "\n", + "In this project, you will also be required to define certain **data structures**. If you do not create these data structures exactly as specified, we'll **manually deduct** points from your autograder score on Gradescope, even if the way you did it produced the correct answer.\n", + "\n", + "Required Data Structures:\n", + "- `dict_2015`\n", + "- `dict_2020`\n", + "- `rural_non_alb_bin_2015_dict`\n", + "- `rural_non_alb_bin_2020_dict`\n", + " \n", + "Students are only allowed to use Python commands and concepts that have been taught in the course prior to the release of p7. Therefore, **you should not use the pandas module**. We will **manually deduct** points from your autograder score on Gradescope otherwise.\n", + "\n", + "For more details on what will cause you to lose points during code review and specific requirements, please take a look at the [Grading rubric](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/blob/main/sum23/projects/p7/rubric.md)." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "91284e1c", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Incremental Coding and Testing:\n", + "\n", + "You should always strive to do incremental coding. **Incremental coding enables you to avoid challenging bugs.** Always write a few lines of code and then test those lines of code, before proceeding to write further code. You can call the `print` function to test intermediate step outputs.\n", + "\n", + "We also recommend you do incremental testing: make sure to run the local tests as soon as you are done with a question. This will ensure that you haven't made a big mistake that might potentially impact the rest of your project solution. Please refrain from making multiple submissions on Gradescope for testing individual questions' answers. Instead use the local tests, to test your solution on your laptop.\n", + "\n", + "That said, it is **important** that you check the Gradescope test results as soon as you submit your project on Gradescope. Test results on Gradescope are typically available somewhere between 2 to 10 minutes after the submission.\n", + "\n", + "Also, remember to check with the [P7 rubric](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/blob/main/sum23/projects/p7/rubric.md) to verify that you will not be losing any points during manual review." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "c13abf13", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Project Questions and Functions:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "38aa88e9", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# it is considered a good coding practice to place all import statements at the top of the notebook\n", + "# please place all your import statements in this cell if you need to import any more modules for this project\n" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "b40c6dce", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "First, read the data stored in `water_accessibility.csv`. You **must** read the csv file and then get the header and rows (and store them into `csv_header` and `csv_rows` variables). You will **lose points** if you use any other names to store these variables." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "316f9f5c", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# read the data stored in water_accessibility.csv\n", + "\n", + "# read the data in \"water_accessibility.csv\"\n", + "csv_data = ... \n", + "\n", + "# split the header and other rows into appropriate variables\n", + "csv_header = ...\n", + "csv_rows = ...\n", + "\n", + "print(csv_header)\n", + "print(csv_rows[0:2])" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "70c06cd9", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "### Function 1: `cell(row_idx, col_name)` \n", + "\n", + "This function must take in a row index, `row_idx` and a column name, `col_name` as its inputs, and return the value in `water_accessibility.csv` stored there. There is **no missing data** in this dataset.\n", + "\n", + "You **must** define the variables `csv_header` and `csv_rows` as in Lab-P7, and you **must** copy/paste your `cell` function from Lab-P7.\n", + "\n", + "**Important:** You **must** only use the `cell` function to extract data from the dataset. If you extract any data without explicitly using this function, you will **lose points** during manual review. Moreover, your `cell` function **must** handle typecasting all columns and multiplying the population (`pop`) by *1000*. You will **lose points** if you perform these steps outside the `cell` function." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca41db56", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# define the cell function here\n" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "1eb3deba", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "After you define the function `cell`, run the following two cells to test whether it works." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2d72e97b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "cell_test1 = cell(0, 'country_name')\n", + "cell_test2 = cell(1, 'year')\n", + "cell_test3 = cell(2, 'urban_percent')\n", + "cell_test4 = cell(3, 'urban_alb')\n", + "cell_test5 = cell(4, 'income_level')\n", + "cell_test6 = cell(5, 'pop')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb74a9e7", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"cell_test\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "f8d0b16f", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "You are all set! You are now ready to start solving the questions." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "9d0efb5b", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 1:** Which country had the highest population (`pop`) in *2020*?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "47987a22", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'highest_pop_country', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8552a500", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q1\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "dee1647d", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 2:** Which country had the highest population (`pop`) **increase** between *2015* and *2020*?\n", + "\n", + "There is a **unique** country in this dataset whose population increased the most. You **do not** have to worry about ties.\n", + "\n", + "**Hint:** Recall how to loop through the dataset and extract data from each year from [Lab 7](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/labs/lab7)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6cb9dd7a", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'highest_pop_inc_country', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9c1c6497", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q2\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "b50acbc5", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 3:** Which country had the highest **increase** in at least basic (`national_alb`) water supply between the years of *2015* and *2020*? \n", + "\n", + "There is a **unique** country in this dataset whose `national_alb` value increased the most. You **do not** have to worry about ties.\n", + "\n", + "**Hint:** Take a look at q7 in Lab-P7 to see how to compute the change in `national_alb` between *2015* and *2020* for each country." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7f2ef785", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'highest_nat_alb_inc_country', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e36ddb30", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q3\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "4bba9ee3", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 4:** What was the `income_level` in *2020* of the country with the highest increase in at least basic (`national_alb`) water supply between *2015* and *2020*?\n", + "\n", + "You **must** not repeat your computation here. Instead modify your code for q3 to extract the correct index, and use that to answer this question." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "abe5a4ed", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'highest_alb_inc_income_level', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2d6efed9", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q4\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "deca9ecc", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 5:** What is the **total** population (`pop`) of **all** the countries (in the dataset) in the `year` *2015*?\n", + "\n", + "The `pop` column stores the population in thousands. Your `cell` function already multiplies the value in this column by *1000*, so you can directly use the value returned by `cell` as the population of the country." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "38e85879", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'total_pop_2015', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b1e8600b", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q5\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "c496f364", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 6:** What was the global **percentage** of urban population (`urban_percent`) across **all** countries (in the dataset) in the `year` *2015*?\n", + "\n", + "You need to find the **total** urban population by *multiplying* the `pop` and `urban_percent` columns of each country and *adding* this up (the urban population). Then you need to *divide* by the **total** population to get the percentage of urban population across all the countries.\n", + "\n", + "Your output **must** be an **int**. You **must** use the `round` function to round your answer to the nearest integer." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1c6623f6", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'urban_pop_percent_2015', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "344323a3", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q6\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "72e81551", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 7:** What was the **total** population (`pop`) of countries that were in the *High income* group (`income_level`) in the `year` *2020*?\n", + "\n", + "Your output **must** be an **int**." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fd0a5d9d", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'high_income_pop', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dbe51f29", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q7\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "a5b16acd", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 8:** Which *income group* (`income_level`) had the **least** population (`pop`) in the `year` *2015*?\n", + "\n", + "You must find the **total** population (`pop`) for each `income_level`, and find the `income_level` which has the **least** total population.\n", + "\n", + "**Hint:** There are several ways to solve this problem efficiently (including using `dicts`). You can try to solve this problem using dicts if you want to. However, another approach that you might already be familiar with from p6 is to first create a *list* of all the **unique** income levels, and then loop through the entire dataset for **each** income level to find the total population of that income level, before comparing these numbers to find the income level with the least population." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "90350b24", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'least_pop_income_group', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bd8df15c", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q8\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "2374c56e", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 9:** Create a **list** of the names (`country_name`) of all countries in the *North America* `region` that **tied** for the **maximum** `national_alb` in *2015* (in *North America*).\n", + "\n", + "You need to first find the **maximum** value of `national_alb` among all countries in the `region` *North America*, and then make a `list` of **all** the countries in this region having this `national_alb` value. **Multiple** countries from *North America* have the same maximum `national_alb` value, so your output **must** be a `list` of **all** those countries." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "960caebf", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'na_max_alb_countries', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7348bbdc", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q9\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "0010cb5e", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "### Function 2: `get_col_dict(col_name, year)` \n", + "\n", + "This function should take in a column `col_name` and a `year` (*2015* or *2020*) as its inputs, and return a `dict` where each key is a `country_code` and the corresponding value is the value under the given `col_name` for the country with the said `country_code` in the given `year`.\n", + "\n", + "For example, the value returned by `get_col_dict('country_name', 2015)` should be something like the following:\n", + "```python\n", + "{'AFG': 'Afghanistan',\n", + " 'ALB': 'Albania',\n", + " 'DZA': 'Algeria',\n", + " 'AND': 'Andorra',\n", + " 'AGO': 'Angola',\n", + " 'ARM': 'Armenia',\n", + " 'AUS': 'Australia',\n", + " 'AUT': 'Austria',\n", + " 'AZE': 'Azerbaijan',\n", + " 'BGD': 'Bangladesh',\n", + " ...\n", + "}\n", + "```\n", + "\n", + "and the value returned by `get_col_dict('pop', 2020)` should be something like the following:\n", + "```python\n", + "{'AFG': 38928000,\n", + " 'ALB': 2878000,\n", + " 'DZA': 43851000,\n", + " 'AND': 77000,\n", + " 'AGO': 32866000,\n", + " 'ARM': 2963000,\n", + " 'AUS': 25500000,\n", + " 'AUT': 9006000,\n", + " 'AZE': 10139000,\n", + " 'BGD': 164689000,\n", + " ...\n", + "}\n", + "```\n", + "\n", + "Start with the following code snippet and complete the function." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b1d53dae", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# replace the ... with your code\n", + "\n", + "def get_col_dict(col_name, year):\n", + " col_dict = {}\n", + " if year == 2015:\n", + " for idx in range (0, len(csv_rows), 2):\n", + " col_dict[...] = ... \n", + " elif year == 2020:\n", + " for idx in range (1, len(csv_rows), 2):\n", + " col_dict[...] = ... \n", + " return col_dict" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "2e90ac41", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "After you define the function `get_col_dict`, run the following two cells to test whether it works." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b7ae6fb4", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "get_col_dict_test1 = get_col_dict('region', 2020)\n", + "get_col_dict_test2 = get_col_dict('national_alb', 2015)\n", + "get_col_dict_test3 = get_col_dict('pop', 2020)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "79dcec3e", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"get_col_dict\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "d171f93a", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "### Data Structures 1: `dict_2015`\n", + "\n", + "You must now create a data structure named `dict_2015`. This data structure must be a **dict**. Each key must be a `country_code`, and the corresponding value must be another **dict**. As for the inner dictionary, the keys must be the various column names, and the values must be the values under the column name for `country_code` in the `year` *2015*.\n", + "\n", + "The keys for each of the *inner* dictionary are the column names:\n", + "- `'country_name'`\n", + "- `'region'`\n", + "- `'income_level'`\n", + "- `'year'`\n", + "- `'pop'`\n", + "- `'urban_percent'`\n", + "- `'national_alb'`\n", + "- `'urban_alb'`\n", + "\n", + "You are **allowed** to *hardcode* the **names** of all these columns (i.e., the keys of the *inner* dictionaries).\n", + "\n", + "The data structure `dict_2015` should look something like this:\n", + "```python\n", + "{'AFG': {'country_name': 'Afghanistan',\n", + " 'region': 'South Asia',\n", + " 'income_level': 'Low income',\n", + " 'year': 2015,\n", + " 'pop': 34414000,\n", + " 'urban_percent': 25,\n", + " 'national_alb': 61,\n", + " 'urban_alb': 87},\n", + " 'ALB': {'country_name': 'Albania',\n", + " 'region': 'Europe & Central Asia',\n", + " 'income_level': 'Upper middle income',\n", + " 'year': 2015,\n", + " 'pop': 2891000,\n", + " 'urban_percent': 57,\n", + " 'national_alb': 93,\n", + " 'urban_alb': 95},\n", + " ...\n", + "}\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bed68d29", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# define the variable 'dict_2015' here as described above\n", + "# you may display the variable for testing purposes while you define it,\n", + "# BUT you MUST remove the line displaying 'dict_2015' before submission as the output will be too large to display\n", + "\n", + "# initialize as an empty dictionary\n", + "dict_2015 = ...\n", + "\n", + "country_dict = get_col_dict('country_name', 2015)\n", + "region_dict = get_col_dict(..., ...)\n", + "# call get_col_dict for other columns\n", + "...\n", + "\n", + "# add data from all these dicts to dict_2015" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "d3c2492b", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "After you define the data structure `dict_2015`, run the following cell to test whether you have defined it properly." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "58713866", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"dict_2015\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "07e3a798", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "### Data Structures 2: `dict_2020`\n", + "\n", + "You must now create a data structure named `dict_2020`. This data structure must be a **dict**. Each key must be a `country_code`, and the corresponding value must be another **dict**. As for the inner dictionary, the keys must be the various column names, and the values must be the values under the column name for `country_code` in the `year` *2020*.\n", + "\n", + "The keys for each of the *inner* dictionary are the column names:\n", + "- `'country_name'`\n", + "- `'region'`\n", + "- `'income_level'`\n", + "- `'year'`\n", + "- `'pop'`\n", + "- `'urban_percent'`\n", + "- `'national_alb'`\n", + "- `'urban_alb'`\n", + "\n", + "You are **allowed** to *hardcode* the **names** of all these columns (i.e., the keys of the *inner* dictionaries)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7ca9c02f", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# define the variable 'dict_2020' here as described above\n", + "# you may display the variable for testing purposes while you define it,\n", + "# BUT you MUST remove the line displaying 'dict_2020' before submission as the output will be too large to display\n" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "60a3c5d3", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "After you define the data structure `dict_2020`, run the following cell to test whether you have defined it properly." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1e68e7dd", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"dict_2020\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "422e0f61", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "#### From this point onwards, you are only allowed to access data from `water_accessibility.csv` by querying from the **dicts** `dict_2015` and `dict_2020`. You will **lose points** during manual review if you access the data through any other means (inlcuding calling the `cell` function)." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "b666a840", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 10:** Output the data from *China* (`country_code`: *CHN*) for the `year` *2020*.\n", + "\n", + "Your output **must** be a **dict** mapping each column name to the value for the country *CHN* in the year *2020*. You **must** answer this by querying data from `dict_2020`.\n", + "\n", + "The expected output is:\n", + "```python\n", + "{'country_name': 'China',\n", + " 'region': 'East Asia & Pacific',\n", + " 'income_level': 'Upper middle income',\n", + " 'year': 2020,\n", + " 'pop': 1463141000,\n", + " 'urban_percent': 62,\n", + " 'national_alb': 94,\n", + " 'urban_alb': 97}\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4f9095c3", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'chn_2020_dict', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e9c1feb6", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q10\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "7912771d", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 11:** What is the national at least basic (`national_alb`) water supply for *Nepal* (`country_code`: *NPL*) in the `year` *2015*?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "01badb20", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'npl_national_alb_2015', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a8b8b903", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q11\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "ef819bad", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 12:** How much did the population (`pop`) of *Finland* **increase** (`country_code`: *FIN*) from the `year` *2015* to *2020*?" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2cafae07", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'population_change_fin', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a11231ab", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q12\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "3c38b8c1", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 13:** For each `income_level`, find the **total** population (`pop`) of all countries within that `income_level` in *2020*.\n", + "\n", + "Your output **must** be a **dict** where each key is a `income_level`, and the corresponding value is the **sum** of populations (`pop`) of all the countries from that `income_level` in the `year` *2020*." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b68d867e", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'income_level_pops', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f1fb4c8c", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q13\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "ca853253", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 14:** For each `income_level`, find the **total** population (`pop`) of all countries who have access to at least basic water supply within that `income_level` in *2020*.\n", + "\n", + "Your output **must** be a **dict** where each key is a `income_level`, and the corresponding value is the **sum** of populations (`pop`) which have access to at least basic water supply of all the countries from that `income_level` in the `year` *2020*.\n", + "\n", + "You **must** round the population of **each** country with access to at least basic water supply to the **nearest** integer **before** adding them up.\n", + "\n", + "**Hint:** For each country, the population with at least basic water supply is `pop * national_alb / 100`. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f3612c98", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'income_level_alb_pops', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2c66e6d4", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q14\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "a045c086", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 15:** For each `income_level`, find the **percentage** of population (`pop`) of all countries within that `income_level` with at least basic water supply in *2020*.\n", + "\n", + "Your output **must** be a **dict** where each key is a `income_level`, and the corresponding value is the **percentage** of the population (`pop`) which have access to at least basic water supply of all the countries from that `income_level` in the `year` *2020*. The percentages **must** be represented as **int**s between *0* and *100*. You **must** round each of the percentages to the **nearest** integer.\n", + "\n", + "**Hint:** You need to loop through the dictionary you found in Q13 (or Q14), and for each key, you need to divide the corresponding value in the Q14 dictionary by the value of the same key in the Q13 dictionary and multiply by 100. Take another look at Task 3.6 from Lab-P7, if you are not sure how to proceed here." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3ed16adc", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'income_level_alb_percent', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb057833", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q15\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "83143982", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "### Data Structure 3: Adding `rural_alb` to `dict_2015` and `dict_2020`\n", + "\n", + "Our dataset has data on the percentage of **national** and **urban** populations with at least basic water supply. However, it is usually **rural** populations which have the greatest difficulty in getting access to water.\n", + "\n", + "Luckily, we are able to calculate **rural_alb** from the given data using the formula:\n", + "\n", + "$$\n", + "rural_{alb} = \\frac{national_{alb} - \\left(urban_{alb} \\times \\frac{urban\\_percent}{100}\\right)}{\\left(1 - \\frac{urban\\_percent}{100}\\right)}\n", + "$$\n", + "\n", + "*If a country has `urban_percent` equal to `100`, then the country has a negligible rural population, and the formula above is not valid. For such countries, we will assume that `rural_alb` is the **same** as `urban_alb`.*\n", + "\n", + "You **must** loop through each country in `dict_2015` and `dict_2020`, and add an **additional** key value pair for each country. The new key should be the string: `\"rural_alb\"`, and the corresponding value should be the `rural_alb` value for that country as given by the formula above. You **must** round each number to the **nearest** integer." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2c158007", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# add the additional key-value pair to both dicts 'dict_2015' and 'dict_2020' here\n", + "# you may display the variable for testing purposes while you define it,\n", + "# BUT you MUST remove the line displaying the dicts before submission as the output will be too large to display\n" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "1b0697ec", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "Run the following cell to test whether you have correctly updated the two data structures." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3756f06e", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"ds3\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "224bada8", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 16:** What's the percentage of rural population with at least basic (`rural_alb`) water supply in *Zimbabwe* (`country_code`: *ZWE*) in *2020*? \n", + "\n", + "You **must** answer this question by querying data from the dict `dict_2020`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5f1e4c0b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'zimbabwe_rural_alb_2020', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c5c37780", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q16\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "bcbed813", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "### Data Structure 4: `rural_non_alb` bins\n", + "\n", + "We have now managed to extract the percentage of rural population with access to atleast basic water supply for each of the countries in the dataset. We can now use this information to find out the countries whose rural populations do **not** have access to at least basic water supply.\n", + "\n", + "You **must** create two **dict**s (one for the `year` *2015* and one for *2020*) where the keys are the integers *0*, *10*, *20*, ..., *100*. The value corresponding to the integer *0* **must** be a **list** containing the names of all the countries for which their rural population **without** access to at least basic (which we can represent as `rural_non_alb`) water supply is `0 <= rural_non_alb < 10`. Similarly, the value corresponding to the key *10* must be a **list** of all countries for which `10 <= rural_non_alb < 20`, and so on.\n", + "\n", + "**Hints:**\n", + "1. You can find `rural_non_alb` as `rural_non_alb = 100 - rural_alb`.\n", + "2. You can find the bin which any country falls into by using the formula:\n", + "```python\n", + "rural_non_alb_bin = ((100 - rural_alb)//10) * 10\n", + "```\n", + "3. Even if a particular bin has no countries in it, you **must** still create a bin for it in your dict (with the value being an empty list). The starter code below will help you accomplish this." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7809dc36", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'rural_non_alb_bin_2015_dict'\n", + "\n", + "# initialize as an empty dictionary\n", + "rural_non_alb_bin_2015_dict = ...\n", + "\n", + "# loop through the keys we want for the dictionary - 0, 10, 20, ..., 100 (inclusive of 100)\n", + "# and add them to the dictionary as keys with the value as an empty list\n", + "for rural_non_alb_bin in range(...):\n", + " rural_non_alb_bin_2015_dict[rural_non_alb_bin] = []\n", + "\n", + "# loop through each country and add to the correct bin of rural_non_alb_bin_2015_dict" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "20737850", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'rural_non_alb_bin_2020_dict'\n" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "47274c60", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "After you define the data structures `rural_non_alb_bin_2015_dict` and `rural_non_alb_bin_2020_dict`, run the following cell to test whether you have defined them properly." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9b1d43d7", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"rural_non_alb_bins\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "ba0832bb", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 17:** List all the countries which had `rural_non_alb` value between *20* and *29* (both inclusive) in the `year` *2015*.\n", + "\n", + "You **must** answer this question by querying the the **dict** `rural_non_alb_bin_2015_dict`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d7cd2af1", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'bin_20_countries', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6a13bfc3", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q17\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "79ca0068", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 18:** What are the countries in the **last** non-empty bin in the `year` *2020*?\n", + "\n", + "Your output **must** be a **list** of the countries in the bin with the **highest** percentage of rural population without at least basic access to water.\n", + "\n", + "**Hint:** You must first find the largest key of the **dict** `rural_non_alb_bin_2020_dict` with a non-empty bin, and then find the value of that key." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5f0a7e59", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'last_non_empty_bin_2020', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fa5d6c6c", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q18\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "c4911079", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 19:** What countries have **regressed** by moving to a **higher** bin from *2015* to *2020*?\n", + "\n", + "Your answer **must** be a **list** of countries which have regressed by having their percentage of rural population without at least basic access to water move to a bin with a **higher** key.\n", + "\n", + "**Hint:** There are many ways of solving this question. Here are a few:\n", + "1. You could create a new dictionary by swapping the keys and values of `rural_non_alb_bin_2015_dict` (and similarly `rural_non_alb_bin_2020_dict`), and use these dictionaries to determine the countries that have regressed.\n", + "2. You could create a nested loop to go through all possible combinations of keys in both the dictionaries `rural_non_alb_bin_2015_dict` and `rural_non_alb_bin_2020_dict`.\n", + "3. You could loop through all the countries and directly query from `dict_2015` and `dict_2020` to determine which of them have regressed." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9467d41d", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'countries_regressed', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b8d4d3b4", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q19\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "99fb75f2", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 20:** What countries have **improved** by moving to a **lower** bin from *2015* to *2020*?\n", + "\n", + "Your answer **must** be a **list** of countries which have improved by having their percentage of rural population without at least basic access to water move to a bin with a **lower** key." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4954b362", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "# compute and store the answer in the variable 'countries_improved', then display it\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "786d8ab1", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q20\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "2a5eeeb8", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Submission\n", + "It is recommended that at this stage, you Restart and Run all Cells in your notebook.\n", + "That will automatically save your work and generate a zip file for you to submit.\n", + "\n", + "**SUBMISSION INSTRUCTIONS**:\n", + "1. **Upload** the zipfile to Gradescope.\n", + "2. Check **Gradescope otter** results as soon as the auto-grader execution gets completed. Don't worry about the score showing up as -/100.0. You only need to check that the test cases passed." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6fa71adc", + "metadata": { + "cell_type": "code" + }, + "outputs": [], + "source": [ + "# running this cell will create a new save checkpoint for your notebook\n", + "from IPython.display import display, Javascript\n", + "display(Javascript('IPython.notebook.save_checkpoint();'))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cf92c956", + "metadata": { + "cell_type": "code", + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "!jupytext --to py p7.ipynb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da0a9c58", + "metadata": { + "cell_type": "code", + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "p7_test.check_file_size(\"p7.ipynb\")\n", + "grader.export(pdf=False, run_tests=True, files=[\"p7.py\"])" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "bd82abcc", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + " " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.9.13" + }, + "otter": { + "OK_FORMAT": true, + "tests": { + "cell_test": { + "name": "cell_test", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"qcell_test1\", cell_test1)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qcell_test2\", cell_test2)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qcell_test3\", cell_test3)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qcell_test4\", cell_test4)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qcell_test5\", cell_test5)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qcell_test6\", cell_test6)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "dict_2015": { + "name": "dict_2015", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"qdict_2015_test\", dict_2015)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "dict_2020": { + "name": "dict_2020", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"qdict_2020_test\", dict_2020)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "ds3": { + "name": "ds3", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"qdict_2015_rural_alb_test\", dict_2015)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qdict_2020_rural_alb_test\", dict_2020)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "get_col_dict": { + "name": "get_col_dict", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"qget_col_dict_test1\", get_col_dict_test1)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qget_col_dict_test2\", get_col_dict_test2)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qget_col_dict_test3\", get_col_dict_test3)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "import": { + "name": "import", + "points": 0, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q1": { + "name": "q1", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q1\", highest_pop_country)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q10": { + "name": "q10", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q10\", chn_2020_dict)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q11": { + "name": "q11", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q11\", npl_national_alb_2015)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q12": { + "name": "q12", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q12\", population_change_fin)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q13": { + "name": "q13", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q13\", income_level_pops)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q14": { + "name": "q14", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q14\", income_level_alb_pops)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q15": { + "name": "q15", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q15\", income_level_alb_percent)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q16": { + "name": "q16", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q16\", zimbabwe_rural_alb_2020)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q17": { + "name": "q17", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q17\", bin_20_countries)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q18": { + "name": "q18", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q18\", last_non_empty_bin_2020)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q19": { + "name": "q19", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q19\", countries_regressed)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q2": { + "name": "q2", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q2\", highest_pop_inc_country)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q20": { + "name": "q20", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q20\", countries_improved)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q3": { + "name": "q3", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q3\", highest_nat_alb_inc_country)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q4": { + "name": "q4", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q4\", highest_alb_inc_income_level)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q5": { + "name": "q5", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q5\", total_pop_2015)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q6": { + "name": "q6", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q6\", urban_pop_percent_2015)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q7": { + "name": "q7", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q7\", high_income_pop)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q8": { + "name": "q8", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q8\", least_pop_income_group)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q9": { + "name": "q9", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"q9\", na_max_alb_countries)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-f1": { + "name": "rubric-f1", + "points": 3, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-f2": { + "name": "rubric-f2", + "points": 3, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q1": { + "name": "rubric-q1", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q10": { + "name": "rubric-q10", + "points": 2, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q11": { + "name": "rubric-q11", + "points": 2, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q12": { + "name": "rubric-q12", + "points": 3, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q13": { + "name": "rubric-q13", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q14": { + "name": "rubric-q14", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q15": { + "name": "rubric-q15", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q16": { + "name": "rubric-q16", + "points": 2, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q17": { + "name": "rubric-q17", + "points": 2, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q18": { + "name": "rubric-q18", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q19": { + "name": "rubric-q19", + "points": 5, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q2": { + "name": "rubric-q2", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q20": { + "name": "rubric-q20", + "points": 5, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q3": { + "name": "rubric-q3", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q4": { + "name": "rubric-q4", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q5": { + "name": "rubric-q5", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q6": { + "name": "rubric-q6", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q7": { + "name": "rubric-q7", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q8": { + "name": "rubric-q8", + "points": 5, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rubric-q9": { + "name": "rubric-q9", + "points": 4, + "suites": [ + { + "cases": [], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "rural_non_alb_bins": { + "name": "rural_non_alb_bins", + "points": 0, + "suites": [ + { + "cases": [ + { + "code": ">>> p7_test.check(\"qrural_non_alb_bin_2015\", rural_non_alb_bin_2015_dict)\nTrue", + "hidden": false, + "locked": false + }, + { + "code": ">>> p7_test.check(\"qrural_non_alb_bin_2020\", rural_non_alb_bin_2020_dict)\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/sum23/projects/p7/p7_test.py b/sum23/projects/p7/p7_test.py new file mode 100644 index 0000000000000000000000000000000000000000..f3620389474b40cbacad4b500e7b159de57ee7e3 --- /dev/null +++ b/sum23/projects/p7/p7_test.py @@ -0,0 +1,6205 @@ +#!/usr/bin/python + +import os, json, math + +MAX_FILE_SIZE = 500 # units - KB +REL_TOL = 6e-04 # relative tolerance for floats +ABS_TOL = 15e-03 # absolute tolerance for floats + +PASS = "PASS" + +TEXT_FORMAT = "text" # question type when expected answer is a str, int, float, or bool +TEXT_FORMAT_NAMEDTUPLE = "text namedtuple" # question type when expected answer is a namedtuple +TEXT_FORMAT_UNORDERED_LIST = "text list_unordered" # question type when the expected answer is a list where the order does *not* matter +TEXT_FORMAT_ORDERED_LIST = "text list_ordered" # question type when the expected answer is a list where the order does matter +TEXT_FORMAT_ORDERED_LIST_NAMEDTUPLE = "text list_ordered namedtuple" # question type when the expected answer is a list of namedtuples where the order does matter +TEXT_FORMAT_SPECIAL_ORDERED_LIST = "text list_special_ordered" # question type when the expected answer is a list where order does matter, but with possible ties. Elements are ordered according to values in special_ordered_json (with ties allowed) +TEXT_FORMAT_DICT = "text dict" # question type when the expected answer is a dictionary +TEXT_FORMAT_LIST_DICTS_ORDERED = "text list_dicts_ordered" # question type when the expected answer is a list of dicts where the order does matter + + +expected_json = {"cell_test1": (TEXT_FORMAT, 'Afghanistan'), + "cell_test2": (TEXT_FORMAT, 2020), + "cell_test3": (TEXT_FORMAT, 57), + "cell_test4": (TEXT_FORMAT, 96), + "cell_test5": (TEXT_FORMAT, 'Upper middle income'), + "cell_test6": (TEXT_FORMAT, 43851000), + "1": (TEXT_FORMAT, "China"), + "2": (TEXT_FORMAT, "India"), + "3": (TEXT_FORMAT, "Afghanistan"), + "4": (TEXT_FORMAT, "Low income"), + "5": (TEXT_FORMAT, 6501786000), + "6": (TEXT_FORMAT, 52), + "7": (TEXT_FORMAT, 871268000), + "8": (TEXT_FORMAT, "Low income"), + "9": (TEXT_FORMAT_UNORDERED_LIST, ['Bermuda', 'Canada', 'United States of America']), + "get_col_dict_test1": (TEXT_FORMAT_DICT, {'AFG': 'South Asia', + 'ALB': 'Europe & Central Asia', + 'DZA': 'Middle East & North Africa', + 'AND': 'Europe & Central Asia', + 'AGO': 'Sub-Saharan Africa', + 'ARM': 'Europe & Central Asia', + 'AUS': 'East Asia & Pacific', + 'AUT': 'Europe & Central Asia', + 'AZE': 'Europe & Central Asia', + 'BGD': 'South Asia', + 'BLR': 'Europe & Central Asia', + 'BEL': 'Europe & Central Asia', + 'BLZ': 'Latin America & Caribbean', + 'BEN': 'Sub-Saharan Africa', + 'BMU': 'North America', + 'BTN': 'South Asia', + 'BIH': 'Europe & Central Asia', + 'BWA': 'Sub-Saharan Africa', + 'BRA': 'Latin America & Caribbean', + 'BRN': 'East Asia & Pacific', + 'BGR': 'Europe & Central Asia', + 'BFA': 'Sub-Saharan Africa', + 'BDI': 'Sub-Saharan Africa', + 'CPV': 'Sub-Saharan Africa', + 'KHM': 'East Asia & Pacific', + 'CMR': 'Sub-Saharan Africa', + 'CAN': 'North America', + 'CAF': 'Sub-Saharan Africa', + 'TCD': 'Sub-Saharan Africa', + 'CHL': 'Latin America & Caribbean', + 'CHN': 'East Asia & Pacific', + 'COL': 'Latin America & Caribbean', + 'CRI': 'Latin America & Caribbean', + 'CIV': 'Sub-Saharan Africa', + 'CUB': 'Latin America & Caribbean', + 'CYP': 'Europe & Central Asia', + 'CZE': 'Europe & Central Asia', + 'DNK': 'Europe & Central Asia', + 'DJI': 'Middle East & North Africa', + 'DOM': 'Latin America & Caribbean', + 'ECU': 'Latin America & Caribbean', + 'SLV': 'Latin America & Caribbean', + 'EST': 'Europe & Central Asia', + 'SWZ': 'Sub-Saharan Africa', + 'ETH': 'Sub-Saharan Africa', + 'FJI': 'East Asia & Pacific', + 'FIN': 'Europe & Central Asia', + 'FRA': 'Europe & Central Asia', + 'GAB': 'Sub-Saharan Africa', + 'GEO': 'Europe & Central Asia', + 'DEU': 'Europe & Central Asia', + 'GHA': 'Sub-Saharan Africa', + 'GIB': 'Europe & Central Asia', + 'GRC': 'Europe & Central Asia', + 'GRL': 'Europe & Central Asia', + 'GTM': 'Latin America & Caribbean', + 'GIN': 'Sub-Saharan Africa', + 'GNB': 'Sub-Saharan Africa', + 'GUY': 'Latin America & Caribbean', + 'HTI': 'Latin America & Caribbean', + 'HND': 'Latin America & Caribbean', + 'HUN': 'Europe & Central Asia', + 'ISL': 'Europe & Central Asia', + 'IND': 'South Asia', + 'IDN': 'East Asia & Pacific', + 'IRQ': 'Middle East & North Africa', + 'IRL': 'Europe & Central Asia', + 'ISR': 'Middle East & North Africa', + 'JAM': 'Latin America & Caribbean', + 'JOR': 'Middle East & North Africa', + 'KAZ': 'Europe & Central Asia', + 'KEN': 'Sub-Saharan Africa', + 'KIR': 'East Asia & Pacific', + 'LVA': 'Europe & Central Asia', + 'LSO': 'Sub-Saharan Africa', + 'LBR': 'Sub-Saharan Africa', + 'LTU': 'Europe & Central Asia', + 'LUX': 'Europe & Central Asia', + 'MDG': 'Sub-Saharan Africa', + 'MWI': 'Sub-Saharan Africa', + 'MYS': 'East Asia & Pacific', + 'MDV': 'South Asia', + 'MLI': 'Sub-Saharan Africa', + 'MLT': 'Middle East & North Africa', + 'MHL': 'East Asia & Pacific', + 'MRT': 'Sub-Saharan Africa', + 'MUS': 'Sub-Saharan Africa', + 'MEX': 'Latin America & Caribbean', + 'MCO': 'Europe & Central Asia', + 'MNG': 'East Asia & Pacific', + 'MNE': 'Europe & Central Asia', + 'MAR': 'Middle East & North Africa', + 'MOZ': 'Sub-Saharan Africa', + 'MMR': 'East Asia & Pacific', + 'NAM': 'Sub-Saharan Africa', + 'NRU': 'East Asia & Pacific', + 'NPL': 'South Asia', + 'NLD': 'Europe & Central Asia', + 'NZL': 'East Asia & Pacific', + 'NIC': 'Latin America & Caribbean', + 'NER': 'Sub-Saharan Africa', + 'NGA': 'Sub-Saharan Africa', + 'MKD': 'Europe & Central Asia', + 'NOR': 'Europe & Central Asia', + 'OMN': 'Middle East & North Africa', + 'PAK': 'South Asia', + 'PLW': 'East Asia & Pacific', + 'PAN': 'Latin America & Caribbean', + 'PNG': 'East Asia & Pacific', + 'PRY': 'Latin America & Caribbean', + 'PER': 'Latin America & Caribbean', + 'PHL': 'East Asia & Pacific', + 'POL': 'Europe & Central Asia', + 'PRT': 'Europe & Central Asia', + 'ROU': 'Europe & Central Asia', + 'RUS': 'Europe & Central Asia', + 'RWA': 'Sub-Saharan Africa', + 'WSM': 'East Asia & Pacific', + 'SEN': 'Sub-Saharan Africa', + 'SRB': 'Europe & Central Asia', + 'SLE': 'Sub-Saharan Africa', + 'SGP': 'East Asia & Pacific', + 'SLB': 'East Asia & Pacific', + 'SOM': 'Sub-Saharan Africa', + 'ZAF': 'Sub-Saharan Africa', + 'SSD': 'Sub-Saharan Africa', + 'ESP': 'Europe & Central Asia', + 'LKA': 'South Asia', + 'SDN': 'Sub-Saharan Africa', + 'SUR': 'Latin America & Caribbean', + 'SWE': 'Europe & Central Asia', + 'CHE': 'Europe & Central Asia', + 'SYR': 'Middle East & North Africa', + 'TJK': 'Europe & Central Asia', + 'THA': 'East Asia & Pacific', + 'TLS': 'East Asia & Pacific', + 'TGO': 'Sub-Saharan Africa', + 'TON': 'East Asia & Pacific', + 'TUN': 'Middle East & North Africa', + 'TKM': 'Europe & Central Asia', + 'TUV': 'East Asia & Pacific', + 'UGA': 'Sub-Saharan Africa', + 'UKR': 'Europe & Central Asia', + 'GBR': 'Europe & Central Asia', + 'USA': 'North America', + 'URY': 'Latin America & Caribbean', + 'UZB': 'Europe & Central Asia', + 'VUT': 'East Asia & Pacific', + 'VNM': 'East Asia & Pacific', + 'ZMB': 'Sub-Saharan Africa', + 'ZWE': 'Sub-Saharan Africa'}), + "get_col_dict_test2": (TEXT_FORMAT_DICT, {'AFG': 61, + 'ALB': 93, + 'DZA': 93, + 'AND': 100, + 'AGO': 54, + 'ARM': 100, + 'AUS': 100, + 'AUT': 100, + 'AZE': 92, + 'BGD': 97, + 'BLR': 96, + 'BEL': 100, + 'BLZ': 97, + 'BEN': 65, + 'BMU': 100, + 'BTN': 96, + 'BIH': 96, + 'BWA': 88, + 'BRA': 98, + 'BRN': 100, + 'BGR': 100, + 'BFA': 50, + 'BDI': 60, + 'CPV': 85, + 'KHM': 68, + 'CMR': 64, + 'CAN': 100, + 'CAF': 42, + 'TCD': 44, + 'CHL': 100, + 'CHN': 92, + 'COL': 96, + 'CRI': 100, + 'CIV': 71, + 'CUB': 96, + 'CYP': 100, + 'CZE': 100, + 'DNK': 100, + 'DJI': 76, + 'DOM': 96, + 'ECU': 93, + 'SLV': 96, + 'EST': 100, + 'SWZ': 67, + 'ETH': 42, + 'FJI': 94, + 'FIN': 100, + 'FRA': 100, + 'GAB': 84, + 'GEO': 96, + 'DEU': 100, + 'GHA': 80, + 'GIB': 100, + 'GRC': 100, + 'GRL': 100, + 'GTM': 92, + 'GIN': 64, + 'GNB': 59, + 'GUY': 95, + 'HTI': 65, + 'HND': 93, + 'HUN': 100, + 'ISL': 100, + 'IND': 88, + 'IDN': 89, + 'IRQ': 94, + 'IRL': 97, + 'ISR': 100, + 'JAM': 90, + 'JOR': 100, + 'KAZ': 95, + 'KEN': 58, + 'KIR': 74, + 'LVA': 99, + 'LSO': 71, + 'LBR': 73, + 'LTU': 97, + 'LUX': 100, + 'MDG': 49, + 'MWI': 66, + 'MYS': 97, + 'MDV': 99, + 'MLI': 74, + 'MLT': 100, + 'MHL': 88, + 'MRT': 67, + 'MUS': 100, + 'MEX': 98, + 'MCO': 100, + 'MNG': 81, + 'MNE': 97, + 'MAR': 84, + 'MOZ': 51, + 'MMR': 74, + 'NAM': 83, + 'NRU': 100, + 'NPL': 88, + 'NLD': 100, + 'NZL': 100, + 'NIC': 81, + 'NER': 45, + 'NGA': 69, + 'MKD': 97, + 'NOR': 100, + 'OMN': 90, + 'PAK': 89, + 'PLW': 100, + 'PAN': 93, + 'PNG': 41, + 'PRY': 97, + 'PER': 90, + 'PHL': 92, + 'POL': 100, + 'PRT': 100, + 'ROU': 100, + 'RUS': 97, + 'RWA': 57, + 'WSM': 91, + 'SEN': 79, + 'SRB': 93, + 'SLE': 58, + 'SGP': 100, + 'SLB': 69, + 'SOM': 49, + 'ZAF': 92, + 'SSD': 41, + 'ESP': 100, + 'LKA': 90, + 'SDN': 59, + 'SUR': 96, + 'SWE': 100, + 'CHE': 100, + 'SYR': 94, + 'TJK': 76, + 'THA': 100, + 'TLS': 75, + 'TGO': 64, + 'TON': 99, + 'TUN': 95, + 'TKM': 98, + 'TUV': 100, + 'UGA': 48, + 'UKR': 94, + 'GBR': 100, + 'USA': 100, + 'URY': 100, + 'UZB': 98, + 'VUT': 90, + 'VNM': 93, + 'ZMB': 61, + 'ZWE': 65}), + "get_col_dict_test3": (TEXT_FORMAT_DICT, {'AFG': 38928000, + 'ALB': 2878000, + 'DZA': 43851000, + 'AND': 77000, + 'AGO': 32866000, + 'ARM': 2963000, + 'AUS': 25500000, + 'AUT': 9006000, + 'AZE': 10139000, + 'BGD': 164689000, + 'BLR': 9449000, + 'BEL': 11590000, + 'BLZ': 398000, + 'BEN': 12123000, + 'BMU': 62000, + 'BTN': 772000, + 'BIH': 3281000, + 'BWA': 2352000, + 'BRA': 212559000, + 'BRN': 437000, + 'BGR': 6948000, + 'BFA': 20903000, + 'BDI': 11891000, + 'CPV': 556000, + 'KHM': 16719000, + 'CMR': 26546000, + 'CAN': 37742000, + 'CAF': 4830000, + 'TCD': 16426000, + 'CHL': 19116000, + 'CHN': 1463141000, + 'COL': 50883000, + 'CRI': 5094000, + 'CIV': 26378000, + 'CUB': 11327000, + 'CYP': 1207000, + 'CZE': 10709000, + 'DNK': 5792000, + 'DJI': 988000, + 'DOM': 10848000, + 'ECU': 17643000, + 'SLV': 6486000, + 'EST': 1327000, + 'SWZ': 1160000, + 'ETH': 114964000, + 'FJI': 896000, + 'FIN': 5541000, + 'FRA': 65274000, + 'GAB': 2226000, + 'GEO': 3989000, + 'DEU': 83784000, + 'GHA': 31073000, + 'GIB': 34000, + 'GRC': 10423000, + 'GRL': 57000, + 'GTM': 17916000, + 'GIN': 13133000, + 'GNB': 1968000, + 'GUY': 787000, + 'HTI': 11403000, + 'HND': 9905000, + 'HUN': 9660000, + 'ISL': 341000, + 'IND': 1380004000, + 'IDN': 273524000, + 'IRQ': 40223000, + 'IRL': 4938000, + 'ISR': 8656000, + 'JAM': 2961000, + 'JOR': 10203000, + 'KAZ': 18777000, + 'KEN': 53771000, + 'KIR': 119000, + 'LVA': 1886000, + 'LSO': 2142000, + 'LBR': 5058000, + 'LTU': 2722000, + 'LUX': 626000, + 'MDG': 27691000, + 'MWI': 19130000, + 'MYS': 32366000, + 'MDV': 541000, + 'MLI': 20251000, + 'MLT': 442000, + 'MHL': 59000, + 'MRT': 4650000, + 'MUS': 1272000, + 'MEX': 128933000, + 'MCO': 39000, + 'MNG': 3278000, + 'MNE': 628000, + 'MAR': 36911000, + 'MOZ': 31255000, + 'MMR': 54410000, + 'NAM': 2541000, + 'NRU': 11000, + 'NPL': 29137000, + 'NLD': 17135000, + 'NZL': 4822000, + 'NIC': 6625000, + 'NER': 24207000, + 'NGA': 206140000, + 'MKD': 2083000, + 'NOR': 5421000, + 'OMN': 5107000, + 'PAK': 220892000, + 'PLW': 18000, + 'PAN': 4315000, + 'PNG': 8947000, + 'PRY': 7133000, + 'PER': 32972000, + 'PHL': 109581000, + 'POL': 37847000, + 'PRT': 10197000, + 'ROU': 19238000, + 'RUS': 145934000, + 'RWA': 12952000, + 'WSM': 198000, + 'SEN': 16744000, + 'SRB': 8737000, + 'SLE': 7977000, + 'SGP': 5850000, + 'SLB': 687000, + 'SOM': 15893000, + 'ZAF': 59309000, + 'SSD': 11194000, + 'ESP': 46755000, + 'LKA': 21413000, + 'SDN': 43849000, + 'SUR': 587000, + 'SWE': 10099000, + 'CHE': 8655000, + 'SYR': 17501000, + 'TJK': 9538000, + 'THA': 69800000, + 'TLS': 1318000, + 'TGO': 8279000, + 'TON': 106000, + 'TUN': 11819000, + 'TKM': 6031000, + 'TUV': 12000, + 'UGA': 45741000, + 'UKR': 43734000, + 'GBR': 67886000, + 'USA': 331003000, + 'URY': 3474000, + 'UZB': 33469000, + 'VUT': 307000, + 'VNM': 97339000, + 'ZMB': 18384000, + 'ZWE': 14863000}), + "dict_2015_test": (TEXT_FORMAT_DICT, {'AFG': {'country_name': 'Afghanistan', + 'region': 'South Asia', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 34414000, + 'urban_percent': 25, + 'national_alb': 61, + 'urban_alb': 87}, + 'ALB': {'country_name': 'Albania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2891000, + 'urban_percent': 57, + 'national_alb': 93, + 'urban_alb': 95}, + 'DZA': {'country_name': 'Algeria', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 39728000, + 'urban_percent': 71, + 'national_alb': 93, + 'urban_alb': 95}, + 'AND': {'country_name': 'Andorra', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 78000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100}, + 'AGO': {'country_name': 'Angola', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 27884000, + 'urban_percent': 63, + 'national_alb': 54, + 'urban_alb': 70}, + 'ARM': {'country_name': 'Armenia', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 2926000, + 'urban_percent': 63, + 'national_alb': 100, + 'urban_alb': 100}, + 'AUS': {'country_name': 'Australia', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 23932000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100}, + 'AUT': {'country_name': 'Austria', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 8679000, + 'urban_percent': 58, + 'national_alb': 100, + 'urban_alb': 100}, + 'AZE': {'country_name': 'Azerbaijan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 9623000, + 'urban_percent': 55, + 'national_alb': 92, + 'urban_alb': 100}, + 'BGD': {'country_name': 'Bangladesh', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 156256000, + 'urban_percent': 34, + 'national_alb': 97, + 'urban_alb': 98}, + 'BLR': {'country_name': 'Belarus', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 9439000, + 'urban_percent': 77, + 'national_alb': 96, + 'urban_alb': 96}, + 'BEL': {'country_name': 'Belgium', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 11288000, + 'urban_percent': 98, + 'national_alb': 100, + 'urban_alb': 100}, + 'BLZ': {'country_name': 'Belize', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 361000, + 'urban_percent': 45, + 'national_alb': 97, + 'urban_alb': 100}, + 'BEN': {'country_name': 'Benin', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10576000, + 'urban_percent': 46, + 'national_alb': 65, + 'urban_alb': 74}, + 'BMU': {'country_name': 'Bermuda', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2015, + 'pop': 64000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'BTN': {'country_name': 'Bhutan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 728000, + 'urban_percent': 39, + 'national_alb': 96, + 'urban_alb': 98}, + 'BIH': {'country_name': 'Bosnia and Herzegovina', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 3429000, + 'urban_percent': 47, + 'national_alb': 96, + 'urban_alb': 95}, + 'BWA': {'country_name': 'Botswana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2121000, + 'urban_percent': 67, + 'national_alb': 88, + 'urban_alb': 97}, + 'BRA': {'country_name': 'Brazil', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 204472000, + 'urban_percent': 86, + 'national_alb': 98, + 'urban_alb': 100}, + 'BRN': {'country_name': 'Brunei Darussalam', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 415000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100}, + 'BGR': {'country_name': 'Bulgaria', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 7200000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100}, + 'BFA': {'country_name': 'Burkina Faso', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 18111000, + 'urban_percent': 28, + 'national_alb': 50, + 'urban_alb': 80}, + 'BDI': {'country_name': 'Burundi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10160000, + 'urban_percent': 12, + 'national_alb': 60, + 'urban_alb': 89}, + 'CPV': {'country_name': 'Cabo Verde', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 525000, + 'urban_percent': 64, + 'national_alb': 85, + 'urban_alb': 92}, + 'KHM': {'country_name': 'Cambodia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 15521000, + 'urban_percent': 22, + 'national_alb': 68, + 'urban_alb': 89}, + 'CMR': {'country_name': 'Cameroon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 23298000, + 'urban_percent': 55, + 'national_alb': 64, + 'urban_alb': 82}, + 'CAN': {'country_name': 'Canada', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2015, + 'pop': 36027000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100}, + 'CAF': {'country_name': 'Central African Republic', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 4493000, + 'urban_percent': 40, + 'national_alb': 42, + 'urban_alb': 58}, + 'TCD': {'country_name': 'Chad', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 14111000, + 'urban_percent': 23, + 'national_alb': 44, + 'urban_alb': 75}, + 'CHL': {'country_name': 'Chile', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2015, + 'pop': 17969000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100}, + 'CHN': {'country_name': 'China', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 1430405000, + 'urban_percent': 56, + 'national_alb': 92, + 'urban_alb': 98}, + 'COL': {'country_name': 'Colombia', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 47521000, + 'urban_percent': 80, + 'national_alb': 96, + 'urban_alb': 100}, + 'CRI': {'country_name': 'Costa Rica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 4848000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100}, + 'CIV': {'country_name': "Côte d'Ivoire", + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 23226000, + 'urban_percent': 49, + 'national_alb': 71, + 'urban_alb': 87}, + 'CUB': {'country_name': 'Cuba', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 11325000, + 'urban_percent': 77, + 'national_alb': 96, + 'urban_alb': 98}, + 'CYP': {'country_name': 'Cyprus', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 1161000, + 'urban_percent': 67, + 'national_alb': 100, + 'urban_alb': 100}, + 'CZE': {'country_name': 'Czech Republic', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10601000, + 'urban_percent': 73, + 'national_alb': 100, + 'urban_alb': 100}, + 'DNK': {'country_name': 'Denmark', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5689000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100}, + 'DJI': {'country_name': 'Djibouti', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 914000, + 'urban_percent': 77, + 'national_alb': 76, + 'urban_alb': 84}, + 'DOM': {'country_name': 'Dominican Republic', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 10282000, + 'urban_percent': 79, + 'national_alb': 96, + 'urban_alb': 98}, + 'ECU': {'country_name': 'Ecuador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 16212000, + 'urban_percent': 63, + 'national_alb': 93, + 'urban_alb': 100}, + 'SLV': {'country_name': 'El Salvador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 6325000, + 'urban_percent': 70, + 'national_alb': 96, + 'urban_alb': 99}, + 'EST': {'country_name': 'Estonia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 1315000, + 'urban_percent': 68, + 'national_alb': 100, + 'urban_alb': 100}, + 'SWZ': {'country_name': 'Eswatini', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 1104000, + 'urban_percent': 23, + 'national_alb': 67, + 'urban_alb': 95}, + 'ETH': {'country_name': 'Ethiopia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 100835000, + 'urban_percent': 19, + 'national_alb': 42, + 'urban_alb': 82}, + 'FJI': {'country_name': 'Fiji', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 869000, + 'urban_percent': 55, + 'national_alb': 94, + 'urban_alb': 98}, + 'FIN': {'country_name': 'Finland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5481000, + 'urban_percent': 85, + 'national_alb': 100, + 'urban_alb': 100}, + 'FRA': {'country_name': 'France', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 64453000, + 'urban_percent': 80, + 'national_alb': 100, + 'urban_alb': 100}, + 'GAB': {'country_name': 'Gabon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 1948000, + 'urban_percent': 88, + 'national_alb': 84, + 'urban_alb': 89}, + 'GEO': {'country_name': 'Georgia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 4024000, + 'urban_percent': 57, + 'national_alb': 96, + 'urban_alb': 100}, + 'DEU': {'country_name': 'Germany', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 81787000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100}, + 'GHA': {'country_name': 'Ghana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 27849000, + 'urban_percent': 54, + 'national_alb': 80, + 'urban_alb': 91}, + 'GIB': {'country_name': 'Gibraltar', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 34000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'GRC': {'country_name': 'Greece', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10660000, + 'urban_percent': 78, + 'national_alb': 100, + 'urban_alb': 100}, + 'GRL': {'country_name': 'Greenland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 56000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100}, + 'GTM': {'country_name': 'Guatemala', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 16252000, + 'urban_percent': 50, + 'national_alb': 92, + 'urban_alb': 97}, + 'GIN': {'country_name': 'Guinea', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 11432000, + 'urban_percent': 35, + 'national_alb': 64, + 'urban_alb': 85}, + 'GNB': {'country_name': 'Guinea-Bissau', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 1737000, + 'urban_percent': 42, + 'national_alb': 59, + 'urban_alb': 73}, + 'GUY': {'country_name': 'Guyana', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 767000, + 'urban_percent': 26, + 'national_alb': 95, + 'urban_alb': 100}, + 'HTI': {'country_name': 'Haiti', + 'region': 'Latin America & Caribbean', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10696000, + 'urban_percent': 52, + 'national_alb': 65, + 'urban_alb': 85}, + 'HND': {'country_name': 'Honduras', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 9113000, + 'urban_percent': 55, + 'national_alb': 93, + 'urban_alb': 99}, + 'HUN': {'country_name': 'Hungary', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 9778000, + 'urban_percent': 71, + 'national_alb': 100, + 'urban_alb': 100}, + 'ISL': {'country_name': 'Iceland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 330000, + 'urban_percent': 94, + 'national_alb': 100, + 'urban_alb': 100}, + 'IND': {'country_name': 'India', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 1310152000, + 'urban_percent': 33, + 'national_alb': 88, + 'urban_alb': 93}, + 'IDN': {'country_name': 'Indonesia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 258383000, + 'urban_percent': 53, + 'national_alb': 89, + 'urban_alb': 95}, + 'IRQ': {'country_name': 'Iraq', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 35572000, + 'urban_percent': 70, + 'national_alb': 94, + 'urban_alb': 98}, + 'IRL': {'country_name': 'Ireland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 4652000, + 'urban_percent': 63, + 'national_alb': 97, + 'urban_alb': 97}, + 'ISR': {'country_name': 'Israel', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2015, + 'pop': 7978000, + 'urban_percent': 92, + 'national_alb': 100, + 'urban_alb': 100}, + 'JAM': {'country_name': 'Jamaica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2891000, + 'urban_percent': 55, + 'national_alb': 90, + 'urban_alb': 95}, + 'JOR': {'country_name': 'Jordan', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 9267000, + 'urban_percent': 90, + 'national_alb': 100, + 'urban_alb': 100}, + 'KAZ': {'country_name': 'Kazakhstan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 17572000, + 'urban_percent': 57, + 'national_alb': 95, + 'urban_alb': 98}, + 'KEN': {'country_name': 'Kenya', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 47878000, + 'urban_percent': 26, + 'national_alb': 58, + 'urban_alb': 87}, + 'KIR': {'country_name': 'Kiribati', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 111000, + 'urban_percent': 52, + 'national_alb': 74, + 'urban_alb': 89}, + 'LVA': {'country_name': 'Latvia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 1998000, + 'urban_percent': 68, + 'national_alb': 99, + 'urban_alb': 99}, + 'LSO': {'country_name': 'Lesotho', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 2059000, + 'urban_percent': 27, + 'national_alb': 71, + 'urban_alb': 90}, + 'LBR': {'country_name': 'Liberia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 4472000, + 'urban_percent': 50, + 'national_alb': 73, + 'urban_alb': 84}, + 'LTU': {'country_name': 'Lithuania', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 2932000, + 'urban_percent': 67, + 'national_alb': 97, + 'urban_alb': 100}, + 'LUX': {'country_name': 'Luxembourg', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 567000, + 'urban_percent': 90, + 'national_alb': 100, + 'urban_alb': 100}, + 'MDG': {'country_name': 'Madagascar', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 24234000, + 'urban_percent': 35, + 'national_alb': 49, + 'urban_alb': 78}, + 'MWI': {'country_name': 'Malawi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 16745000, + 'urban_percent': 16, + 'national_alb': 66, + 'urban_alb': 86}, + 'MYS': {'country_name': 'Malaysia', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 30271000, + 'urban_percent': 74, + 'national_alb': 97, + 'urban_alb': 100}, + 'MDV': {'country_name': 'Maldives', + 'region': 'South Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 455000, + 'urban_percent': 39, + 'national_alb': 99, + 'urban_alb': 99}, + 'MLI': {'country_name': 'Mali', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 17439000, + 'urban_percent': 40, + 'national_alb': 74, + 'urban_alb': 91}, + 'MLT': {'country_name': 'Malta', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2015, + 'pop': 434000, + 'urban_percent': 94, + 'national_alb': 100, + 'urban_alb': 100}, + 'MHL': {'country_name': 'Marshall Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 57000, + 'urban_percent': 76, + 'national_alb': 88, + 'urban_alb': 86}, + 'MRT': {'country_name': 'Mauritania', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 4046000, + 'urban_percent': 51, + 'national_alb': 67, + 'urban_alb': 86}, + 'MUS': {'country_name': 'Mauritius', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 1259000, + 'urban_percent': 41, + 'national_alb': 100, + 'urban_alb': 100}, + 'MEX': {'country_name': 'Mexico', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 121858000, + 'urban_percent': 79, + 'national_alb': 98, + 'urban_alb': 100}, + 'MCO': {'country_name': 'Monaco', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 38000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'MNG': {'country_name': 'Mongolia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 2998000, + 'urban_percent': 68, + 'national_alb': 81, + 'urban_alb': 94}, + 'MNE': {'country_name': 'Montenegro', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 627000, + 'urban_percent': 66, + 'national_alb': 97, + 'urban_alb': 98}, + 'MAR': {'country_name': 'Morocco', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 34664000, + 'urban_percent': 61, + 'national_alb': 84, + 'urban_alb': 96}, + 'MOZ': {'country_name': 'Mozambique', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 27042000, + 'urban_percent': 34, + 'national_alb': 51, + 'urban_alb': 80}, + 'MMR': {'country_name': 'Myanmar', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 52681000, + 'urban_percent': 30, + 'national_alb': 74, + 'urban_alb': 88}, + 'NAM': {'country_name': 'Namibia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2315000, + 'urban_percent': 47, + 'national_alb': 83, + 'urban_alb': 97}, + 'NRU': {'country_name': 'Nauru', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'NPL': {'country_name': 'Nepal', + 'region': 'South Asia', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 27015000, + 'urban_percent': 19, + 'national_alb': 88, + 'urban_alb': 90}, + 'NLD': {'country_name': 'Netherlands', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 16938000, + 'urban_percent': 90, + 'national_alb': 100, + 'urban_alb': 100}, + 'NZL': {'country_name': 'New Zealand', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 4615000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100}, + 'NIC': {'country_name': 'Nicaragua', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 6223000, + 'urban_percent': 58, + 'national_alb': 81, + 'urban_alb': 97}, + 'NER': {'country_name': 'Niger', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 20002000, + 'urban_percent': 16, + 'national_alb': 45, + 'urban_alb': 88}, + 'NGA': {'country_name': 'Nigeria', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 181137000, + 'urban_percent': 48, + 'national_alb': 69, + 'urban_alb': 85}, + 'MKD': {'country_name': 'North Macedonia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2079000, + 'urban_percent': 57, + 'national_alb': 97, + 'urban_alb': 97}, + 'NOR': {'country_name': 'Norway', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5200000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100}, + 'OMN': {'country_name': 'Oman', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2015, + 'pop': 4267000, + 'urban_percent': 81, + 'national_alb': 90, + 'urban_alb': 94}, + 'PAK': {'country_name': 'Pakistan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 199427000, + 'urban_percent': 36, + 'national_alb': 89, + 'urban_alb': 94}, + 'PLW': {'country_name': 'Palau', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 18000, + 'urban_percent': 78, + 'national_alb': 100, + 'urban_alb': 100}, + 'PAN': {'country_name': 'Panama', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 3968000, + 'urban_percent': 67, + 'national_alb': 93, + 'urban_alb': 98}, + 'PNG': {'country_name': 'Papua New Guinea', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 8108000, + 'urban_percent': 13, + 'national_alb': 41, + 'urban_alb': 85}, + 'PRY': {'country_name': 'Paraguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 6689000, + 'urban_percent': 61, + 'national_alb': 97, + 'urban_alb': 100}, + 'PER': {'country_name': 'Peru', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 30471000, + 'urban_percent': 77, + 'national_alb': 90, + 'urban_alb': 95}, + 'PHL': {'country_name': 'Philippines', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 102113000, + 'urban_percent': 46, + 'national_alb': 92, + 'urban_alb': 96}, + 'POL': {'country_name': 'Poland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 38034000, + 'urban_percent': 60, + 'national_alb': 100, + 'urban_alb': 100}, + 'PRT': {'country_name': 'Portugal', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10368000, + 'urban_percent': 64, + 'national_alb': 100, + 'urban_alb': 100}, + 'ROU': {'country_name': 'Romania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 19925000, + 'urban_percent': 54, + 'national_alb': 100, + 'urban_alb': 100}, + 'RUS': {'country_name': 'Russian Federation', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 144985000, + 'urban_percent': 74, + 'national_alb': 97, + 'urban_alb': 99}, + 'RWA': {'country_name': 'Rwanda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 11369000, + 'urban_percent': 17, + 'national_alb': 57, + 'urban_alb': 80}, + 'WSM': {'country_name': 'Samoa', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 194000, + 'urban_percent': 19, + 'national_alb': 91, + 'urban_alb': 91}, + 'SEN': {'country_name': 'Senegal', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 14578000, + 'urban_percent': 46, + 'national_alb': 79, + 'urban_alb': 94}, + 'SRB': {'country_name': 'Serbia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 8877000, + 'urban_percent': 56, + 'national_alb': 93, + 'urban_alb': 92}, + 'SLE': {'country_name': 'Sierra Leone', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 7172000, + 'urban_percent': 41, + 'national_alb': 58, + 'urban_alb': 76}, + 'SGP': {'country_name': 'Singapore', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5592000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'SLB': {'country_name': 'Solomon Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 603000, + 'urban_percent': 22, + 'national_alb': 69, + 'urban_alb': 91}, + 'SOM': {'country_name': 'Somalia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 13797000, + 'urban_percent': 43, + 'national_alb': 49, + 'urban_alb': 74}, + 'ZAF': {'country_name': 'South Africa', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 55386000, + 'urban_percent': 65, + 'national_alb': 92, + 'urban_alb': 99}, + 'SSD': {'country_name': 'South Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10716000, + 'urban_percent': 19, + 'national_alb': 41, + 'urban_alb': 61}, + 'ESP': {'country_name': 'Spain', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 46672000, + 'urban_percent': 80, + 'national_alb': 100, + 'urban_alb': 100}, + 'LKA': {'country_name': 'Sri Lanka', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 20908000, + 'urban_percent': 18, + 'national_alb': 90, + 'urban_alb': 98}, + 'SDN': {'country_name': 'Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 38903000, + 'urban_percent': 34, + 'national_alb': 59, + 'urban_alb': 73}, + 'SUR': {'country_name': 'Suriname', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 559000, + 'urban_percent': 66, + 'national_alb': 96, + 'urban_alb': 98}, + 'SWE': {'country_name': 'Sweden', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 9765000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100}, + 'CHE': {'country_name': 'Switzerland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 8297000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100}, + 'SYR': {'country_name': 'Syrian Arab Republic', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 17997000, + 'urban_percent': 52, + 'national_alb': 94, + 'urban_alb': 95}, + 'TJK': {'country_name': 'Tajikistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 8454000, + 'urban_percent': 27, + 'national_alb': 76, + 'urban_alb': 95}, + 'THA': {'country_name': 'Thailand', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 68715000, + 'urban_percent': 48, + 'national_alb': 100, + 'urban_alb': 100}, + 'TLS': {'country_name': 'Timor-Leste', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 1196000, + 'urban_percent': 29, + 'national_alb': 75, + 'urban_alb': 90}, + 'TGO': {'country_name': 'Togo', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 7323000, + 'urban_percent': 40, + 'national_alb': 64, + 'urban_alb': 88}, + 'TON': {'country_name': 'Tonga', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 101000, + 'urban_percent': 23, + 'national_alb': 99, + 'urban_alb': 100}, + 'TUN': {'country_name': 'Tunisia', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 11180000, + 'urban_percent': 68, + 'national_alb': 95, + 'urban_alb': 100}, + 'TKM': {'country_name': 'Turkmenistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 5565000, + 'urban_percent': 50, + 'national_alb': 98, + 'urban_alb': 100}, + 'TUV': {'country_name': 'Tuvalu', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 11000, + 'urban_percent': 60, + 'national_alb': 100, + 'urban_alb': 100}, + 'UGA': {'country_name': 'Uganda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 38225000, + 'urban_percent': 22, + 'national_alb': 48, + 'urban_alb': 77}, + 'UKR': {'country_name': 'Ukraine', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 44922000, + 'urban_percent': 69, + 'national_alb': 94, + 'urban_alb': 92}, + 'GBR': {'country_name': 'United Kingdom', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 65860000, + 'urban_percent': 83, + 'national_alb': 100, + 'urban_alb': 100}, + 'USA': {'country_name': 'United States of America', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2015, + 'pop': 320878000, + 'urban_percent': 82, + 'national_alb': 100, + 'urban_alb': 100}, + 'URY': {'country_name': 'Uruguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2015, + 'pop': 3412000, + 'urban_percent': 95, + 'national_alb': 100, + 'urban_alb': 100}, + 'UZB': {'country_name': 'Uzbekistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 30930000, + 'urban_percent': 51, + 'national_alb': 98, + 'urban_alb': 100}, + 'VUT': {'country_name': 'Vanuatu', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 271000, + 'urban_percent': 25, + 'national_alb': 90, + 'urban_alb': 100}, + 'VNM': {'country_name': 'Vietnam', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 92677000, + 'urban_percent': 34, + 'national_alb': 93, + 'urban_alb': 98}, + 'ZMB': {'country_name': 'Zambia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 15879000, + 'urban_percent': 42, + 'national_alb': 61, + 'urban_alb': 86}, + 'ZWE': {'country_name': 'Zimbabwe', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 13815000, + 'urban_percent': 32, + 'national_alb': 65, + 'urban_alb': 94}}), + "dict_2020_test": (TEXT_FORMAT_DICT, {'AFG': {'country_name': 'Afghanistan', + 'region': 'South Asia', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 38928000, + 'urban_percent': 26, + 'national_alb': 75, + 'urban_alb': 100}, + 'ALB': {'country_name': 'Albania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2878000, + 'urban_percent': 62, + 'national_alb': 95, + 'urban_alb': 96}, + 'DZA': {'country_name': 'Algeria', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 43851000, + 'urban_percent': 74, + 'national_alb': 94, + 'urban_alb': 96}, + 'AND': {'country_name': 'Andorra', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 77000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100}, + 'AGO': {'country_name': 'Angola', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 32866000, + 'urban_percent': 67, + 'national_alb': 57, + 'urban_alb': 72}, + 'ARM': {'country_name': 'Armenia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2963000, + 'urban_percent': 63, + 'national_alb': 100, + 'urban_alb': 100}, + 'AUS': {'country_name': 'Australia', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 25500000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100}, + 'AUT': {'country_name': 'Austria', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 9006000, + 'urban_percent': 59, + 'national_alb': 100, + 'urban_alb': 100}, + 'AZE': {'country_name': 'Azerbaijan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 10139000, + 'urban_percent': 56, + 'national_alb': 96, + 'urban_alb': 100}, + 'BGD': {'country_name': 'Bangladesh', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 164689000, + 'urban_percent': 38, + 'national_alb': 98, + 'urban_alb': 97}, + 'BLR': {'country_name': 'Belarus', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 9449000, + 'urban_percent': 79, + 'national_alb': 96, + 'urban_alb': 96}, + 'BEL': {'country_name': 'Belgium', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 11590000, + 'urban_percent': 98, + 'national_alb': 100, + 'urban_alb': 100}, + 'BLZ': {'country_name': 'Belize', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 398000, + 'urban_percent': 46, + 'national_alb': 98, + 'urban_alb': 99}, + 'BEN': {'country_name': 'Benin', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 12123000, + 'urban_percent': 48, + 'national_alb': 65, + 'urban_alb': 73}, + 'BMU': {'country_name': 'Bermuda', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2020, + 'pop': 62000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'BTN': {'country_name': 'Bhutan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 772000, + 'urban_percent': 42, + 'national_alb': 97, + 'urban_alb': 98}, + 'BIH': {'country_name': 'Bosnia and Herzegovina', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 3281000, + 'urban_percent': 49, + 'national_alb': 96, + 'urban_alb': 95}, + 'BWA': {'country_name': 'Botswana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2352000, + 'urban_percent': 71, + 'national_alb': 92, + 'urban_alb': 98}, + 'BRA': {'country_name': 'Brazil', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 212559000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100}, + 'BRN': {'country_name': 'Brunei Darussalam', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 437000, + 'urban_percent': 78, + 'national_alb': 100, + 'urban_alb': 100}, + 'BGR': {'country_name': 'Bulgaria', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 6948000, + 'urban_percent': 76, + 'national_alb': 100, + 'urban_alb': 100}, + 'BFA': {'country_name': 'Burkina Faso', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 20903000, + 'urban_percent': 31, + 'national_alb': 47, + 'urban_alb': 80}, + 'BDI': {'country_name': 'Burundi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 11891000, + 'urban_percent': 14, + 'national_alb': 62, + 'urban_alb': 91}, + 'CPV': {'country_name': 'Cabo Verde', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 556000, + 'urban_percent': 67, + 'national_alb': 89, + 'urban_alb': 93}, + 'KHM': {'country_name': 'Cambodia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 16719000, + 'urban_percent': 24, + 'national_alb': 71, + 'urban_alb': 90}, + 'CMR': {'country_name': 'Cameroon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 26546000, + 'urban_percent': 58, + 'national_alb': 66, + 'urban_alb': 82}, + 'CAN': {'country_name': 'Canada', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2020, + 'pop': 37742000, + 'urban_percent': 82, + 'national_alb': 100, + 'urban_alb': 100}, + 'CAF': {'country_name': 'Central African Republic', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 4830000, + 'urban_percent': 42, + 'national_alb': 37, + 'urban_alb': 50}, + 'TCD': {'country_name': 'Chad', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 16426000, + 'urban_percent': 24, + 'national_alb': 46, + 'urban_alb': 74}, + 'CHL': {'country_name': 'Chile', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2020, + 'pop': 19116000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100}, + 'CHN': {'country_name': 'China', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 1463141000, + 'urban_percent': 62, + 'national_alb': 94, + 'urban_alb': 97}, + 'COL': {'country_name': 'Colombia', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 50883000, + 'urban_percent': 81, + 'national_alb': 97, + 'urban_alb': 100}, + 'CRI': {'country_name': 'Costa Rica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 5094000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100}, + 'CIV': {'country_name': "Côte d'Ivoire", + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 26378000, + 'urban_percent': 52, + 'national_alb': 71, + 'urban_alb': 85}, + 'CUB': {'country_name': 'Cuba', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 11327000, + 'urban_percent': 77, + 'national_alb': 97, + 'urban_alb': 98}, + 'CYP': {'country_name': 'Cyprus', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 1207000, + 'urban_percent': 67, + 'national_alb': 100, + 'urban_alb': 100}, + 'CZE': {'country_name': 'Czech Republic', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10709000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100}, + 'DNK': {'country_name': 'Denmark', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5792000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100}, + 'DJI': {'country_name': 'Djibouti', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 988000, + 'urban_percent': 78, + 'national_alb': 76, + 'urban_alb': 84}, + 'DOM': {'country_name': 'Dominican Republic', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 10848000, + 'urban_percent': 83, + 'national_alb': 97, + 'urban_alb': 98}, + 'ECU': {'country_name': 'Ecuador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 17643000, + 'urban_percent': 64, + 'national_alb': 95, + 'urban_alb': 100}, + 'SLV': {'country_name': 'El Salvador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 6486000, + 'urban_percent': 73, + 'national_alb': 98, + 'urban_alb': 100}, + 'EST': {'country_name': 'Estonia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 1327000, + 'urban_percent': 69, + 'national_alb': 100, + 'urban_alb': 100}, + 'SWZ': {'country_name': 'Eswatini', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 1160000, + 'urban_percent': 24, + 'national_alb': 71, + 'urban_alb': 97}, + 'ETH': {'country_name': 'Ethiopia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 114964000, + 'urban_percent': 22, + 'national_alb': 50, + 'urban_alb': 84}, + 'FJI': {'country_name': 'Fiji', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 896000, + 'urban_percent': 57, + 'national_alb': 94, + 'urban_alb': 98}, + 'FIN': {'country_name': 'Finland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5541000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100}, + 'FRA': {'country_name': 'France', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 65274000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100}, + 'GAB': {'country_name': 'Gabon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2226000, + 'urban_percent': 90, + 'national_alb': 85, + 'urban_alb': 90}, + 'GEO': {'country_name': 'Georgia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 3989000, + 'urban_percent': 59, + 'national_alb': 97, + 'urban_alb': 100}, + 'DEU': {'country_name': 'Germany', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 83784000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100}, + 'GHA': {'country_name': 'Ghana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 31073000, + 'urban_percent': 57, + 'national_alb': 86, + 'urban_alb': 96}, + 'GIB': {'country_name': 'Gibraltar', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 34000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'GRC': {'country_name': 'Greece', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10423000, + 'urban_percent': 80, + 'national_alb': 100, + 'urban_alb': 100}, + 'GRL': {'country_name': 'Greenland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 57000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100}, + 'GTM': {'country_name': 'Guatemala', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 17916000, + 'urban_percent': 52, + 'national_alb': 94, + 'urban_alb': 98}, + 'GIN': {'country_name': 'Guinea', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 13133000, + 'urban_percent': 37, + 'national_alb': 64, + 'urban_alb': 87}, + 'GNB': {'country_name': 'Guinea-Bissau', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 1968000, + 'urban_percent': 44, + 'national_alb': 59, + 'urban_alb': 71}, + 'GUY': {'country_name': 'Guyana', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 787000, + 'urban_percent': 27, + 'national_alb': 96, + 'urban_alb': 100}, + 'HTI': {'country_name': 'Haiti', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 11403000, + 'urban_percent': 57, + 'national_alb': 67, + 'urban_alb': 85}, + 'HND': {'country_name': 'Honduras', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 9905000, + 'urban_percent': 58, + 'national_alb': 96, + 'urban_alb': 100}, + 'HUN': {'country_name': 'Hungary', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 9660000, + 'urban_percent': 72, + 'national_alb': 100, + 'urban_alb': 100}, + 'ISL': {'country_name': 'Iceland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 341000, + 'urban_percent': 94, + 'national_alb': 100, + 'urban_alb': 100}, + 'IND': {'country_name': 'India', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 1380004000, + 'urban_percent': 35, + 'national_alb': 90, + 'urban_alb': 94}, + 'IDN': {'country_name': 'Indonesia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 273524000, + 'urban_percent': 57, + 'national_alb': 92, + 'urban_alb': 98}, + 'IRQ': {'country_name': 'Iraq', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 40223000, + 'urban_percent': 71, + 'national_alb': 98, + 'urban_alb': 100}, + 'IRL': {'country_name': 'Ireland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 4938000, + 'urban_percent': 64, + 'national_alb': 97, + 'urban_alb': 97}, + 'ISR': {'country_name': 'Israel', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2020, + 'pop': 8656000, + 'urban_percent': 93, + 'national_alb': 100, + 'urban_alb': 100}, + 'JAM': {'country_name': 'Jamaica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2961000, + 'urban_percent': 56, + 'national_alb': 91, + 'urban_alb': 95}, + 'JOR': {'country_name': 'Jordan', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 10203000, + 'urban_percent': 91, + 'national_alb': 99, + 'urban_alb': 100}, + 'KAZ': {'country_name': 'Kazakhstan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 18777000, + 'urban_percent': 58, + 'national_alb': 95, + 'urban_alb': 98}, + 'KEN': {'country_name': 'Kenya', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 53771000, + 'urban_percent': 28, + 'national_alb': 62, + 'urban_alb': 87}, + 'KIR': {'country_name': 'Kiribati', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 119000, + 'urban_percent': 56, + 'national_alb': 78, + 'urban_alb': 92}, + 'LVA': {'country_name': 'Latvia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 1886000, + 'urban_percent': 68, + 'national_alb': 99, + 'urban_alb': 99}, + 'LSO': {'country_name': 'Lesotho', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 2142000, + 'urban_percent': 29, + 'national_alb': 72, + 'urban_alb': 93}, + 'LBR': {'country_name': 'Liberia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 5058000, + 'urban_percent': 52, + 'national_alb': 75, + 'urban_alb': 86}, + 'LTU': {'country_name': 'Lithuania', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 2722000, + 'urban_percent': 68, + 'national_alb': 98, + 'urban_alb': 100}, + 'LUX': {'country_name': 'Luxembourg', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 626000, + 'urban_percent': 91, + 'national_alb': 100, + 'urban_alb': 100}, + 'MDG': {'country_name': 'Madagascar', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 27691000, + 'urban_percent': 39, + 'national_alb': 53, + 'urban_alb': 80}, + 'MWI': {'country_name': 'Malawi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 19130000, + 'urban_percent': 17, + 'national_alb': 70, + 'urban_alb': 86}, + 'MYS': {'country_name': 'Malaysia', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 32366000, + 'urban_percent': 77, + 'national_alb': 97, + 'urban_alb': 100}, + 'MDV': {'country_name': 'Maldives', + 'region': 'South Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 541000, + 'urban_percent': 41, + 'national_alb': 100, + 'urban_alb': 100}, + 'MLI': {'country_name': 'Mali', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 20251000, + 'urban_percent': 44, + 'national_alb': 83, + 'urban_alb': 96}, + 'MLT': {'country_name': 'Malta', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2020, + 'pop': 442000, + 'urban_percent': 95, + 'national_alb': 100, + 'urban_alb': 100}, + 'MHL': {'country_name': 'Marshall Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 59000, + 'urban_percent': 78, + 'national_alb': 89, + 'urban_alb': 87}, + 'MRT': {'country_name': 'Mauritania', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 4650000, + 'urban_percent': 55, + 'national_alb': 72, + 'urban_alb': 89}, + 'MUS': {'country_name': 'Mauritius', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 1272000, + 'urban_percent': 41, + 'national_alb': 100, + 'urban_alb': 100}, + 'MEX': {'country_name': 'Mexico', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 128933000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100}, + 'MCO': {'country_name': 'Monaco', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 39000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'MNG': {'country_name': 'Mongolia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 3278000, + 'urban_percent': 69, + 'national_alb': 85, + 'urban_alb': 97}, + 'MNE': {'country_name': 'Montenegro', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 628000, + 'urban_percent': 67, + 'national_alb': 99, + 'urban_alb': 100}, + 'MAR': {'country_name': 'Morocco', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 36911000, + 'urban_percent': 64, + 'national_alb': 90, + 'urban_alb': 98}, + 'MOZ': {'country_name': 'Mozambique', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 31255000, + 'urban_percent': 37, + 'national_alb': 63, + 'urban_alb': 88}, + 'MMR': {'country_name': 'Myanmar', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 54410000, + 'urban_percent': 31, + 'national_alb': 84, + 'urban_alb': 95}, + 'NAM': {'country_name': 'Namibia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2541000, + 'urban_percent': 52, + 'national_alb': 84, + 'urban_alb': 96}, + 'NRU': {'country_name': 'Nauru', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 11000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'NPL': {'country_name': 'Nepal', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 29137000, + 'urban_percent': 21, + 'national_alb': 90, + 'urban_alb': 90}, + 'NLD': {'country_name': 'Netherlands', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 17135000, + 'urban_percent': 92, + 'national_alb': 100, + 'urban_alb': 100}, + 'NZL': {'country_name': 'New Zealand', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 4822000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100}, + 'NIC': {'country_name': 'Nicaragua', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 6625000, + 'urban_percent': 59, + 'national_alb': 82, + 'urban_alb': 97}, + 'NER': {'country_name': 'Niger', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 24207000, + 'urban_percent': 17, + 'national_alb': 47, + 'urban_alb': 86}, + 'NGA': {'country_name': 'Nigeria', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 206140000, + 'urban_percent': 52, + 'national_alb': 78, + 'urban_alb': 92}, + 'MKD': {'country_name': 'North Macedonia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2083000, + 'urban_percent': 58, + 'national_alb': 98, + 'urban_alb': 98}, + 'NOR': {'country_name': 'Norway', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5421000, + 'urban_percent': 83, + 'national_alb': 100, + 'urban_alb': 100}, + 'OMN': {'country_name': 'Oman', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5107000, + 'urban_percent': 86, + 'national_alb': 92, + 'urban_alb': 95}, + 'PAK': {'country_name': 'Pakistan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 220892000, + 'urban_percent': 37, + 'national_alb': 90, + 'urban_alb': 93}, + 'PLW': {'country_name': 'Palau', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 18000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100}, + 'PAN': {'country_name': 'Panama', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 4315000, + 'urban_percent': 68, + 'national_alb': 94, + 'urban_alb': 98}, + 'PNG': {'country_name': 'Papua New Guinea', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 8947000, + 'urban_percent': 13, + 'national_alb': 45, + 'urban_alb': 86}, + 'PRY': {'country_name': 'Paraguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 7133000, + 'urban_percent': 62, + 'national_alb': 100, + 'urban_alb': 100}, + 'PER': {'country_name': 'Peru', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 32972000, + 'urban_percent': 78, + 'national_alb': 93, + 'urban_alb': 97}, + 'PHL': {'country_name': 'Philippines', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 109581000, + 'urban_percent': 47, + 'national_alb': 94, + 'urban_alb': 97}, + 'POL': {'country_name': 'Poland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 37847000, + 'urban_percent': 60, + 'national_alb': 100, + 'urban_alb': 100}, + 'PRT': {'country_name': 'Portugal', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10197000, + 'urban_percent': 66, + 'national_alb': 100, + 'urban_alb': 100}, + 'ROU': {'country_name': 'Romania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 19238000, + 'urban_percent': 54, + 'national_alb': 100, + 'urban_alb': 100}, + 'RUS': {'country_name': 'Russian Federation', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 145934000, + 'urban_percent': 75, + 'national_alb': 97, + 'urban_alb': 99}, + 'RWA': {'country_name': 'Rwanda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 12952000, + 'urban_percent': 17, + 'national_alb': 60, + 'urban_alb': 83}, + 'WSM': {'country_name': 'Samoa', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 198000, + 'urban_percent': 18, + 'national_alb': 92, + 'urban_alb': 92}, + 'SEN': {'country_name': 'Senegal', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 16744000, + 'urban_percent': 48, + 'national_alb': 85, + 'urban_alb': 95}, + 'SRB': {'country_name': 'Serbia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 8737000, + 'urban_percent': 56, + 'national_alb': 95, + 'urban_alb': 95}, + 'SLE': {'country_name': 'Sierra Leone', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 7977000, + 'urban_percent': 43, + 'national_alb': 64, + 'urban_alb': 78}, + 'SGP': {'country_name': 'Singapore', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5850000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100}, + 'SLB': {'country_name': 'Solomon Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 687000, + 'urban_percent': 25, + 'national_alb': 67, + 'urban_alb': 91}, + 'SOM': {'country_name': 'Somalia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 15893000, + 'urban_percent': 46, + 'national_alb': 56, + 'urban_alb': 79}, + 'ZAF': {'country_name': 'South Africa', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 59309000, + 'urban_percent': 67, + 'national_alb': 94, + 'urban_alb': 100}, + 'SSD': {'country_name': 'South Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 11194000, + 'urban_percent': 20, + 'national_alb': 41, + 'urban_alb': 70}, + 'ESP': {'country_name': 'Spain', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 46755000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100}, + 'LKA': {'country_name': 'Sri Lanka', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 21413000, + 'urban_percent': 19, + 'national_alb': 92, + 'urban_alb': 100}, + 'SDN': {'country_name': 'Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 43849000, + 'urban_percent': 35, + 'national_alb': 60, + 'urban_alb': 74}, + 'SUR': {'country_name': 'Suriname', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 587000, + 'urban_percent': 66, + 'national_alb': 98, + 'urban_alb': 99}, + 'SWE': {'country_name': 'Sweden', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10099000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100}, + 'CHE': {'country_name': 'Switzerland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 8655000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100}, + 'SYR': {'country_name': 'Syrian Arab Republic', + 'region': 'Middle East & North Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 17501000, + 'urban_percent': 55, + 'national_alb': 94, + 'urban_alb': 95}, + 'TJK': {'country_name': 'Tajikistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 9538000, + 'urban_percent': 28, + 'national_alb': 82, + 'urban_alb': 96}, + 'THA': {'country_name': 'Thailand', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 69800000, + 'urban_percent': 51, + 'national_alb': 100, + 'urban_alb': 100}, + 'TLS': {'country_name': 'Timor-Leste', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 1318000, + 'urban_percent': 31, + 'national_alb': 85, + 'urban_alb': 96}, + 'TGO': {'country_name': 'Togo', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 8279000, + 'urban_percent': 43, + 'national_alb': 69, + 'urban_alb': 91}, + 'TON': {'country_name': 'Tonga', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 106000, + 'urban_percent': 23, + 'national_alb': 99, + 'urban_alb': 100}, + 'TUN': {'country_name': 'Tunisia', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 11819000, + 'urban_percent': 70, + 'national_alb': 98, + 'urban_alb': 100}, + 'TKM': {'country_name': 'Turkmenistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 6031000, + 'urban_percent': 53, + 'national_alb': 100, + 'urban_alb': 100}, + 'TUV': {'country_name': 'Tuvalu', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 12000, + 'urban_percent': 64, + 'national_alb': 100, + 'urban_alb': 100}, + 'UGA': {'country_name': 'Uganda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 45741000, + 'urban_percent': 25, + 'national_alb': 56, + 'urban_alb': 79}, + 'UKR': {'country_name': 'Ukraine', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 43734000, + 'urban_percent': 69, + 'national_alb': 94, + 'urban_alb': 92}, + 'GBR': {'country_name': 'United Kingdom', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 67886000, + 'urban_percent': 84, + 'national_alb': 100, + 'urban_alb': 100}, + 'USA': {'country_name': 'United States of America', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2020, + 'pop': 331003000, + 'urban_percent': 83, + 'national_alb': 100, + 'urban_alb': 100}, + 'URY': {'country_name': 'Uruguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2020, + 'pop': 3474000, + 'urban_percent': 96, + 'national_alb': 100, + 'urban_alb': 100}, + 'UZB': {'country_name': 'Uzbekistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 33469000, + 'urban_percent': 50, + 'national_alb': 98, + 'urban_alb': 100}, + 'VUT': {'country_name': 'Vanuatu', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 307000, + 'urban_percent': 26, + 'national_alb': 91, + 'urban_alb': 100}, + 'VNM': {'country_name': 'Vietnam', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 97339000, + 'urban_percent': 37, + 'national_alb': 97, + 'urban_alb': 100}, + 'ZMB': {'country_name': 'Zambia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 18384000, + 'urban_percent': 45, + 'national_alb': 65, + 'urban_alb': 87}, + 'ZWE': {'country_name': 'Zimbabwe', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 14863000, + 'urban_percent': 32, + 'national_alb': 63, + 'urban_alb': 93}}), + "10": (TEXT_FORMAT_DICT, {'country_name': 'China', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 1463141000, + 'urban_percent': 62, + 'national_alb': 94, + 'urban_alb': 97}), + "11": (TEXT_FORMAT, 88), + "12": (TEXT_FORMAT, 60000), + "13": (TEXT_FORMAT_DICT, {'Low income': 514021000, + 'Upper middle income': 2430080000, + 'Lower middle income': 3045857000, + 'High income': 871268000}), + "14": (TEXT_FORMAT_DICT, {'Low income': 302975040, + 'Upper middle income': 2321860110, + 'Lower middle income': 2687761440, + 'High income': 870638000}), + "15": (TEXT_FORMAT_DICT, {'Low income': 59, + 'Upper middle income': 96, + 'Lower middle income': 88, + 'High income': 100}), + "dict_2015_rural_alb_test": (TEXT_FORMAT_DICT, {'AFG': {'country_name': 'Afghanistan', + 'region': 'South Asia', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 34414000, + 'urban_percent': 25, + 'national_alb': 61, + 'urban_alb': 87, + 'rural_alb': 52}, + 'ALB': {'country_name': 'Albania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2891000, + 'urban_percent': 57, + 'national_alb': 93, + 'urban_alb': 95, + 'rural_alb': 90}, + 'DZA': {'country_name': 'Algeria', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 39728000, + 'urban_percent': 71, + 'national_alb': 93, + 'urban_alb': 95, + 'rural_alb': 88}, + 'AND': {'country_name': 'Andorra', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 78000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AGO': {'country_name': 'Angola', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 27884000, + 'urban_percent': 63, + 'national_alb': 54, + 'urban_alb': 70, + 'rural_alb': 27}, + 'ARM': {'country_name': 'Armenia', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 2926000, + 'urban_percent': 63, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AUS': {'country_name': 'Australia', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 23932000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AUT': {'country_name': 'Austria', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 8679000, + 'urban_percent': 58, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AZE': {'country_name': 'Azerbaijan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 9623000, + 'urban_percent': 55, + 'national_alb': 92, + 'urban_alb': 100, + 'rural_alb': 82}, + 'BGD': {'country_name': 'Bangladesh', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 156256000, + 'urban_percent': 34, + 'national_alb': 97, + 'urban_alb': 98, + 'rural_alb': 96}, + 'BLR': {'country_name': 'Belarus', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 9439000, + 'urban_percent': 77, + 'national_alb': 96, + 'urban_alb': 96, + 'rural_alb': 96}, + 'BEL': {'country_name': 'Belgium', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 11288000, + 'urban_percent': 98, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BLZ': {'country_name': 'Belize', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 361000, + 'urban_percent': 45, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 95}, + 'BEN': {'country_name': 'Benin', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10576000, + 'urban_percent': 46, + 'national_alb': 65, + 'urban_alb': 74, + 'rural_alb': 57}, + 'BMU': {'country_name': 'Bermuda', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2015, + 'pop': 64000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BTN': {'country_name': 'Bhutan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 728000, + 'urban_percent': 39, + 'national_alb': 96, + 'urban_alb': 98, + 'rural_alb': 95}, + 'BIH': {'country_name': 'Bosnia and Herzegovina', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 3429000, + 'urban_percent': 47, + 'national_alb': 96, + 'urban_alb': 95, + 'rural_alb': 97}, + 'BWA': {'country_name': 'Botswana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2121000, + 'urban_percent': 67, + 'national_alb': 88, + 'urban_alb': 97, + 'rural_alb': 70}, + 'BRA': {'country_name': 'Brazil', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 204472000, + 'urban_percent': 86, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 86}, + 'BRN': {'country_name': 'Brunei Darussalam', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 415000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BGR': {'country_name': 'Bulgaria', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 7200000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BFA': {'country_name': 'Burkina Faso', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 18111000, + 'urban_percent': 28, + 'national_alb': 50, + 'urban_alb': 80, + 'rural_alb': 38}, + 'BDI': {'country_name': 'Burundi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10160000, + 'urban_percent': 12, + 'national_alb': 60, + 'urban_alb': 89, + 'rural_alb': 56}, + 'CPV': {'country_name': 'Cabo Verde', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 525000, + 'urban_percent': 64, + 'national_alb': 85, + 'urban_alb': 92, + 'rural_alb': 73}, + 'KHM': {'country_name': 'Cambodia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 15521000, + 'urban_percent': 22, + 'national_alb': 68, + 'urban_alb': 89, + 'rural_alb': 62}, + 'CMR': {'country_name': 'Cameroon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 23298000, + 'urban_percent': 55, + 'national_alb': 64, + 'urban_alb': 82, + 'rural_alb': 42}, + 'CAN': {'country_name': 'Canada', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2015, + 'pop': 36027000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CAF': {'country_name': 'Central African Republic', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 4493000, + 'urban_percent': 40, + 'national_alb': 42, + 'urban_alb': 58, + 'rural_alb': 31}, + 'TCD': {'country_name': 'Chad', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 14111000, + 'urban_percent': 23, + 'national_alb': 44, + 'urban_alb': 75, + 'rural_alb': 35}, + 'CHL': {'country_name': 'Chile', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2015, + 'pop': 17969000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CHN': {'country_name': 'China', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 1430405000, + 'urban_percent': 56, + 'national_alb': 92, + 'urban_alb': 98, + 'rural_alb': 84}, + 'COL': {'country_name': 'Colombia', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 47521000, + 'urban_percent': 80, + 'national_alb': 96, + 'urban_alb': 100, + 'rural_alb': 80}, + 'CRI': {'country_name': 'Costa Rica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 4848000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CIV': {'country_name': "Côte d'Ivoire", + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 23226000, + 'urban_percent': 49, + 'national_alb': 71, + 'urban_alb': 87, + 'rural_alb': 56}, + 'CUB': {'country_name': 'Cuba', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 11325000, + 'urban_percent': 77, + 'national_alb': 96, + 'urban_alb': 98, + 'rural_alb': 89}, + 'CYP': {'country_name': 'Cyprus', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 1161000, + 'urban_percent': 67, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CZE': {'country_name': 'Czech Republic', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10601000, + 'urban_percent': 73, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'DNK': {'country_name': 'Denmark', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5689000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'DJI': {'country_name': 'Djibouti', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 914000, + 'urban_percent': 77, + 'national_alb': 76, + 'urban_alb': 84, + 'rural_alb': 49}, + 'DOM': {'country_name': 'Dominican Republic', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 10282000, + 'urban_percent': 79, + 'national_alb': 96, + 'urban_alb': 98, + 'rural_alb': 88}, + 'ECU': {'country_name': 'Ecuador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 16212000, + 'urban_percent': 63, + 'national_alb': 93, + 'urban_alb': 100, + 'rural_alb': 81}, + 'SLV': {'country_name': 'El Salvador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 6325000, + 'urban_percent': 70, + 'national_alb': 96, + 'urban_alb': 99, + 'rural_alb': 89}, + 'EST': {'country_name': 'Estonia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 1315000, + 'urban_percent': 68, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'SWZ': {'country_name': 'Eswatini', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 1104000, + 'urban_percent': 23, + 'national_alb': 67, + 'urban_alb': 95, + 'rural_alb': 59}, + 'ETH': {'country_name': 'Ethiopia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 100835000, + 'urban_percent': 19, + 'national_alb': 42, + 'urban_alb': 82, + 'rural_alb': 33}, + 'FJI': {'country_name': 'Fiji', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 869000, + 'urban_percent': 55, + 'national_alb': 94, + 'urban_alb': 98, + 'rural_alb': 89}, + 'FIN': {'country_name': 'Finland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5481000, + 'urban_percent': 85, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'FRA': {'country_name': 'France', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 64453000, + 'urban_percent': 80, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GAB': {'country_name': 'Gabon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 1948000, + 'urban_percent': 88, + 'national_alb': 84, + 'urban_alb': 89, + 'rural_alb': 47}, + 'GEO': {'country_name': 'Georgia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 4024000, + 'urban_percent': 57, + 'national_alb': 96, + 'urban_alb': 100, + 'rural_alb': 91}, + 'DEU': {'country_name': 'Germany', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 81787000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GHA': {'country_name': 'Ghana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 27849000, + 'urban_percent': 54, + 'national_alb': 80, + 'urban_alb': 91, + 'rural_alb': 67}, + 'GIB': {'country_name': 'Gibraltar', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 34000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GRC': {'country_name': 'Greece', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10660000, + 'urban_percent': 78, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GRL': {'country_name': 'Greenland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 56000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GTM': {'country_name': 'Guatemala', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 16252000, + 'urban_percent': 50, + 'national_alb': 92, + 'urban_alb': 97, + 'rural_alb': 87}, + 'GIN': {'country_name': 'Guinea', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 11432000, + 'urban_percent': 35, + 'national_alb': 64, + 'urban_alb': 85, + 'rural_alb': 53}, + 'GNB': {'country_name': 'Guinea-Bissau', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 1737000, + 'urban_percent': 42, + 'national_alb': 59, + 'urban_alb': 73, + 'rural_alb': 49}, + 'GUY': {'country_name': 'Guyana', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 767000, + 'urban_percent': 26, + 'national_alb': 95, + 'urban_alb': 100, + 'rural_alb': 93}, + 'HTI': {'country_name': 'Haiti', + 'region': 'Latin America & Caribbean', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10696000, + 'urban_percent': 52, + 'national_alb': 65, + 'urban_alb': 85, + 'rural_alb': 43}, + 'HND': {'country_name': 'Honduras', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 9113000, + 'urban_percent': 55, + 'national_alb': 93, + 'urban_alb': 99, + 'rural_alb': 86}, + 'HUN': {'country_name': 'Hungary', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 9778000, + 'urban_percent': 71, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'ISL': {'country_name': 'Iceland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 330000, + 'urban_percent': 94, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'IND': {'country_name': 'India', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 1310152000, + 'urban_percent': 33, + 'national_alb': 88, + 'urban_alb': 93, + 'rural_alb': 86}, + 'IDN': {'country_name': 'Indonesia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 258383000, + 'urban_percent': 53, + 'national_alb': 89, + 'urban_alb': 95, + 'rural_alb': 82}, + 'IRQ': {'country_name': 'Iraq', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 35572000, + 'urban_percent': 70, + 'national_alb': 94, + 'urban_alb': 98, + 'rural_alb': 85}, + 'IRL': {'country_name': 'Ireland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 4652000, + 'urban_percent': 63, + 'national_alb': 97, + 'urban_alb': 97, + 'rural_alb': 97}, + 'ISR': {'country_name': 'Israel', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2015, + 'pop': 7978000, + 'urban_percent': 92, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'JAM': {'country_name': 'Jamaica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2891000, + 'urban_percent': 55, + 'national_alb': 90, + 'urban_alb': 95, + 'rural_alb': 84}, + 'JOR': {'country_name': 'Jordan', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 9267000, + 'urban_percent': 90, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'KAZ': {'country_name': 'Kazakhstan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 17572000, + 'urban_percent': 57, + 'national_alb': 95, + 'urban_alb': 98, + 'rural_alb': 91}, + 'KEN': {'country_name': 'Kenya', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 47878000, + 'urban_percent': 26, + 'national_alb': 58, + 'urban_alb': 87, + 'rural_alb': 48}, + 'KIR': {'country_name': 'Kiribati', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 111000, + 'urban_percent': 52, + 'national_alb': 74, + 'urban_alb': 89, + 'rural_alb': 58}, + 'LVA': {'country_name': 'Latvia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 1998000, + 'urban_percent': 68, + 'national_alb': 99, + 'urban_alb': 99, + 'rural_alb': 99}, + 'LSO': {'country_name': 'Lesotho', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 2059000, + 'urban_percent': 27, + 'national_alb': 71, + 'urban_alb': 90, + 'rural_alb': 64}, + 'LBR': {'country_name': 'Liberia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 4472000, + 'urban_percent': 50, + 'national_alb': 73, + 'urban_alb': 84, + 'rural_alb': 62}, + 'LTU': {'country_name': 'Lithuania', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 2932000, + 'urban_percent': 67, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 91}, + 'LUX': {'country_name': 'Luxembourg', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 567000, + 'urban_percent': 90, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MDG': {'country_name': 'Madagascar', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 24234000, + 'urban_percent': 35, + 'national_alb': 49, + 'urban_alb': 78, + 'rural_alb': 33}, + 'MWI': {'country_name': 'Malawi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 16745000, + 'urban_percent': 16, + 'national_alb': 66, + 'urban_alb': 86, + 'rural_alb': 62}, + 'MYS': {'country_name': 'Malaysia', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 30271000, + 'urban_percent': 74, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 88}, + 'MDV': {'country_name': 'Maldives', + 'region': 'South Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 455000, + 'urban_percent': 39, + 'national_alb': 99, + 'urban_alb': 99, + 'rural_alb': 99}, + 'MLI': {'country_name': 'Mali', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 17439000, + 'urban_percent': 40, + 'national_alb': 74, + 'urban_alb': 91, + 'rural_alb': 63}, + 'MLT': {'country_name': 'Malta', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2015, + 'pop': 434000, + 'urban_percent': 94, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MHL': {'country_name': 'Marshall Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 57000, + 'urban_percent': 76, + 'national_alb': 88, + 'urban_alb': 86, + 'rural_alb': 94}, + 'MRT': {'country_name': 'Mauritania', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 4046000, + 'urban_percent': 51, + 'national_alb': 67, + 'urban_alb': 86, + 'rural_alb': 47}, + 'MUS': {'country_name': 'Mauritius', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 1259000, + 'urban_percent': 41, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MEX': {'country_name': 'Mexico', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 121858000, + 'urban_percent': 79, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 90}, + 'MCO': {'country_name': 'Monaco', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 38000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MNG': {'country_name': 'Mongolia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 2998000, + 'urban_percent': 68, + 'national_alb': 81, + 'urban_alb': 94, + 'rural_alb': 53}, + 'MNE': {'country_name': 'Montenegro', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 627000, + 'urban_percent': 66, + 'national_alb': 97, + 'urban_alb': 98, + 'rural_alb': 95}, + 'MAR': {'country_name': 'Morocco', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 34664000, + 'urban_percent': 61, + 'national_alb': 84, + 'urban_alb': 96, + 'rural_alb': 65}, + 'MOZ': {'country_name': 'Mozambique', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 27042000, + 'urban_percent': 34, + 'national_alb': 51, + 'urban_alb': 80, + 'rural_alb': 36}, + 'MMR': {'country_name': 'Myanmar', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 52681000, + 'urban_percent': 30, + 'national_alb': 74, + 'urban_alb': 88, + 'rural_alb': 68}, + 'NAM': {'country_name': 'Namibia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2315000, + 'urban_percent': 47, + 'national_alb': 83, + 'urban_alb': 97, + 'rural_alb': 71}, + 'NRU': {'country_name': 'Nauru', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'NPL': {'country_name': 'Nepal', + 'region': 'South Asia', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 27015000, + 'urban_percent': 19, + 'national_alb': 88, + 'urban_alb': 90, + 'rural_alb': 88}, + 'NLD': {'country_name': 'Netherlands', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 16938000, + 'urban_percent': 90, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'NZL': {'country_name': 'New Zealand', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 4615000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'NIC': {'country_name': 'Nicaragua', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 6223000, + 'urban_percent': 58, + 'national_alb': 81, + 'urban_alb': 97, + 'rural_alb': 59}, + 'NER': {'country_name': 'Niger', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 20002000, + 'urban_percent': 16, + 'national_alb': 45, + 'urban_alb': 88, + 'rural_alb': 37}, + 'NGA': {'country_name': 'Nigeria', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 181137000, + 'urban_percent': 48, + 'national_alb': 69, + 'urban_alb': 85, + 'rural_alb': 54}, + 'MKD': {'country_name': 'North Macedonia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 2079000, + 'urban_percent': 57, + 'national_alb': 97, + 'urban_alb': 97, + 'rural_alb': 97}, + 'NOR': {'country_name': 'Norway', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5200000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'OMN': {'country_name': 'Oman', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2015, + 'pop': 4267000, + 'urban_percent': 81, + 'national_alb': 90, + 'urban_alb': 94, + 'rural_alb': 73}, + 'PAK': {'country_name': 'Pakistan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 199427000, + 'urban_percent': 36, + 'national_alb': 89, + 'urban_alb': 94, + 'rural_alb': 86}, + 'PLW': {'country_name': 'Palau', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 18000, + 'urban_percent': 78, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'PAN': {'country_name': 'Panama', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 3968000, + 'urban_percent': 67, + 'national_alb': 93, + 'urban_alb': 98, + 'rural_alb': 83}, + 'PNG': {'country_name': 'Papua New Guinea', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 8108000, + 'urban_percent': 13, + 'national_alb': 41, + 'urban_alb': 85, + 'rural_alb': 34}, + 'PRY': {'country_name': 'Paraguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 6689000, + 'urban_percent': 61, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 92}, + 'PER': {'country_name': 'Peru', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 30471000, + 'urban_percent': 77, + 'national_alb': 90, + 'urban_alb': 95, + 'rural_alb': 73}, + 'PHL': {'country_name': 'Philippines', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 102113000, + 'urban_percent': 46, + 'national_alb': 92, + 'urban_alb': 96, + 'rural_alb': 89}, + 'POL': {'country_name': 'Poland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 38034000, + 'urban_percent': 60, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'PRT': {'country_name': 'Portugal', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 10368000, + 'urban_percent': 64, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'ROU': {'country_name': 'Romania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 19925000, + 'urban_percent': 54, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'RUS': {'country_name': 'Russian Federation', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 144985000, + 'urban_percent': 74, + 'national_alb': 97, + 'urban_alb': 99, + 'rural_alb': 91}, + 'RWA': {'country_name': 'Rwanda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 11369000, + 'urban_percent': 17, + 'national_alb': 57, + 'urban_alb': 80, + 'rural_alb': 52}, + 'WSM': {'country_name': 'Samoa', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 194000, + 'urban_percent': 19, + 'national_alb': 91, + 'urban_alb': 91, + 'rural_alb': 91}, + 'SEN': {'country_name': 'Senegal', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 14578000, + 'urban_percent': 46, + 'national_alb': 79, + 'urban_alb': 94, + 'rural_alb': 66}, + 'SRB': {'country_name': 'Serbia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 8877000, + 'urban_percent': 56, + 'national_alb': 93, + 'urban_alb': 92, + 'rural_alb': 94}, + 'SLE': {'country_name': 'Sierra Leone', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 7172000, + 'urban_percent': 41, + 'national_alb': 58, + 'urban_alb': 76, + 'rural_alb': 45}, + 'SGP': {'country_name': 'Singapore', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2015, + 'pop': 5592000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'SLB': {'country_name': 'Solomon Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 603000, + 'urban_percent': 22, + 'national_alb': 69, + 'urban_alb': 91, + 'rural_alb': 63}, + 'SOM': {'country_name': 'Somalia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 13797000, + 'urban_percent': 43, + 'national_alb': 49, + 'urban_alb': 74, + 'rural_alb': 30}, + 'ZAF': {'country_name': 'South Africa', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 55386000, + 'urban_percent': 65, + 'national_alb': 92, + 'urban_alb': 99, + 'rural_alb': 79}, + 'SSD': {'country_name': 'South Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 10716000, + 'urban_percent': 19, + 'national_alb': 41, + 'urban_alb': 61, + 'rural_alb': 36}, + 'ESP': {'country_name': 'Spain', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 46672000, + 'urban_percent': 80, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'LKA': {'country_name': 'Sri Lanka', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 20908000, + 'urban_percent': 18, + 'national_alb': 90, + 'urban_alb': 98, + 'rural_alb': 88}, + 'SDN': {'country_name': 'Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 38903000, + 'urban_percent': 34, + 'national_alb': 59, + 'urban_alb': 73, + 'rural_alb': 52}, + 'SUR': {'country_name': 'Suriname', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 559000, + 'urban_percent': 66, + 'national_alb': 96, + 'urban_alb': 98, + 'rural_alb': 92}, + 'SWE': {'country_name': 'Sweden', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 9765000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CHE': {'country_name': 'Switzerland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 8297000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'SYR': {'country_name': 'Syrian Arab Republic', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 17997000, + 'urban_percent': 52, + 'national_alb': 94, + 'urban_alb': 95, + 'rural_alb': 93}, + 'TJK': {'country_name': 'Tajikistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 8454000, + 'urban_percent': 27, + 'national_alb': 76, + 'urban_alb': 95, + 'rural_alb': 69}, + 'THA': {'country_name': 'Thailand', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 68715000, + 'urban_percent': 48, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'TLS': {'country_name': 'Timor-Leste', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 1196000, + 'urban_percent': 29, + 'national_alb': 75, + 'urban_alb': 90, + 'rural_alb': 69}, + 'TGO': {'country_name': 'Togo', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 7323000, + 'urban_percent': 40, + 'national_alb': 64, + 'urban_alb': 88, + 'rural_alb': 48}, + 'TON': {'country_name': 'Tonga', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 101000, + 'urban_percent': 23, + 'national_alb': 99, + 'urban_alb': 100, + 'rural_alb': 99}, + 'TUN': {'country_name': 'Tunisia', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 11180000, + 'urban_percent': 68, + 'national_alb': 95, + 'urban_alb': 100, + 'rural_alb': 84}, + 'TKM': {'country_name': 'Turkmenistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 5565000, + 'urban_percent': 50, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 96}, + 'TUV': {'country_name': 'Tuvalu', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2015, + 'pop': 11000, + 'urban_percent': 60, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'UGA': {'country_name': 'Uganda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 38225000, + 'urban_percent': 22, + 'national_alb': 48, + 'urban_alb': 77, + 'rural_alb': 40}, + 'UKR': {'country_name': 'Ukraine', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 44922000, + 'urban_percent': 69, + 'national_alb': 94, + 'urban_alb': 92, + 'rural_alb': 98}, + 'GBR': {'country_name': 'United Kingdom', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2015, + 'pop': 65860000, + 'urban_percent': 83, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'USA': {'country_name': 'United States of America', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2015, + 'pop': 320878000, + 'urban_percent': 82, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'URY': {'country_name': 'Uruguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2015, + 'pop': 3412000, + 'urban_percent': 95, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'UZB': {'country_name': 'Uzbekistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 30930000, + 'urban_percent': 51, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 96}, + 'VUT': {'country_name': 'Vanuatu', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 271000, + 'urban_percent': 25, + 'national_alb': 90, + 'urban_alb': 100, + 'rural_alb': 87}, + 'VNM': {'country_name': 'Vietnam', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 92677000, + 'urban_percent': 34, + 'national_alb': 93, + 'urban_alb': 98, + 'rural_alb': 90}, + 'ZMB': {'country_name': 'Zambia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2015, + 'pop': 15879000, + 'urban_percent': 42, + 'national_alb': 61, + 'urban_alb': 86, + 'rural_alb': 43}, + 'ZWE': {'country_name': 'Zimbabwe', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2015, + 'pop': 13815000, + 'urban_percent': 32, + 'national_alb': 65, + 'urban_alb': 94, + 'rural_alb': 51}}), +"dict_2020_rural_alb_test": (TEXT_FORMAT_DICT, {'AFG': {'country_name': 'Afghanistan', + 'region': 'South Asia', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 38928000, + 'urban_percent': 26, + 'national_alb': 75, + 'urban_alb': 100, + 'rural_alb': 66}, + 'ALB': {'country_name': 'Albania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2878000, + 'urban_percent': 62, + 'national_alb': 95, + 'urban_alb': 96, + 'rural_alb': 93}, + 'DZA': {'country_name': 'Algeria', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 43851000, + 'urban_percent': 74, + 'national_alb': 94, + 'urban_alb': 96, + 'rural_alb': 88}, + 'AND': {'country_name': 'Andorra', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 77000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AGO': {'country_name': 'Angola', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 32866000, + 'urban_percent': 67, + 'national_alb': 57, + 'urban_alb': 72, + 'rural_alb': 27}, + 'ARM': {'country_name': 'Armenia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2963000, + 'urban_percent': 63, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AUS': {'country_name': 'Australia', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 25500000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AUT': {'country_name': 'Austria', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 9006000, + 'urban_percent': 59, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'AZE': {'country_name': 'Azerbaijan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 10139000, + 'urban_percent': 56, + 'national_alb': 96, + 'urban_alb': 100, + 'rural_alb': 91}, + 'BGD': {'country_name': 'Bangladesh', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 164689000, + 'urban_percent': 38, + 'national_alb': 98, + 'urban_alb': 97, + 'rural_alb': 99}, + 'BLR': {'country_name': 'Belarus', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 9449000, + 'urban_percent': 79, + 'national_alb': 96, + 'urban_alb': 96, + 'rural_alb': 96}, + 'BEL': {'country_name': 'Belgium', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 11590000, + 'urban_percent': 98, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BLZ': {'country_name': 'Belize', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 398000, + 'urban_percent': 46, + 'national_alb': 98, + 'urban_alb': 99, + 'rural_alb': 97}, + 'BEN': {'country_name': 'Benin', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 12123000, + 'urban_percent': 48, + 'national_alb': 65, + 'urban_alb': 73, + 'rural_alb': 58}, + 'BMU': {'country_name': 'Bermuda', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2020, + 'pop': 62000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BTN': {'country_name': 'Bhutan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 772000, + 'urban_percent': 42, + 'national_alb': 97, + 'urban_alb': 98, + 'rural_alb': 96}, + 'BIH': {'country_name': 'Bosnia and Herzegovina', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 3281000, + 'urban_percent': 49, + 'national_alb': 96, + 'urban_alb': 95, + 'rural_alb': 97}, + 'BWA': {'country_name': 'Botswana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2352000, + 'urban_percent': 71, + 'national_alb': 92, + 'urban_alb': 98, + 'rural_alb': 77}, + 'BRA': {'country_name': 'Brazil', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 212559000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BRN': {'country_name': 'Brunei Darussalam', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 437000, + 'urban_percent': 78, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BGR': {'country_name': 'Bulgaria', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 6948000, + 'urban_percent': 76, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'BFA': {'country_name': 'Burkina Faso', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 20903000, + 'urban_percent': 31, + 'national_alb': 47, + 'urban_alb': 80, + 'rural_alb': 32}, + 'BDI': {'country_name': 'Burundi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 11891000, + 'urban_percent': 14, + 'national_alb': 62, + 'urban_alb': 91, + 'rural_alb': 57}, + 'CPV': {'country_name': 'Cabo Verde', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 556000, + 'urban_percent': 67, + 'national_alb': 89, + 'urban_alb': 93, + 'rural_alb': 81}, + 'KHM': {'country_name': 'Cambodia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 16719000, + 'urban_percent': 24, + 'national_alb': 71, + 'urban_alb': 90, + 'rural_alb': 65}, + 'CMR': {'country_name': 'Cameroon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 26546000, + 'urban_percent': 58, + 'national_alb': 66, + 'urban_alb': 82, + 'rural_alb': 44}, + 'CAN': {'country_name': 'Canada', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2020, + 'pop': 37742000, + 'urban_percent': 82, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CAF': {'country_name': 'Central African Republic', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 4830000, + 'urban_percent': 42, + 'national_alb': 37, + 'urban_alb': 50, + 'rural_alb': 28}, + 'TCD': {'country_name': 'Chad', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 16426000, + 'urban_percent': 24, + 'national_alb': 46, + 'urban_alb': 74, + 'rural_alb': 37}, + 'CHL': {'country_name': 'Chile', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2020, + 'pop': 19116000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CHN': {'country_name': 'China', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 1463141000, + 'urban_percent': 62, + 'national_alb': 94, + 'urban_alb': 97, + 'rural_alb': 89}, + 'COL': {'country_name': 'Colombia', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 50883000, + 'urban_percent': 81, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 84}, + 'CRI': {'country_name': 'Costa Rica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 5094000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CIV': {'country_name': "Côte d'Ivoire", + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 26378000, + 'urban_percent': 52, + 'national_alb': 71, + 'urban_alb': 85, + 'rural_alb': 56}, + 'CUB': {'country_name': 'Cuba', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 11327000, + 'urban_percent': 77, + 'national_alb': 97, + 'urban_alb': 98, + 'rural_alb': 94}, + 'CYP': {'country_name': 'Cyprus', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 1207000, + 'urban_percent': 67, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CZE': {'country_name': 'Czech Republic', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10709000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'DNK': {'country_name': 'Denmark', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5792000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'DJI': {'country_name': 'Djibouti', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 988000, + 'urban_percent': 78, + 'national_alb': 76, + 'urban_alb': 84, + 'rural_alb': 48}, + 'DOM': {'country_name': 'Dominican Republic', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 10848000, + 'urban_percent': 83, + 'national_alb': 97, + 'urban_alb': 98, + 'rural_alb': 92}, + 'ECU': {'country_name': 'Ecuador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 17643000, + 'urban_percent': 64, + 'national_alb': 95, + 'urban_alb': 100, + 'rural_alb': 86}, + 'SLV': {'country_name': 'El Salvador', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 6486000, + 'urban_percent': 73, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 93}, + 'EST': {'country_name': 'Estonia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 1327000, + 'urban_percent': 69, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'SWZ': {'country_name': 'Eswatini', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 1160000, + 'urban_percent': 24, + 'national_alb': 71, + 'urban_alb': 97, + 'rural_alb': 63}, + 'ETH': {'country_name': 'Ethiopia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 114964000, + 'urban_percent': 22, + 'national_alb': 50, + 'urban_alb': 84, + 'rural_alb': 40}, + 'FJI': {'country_name': 'Fiji', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 896000, + 'urban_percent': 57, + 'national_alb': 94, + 'urban_alb': 98, + 'rural_alb': 89}, + 'FIN': {'country_name': 'Finland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5541000, + 'urban_percent': 86, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'FRA': {'country_name': 'France', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 65274000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GAB': {'country_name': 'Gabon', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2226000, + 'urban_percent': 90, + 'national_alb': 85, + 'urban_alb': 90, + 'rural_alb': 40}, + 'GEO': {'country_name': 'Georgia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 3989000, + 'urban_percent': 59, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 93}, + 'DEU': {'country_name': 'Germany', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 83784000, + 'urban_percent': 77, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GHA': {'country_name': 'Ghana', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 31073000, + 'urban_percent': 57, + 'national_alb': 86, + 'urban_alb': 96, + 'rural_alb': 73}, + 'GIB': {'country_name': 'Gibraltar', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 34000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GRC': {'country_name': 'Greece', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10423000, + 'urban_percent': 80, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GRL': {'country_name': 'Greenland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 57000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'GTM': {'country_name': 'Guatemala', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 17916000, + 'urban_percent': 52, + 'national_alb': 94, + 'urban_alb': 98, + 'rural_alb': 90}, + 'GIN': {'country_name': 'Guinea', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 13133000, + 'urban_percent': 37, + 'national_alb': 64, + 'urban_alb': 87, + 'rural_alb': 50}, + 'GNB': {'country_name': 'Guinea-Bissau', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 1968000, + 'urban_percent': 44, + 'national_alb': 59, + 'urban_alb': 71, + 'rural_alb': 50}, + 'GUY': {'country_name': 'Guyana', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 787000, + 'urban_percent': 27, + 'national_alb': 96, + 'urban_alb': 100, + 'rural_alb': 95}, + 'HTI': {'country_name': 'Haiti', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 11403000, + 'urban_percent': 57, + 'national_alb': 67, + 'urban_alb': 85, + 'rural_alb': 43}, + 'HND': {'country_name': 'Honduras', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 9905000, + 'urban_percent': 58, + 'national_alb': 96, + 'urban_alb': 100, + 'rural_alb': 90}, + 'HUN': {'country_name': 'Hungary', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 9660000, + 'urban_percent': 72, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'ISL': {'country_name': 'Iceland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 341000, + 'urban_percent': 94, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'IND': {'country_name': 'India', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 1380004000, + 'urban_percent': 35, + 'national_alb': 90, + 'urban_alb': 94, + 'rural_alb': 88}, + 'IDN': {'country_name': 'Indonesia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 273524000, + 'urban_percent': 57, + 'national_alb': 92, + 'urban_alb': 98, + 'rural_alb': 84}, + 'IRQ': {'country_name': 'Iraq', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 40223000, + 'urban_percent': 71, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 93}, + 'IRL': {'country_name': 'Ireland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 4938000, + 'urban_percent': 64, + 'national_alb': 97, + 'urban_alb': 97, + 'rural_alb': 97}, + 'ISR': {'country_name': 'Israel', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2020, + 'pop': 8656000, + 'urban_percent': 93, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'JAM': {'country_name': 'Jamaica', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2961000, + 'urban_percent': 56, + 'national_alb': 91, + 'urban_alb': 95, + 'rural_alb': 86}, + 'JOR': {'country_name': 'Jordan', + 'region': 'Middle East & North Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 10203000, + 'urban_percent': 91, + 'national_alb': 99, + 'urban_alb': 100, + 'rural_alb': 89}, + 'KAZ': {'country_name': 'Kazakhstan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 18777000, + 'urban_percent': 58, + 'national_alb': 95, + 'urban_alb': 98, + 'rural_alb': 91}, + 'KEN': {'country_name': 'Kenya', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 53771000, + 'urban_percent': 28, + 'national_alb': 62, + 'urban_alb': 87, + 'rural_alb': 52}, + 'KIR': {'country_name': 'Kiribati', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 119000, + 'urban_percent': 56, + 'national_alb': 78, + 'urban_alb': 92, + 'rural_alb': 60}, + 'LVA': {'country_name': 'Latvia', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 1886000, + 'urban_percent': 68, + 'national_alb': 99, + 'urban_alb': 99, + 'rural_alb': 99}, + 'LSO': {'country_name': 'Lesotho', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 2142000, + 'urban_percent': 29, + 'national_alb': 72, + 'urban_alb': 93, + 'rural_alb': 63}, + 'LBR': {'country_name': 'Liberia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 5058000, + 'urban_percent': 52, + 'national_alb': 75, + 'urban_alb': 86, + 'rural_alb': 63}, + 'LTU': {'country_name': 'Lithuania', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 2722000, + 'urban_percent': 68, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 94}, + 'LUX': {'country_name': 'Luxembourg', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 626000, + 'urban_percent': 91, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MDG': {'country_name': 'Madagascar', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 27691000, + 'urban_percent': 39, + 'national_alb': 53, + 'urban_alb': 80, + 'rural_alb': 36}, + 'MWI': {'country_name': 'Malawi', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 19130000, + 'urban_percent': 17, + 'national_alb': 70, + 'urban_alb': 86, + 'rural_alb': 67}, + 'MYS': {'country_name': 'Malaysia', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 32366000, + 'urban_percent': 77, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 87}, + 'MDV': {'country_name': 'Maldives', + 'region': 'South Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 541000, + 'urban_percent': 41, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MLI': {'country_name': 'Mali', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 20251000, + 'urban_percent': 44, + 'national_alb': 83, + 'urban_alb': 96, + 'rural_alb': 73}, + 'MLT': {'country_name': 'Malta', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2020, + 'pop': 442000, + 'urban_percent': 95, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MHL': {'country_name': 'Marshall Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 59000, + 'urban_percent': 78, + 'national_alb': 89, + 'urban_alb': 87, + 'rural_alb': 96}, + 'MRT': {'country_name': 'Mauritania', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 4650000, + 'urban_percent': 55, + 'national_alb': 72, + 'urban_alb': 89, + 'rural_alb': 51}, + 'MUS': {'country_name': 'Mauritius', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 1272000, + 'urban_percent': 41, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MEX': {'country_name': 'Mexico', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 128933000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MCO': {'country_name': 'Monaco', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 39000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'MNG': {'country_name': 'Mongolia', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 3278000, + 'urban_percent': 69, + 'national_alb': 85, + 'urban_alb': 97, + 'rural_alb': 58}, + 'MNE': {'country_name': 'Montenegro', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 628000, + 'urban_percent': 67, + 'national_alb': 99, + 'urban_alb': 100, + 'rural_alb': 97}, + 'MAR': {'country_name': 'Morocco', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 36911000, + 'urban_percent': 64, + 'national_alb': 90, + 'urban_alb': 98, + 'rural_alb': 76}, + 'MOZ': {'country_name': 'Mozambique', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 31255000, + 'urban_percent': 37, + 'national_alb': 63, + 'urban_alb': 88, + 'rural_alb': 48}, + 'MMR': {'country_name': 'Myanmar', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 54410000, + 'urban_percent': 31, + 'national_alb': 84, + 'urban_alb': 95, + 'rural_alb': 79}, + 'NAM': {'country_name': 'Namibia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2541000, + 'urban_percent': 52, + 'national_alb': 84, + 'urban_alb': 96, + 'rural_alb': 71}, + 'NRU': {'country_name': 'Nauru', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 11000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'NPL': {'country_name': 'Nepal', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 29137000, + 'urban_percent': 21, + 'national_alb': 90, + 'urban_alb': 90, + 'rural_alb': 90}, + 'NLD': {'country_name': 'Netherlands', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 17135000, + 'urban_percent': 92, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'NZL': {'country_name': 'New Zealand', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 4822000, + 'urban_percent': 87, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'NIC': {'country_name': 'Nicaragua', + 'region': 'Latin America & Caribbean', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 6625000, + 'urban_percent': 59, + 'national_alb': 82, + 'urban_alb': 97, + 'rural_alb': 60}, + 'NER': {'country_name': 'Niger', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 24207000, + 'urban_percent': 17, + 'national_alb': 47, + 'urban_alb': 86, + 'rural_alb': 39}, + 'NGA': {'country_name': 'Nigeria', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 206140000, + 'urban_percent': 52, + 'national_alb': 78, + 'urban_alb': 92, + 'rural_alb': 63}, + 'MKD': {'country_name': 'North Macedonia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 2083000, + 'urban_percent': 58, + 'national_alb': 98, + 'urban_alb': 98, + 'rural_alb': 98}, + 'NOR': {'country_name': 'Norway', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5421000, + 'urban_percent': 83, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'OMN': {'country_name': 'Oman', + 'region': 'Middle East & North Africa', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5107000, + 'urban_percent': 86, + 'national_alb': 92, + 'urban_alb': 95, + 'rural_alb': 74}, + 'PAK': {'country_name': 'Pakistan', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 220892000, + 'urban_percent': 37, + 'national_alb': 90, + 'urban_alb': 93, + 'rural_alb': 88}, + 'PLW': {'country_name': 'Palau', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 18000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'PAN': {'country_name': 'Panama', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 4315000, + 'urban_percent': 68, + 'national_alb': 94, + 'urban_alb': 98, + 'rural_alb': 86}, + 'PNG': {'country_name': 'Papua New Guinea', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 8947000, + 'urban_percent': 13, + 'national_alb': 45, + 'urban_alb': 86, + 'rural_alb': 39}, + 'PRY': {'country_name': 'Paraguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 7133000, + 'urban_percent': 62, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'PER': {'country_name': 'Peru', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 32972000, + 'urban_percent': 78, + 'national_alb': 93, + 'urban_alb': 97, + 'rural_alb': 79}, + 'PHL': {'country_name': 'Philippines', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 109581000, + 'urban_percent': 47, + 'national_alb': 94, + 'urban_alb': 97, + 'rural_alb': 91}, + 'POL': {'country_name': 'Poland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 37847000, + 'urban_percent': 60, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'PRT': {'country_name': 'Portugal', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10197000, + 'urban_percent': 66, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'ROU': {'country_name': 'Romania', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 19238000, + 'urban_percent': 54, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'RUS': {'country_name': 'Russian Federation', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 145934000, + 'urban_percent': 75, + 'national_alb': 97, + 'urban_alb': 99, + 'rural_alb': 91}, + 'RWA': {'country_name': 'Rwanda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 12952000, + 'urban_percent': 17, + 'national_alb': 60, + 'urban_alb': 83, + 'rural_alb': 55}, + 'WSM': {'country_name': 'Samoa', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 198000, + 'urban_percent': 18, + 'national_alb': 92, + 'urban_alb': 92, + 'rural_alb': 92}, + 'SEN': {'country_name': 'Senegal', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 16744000, + 'urban_percent': 48, + 'national_alb': 85, + 'urban_alb': 95, + 'rural_alb': 76}, + 'SRB': {'country_name': 'Serbia', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 8737000, + 'urban_percent': 56, + 'national_alb': 95, + 'urban_alb': 95, + 'rural_alb': 95}, + 'SLE': {'country_name': 'Sierra Leone', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 7977000, + 'urban_percent': 43, + 'national_alb': 64, + 'urban_alb': 78, + 'rural_alb': 53}, + 'SGP': {'country_name': 'Singapore', + 'region': 'East Asia & Pacific', + 'income_level': 'High income', + 'year': 2020, + 'pop': 5850000, + 'urban_percent': 100, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'SLB': {'country_name': 'Solomon Islands', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 687000, + 'urban_percent': 25, + 'national_alb': 67, + 'urban_alb': 91, + 'rural_alb': 59}, + 'SOM': {'country_name': 'Somalia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 15893000, + 'urban_percent': 46, + 'national_alb': 56, + 'urban_alb': 79, + 'rural_alb': 36}, + 'ZAF': {'country_name': 'South Africa', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 59309000, + 'urban_percent': 67, + 'national_alb': 94, + 'urban_alb': 100, + 'rural_alb': 82}, + 'SSD': {'country_name': 'South Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 11194000, + 'urban_percent': 20, + 'national_alb': 41, + 'urban_alb': 70, + 'rural_alb': 34}, + 'ESP': {'country_name': 'Spain', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 46755000, + 'urban_percent': 81, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'LKA': {'country_name': 'Sri Lanka', + 'region': 'South Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 21413000, + 'urban_percent': 19, + 'national_alb': 92, + 'urban_alb': 100, + 'rural_alb': 90}, + 'SDN': {'country_name': 'Sudan', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 43849000, + 'urban_percent': 35, + 'national_alb': 60, + 'urban_alb': 74, + 'rural_alb': 52}, + 'SUR': {'country_name': 'Suriname', + 'region': 'Latin America & Caribbean', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 587000, + 'urban_percent': 66, + 'national_alb': 98, + 'urban_alb': 99, + 'rural_alb': 96}, + 'SWE': {'country_name': 'Sweden', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 10099000, + 'urban_percent': 88, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'CHE': {'country_name': 'Switzerland', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 8655000, + 'urban_percent': 74, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'SYR': {'country_name': 'Syrian Arab Republic', + 'region': 'Middle East & North Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 17501000, + 'urban_percent': 55, + 'national_alb': 94, + 'urban_alb': 95, + 'rural_alb': 93}, + 'TJK': {'country_name': 'Tajikistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 9538000, + 'urban_percent': 28, + 'national_alb': 82, + 'urban_alb': 96, + 'rural_alb': 77}, + 'THA': {'country_name': 'Thailand', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 69800000, + 'urban_percent': 51, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'TLS': {'country_name': 'Timor-Leste', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 1318000, + 'urban_percent': 31, + 'national_alb': 85, + 'urban_alb': 96, + 'rural_alb': 80}, + 'TGO': {'country_name': 'Togo', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 8279000, + 'urban_percent': 43, + 'national_alb': 69, + 'urban_alb': 91, + 'rural_alb': 52}, + 'TON': {'country_name': 'Tonga', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 106000, + 'urban_percent': 23, + 'national_alb': 99, + 'urban_alb': 100, + 'rural_alb': 99}, + 'TUN': {'country_name': 'Tunisia', + 'region': 'Middle East & North Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 11819000, + 'urban_percent': 70, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 93}, + 'TKM': {'country_name': 'Turkmenistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 6031000, + 'urban_percent': 53, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'TUV': {'country_name': 'Tuvalu', + 'region': 'East Asia & Pacific', + 'income_level': 'Upper middle income', + 'year': 2020, + 'pop': 12000, + 'urban_percent': 64, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'UGA': {'country_name': 'Uganda', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Low income', + 'year': 2020, + 'pop': 45741000, + 'urban_percent': 25, + 'national_alb': 56, + 'urban_alb': 79, + 'rural_alb': 48}, + 'UKR': {'country_name': 'Ukraine', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 43734000, + 'urban_percent': 69, + 'national_alb': 94, + 'urban_alb': 92, + 'rural_alb': 98}, + 'GBR': {'country_name': 'United Kingdom', + 'region': 'Europe & Central Asia', + 'income_level': 'High income', + 'year': 2020, + 'pop': 67886000, + 'urban_percent': 84, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'USA': {'country_name': 'United States of America', + 'region': 'North America', + 'income_level': 'High income', + 'year': 2020, + 'pop': 331003000, + 'urban_percent': 83, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'URY': {'country_name': 'Uruguay', + 'region': 'Latin America & Caribbean', + 'income_level': 'High income', + 'year': 2020, + 'pop': 3474000, + 'urban_percent': 96, + 'national_alb': 100, + 'urban_alb': 100, + 'rural_alb': 100}, + 'UZB': {'country_name': 'Uzbekistan', + 'region': 'Europe & Central Asia', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 33469000, + 'urban_percent': 50, + 'national_alb': 98, + 'urban_alb': 100, + 'rural_alb': 96}, + 'VUT': {'country_name': 'Vanuatu', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 307000, + 'urban_percent': 26, + 'national_alb': 91, + 'urban_alb': 100, + 'rural_alb': 88}, + 'VNM': {'country_name': 'Vietnam', + 'region': 'East Asia & Pacific', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 97339000, + 'urban_percent': 37, + 'national_alb': 97, + 'urban_alb': 100, + 'rural_alb': 95}, + 'ZMB': {'country_name': 'Zambia', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 18384000, + 'urban_percent': 45, + 'national_alb': 65, + 'urban_alb': 87, + 'rural_alb': 47}, + 'ZWE': {'country_name': 'Zimbabwe', + 'region': 'Sub-Saharan Africa', + 'income_level': 'Lower middle income', + 'year': 2020, + 'pop': 14863000, + 'urban_percent': 32, + 'national_alb': 63, + 'urban_alb': 93, + 'rural_alb': 49}}), + "16": (TEXT_FORMAT, 49), + "rural_non_alb_bin_2015": (TEXT_FORMAT_DICT, {0: ['Andorra', + 'Armenia', + 'Australia', + 'Austria', + 'Bangladesh', + 'Belarus', + 'Belgium', + 'Belize', + 'Bermuda', + 'Bhutan', + 'Bosnia and Herzegovina', + 'Brunei Darussalam', + 'Bulgaria', + 'Canada', + 'Chile', + 'Costa Rica', + 'Cyprus', + 'Czech Republic', + 'Denmark', + 'Estonia', + 'Finland', + 'France', + 'Georgia', + 'Germany', + 'Gibraltar', + 'Greece', + 'Greenland', + 'Guyana', + 'Hungary', + 'Iceland', + 'Ireland', + 'Israel', + 'Jordan', + 'Kazakhstan', + 'Latvia', + 'Lithuania', + 'Luxembourg', + 'Maldives', + 'Malta', + 'Marshall Islands', + 'Mauritius', + 'Monaco', + 'Montenegro', + 'Nauru', + 'Netherlands', + 'New Zealand', + 'North Macedonia', + 'Norway', + 'Palau', + 'Paraguay', + 'Poland', + 'Portugal', + 'Romania', + 'Russian Federation', + 'Samoa', + 'Serbia', + 'Singapore', + 'Spain', + 'Suriname', + 'Sweden', + 'Switzerland', + 'Syrian Arab Republic', + 'Thailand', + 'Tonga', + 'Turkmenistan', + 'Tuvalu', + 'Ukraine', + 'United Kingdom', + 'United States of America', + 'Uruguay', + 'Uzbekistan'], + 10: ['Albania', + 'Algeria', + 'Azerbaijan', + 'Brazil', + 'China', + 'Cuba', + 'Dominican Republic', + 'Ecuador', + 'El Salvador', + 'Fiji', + 'Guatemala', + 'Honduras', + 'India', + 'Indonesia', + 'Iraq', + 'Jamaica', + 'Malaysia', + 'Mexico', + 'Nepal', + 'Pakistan', + 'Panama', + 'Philippines', + 'Sri Lanka', + 'Tunisia', + 'Vanuatu', + 'Vietnam'], + 20: ['Cabo Verde', 'Colombia', 'Namibia', 'Oman', 'Peru', 'South Africa'], + 30: ['Botswana', + 'Cambodia', + 'Ghana', + 'Lesotho', + 'Liberia', + 'Malawi', + 'Mali', + 'Morocco', + 'Myanmar', + 'Senegal', + 'Solomon Islands', + 'Tajikistan', + 'Timor-Leste'], + 40: ['Afghanistan', + 'Benin', + 'Burundi', + "Côte d'Ivoire", + 'Eswatini', + 'Guinea', + 'Kiribati', + 'Mongolia', + 'Nicaragua', + 'Nigeria', + 'Rwanda', + 'Sudan', + 'Zimbabwe'], + 50: ['Cameroon', + 'Djibouti', + 'Gabon', + 'Guinea-Bissau', + 'Haiti', + 'Kenya', + 'Mauritania', + 'Sierra Leone', + 'Togo', + 'Zambia'], + 60: ['Burkina Faso', + 'Central African Republic', + 'Chad', + 'Ethiopia', + 'Madagascar', + 'Mozambique', + 'Niger', + 'Papua New Guinea', + 'South Sudan', + 'Uganda'], + 70: ['Angola', 'Somalia'], + 80: [], + 90: [], + 100: []}), + "rural_non_alb_bin_2020": (TEXT_FORMAT_DICT, {0: ['Albania', + 'Andorra', + 'Armenia', + 'Australia', + 'Austria', + 'Azerbaijan', + 'Bangladesh', + 'Belarus', + 'Belgium', + 'Belize', + 'Bermuda', + 'Bhutan', + 'Bosnia and Herzegovina', + 'Brazil', + 'Brunei Darussalam', + 'Bulgaria', + 'Canada', + 'Chile', + 'Costa Rica', + 'Cuba', + 'Cyprus', + 'Czech Republic', + 'Denmark', + 'Dominican Republic', + 'El Salvador', + 'Estonia', + 'Finland', + 'France', + 'Georgia', + 'Germany', + 'Gibraltar', + 'Greece', + 'Greenland', + 'Guyana', + 'Hungary', + 'Iceland', + 'Iraq', + 'Ireland', + 'Israel', + 'Kazakhstan', + 'Latvia', + 'Lithuania', + 'Luxembourg', + 'Maldives', + 'Malta', + 'Marshall Islands', + 'Mauritius', + 'Mexico', + 'Monaco', + 'Montenegro', + 'Nauru', + 'Netherlands', + 'New Zealand', + 'North Macedonia', + 'Norway', + 'Palau', + 'Paraguay', + 'Philippines', + 'Poland', + 'Portugal', + 'Romania', + 'Russian Federation', + 'Samoa', + 'Serbia', + 'Singapore', + 'Spain', + 'Suriname', + 'Sweden', + 'Switzerland', + 'Syrian Arab Republic', + 'Thailand', + 'Tonga', + 'Tunisia', + 'Turkmenistan', + 'Tuvalu', + 'Ukraine', + 'United Kingdom', + 'United States of America', + 'Uruguay', + 'Uzbekistan', + 'Vietnam'], + 10: ['Algeria', + 'Cabo Verde', + 'China', + 'Colombia', + 'Ecuador', + 'Fiji', + 'Guatemala', + 'Honduras', + 'India', + 'Indonesia', + 'Jamaica', + 'Jordan', + 'Malaysia', + 'Nepal', + 'Pakistan', + 'Panama', + 'South Africa', + 'Sri Lanka', + 'Vanuatu'], + 20: ['Botswana', + 'Ghana', + 'Mali', + 'Morocco', + 'Myanmar', + 'Namibia', + 'Oman', + 'Peru', + 'Senegal', + 'Tajikistan', + 'Timor-Leste'], + 30: ['Afghanistan', + 'Cambodia', + 'Eswatini', + 'Lesotho', + 'Liberia', + 'Malawi', + 'Nigeria'], + 40: ['Benin', + 'Burundi', + "Côte d'Ivoire", + 'Kenya', + 'Kiribati', + 'Mauritania', + 'Mongolia', + 'Nicaragua', + 'Rwanda', + 'Sierra Leone', + 'Solomon Islands', + 'Sudan', + 'Togo'], + 50: ['Cameroon', + 'Djibouti', + 'Guinea', + 'Guinea-Bissau', + 'Haiti', + 'Mozambique', + 'Uganda', + 'Zambia', + 'Zimbabwe'], + 60: ['Burkina Faso', + 'Chad', + 'Ethiopia', + 'Gabon', + 'Madagascar', + 'Niger', + 'Papua New Guinea', + 'Somalia', + 'South Sudan'], + 70: ['Angola', 'Central African Republic'], + 80: [], + 90: [], + 100: []}), + "17": (TEXT_FORMAT_UNORDERED_LIST, ['Cabo Verde', 'Colombia', 'Namibia', 'Oman', 'Peru', 'South Africa']), + "18": (TEXT_FORMAT_UNORDERED_LIST, ['Angola', 'Central African Republic']), + "19": (TEXT_FORMAT_UNORDERED_LIST, ['Jordan', + 'Solomon Islands', + 'Guinea', + 'Zimbabwe', + 'Gabon', + 'Central African Republic']), + "20": (TEXT_FORMAT_UNORDERED_LIST, ['Albania', + 'Azerbaijan', + 'Brazil', + 'Cuba', + 'Dominican Republic', + 'El Salvador', + 'Iraq', + 'Mexico', + 'Philippines', + 'Tunisia', + 'Vietnam', + 'Cabo Verde', + 'Colombia', + 'South Africa', + 'Botswana', + 'Ghana', + 'Mali', + 'Morocco', + 'Myanmar', + 'Senegal', + 'Tajikistan', + 'Timor-Leste', + 'Afghanistan', + 'Eswatini', + 'Nigeria', + 'Kenya', + 'Mauritania', + 'Sierra Leone', + 'Togo', + 'Mozambique', + 'Uganda', + 'Somalia'])} + + +special_ordered_json = {} + +def compare_outputs(expected, actual, format, expected_ordering=None): + try: + if format == TEXT_FORMAT: + return simple_compare(expected, actual) + elif format in [TEXT_FORMAT_ORDERED_LIST, TEXT_FORMAT_LIST_DICTS_ORDERED]: + return list_compare_ordered(expected, actual) + elif format == TEXT_FORMAT_UNORDERED_LIST: + return list_compare_unordered(expected, actual) + elif format == TEXT_FORMAT_SPECIAL_ORDERED_LIST: + return list_compare_special(expected, actual, special_ordered_json[qnum[1:]]) + elif format == TEXT_FORMAT_DICT: + return dict_compare(expected, actual) + else: + if expected != actual: + return "expected %s but found %s " % (repr(expected), repr(actual)) + except: + if expected != actual: + return "expected %s" % (repr(expected)) + +def check_cell_text(qnum, actual): + format, expected = expected_json[qnum[1:]] + if format == TEXT_FORMAT_SPECIAL_ORDERED_LIST: + expected_ordering = special_ordered_json[qnum[1:]] + return compare_outputs(expected, actual, format, expected_ordering) + else: + return compare_outputs(expected, actual, format) + + +def simple_compare(expected, actual, complete_msg=True): + msg = PASS + if type(expected) == type: + if expected != actual: + if type(actual) == type: + msg = "expected %s but found %s" % (expected.__name__, actual.__name__) + else: + msg = "expected %s but found %s" % (expected.__name__, repr(actual)) + elif type(expected) != type(actual) and not (type(expected) in [float, int] and type(actual) in [float, int]): + msg = "expected to find type %s but found type %s" % (type(expected).__name__, type(actual).__name__) + elif type(expected) == float: + if not math.isclose(actual, expected, rel_tol=REL_TOL, abs_tol=ABS_TOL): + msg = "expected %s" % (repr(expected)) + if complete_msg: + msg = msg + " but found %s" % (repr(actual)) + else: + if expected != actual: + msg = "expected %s" % (repr(expected)) + if complete_msg: + msg = msg + " but found %s" % (repr(actual)) + return msg + + +def list_compare_ordered(expected, actual, obj="list"): + msg = PASS + if type(expected) != type(actual): + msg = "expected to find type %s but found type %s" % (type(expected).__name__, type(actual).__name__) + return msg + for i in range(len(expected)): + if i >= len(actual): + msg = "expected missing %s in %s" % (repr(expected[i]), obj) + break + if type(expected[i]) in [int, float, bool, str]: + val = simple_compare(expected[i], actual[i]) + elif type(expected[i]) in [list]: + val = list_compare_ordered(expected[i], actual[i], "sub" + obj) + elif type(expected[i]) in [dict]: + val = dict_compare(expected[i], actual[i]) + elif type(expected[i]).__name__ == obfuscate1(): + val = simple_compare(expected[i], actual[i]) + if val != PASS: + msg = "at index %d of the %s, " % (i, obj) + val + break + if len(actual) > len(expected) and msg == PASS: + msg = "found unexpected %s in %s" % (repr(actual[len(expected)]), obj) + if len(expected) != len(actual): + msg = msg + " (found %d entries in %s, but expected %d)" % (len(actual), obj, len(expected)) + + if len(expected) > 0 and type(expected[0]) in [int, float, bool, str]: + if msg != PASS and list_compare_unordered(expected, actual, obj) == PASS: + try: + msg = msg + " (list may not be ordered as required)" + except: + pass + return msg + + +def list_compare_helper(larger, smaller): + msg = PASS + j = 0 + for i in range(len(larger)): + if i == len(smaller): + msg = "expected %s" % (repr(larger[i])) + break + found = False + while not found: + if j == len(smaller): + val = simple_compare(larger[i], smaller[j - 1], False) + break + val = simple_compare(larger[i], smaller[j], False) + j += 1 + if val == PASS: + found = True + break + if not found: + msg = val + break + return msg + + +def list_compare_unordered(expected, actual, obj="list"): + msg = PASS + if type(expected) != type(actual): + msg = "expected to find type %s but found type %s" % (type(expected).__name__, type(actual).__name__) + return msg + try: + sort_expected = sorted(expected) + sort_actual = sorted(actual) + except: + msg = "unexpected datatype found in %s; expected entries of type %s" % (obj, obj, type(expected[0]).__name__) + return msg + + if len(actual) == 0 and len(expected) > 0: + msg = "in the %s, missing" % (obj) + expected[0] + elif len(actual) > 0 and len(expected) > 0: + val = simple_compare(sort_expected[0], sort_actual[0]) + if val.startswith("expected to find type"): + msg = "in the %s, " % (obj) + simple_compare(sort_expected[0], sort_actual[0]) + else: + if len(expected) > len(actual): + msg = "in the %s, missing " % (obj) + list_compare_helper(sort_expected, sort_actual) + elif len(expected) < len(actual): + msg = "in the %s, found un" % (obj) + list_compare_helper(sort_actual, sort_expected) + if len(expected) != len(actual): + msg = msg + " (found %d entries in %s, but expected %d)" % (len(actual), obj, len(expected)) + return msg + else: + val = list_compare_helper(sort_expected, sort_actual) + if val != PASS: + msg = "in the %s, missing " % (obj) + val + ", but found un" + list_compare_helper(sort_actual, + sort_expected) + return msg + + +def list_compare_special_init(expected, special_order): + real_expected = [] + for i in range(len(expected)): + if real_expected == [] or special_order[i-1] != special_order[i]: + real_expected.append([]) + real_expected[-1].append(expected[i]) + return real_expected + + +def list_compare_special(expected, actual, special_order): + expected = list_compare_special_init(expected, special_order) + msg = PASS + expected_list = [] + for expected_item in expected: + expected_list.extend(expected_item) + val = list_compare_unordered(expected_list, actual) + if val != PASS: + msg = val + else: + i = 0 + for expected_item in expected: + j = len(expected_item) + actual_item = actual[i: i + j] + val = list_compare_unordered(expected_item, actual_item) + if val != PASS: + if j == 1: + msg = "at index %d " % (i) + val + else: + msg = "between indices %d and %d " % (i, i + j - 1) + val + msg = msg + " (list may not be ordered as required)" + break + i += j + + return msg + + +def dict_compare(expected, actual, obj="dict"): + msg = PASS + if type(expected) != type(actual): + msg = "expected to find type %s but found type %s" % (type(expected).__name__, type(actual).__name__) + return msg + try: + expected_keys = sorted(list(expected.keys())) + actual_keys = sorted(list(actual.keys())) + except: + msg = "unexpected datatype found in keys of dict; expect a dict with keys of type %s" % ( + type(expected_keys[0]).__name__) + return msg + val = list_compare_unordered(expected_keys, actual_keys, "dict") + if val != PASS: + msg = "bad keys in %s: " % (obj) + val + if msg == PASS: + for key in expected: + if expected[key] == None or type(expected[key]) in [int, float, bool, str]: + val = simple_compare(expected[key], actual[key]) + elif type(expected[key]) in [list]: + val = list_compare_ordered(expected[key], actual[key], "value") + elif type(expected[key]) in [dict]: + val = dict_compare(expected[key], actual[key], "sub" + obj) + if val != PASS: + msg = "incorrect val for key %s in %s: " % (repr(key), obj) + val + return msg + + +def check(qnum, actual): + msg = check_cell_text(qnum, actual) + if msg == PASS: + return True + print("<b style='color: red;'>ERROR:</b> " + msg) + +def check_file_size(path): + size = os.path.getsize(path) + assert size < MAX_FILE_SIZE * 10**3, "Your file is too big to be processed by Gradescope; please delete unnecessary output cells so your file size is < %s KB" % MAX_FILE_SIZE diff --git a/sum23/projects/p7/rubric.md b/sum23/projects/p7/rubric.md new file mode 100644 index 0000000000000000000000000000000000000000..d643ebb54222858ae5eea93352a5ca4abe99510d --- /dev/null +++ b/sum23/projects/p7/rubric.md @@ -0,0 +1,124 @@ +# Project 7 (P7) grading rubric + +## Code reviews + +- A TA / grader will be reviewing your code after the deadline. +- They will make deductions based on the Rubric provided below. +- To ensure that you don’t lose any points in code review, you must review the rubric and make sure that you have followed the instructions provided in the project correctly. + +## Rubric + +### General deductions: + +- Did not save the notebook file prior to running the cell containing "export". We cannot see your output if you do not save before generating the zip file. This deduction will become stricter for future projects. (-3) +- Used concepts/modules (ex: pandas) not covered in class yet (You may use built-in functions that you have been instructed to use) (-3) +- import statements are not mentioned in the required cell at the top of the notebook (-1) +- Hardcoded answers or data structures (full points) + +### Question specific guidelines: + +- `cell` (3) + - Function does not typecast based on column names (-1) + - Function does not multiply the values in the pop column by 1000 (-1) + - Function is defined more than once (-1) + +- Q1 (4) + - Incorrect logic is used to answer (-2) + - Required functions are not used to answer (-1) + +- Q2 (4) + - Incorrect logic is used to answer (-2) + - Required functions are not used to answer (-1) + +- Q3 (4) + - Incorrect logic is used to answer (-2) + - Required functions are not used to answer (-1) + +- Q4 (4) + - Incorrect logic is used to answer (-1) + - Recomputed variable defined in Q3 (-1) + - Required functions are not used to answer (-1) + +- Q5 (4) + - Incorrect logic is used to answer (-2) + - Required functions are not used to answer (-1) + +- Q6 (4) + - Incorrect logic is used to answer (-2) + - Required functions are not used to answer (-1) + +- Q7 (4) + - Incorrect logic is used to answer (-2) + - Required functions are not used to answer (-1) + +- Q8 (5) + - Incorrect logic is used to answer (-2) + - Hardcoded income levels (-1) + - Required functions are not used to answer (-1) + +- Q9 (4) + - Incorrect logic is used to answer (-2) + - Required functions are not used to answer (-1) + +- `get_col_dict` (3) + - Incorrect logic is used in function (-2) + - Function is defined more than once (-1) + +- `dict_2015` (3) + - Data structure is defined incorrectly (-3) + +- `dict_2020` (3) + - Data structure is defined incorrectly (-3) + +- Q10 (2) + - Required data structures are not used to answer (-1) + +- Q11 (2) + - Required data structures are not used to answer (-1) + +- Q12 (3) + - Incorrect logic is used to answer (-1) + - Required data structures are not used to answer (-1) + +- Q13 (4) + - Incorrect logic is used to answer (-2) + - Required data structures are not used to answer (-1) + +- Q14 (4) + - Incorrect logic is used to answer (-2) + - Required data structures are not used to answer (-1) + +- Q15 (4) + - Incorrect logic is used to answer (-1) + - Recomputed variables already defined in q13 and q14 (-1) + - Required data structures are not used to answer (-1) + +- `dict_2015` (2) + - Incorrect rural_alb calculation in data structure (-2) + +- `dict_2020` (2) + - Incorrect rural_alb calculation in data structure (-2) + +- Q16 (2) + - Required data structures are not used to answer (-1) + +- `rural_non_alb_bin_2015_dict` (5) + - Data structure is defined incorrectly (-5) + +- `rural_non_alb_bin_2020_dict` (5) + - Data structure is defined incorrectly (-5) + +- Q17 (2) + - Required data structures are not used to answer (-1) + +- Q18 (4) + - Incorrect logic is used to answer (-2) + - Required data structures are not used to answer (-1) + +- Q19 (5) + - Incorrect logic is used to answer (-2) + - Required data structures are not used to answer (-2) + +- Q20 (5) + - Incorrect logic is used to answer (-2) + - Required data structures are not used to answer (-2) diff --git a/sum23/projects/p7/water_accessibility.csv b/sum23/projects/p7/water_accessibility.csv new file mode 100644 index 0000000000000000000000000000000000000000..2be44faac5c2e89f66743c049245d6e1ca630b3d --- /dev/null +++ b/sum23/projects/p7/water_accessibility.csv @@ -0,0 +1,303 @@ +country_code,country_name,region,year,income_level,pop,urban_percent,national_alb,urban_alb +AFG,Afghanistan,South Asia,2015,Low income,34414,25,61,87 +AFG,Afghanistan,South Asia,2020,Low income,38928,26,75,100 +ALB,Albania,Europe & Central Asia,2015,Upper middle income,2891,57,93,95 +ALB,Albania,Europe & Central Asia,2020,Upper middle income,2878,62,95,96 +DZA,Algeria,Middle East & North Africa,2015,Upper middle income,39728,71,93,95 +DZA,Algeria,Middle East & North Africa,2020,Lower middle income,43851,74,94,96 +AND,Andorra,Europe & Central Asia,2015,High income,78,88,100,100 +AND,Andorra,Europe & Central Asia,2020,High income,77,88,100,100 +AGO,Angola,Sub-Saharan Africa,2015,Upper middle income,27884,63,54,70 +AGO,Angola,Sub-Saharan Africa,2020,Lower middle income,32866,67,57,72 +ARM,Armenia,Europe & Central Asia,2015,Lower middle income,2926,63,100,100 +ARM,Armenia,Europe & Central Asia,2020,Upper middle income,2963,63,100,100 +AUS,Australia,East Asia & Pacific,2015,High income,23932,86,100,100 +AUS,Australia,East Asia & Pacific,2020,High income,25500,86,100,100 +AUT,Austria,Europe & Central Asia,2015,High income,8679,58,100,100 +AUT,Austria,Europe & Central Asia,2020,High income,9006,59,100,100 +AZE,Azerbaijan,Europe & Central Asia,2015,Upper middle income,9623,55,92,100 +AZE,Azerbaijan,Europe & Central Asia,2020,Upper middle income,10139,56,96,100 +BGD,Bangladesh,South Asia,2015,Lower middle income,156256,34,97,98 +BGD,Bangladesh,South Asia,2020,Lower middle income,164689,38,98,97 +BLR,Belarus,Europe & Central Asia,2015,Upper middle income,9439,77,96,96 +BLR,Belarus,Europe & Central Asia,2020,Upper middle income,9449,79,96,96 +BEL,Belgium,Europe & Central Asia,2015,High income,11288,98,100,100 +BEL,Belgium,Europe & Central Asia,2020,High income,11590,98,100,100 +BLZ,Belize,Latin America & Caribbean,2015,Upper middle income,361,45,97,100 +BLZ,Belize,Latin America & Caribbean,2020,Lower middle income,398,46,98,99 +BEN,Benin,Sub-Saharan Africa,2015,Low income,10576,46,65,74 +BEN,Benin,Sub-Saharan Africa,2020,Lower middle income,12123,48,65,73 +BMU,Bermuda,North America,2015,High income,64,100,100,100 +BMU,Bermuda,North America,2020,High income,62,100,100,100 +BTN,Bhutan,South Asia,2015,Lower middle income,728,39,96,98 +BTN,Bhutan,South Asia,2020,Lower middle income,772,42,97,98 +BIH,Bosnia and Herzegovina,Europe & Central Asia,2015,Upper middle income,3429,47,96,95 +BIH,Bosnia and Herzegovina,Europe & Central Asia,2020,Upper middle income,3281,49,96,95 +BWA,Botswana,Sub-Saharan Africa,2015,Upper middle income,2121,67,88,97 +BWA,Botswana,Sub-Saharan Africa,2020,Upper middle income,2352,71,92,98 +BRA,Brazil,Latin America & Caribbean,2015,Upper middle income,204472,86,98,100 +BRA,Brazil,Latin America & Caribbean,2020,Upper middle income,212559,87,100,100 +BRN,Brunei Darussalam,East Asia & Pacific,2015,High income,415,77,100,100 +BRN,Brunei Darussalam,East Asia & Pacific,2020,High income,437,78,100,100 +BGR,Bulgaria,Europe & Central Asia,2015,Upper middle income,7200,74,100,100 +BGR,Bulgaria,Europe & Central Asia,2020,Upper middle income,6948,76,100,100 +BFA,Burkina Faso,Sub-Saharan Africa,2015,Low income,18111,28,50,80 +BFA,Burkina Faso,Sub-Saharan Africa,2020,Low income,20903,31,47,80 +BDI,Burundi,Sub-Saharan Africa,2015,Low income,10160,12,60,89 +BDI,Burundi,Sub-Saharan Africa,2020,Low income,11891,14,62,91 +CPV,Cabo Verde,Sub-Saharan Africa,2015,Lower middle income,525,64,85,92 +CPV,Cabo Verde,Sub-Saharan Africa,2020,Lower middle income,556,67,89,93 +KHM,Cambodia,East Asia & Pacific,2015,Lower middle income,15521,22,68,89 +KHM,Cambodia,East Asia & Pacific,2020,Lower middle income,16719,24,71,90 +CMR,Cameroon,Sub-Saharan Africa,2015,Lower middle income,23298,55,64,82 +CMR,Cameroon,Sub-Saharan Africa,2020,Lower middle income,26546,58,66,82 +CAN,Canada,North America,2015,High income,36027,81,100,100 +CAN,Canada,North America,2020,High income,37742,82,100,100 +CAF,Central African Republic,Sub-Saharan Africa,2015,Low income,4493,40,42,58 +CAF,Central African Republic,Sub-Saharan Africa,2020,Low income,4830,42,37,50 +TCD,Chad,Sub-Saharan Africa,2015,Low income,14111,23,44,75 +TCD,Chad,Sub-Saharan Africa,2020,Low income,16426,24,46,74 +CHL,Chile,Latin America & Caribbean,2015,High income,17969,87,100,100 +CHL,Chile,Latin America & Caribbean,2020,High income,19116,88,100,100 +CHN,China,East Asia & Pacific,2015,Upper middle income,1430405,56,92,98 +CHN,China,East Asia & Pacific,2020,Upper middle income,1463141,62,94,97 +COL,Colombia,Latin America & Caribbean,2015,Upper middle income,47521,80,96,100 +COL,Colombia,Latin America & Caribbean,2020,Upper middle income,50883,81,97,100 +CRI,Costa Rica,Latin America & Caribbean,2015,Upper middle income,4848,77,100,100 +CRI,Costa Rica,Latin America & Caribbean,2020,Upper middle income,5094,81,100,100 +CIV,Côte d'Ivoire,Sub-Saharan Africa,2015,Lower middle income,23226,49,71,87 +CIV,Côte d'Ivoire,Sub-Saharan Africa,2020,Lower middle income,26378,52,71,85 +CUB,Cuba,Latin America & Caribbean,2015,Upper middle income,11325,77,96,98 +CUB,Cuba,Latin America & Caribbean,2020,Upper middle income,11327,77,97,98 +CYP,Cyprus,Europe & Central Asia,2015,High income,1161,67,100,100 +CYP,Cyprus,Europe & Central Asia,2020,High income,1207,67,100,100 +CZE,Czech Republic,Europe & Central Asia,2015,High income,10601,73,100,100 +CZE,Czech Republic,Europe & Central Asia,2020,High income,10709,74,100,100 +DNK,Denmark,Europe & Central Asia,2015,High income,5689,88,100,100 +DNK,Denmark,Europe & Central Asia,2020,High income,5792,88,100,100 +DJI,Djibouti,Middle East & North Africa,2015,Lower middle income,914,77,76,84 +DJI,Djibouti,Middle East & North Africa,2020,Lower middle income,988,78,76,84 +DOM,Dominican Republic,Latin America & Caribbean,2015,Upper middle income,10282,79,96,98 +DOM,Dominican Republic,Latin America & Caribbean,2020,Upper middle income,10848,83,97,98 +ECU,Ecuador,Latin America & Caribbean,2015,Upper middle income,16212,63,93,100 +ECU,Ecuador,Latin America & Caribbean,2020,Upper middle income,17643,64,95,100 +SLV,El Salvador,Latin America & Caribbean,2015,Lower middle income,6325,70,96,99 +SLV,El Salvador,Latin America & Caribbean,2020,Lower middle income,6486,73,98,100 +EST,Estonia,Europe & Central Asia,2015,High income,1315,68,100,100 +EST,Estonia,Europe & Central Asia,2020,High income,1327,69,100,100 +SWZ,Eswatini,Sub-Saharan Africa,2015,Lower middle income,1104,23,67,95 +SWZ,Eswatini,Sub-Saharan Africa,2020,Lower middle income,1160,24,71,97 +ETH,Ethiopia,Sub-Saharan Africa,2015,Low income,100835,19,42,82 +ETH,Ethiopia,Sub-Saharan Africa,2020,Low income,114964,22,50,84 +FJI,Fiji,East Asia & Pacific,2015,Upper middle income,869,55,94,98 +FJI,Fiji,East Asia & Pacific,2020,Upper middle income,896,57,94,98 +FIN,Finland,Europe & Central Asia,2015,High income,5481,85,100,100 +FIN,Finland,Europe & Central Asia,2020,High income,5541,86,100,100 +FRA,France,Europe & Central Asia,2015,High income,64453,80,100,100 +FRA,France,Europe & Central Asia,2020,High income,65274,81,100,100 +GAB,Gabon,Sub-Saharan Africa,2015,Upper middle income,1948,88,84,89 +GAB,Gabon,Sub-Saharan Africa,2020,Upper middle income,2226,90,85,90 +GEO,Georgia,Europe & Central Asia,2015,Upper middle income,4024,57,96,100 +GEO,Georgia,Europe & Central Asia,2020,Upper middle income,3989,59,97,100 +DEU,Germany,Europe & Central Asia,2015,High income,81787,77,100,100 +DEU,Germany,Europe & Central Asia,2020,High income,83784,77,100,100 +GHA,Ghana,Sub-Saharan Africa,2015,Lower middle income,27849,54,80,91 +GHA,Ghana,Sub-Saharan Africa,2020,Lower middle income,31073,57,86,96 +GIB,Gibraltar,Europe & Central Asia,2015,High income,34,100,100,100 +GIB,Gibraltar,Europe & Central Asia,2020,High income,34,100,100,100 +GRC,Greece,Europe & Central Asia,2015,High income,10660,78,100,100 +GRC,Greece,Europe & Central Asia,2020,High income,10423,80,100,100 +GRL,Greenland,Europe & Central Asia,2015,High income,56,86,100,100 +GRL,Greenland,Europe & Central Asia,2020,High income,57,87,100,100 +GTM,Guatemala,Latin America & Caribbean,2015,Lower middle income,16252,50,92,97 +GTM,Guatemala,Latin America & Caribbean,2020,Upper middle income,17916,52,94,98 +GIN,Guinea,Sub-Saharan Africa,2015,Low income,11432,35,64,85 +GIN,Guinea,Sub-Saharan Africa,2020,Low income,13133,37,64,87 +GNB,Guinea-Bissau,Sub-Saharan Africa,2015,Low income,1737,42,59,73 +GNB,Guinea-Bissau,Sub-Saharan Africa,2020,Low income,1968,44,59,71 +GUY,Guyana,Latin America & Caribbean,2015,Upper middle income,767,26,95,100 +GUY,Guyana,Latin America & Caribbean,2020,Upper middle income,787,27,96,100 +HTI,Haiti,Latin America & Caribbean,2015,Low income,10696,52,65,85 +HTI,Haiti,Latin America & Caribbean,2020,Lower middle income,11403,57,67,85 +HND,Honduras,Latin America & Caribbean,2015,Lower middle income,9113,55,93,99 +HND,Honduras,Latin America & Caribbean,2020,Lower middle income,9905,58,96,100 +HUN,Hungary,Europe & Central Asia,2015,High income,9778,71,100,100 +HUN,Hungary,Europe & Central Asia,2020,High income,9660,72,100,100 +ISL,Iceland,Europe & Central Asia,2015,High income,330,94,100,100 +ISL,Iceland,Europe & Central Asia,2020,High income,341,94,100,100 +IND,India,South Asia,2015,Lower middle income,1310152,33,88,93 +IND,India,South Asia,2020,Lower middle income,1380004,35,90,94 +IDN,Indonesia,East Asia & Pacific,2015,Lower middle income,258383,53,89,95 +IDN,Indonesia,East Asia & Pacific,2020,Lower middle income,273524,57,92,98 +IRQ,Iraq,Middle East & North Africa,2015,Upper middle income,35572,70,94,98 +IRQ,Iraq,Middle East & North Africa,2020,Upper middle income,40223,71,98,100 +IRL,Ireland,Europe & Central Asia,2015,High income,4652,63,97,97 +IRL,Ireland,Europe & Central Asia,2020,High income,4938,64,97,97 +ISR,Israel,Middle East & North Africa,2015,High income,7978,92,100,100 +ISR,Israel,Middle East & North Africa,2020,High income,8656,93,100,100 +JAM,Jamaica,Latin America & Caribbean,2015,Upper middle income,2891,55,90,95 +JAM,Jamaica,Latin America & Caribbean,2020,Upper middle income,2961,56,91,95 +JOR,Jordan,Middle East & North Africa,2015,Upper middle income,9267,90,100,100 +JOR,Jordan,Middle East & North Africa,2020,Upper middle income,10203,91,99,100 +KAZ,Kazakhstan,Europe & Central Asia,2015,Upper middle income,17572,57,95,98 +KAZ,Kazakhstan,Europe & Central Asia,2020,Upper middle income,18777,58,95,98 +KEN,Kenya,Sub-Saharan Africa,2015,Lower middle income,47878,26,58,87 +KEN,Kenya,Sub-Saharan Africa,2020,Lower middle income,53771,28,62,87 +KIR,Kiribati,East Asia & Pacific,2015,Lower middle income,111,52,74,89 +KIR,Kiribati,East Asia & Pacific,2020,Lower middle income,119,56,78,92 +LVA,Latvia,Europe & Central Asia,2015,High income,1998,68,99,99 +LVA,Latvia,Europe & Central Asia,2020,High income,1886,68,99,99 +LSO,Lesotho,Sub-Saharan Africa,2015,Lower middle income,2059,27,71,90 +LSO,Lesotho,Sub-Saharan Africa,2020,Lower middle income,2142,29,72,93 +LBR,Liberia,Sub-Saharan Africa,2015,Low income,4472,50,73,84 +LBR,Liberia,Sub-Saharan Africa,2020,Low income,5058,52,75,86 +LTU,Lithuania,Europe & Central Asia,2015,High income,2932,67,97,100 +LTU,Lithuania,Europe & Central Asia,2020,High income,2722,68,98,100 +LUX,Luxembourg,Europe & Central Asia,2015,High income,567,90,100,100 +LUX,Luxembourg,Europe & Central Asia,2020,High income,626,91,100,100 +MDG,Madagascar,Sub-Saharan Africa,2015,Low income,24234,35,49,78 +MDG,Madagascar,Sub-Saharan Africa,2020,Low income,27691,39,53,80 +MWI,Malawi,Sub-Saharan Africa,2015,Low income,16745,16,66,86 +MWI,Malawi,Sub-Saharan Africa,2020,Low income,19130,17,70,86 +MYS,Malaysia,East Asia & Pacific,2015,Upper middle income,30271,74,97,100 +MYS,Malaysia,East Asia & Pacific,2020,Upper middle income,32366,77,97,100 +MDV,Maldives,South Asia,2015,Upper middle income,455,39,99,99 +MDV,Maldives,South Asia,2020,Upper middle income,541,41,100,100 +MLI,Mali,Sub-Saharan Africa,2015,Low income,17439,40,74,91 +MLI,Mali,Sub-Saharan Africa,2020,Low income,20251,44,83,96 +MLT,Malta,Middle East & North Africa,2015,High income,434,94,100,100 +MLT,Malta,Middle East & North Africa,2020,High income,442,95,100,100 +MHL,Marshall Islands,East Asia & Pacific,2015,Upper middle income,57,76,88,86 +MHL,Marshall Islands,East Asia & Pacific,2020,Upper middle income,59,78,89,87 +MRT,Mauritania,Sub-Saharan Africa,2015,Lower middle income,4046,51,67,86 +MRT,Mauritania,Sub-Saharan Africa,2020,Lower middle income,4650,55,72,89 +MUS,Mauritius,Sub-Saharan Africa,2015,Upper middle income,1259,41,100,100 +MUS,Mauritius,Sub-Saharan Africa,2020,Upper middle income,1272,41,100,100 +MEX,Mexico,Latin America & Caribbean,2015,Upper middle income,121858,79,98,100 +MEX,Mexico,Latin America & Caribbean,2020,Upper middle income,128933,81,100,100 +MCO,Monaco,Europe & Central Asia,2015,High income,38,100,100,100 +MCO,Monaco,Europe & Central Asia,2020,High income,39,100,100,100 +MNG,Mongolia,East Asia & Pacific,2015,Lower middle income,2998,68,81,94 +MNG,Mongolia,East Asia & Pacific,2020,Lower middle income,3278,69,85,97 +MNE,Montenegro,Europe & Central Asia,2015,Upper middle income,627,66,97,98 +MNE,Montenegro,Europe & Central Asia,2020,Upper middle income,628,67,99,100 +MAR,Morocco,Middle East & North Africa,2015,Lower middle income,34664,61,84,96 +MAR,Morocco,Middle East & North Africa,2020,Lower middle income,36911,64,90,98 +MOZ,Mozambique,Sub-Saharan Africa,2015,Low income,27042,34,51,80 +MOZ,Mozambique,Sub-Saharan Africa,2020,Low income,31255,37,63,88 +MMR,Myanmar,East Asia & Pacific,2015,Lower middle income,52681,30,74,88 +MMR,Myanmar,East Asia & Pacific,2020,Lower middle income,54410,31,84,95 +NAM,Namibia,Sub-Saharan Africa,2015,Upper middle income,2315,47,83,97 +NAM,Namibia,Sub-Saharan Africa,2020,Upper middle income,2541,52,84,96 +NRU,Nauru,East Asia & Pacific,2015,High income,10,100,100,100 +NRU,Nauru,East Asia & Pacific,2020,High income,11,100,100,100 +NPL,Nepal,South Asia,2015,Low income,27015,19,88,90 +NPL,Nepal,South Asia,2020,Lower middle income,29137,21,90,90 +NLD,Netherlands,Europe & Central Asia,2015,High income,16938,90,100,100 +NLD,Netherlands,Europe & Central Asia,2020,High income,17135,92,100,100 +NZL,New Zealand,East Asia & Pacific,2015,High income,4615,86,100,100 +NZL,New Zealand,East Asia & Pacific,2020,High income,4822,87,100,100 +NIC,Nicaragua,Latin America & Caribbean,2015,Lower middle income,6223,58,81,97 +NIC,Nicaragua,Latin America & Caribbean,2020,Lower middle income,6625,59,82,97 +NER,Niger,Sub-Saharan Africa,2015,Low income,20002,16,45,88 +NER,Niger,Sub-Saharan Africa,2020,Low income,24207,17,47,86 +NGA,Nigeria,Sub-Saharan Africa,2015,Lower middle income,181137,48,69,85 +NGA,Nigeria,Sub-Saharan Africa,2020,Lower middle income,206140,52,78,92 +MKD,North Macedonia,Europe & Central Asia,2015,Upper middle income,2079,57,97,97 +MKD,North Macedonia,Europe & Central Asia,2020,Upper middle income,2083,58,98,98 +NOR,Norway,Europe & Central Asia,2015,High income,5200,81,100,100 +NOR,Norway,Europe & Central Asia,2020,High income,5421,83,100,100 +OMN,Oman,Middle East & North Africa,2015,High income,4267,81,90,94 +OMN,Oman,Middle East & North Africa,2020,High income,5107,86,92,95 +PAK,Pakistan,South Asia,2015,Lower middle income,199427,36,89,94 +PAK,Pakistan,South Asia,2020,Lower middle income,220892,37,90,93 +PLW,Palau,East Asia & Pacific,2015,Upper middle income,18,78,100,100 +PLW,Palau,East Asia & Pacific,2020,High income,18,81,100,100 +PAN,Panama,Latin America & Caribbean,2015,Upper middle income,3968,67,93,98 +PAN,Panama,Latin America & Caribbean,2020,Upper middle income,4315,68,94,98 +PNG,Papua New Guinea,East Asia & Pacific,2015,Lower middle income,8108,13,41,85 +PNG,Papua New Guinea,East Asia & Pacific,2020,Lower middle income,8947,13,45,86 +PRY,Paraguay,Latin America & Caribbean,2015,Upper middle income,6689,61,97,100 +PRY,Paraguay,Latin America & Caribbean,2020,Upper middle income,7133,62,100,100 +PER,Peru,Latin America & Caribbean,2015,Upper middle income,30471,77,90,95 +PER,Peru,Latin America & Caribbean,2020,Upper middle income,32972,78,93,97 +PHL,Philippines,East Asia & Pacific,2015,Lower middle income,102113,46,92,96 +PHL,Philippines,East Asia & Pacific,2020,Lower middle income,109581,47,94,97 +POL,Poland,Europe & Central Asia,2015,High income,38034,60,100,100 +POL,Poland,Europe & Central Asia,2020,High income,37847,60,100,100 +PRT,Portugal,Europe & Central Asia,2015,High income,10368,64,100,100 +PRT,Portugal,Europe & Central Asia,2020,High income,10197,66,100,100 +ROU,Romania,Europe & Central Asia,2015,Upper middle income,19925,54,100,100 +ROU,Romania,Europe & Central Asia,2020,Upper middle income,19238,54,100,100 +RUS,Russian Federation,Europe & Central Asia,2015,Upper middle income,144985,74,97,99 +RUS,Russian Federation,Europe & Central Asia,2020,Upper middle income,145934,75,97,99 +RWA,Rwanda,Sub-Saharan Africa,2015,Low income,11369,17,57,80 +RWA,Rwanda,Sub-Saharan Africa,2020,Low income,12952,17,60,83 +WSM,Samoa,East Asia & Pacific,2015,Lower middle income,194,19,91,91 +WSM,Samoa,East Asia & Pacific,2020,Lower middle income,198,18,92,92 +SEN,Senegal,Sub-Saharan Africa,2015,Low income,14578,46,79,94 +SEN,Senegal,Sub-Saharan Africa,2020,Lower middle income,16744,48,85,95 +SRB,Serbia,Europe & Central Asia,2015,Upper middle income,8877,56,93,92 +SRB,Serbia,Europe & Central Asia,2020,Upper middle income,8737,56,95,95 +SLE,Sierra Leone,Sub-Saharan Africa,2015,Low income,7172,41,58,76 +SLE,Sierra Leone,Sub-Saharan Africa,2020,Low income,7977,43,64,78 +SGP,Singapore,East Asia & Pacific,2015,High income,5592,100,100,100 +SGP,Singapore,East Asia & Pacific,2020,High income,5850,100,100,100 +SLB,Solomon Islands,East Asia & Pacific,2015,Lower middle income,603,22,69,91 +SLB,Solomon Islands,East Asia & Pacific,2020,Lower middle income,687,25,67,91 +SOM,Somalia,Sub-Saharan Africa,2015,Low income,13797,43,49,74 +SOM,Somalia,Sub-Saharan Africa,2020,Low income,15893,46,56,79 +ZAF,South Africa,Sub-Saharan Africa,2015,Upper middle income,55386,65,92,99 +ZAF,South Africa,Sub-Saharan Africa,2020,Upper middle income,59309,67,94,100 +SSD,South Sudan,Sub-Saharan Africa,2015,Low income,10716,19,41,61 +SSD,South Sudan,Sub-Saharan Africa,2020,Low income,11194,20,41,70 +ESP,Spain,Europe & Central Asia,2015,High income,46672,80,100,100 +ESP,Spain,Europe & Central Asia,2020,High income,46755,81,100,100 +LKA,Sri Lanka,South Asia,2015,Lower middle income,20908,18,90,98 +LKA,Sri Lanka,South Asia,2020,Lower middle income,21413,19,92,100 +SDN,Sudan,Sub-Saharan Africa,2015,Lower middle income,38903,34,59,73 +SDN,Sudan,Sub-Saharan Africa,2020,Low income,43849,35,60,74 +SUR,Suriname,Latin America & Caribbean,2015,Upper middle income,559,66,96,98 +SUR,Suriname,Latin America & Caribbean,2020,Upper middle income,587,66,98,99 +SWE,Sweden,Europe & Central Asia,2015,High income,9765,87,100,100 +SWE,Sweden,Europe & Central Asia,2020,High income,10099,88,100,100 +CHE,Switzerland,Europe & Central Asia,2015,High income,8297,74,100,100 +CHE,Switzerland,Europe & Central Asia,2020,High income,8655,74,100,100 +SYR,Syrian Arab Republic,Middle East & North Africa,2015,Lower middle income,17997,52,94,95 +SYR,Syrian Arab Republic,Middle East & North Africa,2020,Low income,17501,55,94,95 +TJK,Tajikistan,Europe & Central Asia,2015,Lower middle income,8454,27,76,95 +TJK,Tajikistan,Europe & Central Asia,2020,Lower middle income,9538,28,82,96 +THA,Thailand,East Asia & Pacific,2015,Upper middle income,68715,48,100,100 +THA,Thailand,East Asia & Pacific,2020,Upper middle income,69800,51,100,100 +TLS,Timor-Leste,East Asia & Pacific,2015,Lower middle income,1196,29,75,90 +TLS,Timor-Leste,East Asia & Pacific,2020,Lower middle income,1318,31,85,96 +TGO,Togo,Sub-Saharan Africa,2015,Low income,7323,40,64,88 +TGO,Togo,Sub-Saharan Africa,2020,Low income,8279,43,69,91 +TON,Tonga,East Asia & Pacific,2015,Lower middle income,101,23,99,100 +TON,Tonga,East Asia & Pacific,2020,Upper middle income,106,23,99,100 +TUN,Tunisia,Middle East & North Africa,2015,Lower middle income,11180,68,95,100 +TUN,Tunisia,Middle East & North Africa,2020,Lower middle income,11819,70,98,100 +TKM,Turkmenistan,Europe & Central Asia,2015,Upper middle income,5565,50,98,100 +TKM,Turkmenistan,Europe & Central Asia,2020,Upper middle income,6031,53,100,100 +TUV,Tuvalu,East Asia & Pacific,2015,Upper middle income,11,60,100,100 +TUV,Tuvalu,East Asia & Pacific,2020,Upper middle income,12,64,100,100 +UGA,Uganda,Sub-Saharan Africa,2015,Low income,38225,22,48,77 +UGA,Uganda,Sub-Saharan Africa,2020,Low income,45741,25,56,79 +UKR,Ukraine,Europe & Central Asia,2015,Lower middle income,44922,69,94,92 +UKR,Ukraine,Europe & Central Asia,2020,Lower middle income,43734,69,94,92 +GBR,United Kingdom,Europe & Central Asia,2015,High income,65860,83,100,100 +GBR,United Kingdom,Europe & Central Asia,2020,High income,67886,84,100,100 +USA,United States of America,North America,2015,High income,320878,82,100,100 +USA,United States of America,North America,2020,High income,331003,83,100,100 +URY,Uruguay,Latin America & Caribbean,2015,High income,3412,95,100,100 +URY,Uruguay,Latin America & Caribbean,2020,High income,3474,96,100,100 +UZB,Uzbekistan,Europe & Central Asia,2015,Lower middle income,30930,51,98,100 +UZB,Uzbekistan,Europe & Central Asia,2020,Lower middle income,33469,50,98,100 +VUT,Vanuatu,East Asia & Pacific,2015,Lower middle income,271,25,90,100 +VUT,Vanuatu,East Asia & Pacific,2020,Lower middle income,307,26,91,100 +VNM,Vietnam,East Asia & Pacific,2015,Lower middle income,92677,34,93,98 +VNM,Vietnam,East Asia & Pacific,2020,Lower middle income,97339,37,97,100 +ZMB,Zambia,Sub-Saharan Africa,2015,Lower middle income,15879,42,61,86 +ZMB,Zambia,Sub-Saharan Africa,2020,Lower middle income,18384,45,65,87 +ZWE,Zimbabwe,Sub-Saharan Africa,2015,Low income,13815,32,65,94 +ZWE,Zimbabwe,Sub-Saharan Africa,2020,Lower middle income,14863,32,63,93