earthrise-media / vacs-map

Exploring VACS project data
1 stars 0 forks source link

Add crop comparison view to the profile page #48

Open kelsey-taylor opened 10 months ago

kelsey-taylor commented 10 months ago

blocked by design

kelsey-taylor commented 10 months ago

designs are updated — moving to to-do

mwbernard commented 9 months ago

@cameronkruse Working on this functionality today and was hoping you could help verify method for getting this 'compared yield ratio' figure that we want to use.

so... as a baseline to get on the same page - currently in the app we are universally showing yield ratio figures, calculated as:

([selectedCrop]_futureYield - [selectedCrop]_historical) / [selectedCrop]_historical

This gives us yield ratio figures where a negative value means the crop will have less yield in future, and positive means more. A 0 value means they're equal. And our color spectrum mirrors this, with neutral color being the 0 values, most orange being the lowest value, and most green the highest.

My understanding of our goal for this new comparison metric is that we want essentially the same logic as above, but instead of the 0 value being when future_cropA === historical_cropA, 0 should be when future_cropA === future_cropB. My question is can we do this by just replacing the historical figures in the formula above with the reference crop figures, so:

([selectedCrop]_futureYield - [referenceCrop]_future) / [referenceCrop]_future

This isn't what you did in this notebook, but I also don't think you were using the same yield ratio figure in that example, or the same coloring method.

ALTERNATIVELY, if we aren't able to directly compare the yield figures between different crops like this, I think we'd want to calculate the yield ratio as above for both cropA and cropB - and then get a yield ratio of yield ratios... so:

([selectedCrop]_yieldratio - [referenceCrop]_yieldratio) / [referenceCrop]_yieldratio

Then we could color by the same method, where a 0 value means the yield ratios are equal, orange means selected yield ratio is smaller than reference, and green the opposite. Now that I write this out I'm feeling like this option makes the most sense, but I'm going to leave the other here in case I'm wrong!

Any thoughts or guidance here would be helpful!

mwbernard commented 9 months ago

Moving to backlog as this is now unplanned. Not going to close the issue entirely though. For reference, if we were to add this feature, the yield ratio of yield ratios described above as:

([selectedCrop]_yieldratio - [referenceCrop]_yieldratio) / [referenceCrop]_yieldratio

would be the desired metric to show.