earthrise-media / vacs-map

Exploring VACS project data
1 stars 0 forks source link

Aggregate crop data to grid dot #4

Closed kelsey-taylor closed 10 months ago

kelsey-taylor commented 10 months ago

We have a view in mind where you'd be able to see the most prominent crop at any grid dot location — could we slice the data so this is easily viewable? I'm thinking the most prominent crop is what we want, plus that crop's maximum yield and maybe average yield for comparison

Would also be useful to see the yield ratio at each grid dot averaged across all crops — where will most crops produce less or more in the future?

mwbernard commented 10 months ago

trying this out in observable first

these are avg yield ratios for all crops (not a weighted avg in any way) with white => yield ratio of 1, blue positive and red negative

SSP370

Image

SSP126

Image

mwbernard commented 10 months ago

I'm thinking the most prominent crop is what we want, plus that crop's maximum yield and maybe average yield for comparison

@kelsey-taylor so this would be for each dot we get the crop with the highest yield ratio (or yield?) and then we color the dot by crop type (or by yield/yield ratio)?

mwbernard commented 10 months ago

could also try just summing yield ratios so that dots where only 1 crop has data aren't given equal weight

kelsey-taylor commented 10 months ago

this is looking cool so far! definitely can see a diff between the two scenarios with the average yield ratio

@kelsey-taylor so this would be for each dot we get the crop with the highest yield ratio (or yield?) and then we color the dot by crop type (or by yield/yield ratio)?

I think yield is going to be more interesting here but both yield and yield ratio could be useful. and yes, colored by crop type!

mwbernard commented 10 months ago

In the same notebook as above ^

Dots colored by crop with highest yield at that grid cell, sized (very) roughly by total yield

Screenshot 2023-11-10 at 10 57 05 AM

mwbernard commented 10 months ago

Highest yield ratio at each grid cell, colored by crop type

Screenshot 2023-11-10 at 11 18 37 AM Screenshot 2023-11-10 at 11 18 28 AM

mwbernard commented 10 months ago

@ebrelsford this has a record of the aggregation efforts thus far. we've done two main approaches:

  1. A (non-weighted) mean of yield ratios for all crops at each grid cell (gives extra weight to data for crops that grow where few other crops do)
  2. Highest total yield at each grid cell, colored by crop
  3. Highest yield ratio at each grid cell, also colored by crop

The main questions I'm wondering about are: a) whether it makes sense to weight the avg calculation in (1) in some way? b) whether any of these approaches stand out to you as more or less interesting? c) when adding one or more of these to the app, should we do the calculations up front when we load the data, and give each its own column?

ebrelsford commented 10 months ago

@mwbernard I'm a little skeptical about using yield ratio like this as it's susceptible to outliers in a way that might be misleading. For example, imagine a place that grows a negligible amount of taro (say 1.25 for argument's sake) and it goes up a tiny amount to a total of 5, so it looks like it's up 4x. But there might be another crop that has a yield of 100k but only went up by 1.5x. It seems to me this should probably be weighted somehow and feels like something we should run by AgMIP before getting too far down this road.

kelsey-taylor commented 10 months ago

moving to backlog given the new direction

in short, we aren't planning to have any views with this data shown for the entire continent. there was some conversation about adding a packed circle diagram when you click on a grid dot on the crop page, though.

kelsey-taylor commented 10 months ago

gonna close this as no longer relevant