boxwise / boxtribute

The code base for Boxtribute 2.0, a humanitarian aid web application making it easy to source, store and distribute goods to people in need in a fair and dignified way
https://www.boxtribute.org/
Apache License 2.0
33 stars 11 forks source link

[5th viz] create user story / spec for 5th viz #932

Closed seinig closed 4 weeks ago

seinig commented 1 year ago

Sunburst Diagram with drill down showing all boxes that currently have state 'in stock'. For this first version of the sunburst we can realize the same grouping and the same hierarchy as the Boxtribute Stock Overview:

  1. product category in the centre
  2. product name (merged from product with same name but different gender)
  3. gender
  4. sizes

FE

Grouping

Filter

This is for coordinator of donations on both sides, sending and receiving NGOs: I, as coordinator of donations of a sending NGO need an quick overview that is easily explorable of what we have in Stock, in order to decide whether we can go ahead with the organizations of a shipment to a NGO with specific needs. Here it would be good to have both items and box numbers in sight: Items are relevant to compare with the communicated need of the receiving NGO. Box number is relevant in order to estimate, whether this is worth packing on a pallet for shipment (ca. 22 boxes are necessary to fill a pallet)

pylipp commented 1 year ago

@seinig I think I get the basic idea, though I have some questions:

  1. Should the sunburst diagram contain multiple rings for product name, gender, size each? A sketch about how the diagram should be built would be helpful. I've previously seen sunbursts being used for data hierarchy, e.g. here: product category -> (gender ->) product name -> number of boxes/items but I'm having trouble to also see "size" in the picture.
  2. From the user story I read that only the current inventory is relevant, not the past inventory (which is indicated by the first sentence showing all boxes [...] at certain time point). How important is it to know the inventory at a point in the past?
  3. Filter "Option to toggle this to boxes would be very helpful" I don't understand. Do you mean by default the displayed values should be item count, but toggling to box count should be possible?

From looking at the nivo documentation I think we definitely need a FE-BE meeting to discuss the data interface with @MaikNeubert but that's not urgent.

seinig commented 1 year ago
  1. Yes, this is how we imagined it. I attached a sketch with only two product categories in the centre ring which would be the top hierarchy, just as in the Stock Overview. For two product names (Joggers & Longsleeves) I 'showed' also gender and sizes. That is, how many items of i.e. female longsleeves in size S are 'in stock'. (Sorry, 'pullover' should say 'jumpers')

  2. You are totally right, for this use case only the current state is relevant. That only would matter for another use case that doesn't have priority now (going more into the analytics direction). I just adapted the description accordingly.

  3. Yes, i think we're on the same page. By default the 100% of the sunburst/donut chart should be seperated by item count of the lower hierarchies. "699 items out of 31.608 total items are Female-Longsleeves-Size(S)" (with the other hierarchies in between). The Alternative with lower priority is to change this to a box perspective (helpfull for packing pallets or estimating volume in warehouse): "33 boxes out of 527 total boxes are filled with items 'Female-Longsleeves'; 13 of those in Size S". This would be helpfull, but in case this is taking too much effort, showing the according box count in brackets behind the item-count would be fine too. ("Longsleeves-Female-Size(S): 699 (13 boxes))

That's good to know, maybe during the Hackaton might be a good time for this. WhatsApp Image 2023-10-20 at 14 24 32

pylipp commented 12 months ago

@MaikNeubert @HaGuesto I propose the following interface:

type Query {
  stockOverview(baseId: Int!): StockOverviewData
}

type StockOverviewData implements DataCube {
  facts: [StockOverviewResult!]!
  dimensions: StockOverviewDataDimensions!
}

type StockOverviewResult {
  categoryId: Int!
  productName: String!
  gender: ProductGender!
  sizeId: Int!
  tagIds: [Int!]
  locationId: Int!
  boxState: BoxState!
  itemsCount: Int!
  boxesCount: Int!
}

type StockOverviewDataDimensions {
  category: [DimensionInfo!]!
  size: [DimensionInfo!]!
  tag: [TagDimensionInfo!]!
  location: [DimensionInfo!]!
}
MaikNeubert commented 12 months ago

@pylipp looks good