Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: soil list result does not always provide LCC #119

Open
shrouxm opened this issue Jun 18, 2024 · 8 comments
Open

bug: soil list result does not always provide LCC #119

shrouxm opened this issue Jun 18, 2024 · 8 comments
Assignees
Labels
bug Something isn't working Engineering

Comments

@shrouxm
Copy link
Member

shrouxm commented Jun 18, 2024

Description

Sometimes the LCC values for list_soils are "nan" or "None". Not sure if this is due to missing data or an algorithm bug. Either we, we should return better values than "nan" or "None".

Steps To Reproduce

Query list_soils with the coordinates {"lon": -122.084000, "lat": 37.422000}.

Solution

  • When soil ID returns LCC values as nan or none, display "Not available" in pbody1 style.

Actual behavior

LCC values render as "nan" or "None"

Additional context

Example result json:

{
      "id": {
        "name": "Hangerone",
        "component": "Hangerone",
        "score_loc": 1.0,
        "rank_loc": "1"
      },
      "site": {
        "siteData": {
          "mapunitID": "1882928",
          "componentID": "24611985",
          "componentKind": "Series",
          "dataSource": "SSURGO",
          "textureInfill": "No",
          "rfvInfill": "No",
          "componentPct": 90,
          "distance": 133.0,
          "minCompDistance": 133.0,
          "slope": 1.0,
          "nirrcapcl": "nan",
          "nirrcapscl": "None",
          "nirrcapunit": "nan",
          "irrcapcl": "nan",
          "irrcapscl": "None",
          "irrcapunit": "nan",
          "taxsubgrp": "Cumulic Vertic Endoaquolls",
          "sdeURL": "https://casoilresource.lawr.ucdavis.edu/sde/?series=hangerone",
          "seeURL": "https://casoilresource.lawr.ucdavis.edu/see/#hangerone"
        },
        "siteDescription": "The Hangerone series consists of very deep, poorly drained soils that formed in alluvium from mixed rock sources. Hangerone soils are in basins. Slopes range from 0 to 2 percent. The mean annual precipitation is about 14 inches and the mean annual temperature is about 60 degrees F."
      },
      "esd": {
        "ESD": {
          "ecoclassid": ["R014XG903CA"],
          "ecoclassname": ["Salt Marsh"],
          "esd_url": [""]
        }
      },
      "bottom_depth": {
        "0": 24,
        "1": 42,
        "2": 68,
        "3": 88,
        "4": 115,
        "5": 183,
        "6": 225
      },
      "sand": {
        "0": 20.6,
        "1": 15.8,
        "2": 16.0,
        "3": 18.5,
        "4": 24.7,
        "5": 44.1,
        "6": 22.0
      },
      "clay": {
        "0": 41.8,
        "1": 50.7,
        "2": 49.6,
        "3": 43.8,
        "4": 33.7,
        "5": 24.4,
        "6": 48.6
      },
      "texture": {
        "0": "Clay",
        "1": "Clay",
        "2": "Clay",
        "3": "Clay",
        "4": "Clay loam",
        "5": "Loam",
        "6": "Clay"
      },
      "rock_fragments": {
        "0": 2,
        "1": 1,
        "2": 0,
        "3": 0,
        "4": 0,
        "5": 30,
        "6": 0
      },
      "cec": { "0": "CEC", "1": "CEC" },
      "ph": {
        "0": 8.3,
        "1": 8.3,
        "2": 8.4,
        "3": 8.6,
        "4": 8.5,
        "5": 8.6,
        "6": 8.2
      },
      "ec": {
        "0": 2.0,
        "1": 2.0,
        "2": 2.0,
        "3": 2.0,
        "4": 2.0,
        "5": 2.0,
        "6": 2.0
      },
      "lab": {
        "0": [41.22, 1.45, 6.17],
        "1": [41.22, 1.45, 6.17],
        "2": [41.22, 1.45, 6.17],
        "3": [60.67, 0.21, 8.29],
        "4": [71.25, -0.45, 8.34],
        "5": [71.62, 0.23, 14.6],
        "6": [41.23, 0.35, 6.53]
      },
      "munsell": {
        "0": "10YR 4/1",
        "1": "10YR 4/1",
        "2": "10YR 4/1",
        "3": "2.5Y 6/1",
        "4": "2.5Y 7/1",
        "5": "2.5Y 7/2",
        "6": "2.5Y 4/1"
      }
    }
@shrouxm shrouxm added the bug Something isn't working label Jun 18, 2024
@shrouxm shrouxm added this to the Capri milestone Jun 18, 2024
@shrouxm shrouxm added this to LandPKS Jun 18, 2024
@github-project-automation github-project-automation bot moved this to Todo in LandPKS Jun 18, 2024
@DerekCaelin DerekCaelin modified the milestones: Capri, LandPKS Backlog Jul 19, 2024
@jjmaynard
Copy link
Collaborator

@DerekCaelin This is an issue with missing data in the SSURGO database. SoilWeb returns missing LCC fields for this particular component.

@DerekCaelin
Copy link

So, there is not an issue with the algorithm. We should figure out how to present this lack of information from SSURGO. Jon will reach out to SSURGO asking how we should report missing LCC.

@DerekCaelin
Copy link

Derek to talk with @CourtneyLee333 about this.

@CourtneyLee333
Copy link

In other places where our external sources are missing data we say "None Available". Do we need a different pattern here?

@DerekCaelin
Copy link

DerekCaelin commented Nov 20, 2024

I'd be fine with that. It looks like the solution we are proposing is:

IF Soil ID LCC returns nan or none (e.g. for the "Cheshire" soil available at 41.65192, -72.68794) THEN display "Not available" - does that sound right?

@CourtneyLee333
Copy link

If that makes sense to the soil scientists in the house, then yes. If there is a more nuanced message we can deliver that would be good to know.

@DerekCaelin
Copy link

@shrouxm could you take on the solution described above? ☝️

@shrouxm
Copy link
Member Author

shrouxm commented Nov 26, 2024

@DerekCaelin sure, not sure if i will get to it this sprint, but if not then next sprint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Engineering
Projects
Status: Todo
Development

No branches or pull requests

4 participants