Skip to content
Snippets Groups Projects
Commit 86f79cdf authored by Ashwin Maran's avatar Ashwin Maran
Browse files

add p7 and lab-p7

parent 5804ee1c
No related branches found
No related tags found
No related merge requests found
# Lab 7: Dictionaries
In this lab, you will analyze water accessibility data using dictionaries.
### Corrections/Clarifications
None yet
**Find any issues?** Report to us:
- Srinath Namburi <sgnamburi@wisc.edu>
- Karthik Suresh <ksuresh6@wisc.edu>
------------------------------
## Learning Objectives
In this lab, you will practice how to...
* Access and utilize data in CSV files
* Deal with messy real-world datasets
* Use dictionaries to organize data into key, value pairs
------------------------------
## Note on Academic Misconduct
You may do these lab exercises only with your project partner; you are not allowed to start
working on Lab-P7 with one person, then do the project with a different partner. Now may be a
good time to review [our course policies](https://cs220.cs.wisc.edu/s23/syllabus.html).
## Project Partner
We strongly recommend students find a project partner. Pair programming is a great way to learn
from a fellow student. Project difficulty increases exponentially in this course. Finding a project
partner early on during the semester is a good idea.
If you are still looking for a project partner, take a moment to ask around the room if anyone
would like to partner with you on this project. Then you can work with them on this lab and the
project.
------------------------------
## Segment 1: Setup
Create a `lab-p7` directory and download the following files into the `lab-p7` directory.
* `water_accessibility.csv`
* `practice.ipynb`
* `practice_test.py`
If you found your `.csv` file is downloaded as a `.txt` file (e.g. `water_accessibility.txt` instead of `water_accessibility.csv`), run `mv water_accessibility.txt water_accessibility.csv` from your Powershell/Terminal to change the extension of the file into `.csv` file manually. All the data that we need for p7 is stored in `water_accessibility.csv`
To start, familiarize yourself with the dataset (`water_accessibility.csv`). Examine its contents using Microsoft Excel, Numbers (Mac) or any other spreadsheet viewing software.
------------------------------
## Segments 2: Using dictionaries to analyze the data
You will be finishing the rest of your lab on `practice.ipynb`. Run the command `jupyter notebook` from your Terminal/PowerShell window.
Remember not to close this
Terminal/PowerShell window while Jupyter is running, and open a new Terminal/PowerShell
window if necessary.
**Note**: For p7, you will be working on `p7.ipynb`, which is very similar to `practice.ipynb`. We
strongly recommend that you finish working on this notebook during the lab, so you can ask
your TA/PM any questions about the notebook that may arise.
**Note**: Unlike `p7.ipynb`, you do **not** have to submit `practice.ipynb`. This notebook is solely
for your practice and preparation for p7.
------------------------------
## Segment 3: Otter tests check for project submission
This segment is informational only and has no tasks. Your work on `p7.ipynb` is not complete when you submit the project on Gradescope. You **must** review the project's rubric and make sure that you have followed the directions provided in the project to solve the questions. The rubric is meant to reinforce your understanding of the project's directions. The hidden tests on the autograder will be making deductions as per the rubric. If you feel that the autograder has falsely identified your code as incorrect, make a regrade request, so that TAs and graders manually review your code to confirm whether the deduction is appropriate.
------------------------------
## Project 7
You can now get started with [p7]((https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-s23-projects/-/tree/main/p7)). **You may use any helper functions created here in project p7**. Remember to only work with p7 with your partner from this point on. Have fun!
lab-p7/images/gradescope.png

150 KiB

This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Project 7 (P7): Drinking Water Accessibility
## Corrections and clarifications:
* None yet.
**Find any issues?** Report to us:
- Srinath Namburi <sgnamburi@wisc.edu>
- Karthik Suresh <ksuresh6@wisc.edu>
## Instructions:
This project will focus on **utilizing lists** and **managing dictionaries**. To start, download [`p7.ipynb`](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-s23-projectdesign/-/blob/main/p7/otter_files/student/p7.ipynb), [`p7_test.py`](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-s23-projectdesign/-/blob/main/p7/otter_files/student/p7_test.py), and [`water_accessibility.csv`](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-s23-projectdesign/-/raw/main/p7/otter_files/student/water_accessibility.csv).
**Note:** Please go through [lab-p7](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-s23-projectdesign/-/tree/main/lab-p7) before you start the project. The lab contains some very important information that will be necessary for you to finish the project.
You will work on `p7.ipynb` and hand it in. You should follow the provided directions for each question. Questions have **specific** directions on what **to do** and what **not to do**.
After you've downloaded the file to your `p7` directory, open a terminal window and use `cd` to navigate to that directory. To make sure you're in the correct directory in the terminal, type `pwd`. To make sure you've downloaded the notebook file, type `ls` to ensure that `p7.ipynb`, `p7_test.py`, and `water_accessibility.csv` are listed. Then run the command `jupyter notebook` to start Jupyter, and get started on the project!
**IMPORTANT**: You should **NOT** terminate/close the session where you run the above command. If you need to use any other Terminal/PowerShell commands, open a new window instead. Keep constantly saving your notebook file, by either clicking the "Save and Checkpoint" button (floppy disk) or using the appropriate keyboard shortcut.
------------------------------
## IMPORTANT Submission instructions:
- Review the [Grading Rubric](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-s23-projects/-/tree/main/p7/rubric.md), to ensure that you don't lose points during code review.
- You must **save your notebook file** before you run the cell containing **export**.
- Login to [Gradescope](https://www.gradescope.com/) and upload the zip file into the p7 assignment.
- If you completed the project with a **partner**, make sure to **add their name** by clicking "Add Group Member"
in Gradescope when uploading the p6 zip file.
<img src="images/add_group_member.png" width="400">
- It is **your responsibility** to make sure that your project clears auto-grader tests on the Gradescope test system. Otter test results should be available in a few minutes after your submission. You should be able to see both PASS / FAIL results for the 20 test cases and your total score, which is accessible via Gradescope Dashboard (as in the image below):
<img src="images/gradescope.png" width="400">
- If you feel you have been incorrectly graded on a particular question during manual review, then you can find more about the Regrade Request process [here](https://piazza.com/class/ld8bqui1lgeas/post/105).
p7/images/add_group_member.png

157 KiB

p7/images/autograder_success.png

41.3 KiB

p7/images/gradescope.png

150 KiB

p7/p7.ipynb 0 → 100644
This diff is collapsed.
This diff is collapsed.
# Project 7 (P7) grading rubric
## Code reviews
- A TA / grader will be reviewing your code after the deadline.
- They will make deductions based on the Rubric provided below.
- To ensure that you don’t lose any points in code review, you must review the rubric and make sure that you have followed the instructions provided in the project correctly.
## Rubric
### General guidelines:
- Did not save the notebook file prior to running the cell containing "export". We cannot see your output if you do not save before generating the zip file. This deduction will become stricter for future projects. (-3)
- Used concepts/modules (ex: pandas) not covered in class yet (built-in functions that you have been introduced to can be used) (-3)
- import statements are not mentioned in the required cell at the top of the notebook (-1)
- Hardcoded answers or data structures (full points)
### Question specific guidelines:
- `cell` (3)
- Function does not typecast based on column names (-1)
- Function does not multiply the values in the pop column by 1000 (-1)
- Function is defined more than once (-1)
- Q1 (4)
- Incorrect logic is used to answer (-2)
- Required functions are not used to answer (-1)
- Q2 (4)
- Incorrect logic is used to answer (-2)
- Required functions are not used to answer (-1)
- Q3 (4)
- Incorrect logic is used to answer (-2)
- Required functions are not used to answer (-1)
- Q4 (4)
- Incorrect logic is used to answer (-1)
- Recomputed variable defined in Q3 (-1)
- Required functions are not used to answer (-1)
- Q5 (4)
- Incorrect logic is used to answer (-2)
- Required functions are not used to answer (-1)
- Q6 (4)
- Incorrect logic is used to answer (-2)
- Required functions are not used to answer (-1)
- Q7 (4)
- Incorrect logic is used to answer (-2)
- Required functions are not used to answer (-1)
- Q8 (5)
- Incorrect logic is used to answer (-2)
- Hardcoded income levels (-1)
- Required functions are not used to answer (-1)
- Q9 (4)
- Incorrect logic is used to answer (-2)
- Required functions are not used to answer (-1)
- `get_col_dict` (3)
- Incorrect logic is used in function (-2)
- Function is defined more than once (-1)
- `dict_2015` (3)
- Data structure is defined incorrectly (-3)
- `dict_2020` (3)
- Data structure is defined incorrectly (-3)
- Q10 (2)
- Required data structures are not used to answer (-1)
- Q11 (2)
- Required data structures are not used to answer (-1)
- Q12 (3)
- Incorrect logic is used to answer (-1)
- Required data structures are not used to answer (-1)
- Q13 (4)
- Incorrect logic is used to answer (-2)
- Required data structures are not used to answer (-1)
- Q14 (4)
- Incorrect logic is used to answer (-2)
- Required data structures are not used to answer (-1)
- Q15 (4)
- Incorrect logic is used to answer (-1)
- Recomputed variables already defined in q13 and q14 (-1)
- Required data structures are not used to answer (-1)
- `dict_2015` (2)
- Incorrect rural_alb calculation in data structure (-2)
- `dict_2020` (2)
- Incorrect rural_alb calculation in data structure (-2)
- Q16 (2)
- Required data structures are not used to answer (-1)
- `rural_non_alb_bin_2015_dict` (5)
- Data structure is defined incorrectly (-5)
- `rural_non_alb_bin_2020_dict` (5)
- Data structure is defined incorrectly (-5)
- Q17 (2)
- Required data structures are not used to answer (-1)
- Q18 (4)
- Incorrect logic is used to answer (-2)
- Required data structures are not used to answer (-1)
- Q19 (5)
- Incorrect logic is used to answer (-2)
- Required data structures are not used to answer (-2)
- Q20 (5)
- Incorrect logic is used to answer (-2)
- Required data structures are not used to answer (-2)
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment