Competition - XP Competition 2022
  • AI Chat
  • Code
  • Report
  • 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!

    # 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

    How Much of the World Has Access to the Internet?

    Now let's now move on to the competition and challenge.

    📖 Background

    You work for a policy consulting firm. One of the firm's principals is preparing to give a presentation on the state of internet access in the world. She needs your help answering some questions about internet accessibility across the world.

    💾 The data

    The research team compiled the following tables (source):
    internet
    • "Entity" - The name of the country, region, or group.
    • "Code" - Unique id for the country (null for other entities).
    • "Year" - Year from 1990 to 2019.
    • "Internet_usage" - The share of the entity's population who have used the internet in the last three months.
    people
    • "Entity" - The name of the country, region, or group.
    • "Code" - Unique id for the country (null for other entities).
    • "Year" - Year from 1990 to 2020.
    • "Users" - The number of people who have used the internet in the last three months for that country, region, or group.
    broadband
    • "Entity" - The name of the country, region, or group.
    • "Code" - Unique id for the country (null for other entities).
    • "Year" - Year from 1998 to 2020.
    • "Broadband_Subscriptions" - The number of fixed subscriptions to high-speed internet at downstream speeds >= 256 kbit/s for that country, region, or group.

    Acknowledgments: Max Roser, Hannah Ritchie, and Esteban Ortiz-Ospina (2015) - "Internet." OurWorldInData.org.

    # Read the internet table
    internet = pd.read_csv('data/internet.csv')
    
    # Take a look at the first rows
    internet
    # Read the people table
    people = pd.read_csv('data/people.csv')
    people