earthlab / edsc-summer-2020

A repository to store teaching notebooks for the Earth Lab earth data science corps.
3 stars 10 forks source link

01-python-tabular-data #30

Open nquarder opened 3 years ago

nquarder commented 3 years ago

1.10 Missing Data Values & Headers in Text Files

These .csv files have a different header structure than last year, and now there is a column called 'Anomaly.' On top is a screengrab from the notebook from last year, and below that is one from this year.

2020

Screen Shot 2021-03-19 at 3 10 59 PM

2021

Screen Shot 2021-03-19 at 3 07 59 PM

Without changing any of the code from last year and trying to plot temperature in Miami and Montgmery, a key error (KeyError: 'Date') is returned. Changing skiprows=3 to skiprows=4 solves this problem.

nquarder commented 3 years ago

This Challenge cell asks students to plot temperature in Seattle, WA but the data in this .csv are from Montgomery, AL

Screen Shot 2021-03-19 at 3 49 41 PM
nquarder commented 3 years ago

1.13 ## Challenge -- OPTIONAL

This .csv file has also changed slightly from last year.

Without changing the code to generate the plot of CO2 vs time in Barrow, AK a parse error is returned (ParserError: Error tokenizing data. C error: Expected 3 fields in line 151, saw 17).

Last year the first 148 rows needed to be skipped to generate the data frame & plot. Changing skiprows=148 to skiprows=150 solves this.

nquarder commented 3 years ago

It looks like there are no (autograded) tests in this notebook. Is that something we want to consider including here?

nquarder commented 3 years ago

1.5 Text Files & Delimiters

In the 1st sentence of the 2nd block of text, space should be replaced with comma.

(e.g. Below you will find an example of a comma delimited text file.)