freeCodeCamp/CurriculumExpansion

Sea Level Predictor (Certification project)

Closed this issue · 4 comments

Type O
Third bullet: "Make sure the line goes through the year 2050 to predict the sea level rise in 2050.

This project seems like a bit briefer/easier than the others.

The instructions did seem straight forward and easy to understand.

Following the tutorial on scipy, I noticed this method of getting the variables:
slope, intercept, r_value, p_value, std_err = linregress(x, y)

In some ways, this is a kind of convenient way of seeing all of what was output by linregress(x, y).

I wouldn't be surprised if a lot of submissions would include that method because it's in documentation.

@rayjohnson529 Thanks for your review and input!

Maybe we should switch the order and put this project earlier since it is easier. Your way of getting the values is a little quicker. We won't be giving the solution to students so you could be right about people using that method. As long as people get the values, different methods are allowed.

Your rephrase of the third bullet makes since but after re-reading the current version, I think the current version works as well.

I've just completed the project, and I'd agree with @beaucarnes with regards to the project difficulty. I found it more approachable than the projects visualizing medical data and the time series, and including the project earlier is a good idea.

For the project at hand, the line describing the y-axis mispells the word axis

and the "CSIRO Adjusted Sea Level" column as the y-axix.

Past this typo, the instructions are rather clear, but I found the note regarding the year 2050 to be slightly misleading. The test actually consider data points up to the year 2050, not included. Effectively, the lines of best fit map data in the [1880-2049] and [2000-2049] timeframe. The suggestion is to either rephrase the assignment, from the previous:

Make the line go through the year 2050 to predict the sea level rise in 2050.

To something similar to:

For the line consider values up to the year 2050, not included.

Similarly, and for the second line, the text could be simplified:

Make the line also go through the year 2050 to predict the sea level rise in 2050 if the rate of rise continues as it has since the year 2000.

To something similar to:

Consider again values up to the year 2050, not included, to predict the sea level rise if the rate of rise continues as it has since the year 2000.

Alternatively, we could update the test to consider the year 2050 as well.

I'd like to add another note for the lines of best fit. At first, I drew the lines using two datapoints only:

x1 = int(df.iloc[0]["Year"])
x2 = 2049
y1 = intercept + x1 * slope
y2 = intercept + x2 * slope

plt.plot([x1, x2], [y1, y2])

This works, as the line is represented by a straight segment and it's enough to consider its two extremes. Unfortunately however, the code doesn't pass the test comparing the values in their y coordinate (the test_plot_lines test). The test in question describes one value for each year, so it expects more than two values.

Should we update the test to consider both approaches? Should we update the README, or are the instructions clear already? Perhaps this is not a problem, and something I only encountered. I welcome any comment or suggestion.

Let me know if you need more information or if I wasn't clear enough. For reference, here's my fork: https://repl.it/@borntofrappe/fcc-sea-level-predictor