aazuspan / sankee

Visualize classified time series data with interactive Sankey plots in Google Earth Engine
https://sankee.readthedocs.io/en/latest/index.html
MIT License
99 stars 15 forks source link

[BUG] Error when some nan values sampled #9

Closed aazuspan closed 3 years ago

aazuspan commented 3 years ago

When running sankify in an area that has some valid samples and some NaN samples, an error is thrown:

Exception: The following values are present in the data and undefined in the labels: [nan]

Instead, the NaN samples should be dropped if the dropna arg is true.

To recreate, run sankee.sankify with the LCMS dataset, 1985 and 2020 data, and the following region:

region = ee.Geometry.Polygon = [[
  [-104.983543, 48.545251],
  [-104.983543, 49.367619],
  [-104.43412, 49.367619],
  [-104.43412, 48.545251],
  [-104.983543, 48.545251]
]]