Pedro Pimenta














Sign up
Beta
Spinner

How Much of the World Has Access to the Internet?

📖 Background

The first-ever "XP Accelerator Competition" is now open for entries.

This competition is part of the Free Week + XP challenge at DataCamp. Winners of this competition will earn 50,000 XP. Learn your way up our XP leaderboard!

💡 Learn more

The following DataCamp courses can help review the skills needed for this challenge:

  • Data Manipulation with pandas
  • Introduction to Data Visualization with Seaborn
  • Introduction to Statistics in Python

ℹ️ Introduction to data science notebooks

You can skip this section if you are already familiar with data science notebooks.

Data science notebooks

A data science notebook is a document containing text cells (what you're reading now) and code cells. What is unique about a notebook is that it's interactive: You can change or add code cells and then run a cell by selecting it and then clicking the Run button on the right ( , or Run All ) or hitting control + enter.

The result will be displayed directly in the notebook.

# Modify any of the numbers and rerun the cell.
100 * 1.75 * 222

Data science notebooks & data analysis

Notebooks are great for interactive data analysis. You can add a Markdown text, Python, or SQL cell by clicking on the Add Markdown, Add Code and Add SQL buttons that appear as you move the mouse pointer near the bottom of any cell.

Here at DataCamp, we call our interactive notebook workspace. You can find out more about Workspace here.

We will load the broadband table containing information about access to broadband internet connections around the world.

# Import pandas
import pandas as pd

# Read the data
broadband = pd.read_csv('data/broadband.csv')

# Take a look at the first rows
broadband

Data analysis example:

Find the number of broadband subscriptions (per 100 people) for the European Union in 2018.

We can use bracket notation to filter for Entity equal to 'European Union' and the Year equal to 2018.

selection = (broadband['Entity'] == 'European Union') & (broadband['Year'] == 2018)
broadband[selection]

Data science notebooks & visualizations

Visualizations are very helpful in summarizing data and gaining insights. A well-crafted chart often conveys information much better than a table.

It is very straightforward to include plots in a data science notebook. For example, let's look at how broadband subscriptions have changed in time in Latin America and the Caribbean.

First, we filter our data for 'Latin America and Caribbean' and save that to a new data frame called latam:

selection = broadband['Entity'] == 'Latin America and Caribbean'
latam = broadband[selection]
latam

Workspace has built-in chart cells (create one by clicking on Add Chart). We use one to build the chart using the latam table we created in the cell above.

Current Type: Line
Current X-axis: Year
Current Y-axis: Broadband_Subscriptions
Current Color: Entity

Broadband subscriptions in Latin America

You can also use other visualization libraries like Matplotlib or Seaborn by running the cell below to import them into this workspace.

import matplotlib.pyplot as plt
import seaborn as sns



  • AI Chat
  • Code