Practice activity

If you have installed Python locally, launch JupyterLab by running:

conda activate sds

and

jupyter lab

Golf courses in Oregon

In this activity, we will use Pandas to conduct some data analysis on golf courses in Oregon. The data can be downloaded here and here. The first dataset is a table of golf courses in Oregon. The second dataset is provides population data for each zip code in Oregon.

golf

Task 1 (5 points)

Read the the golf course dataset and answer the following questions:

  • a) How many rows and columns are in this dataset?

  • b) What are the names of the columns?

  • c) When was the first golf course built in Oregon?

  • d) What is the name and the town of the oldest course?

  • e) What is the name (and cost) of the course with the highest green fees?


Task 2 (5 points)

Read the the zip code population dataset and answer the following questions:

  • a) How many rows and columns are in this dataset?

  • b) What is the mean population?

  • c) How many zip codes have more than 40,000 people?

  • d) Which county has the most cities?

  • e) Which city has the most zip codes?


Task 3 (5 points)

  • a) Merge the two Dataframes

  • b) How many zip codes do not have a single golf course?

  • c) Which zip code has the most golf courses?

  • d) Which city has the most golf courses per capita (i.e. per person)?

  • e) Which county has the most golf courses per capita?


Task 4 (0 points)

  • Add a title, your name, and date of this submission to your Jupyter Notebook using Markdown text.

  • Add some more Markdown text to separate each task of this assignment and use f-strings to make yours answers clear.

Important

Save your notebook to your local course folder and submit assignment (in .pdf format) to Canvas by the deadline.