Dataset on Immigration to Canada

 


Welcome to the Dataset on Immigration to Canada! you'll gain an understanding of the dataset used for data visualization. We'll import the data into your program using Pandas as a DataFrame and process it to make it suitable for plotting.

The dataset we'll be working with is compiled by the Population Division of the United Nations and contains immigration data pertaining to 45 countries. For each country, the dataset includes information on the total number of immigrants from all world countries. While the dataset covers multiple countries, our focus will primarily be on immigration to Canada.

Here's a snapshot of the UN data on immigration to Canada in the form of an Excel file: The initial rows contain textual data about the UN department and other information, followed by row 21 containing column labels. Each subsequent row represents a country, including metadata such as continent, region, and development status, along with total immigration numbers from 1980 to 2013.

To begin, we'll use Pandas to import the data into a DataFrame. We'll also utilize the openpyxl library to extract data from Excel spreadsheets. By skipping the first 20 rows, we can read only the data corresponding to each country. You can verify the successful import by using the head function to display the first five rows of the DataFrame.

Next, we'll process the DataFrame by setting the country name as the index of each row, facilitating easier querying of specific countries. Additionally, we'll add an extra column representing the total immigration for each country from 1980 to 2013.

Let's name our DataFrame df_canada. Throughout this course, we'll use Pandas for data analysis before creating visualization tools. With the data imported and processed, we'll be ready to create different types of plots for exploratory analysis or presentation purposes.

In summary, you've learned that the UN compiled immigration data provides insights into the number of people who migrated, particularly to Canada. Importing this data into a Pandas DataFrame is the first step towards creating various types of plots for visualization and analysis.

Comments

Popular posts from this blog

Common cybersecurity terminology

Cheat Sheet: Plotting with Matplotlib using Pandas

Introduction to security frameworks and controls