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

Add yield forecasting notebook #362

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

thomasfrederikse
Copy link
Contributor

We have created an example notebook on how to use Planetary Variables to make yield forecasts. See also issue #357

@thomasfrederikse
Copy link
Contributor Author

@yoann-malbeteau @matthew-ballard Could one of you review of this notebook to get it ready for merging?

@yoann-malbeteau
Copy link
Contributor

I have few comments

  • I would call it "Regional Yield Forecast" to avoid confusion with field yield forecast (that include farmers practices)
  • Rather than adding the CSVs, would it be better to use the SH stat API (or Planet API) to extract the timeseries ?
  • Are you trying to showcase the yield_forecast bundles ? If so, I could be better to explain how you get the data ? Ideally, using a region within the sandbox.
  • Planet_style is not available to external user. I would remove it.
  • in the figure for LST why do you plot both ? can you just invert the y axis (rather than put the value to negative) I can be confusing.
  • Why do you need two types of correlation ?
  • Would it be better to "forecast 2022 and 2023" as a validation and then finish with the 2024 "real" forecast ?
  • To improve readability: I would be nice to have the explanation for each variable at the beginning (like in a format of Why? about yield forecast?, what? PVs and How ? forecast model) and then we can jump directly into the yield forecast exercise.

@thomasfrederikse
Copy link
Contributor Author

Thanks! I just updated the notebook with your comments in mind. See below:

- I would call it "Regional Yield Forecast" to avoid confusion with field yield forecast (that include farmers practices)
Done
- Rather than adding the CSVs, would it be better to use the SH stat API (or Planet API) to extract the timeseries ? Are you trying to showcase the yield_forecast bundles ? If so, I could be better to explain how you get the data ? Ideally, using a region within the sandbox.
Good point. I chose this region because of the availability of yield data from USDA. VOD is not available as sandbox data at all. Furthermore, obtaining the data would add massive chunks of code to the notebook, which reduces the readability, as we just want to show how a simple forecasting algorithm could look. Therefore, I added the time series to the notebook.
- Planet_style is not available to external user. I would remove it.
Double-checked: the code also works without using planet_style and the plots show up good.
- in the figure for LST why do you plot both ? can you just invert the y axis (rather than put the value to negative) I can be confusing.
Yes, that’d be much better. I updated the plots
- Why do you need two types of correlation ?
Some people prefer the Spearman rank correlation over the standard Pearson coefficient. The differences between both are rather small, but for the sake of completeness, I’ve listed both.
- Would it be better to "forecast 2022 and 2023" as a validation and then finish with the 2024 "real" forecast ? Yes, that’s better.
Done
- To improve readability: I would be nice to have the explanation for each variable at the beginning (like in a format of Why? about yield forecast?, what? PVs and How ? forecast model) and then we can jump directly into the yield forecast exercise.
Yes, good idea. I’ve re-ordered the descriptions.

@yoann-malbeteau yoann-malbeteau self-requested a review December 2, 2024 16:16
Copy link
Contributor

@yoann-malbeteau yoann-malbeteau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you. Very nice example

@thomasfrederikse thomasfrederikse merged commit 43b0f44 into planetlabs:master Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants