3.0 KiB
id, title, challengeType, forumTopicId, dashedName
| id | title | challengeType | forumTopicId | dashedName |
|---|---|---|---|---|
| 5e4f5c4b570f7e3a4949899f | Sea Level Predictor | 10 | 462370 | sea-level-predictor |
--description--
You will be working on this project with our Gitpod starter code.
وما زلنا نطور الجزء التعليمي التفاعلي من منهج Python. الآن، إليك بعض مقاطع الفيديو على قناة اليوتيوب الخاصة بي freeCodeCamp.org التي ستعلمك كلّما تحتاج إليه لإكمال هذا المشروع:
-
Python for Everybody Video Course (14 hours)
-
How to Analyze Data with Python Pandas (10 hours)
--instructions--
You will analyze a dataset of the global average sea level change since 1880. You will use the data to predict the sea level change through year 2050.
Use the data to complete the following tasks:
- Use Pandas to import the data from
epa-sea-level.csv. - Use matplotlib to create a scatter plot using the
Yearcolumn as the x-axis and theCSIRO Adjusted Sea Levelcolumn as the y-axis. - Use the
linregressfunction fromscipy.statsto get the slope and y-intercept of the line of best fit. Plot the line of best fit over the top of the scatter plot. Make the line go through the year 2050 to predict the sea level rise in 2050. - Plot a new line of best fit just using the data from year 2000 through the most recent year in the dataset. 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.
- The x label should be
Year, the y label should beSea Level (inches), and the title should beRise in Sea Level.
The boilerplate also includes commands to save and return the image.
التطوير
Write your code in sea_level_predictor.py. For development, you can use main.py to test your code.
الاختبار
The unit tests for this project are in test_module.py. We imported the tests from test_module.py to main.py for your convenience.
التقديم
Copy your project's URL and submit it to freeCodeCamp.
Data Source
Global Average Absolute Sea Level Change, 1880-2014 from the US Environmental Protection Agency using data from CSIRO, 2015; NOAA, 2015.
--hints--
It should pass all Python tests.
--solutions--
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.