Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Top-level goal of notebook: Read a CSV file into a pandas DataFrame and add specific columns to it. These columns are added by applying functions
Top-level goal of notebook: Read a CSV file into a pandas DataFrame and add specific columns to it. These columns are added by applying functions to specific columns. The columns to add include:
- A datetime column that converts "Garmin time" to standard (unix epoch) time. Note that Garmin doesn't use standard epoch offsets for their timestamps. Rather than using the number of seconds that have elapsed since midnight on January 1, 1970, they use the number of seconds from midnight on December 31, 1989.
- A conversion of "semicircles" of latitude and longitude to two different formats: degrees, minutes, seconds 3-tuples and fractional degrees. For example, a latitude of 504719750 semicircles corresponds to a 3-tuple of degrees, minutes and seconds of (42, 18, 18.43) and 42.305121 degrees.
- A "normalized speed" column that consists of the values for speed modified to remove outliers by replacing them with upper and lower bounds as well as normalized to z-values (i.e. by subtracting the mean from each value and dividing the result by the standard deviation).
In addition, it needs a completed function that looks at the difference between sequential rows to determine whether the cyclist is slowing down or not.
Your task for this assignment is to debug this notebook to produce the desired results as shown in the assertions below.