Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bug: soilid data rank number is being improperly assigned due to a missing dataframe sorting step

オープン
#256 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
data

調査の方向性

Start by locating the rank_soils function and inspect how its dataframe is ordered before rank_data is assigned. Reproduce the reported point at 44.63165, -123.19684, then verify that the component with the highest score_data receives rank_data 1 and that the returned soilRank ordering is correct.

索引モデルが issue の本文から書いたものです。

説明

Description

Current 'rank_soils' function is missing a dataframe sorting step required to correctly assign a number ranking for the 'rank_data' field returned from the api.

Steps To Reproduce

create point in app and populate user data with values that are similar to a soil with a low location rank. Because of the incorrect ordering of the dataframe, the component where 'rank_data' = 1 will not be the component with the highest 'score_data'.

Expected behavior

Willamette has the highest "score_data":0.942 and is correctly assigned the top "rank_data":"1"

Corrected rank_soils return with texture class entered for 112-155cm depth and correct sorting
# Sort dataframe to correctly assign Rank_Data
D_final = D_final.sort_values(by=["soilID_rank_data", "Score_Data"], ascending=[False, False])
{
   "metadata":{
      "location":"us",
      "model":"v2"
   },
   "soilRank":[
      {
         "name":"Woodburn",
         "component":"Woodburn",
         "componentID":25270809,
         "score_data_loc":0.913,
         "rank_data_loc":"1",
         "score_data":0.906,
         "rank_data":"2",
         "score_loc":0.92,
         "rank_loc":1,
         "componentData":"Data Complete"
      },
      {
         "name":"Willamette",
         "component":"Willamette",
         "componentID":25270986,
         "score_data_loc":0.765,
         "rank_data_loc":"2",
         "score_data":0.942,
         "rank_data":"1",
         "score_loc":0.588,
         "rank_loc":2,
         "componentData":"Data Complete"
      },
      {
         "name":"Amity",
         "component":"Amity",
         "componentID":25270996,
         "score_data_loc":0.571,
         "rank_data_loc":"3",
         "score_data":0.906,
         "rank_data":"3",
         "score_loc":0.237,
         "rank_loc":3,
         "componentData":"Data Complete"
      },
      {
         "name":"Dayton",
         "component":"Dayton",
         "componentID":25270995,
         "score_data_loc":0.407,
         "rank_data_loc":"4",
         "score_data":0.794,
         "rank_data":"4",
         "score_loc":0.02,
         "rank_loc":4,
         "componentData":"Data Complete"
      }
   ]
}

Actual behavior

Current results for the test point: 44.63165, -123.19684

Willamette has highest "score_data" but is ranked 2 for "rank_data" Current rank_soils return with texture class entered for 112-155cm depth with missing sorting step
{
   "metadata":{
      "location":"us",
      "model":"v2"
   },
   "soilRank":[
      {
         "name":"Woodburn",
         "component":"Woodburn",
         "componentID":25270809,
         "score_data_loc":0.913,
         "rank_data_loc":"1",
         "score_data":0.906,
         "rank_data":"1",
         "score_loc":0.92,
         "rank_loc":1,
         "componentData":"Data Complete"
      },
      {
         "name":"Willamette",
         "component":"Willamette",
         "componentID":25270986,
         "score_data_loc":0.765,
         "rank_data_loc":"2",
         "score_data":0.942,
         "rank_data":"2",
         "score_loc":0.588,
         "rank_loc":2,
         "componentData":"Data Complete"
      },
      {
         "name":"Amity",
         "component":"Amity",
         "componentID":25270996,
         "score_data_loc":0.571,
         "rank_data_loc":"3",
         "score_data":0.906,
         "rank_data":"3",
         "score_loc":0.237,
         "rank_loc":3,
         "componentData":"Data Complete"
      },
      {
         "name":"Dayton",
         "component":"Dayton",
         "componentID":25270995,
         "score_data_loc":0.407,
         "rank_data_loc":"4",
         "score_data":0.794,
         "rank_data":"4",
         "score_loc":0.02,
         "rank_loc":4,
         "componentData":"Data Complete"
      }
   ]
}
主要言語
Python
スター
2
フォーク
3
平均マージ
21時間 49分
マージ済み PR(30日)
3

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

techmatters/soil-id-algorithm のほかの issue

techmatters/soil-id-algorithm の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。