Files
freeCodeCamp/curriculum/challenges/japanese/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md
2024-02-19 19:27:27 -06:00

3.3 KiB
Raw Blame History

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5e4f5c4b570f7e3a4949899f 海面水位の予測プログラム 10 462370 sea-level-predictor

--description--

You will be working on this project with our Gitpod starter code.

Python カリキュラムの対話式教育コンテンツを引き続き開発中です。 現在、下記の freeCodeCamp.org YouTube チャンネルで、このプロジェクトの完了に必要なすべての知識について説明する動画をいくつか公開しています。

--instructions--

1880 年以降の世界的な平均海面変化のデータセットを分析します。 データを使用して、2050 年までの海面の変化を予測します。

データを使用して、次のタスクを完了してください。

  • Pandas を使用して epa-sea-level.csv からデータをインポートします。
  • matplotlib を使用し、x 軸として Year 列、y 軸として CSIRO Adjusted Sea Level 列を使用する散布図を作成します。
  • scipy.statslinregress 関数を使用して、最も良く当てはまる線の傾きと y 切片を得ます。 散布図の上に最良の当てはめ線 (回帰直線) を描きます。 線を 2050 年まで伸ばし、2050 年の海面上昇を予測します。
  • データセットにある 2000 年から最新年までのデータを使用し、新しい最良の当てはめ線をプロットします。 線を 2050 年まで伸ばし、2000 年以降の上昇率が続くと仮定した場合の 2050 年の海面上昇を予測します。
  • x のラベルを Year、y のラベルを Sea Level (inches) とし、タイトルを Rise in Sea Level とします。

このボイラープレートには、画像を保存して返すコマンドも含まれています。

開発

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. すでに test_module.py から main.py にテストをインポートしてあります。

提出

プロジェクトの URL をコピーし、freeCodeCamp に提出してください。

データのソース

世界的な海面絶対高の変化、18802014年、アメリカ合衆国環境保護庁提供。CSIRO (2015 年)、NOAA (2015 年) のデータを使用。

--hints--

すべての Python テストが成功する必要があります。


--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.