Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 877 Bytes

inClassNov03.md

File metadata and controls

25 lines (17 loc) · 877 Bytes

In class assignment (Nov-3)

This is a group assignment

Please create a notebook called InClassNov3.ipynb in your repo and make sure that you list all the names at the top of the notebook

BeautifulSoup + Pandas:

  1. You are required to write a function that scrapes the Wikipedia article with the list of countries by population (Main Table) (https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population_density). We do not want to collect the data related to "World" (Find a way to skip these lines). Collect the following information:
  • Country name
  • Area (km2)
  • Area (mi2)
  • Population
  1. Put your data into a Pandas Dataframe!!! Make sure you have the numeric columns as numbers

  2. Provide a summary of your data (average, mean, etc.)

  3. Calculate the correlation between your columns

  4. Plot a scatterplot (population vs. area (km2)