Giter VIP home page Giter VIP logo

gdp-and-internet-usage's Introduction

GDP-and-Internet-Usage

A guided exploration of UN data (Gross Domestic Product and Internet Usage)

  1. Created a data folder in your local project repository.

  2. Downloaded the two CSV files and place them in the data folder:

    a. Gross Domestic Product (GDP) per capita http://data.un.org/Data.aspx?d=WDI&f=Indicator_Code%3aNY.GDP.PCAP.PP.KD

    • rename the file to gdp_percapita.csv
    • open it with a text editor (not excel) and take a look

    b. Percentage of Individuals using the Internet http://data.un.org/Data.aspx?d=ITU&f=ind1Code%3aI99H

    • rename the file to internet_use.csv
    • open it with a text editor and take a look
  3. Launched a Jupyter Notebook.

  • Used markdown cells to record answers to any questions asked in the exercise. On the menu bar, you can toggle the cell type from Code to Markdown.
  1. Imported the required packages with their customary aliases as follows:

    import pandas as pd
    import numpy as np
    import matplotlib.pyplot as plt
    import seaborn as sns

  2. Used the %matplotlib inline command so that your plots show in the notebook without having to call plt.show() every time.

  3. Using the pandas read_csv() function, read the GDP dataset into your notebook as a DataFrame called gdp_df. Take a look at the first 6 rows.

  4. Repeated the above steps for the internet use dataset. Call this DataFrame internet_df. Looked at the first six rows.

  5. Looked at the shape of each dataframe - how many rows, how many columns.

  6. Looked at the data types for the columns in each table.

  7. Looked at the last 10 rows of each dataset in turn.

  8. Dropped the 'value footnotes' data (column) from both datasets. Check that this worked as expected.

  9. Changed the columns for the GDP Per Capita data frame to ‘Country’, ‘Year’, and ‘GDP_Per_Capita’.

  10. Changed the columns for the Internet Users data frame to ‘Country’, ‘Year’, and ‘Internet_Users_Pct’.

  11. Merged the two DataFrames to one. Merge all rows from each of the two DataFrames. Call the new DataFrame gdp_and_internet_use.

  12. Looked at the first five rows of your new data frame to confirm it merged correctly.

  13. Looked at the last five rows to make sure the data is clean and as expected.

  14. Subset the combined data frame to keep only the data for 2004, 2009, and 2014. Checked that this subset correctly.

  15. Created three new data frames, one for 2004, one for 2009, and one for 2014. Gave them meaningful names aand answered the questions below.

  16. Which country had the highest percentage of internet users in 2014? What was the percentage? (typing the first 3 letters of your DataFrame name and hitting the tab for auto-complete options).

  17. Which country had the lowest percentage of internet users in 2014? What was the percentage?

  18. Repeated the above steps for 2004 and 2009.

  19. Which country had the highest gdp per capita in 2014? What was the gdp per capita?

  20. Which country had the lowest gdp per capita in 2014? What was the gdp per capita?

  21. Created some scatterplots:
    a. 2004 Percent Using the Internet vs GDP Per Capita
    b. 2009 Percent Using the Internet vs GDP Per Capita
    c. 2014 Percent Using the Internet vs GDP Per Capita

  22. Deterime there differences across years? What do the plots tell you about any relationship between these two variables? Enter your observations as a markdown cell.

  23. Looked at the distribution of gdp per capita values for 2014. Is it unimodal?

  24. Looked at the distribution of Internet Use for 2014. Is it unimodal?

  25. What are the top 5 countries in terms of internet use in 2014?

  26. Created a data frame called top_5_internet from the combined data frame that has all three years for these 5 countries. You should have 15 rows. Check that this is true.

  27. Created a seaborn FacetGrid to show the internet usage trend over time for these 5 countries (those with the highest reported internet use in 2014). Which country had the greatest growth between 2004 and 2014? Is there a plotting issue with Bermuda? Can you fix it?

  28. Repeated the steps above to look at the trend for the 5 countries with the lowest 2014 internet usage. Which country has consistently had the least internet use?

  29. Found the top 5 countries for 2014 in terms of GDP per capita; create a dataframe to look at 10-year trends in gdp per capita for those 5 countries. Use a seaborn facet grid for this.

  30. Repeated this one more time to look at 10-year trend for the bottom 5 countries for 2014 in terms of GDP per capita.

  31. Is there anything surprising or unusual in any of these plots? Searching on the internet, can you find any possible explanations for unusual findings?

Bonus exercise:

  1. Download another data set from the UN data (http://data.un.org/Explorer.aspx) to merge with your data and explore.

gdp-and-internet-usage's People

Contributors

pbusienei avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.