openfoodfacts / open-prices

An open database of prices 🧾💸💰🏷️🤑🍽️
https://prices.openfoodfacts.org
GNU Affero General Public License v3.0
39 stars 12 forks source link

Proof: add new "consumption-related" fields on receipts: total amount, items count #387

Open raphodn opened 2 months ago

raphodn commented 2 months ago

Story

When uploading a proof, we could ask the user to input the number of items on the receipt, and it's total amount.

This could be useful metadata to show afterwards to the user.

Ideally this data should only be sent back to the owner, no to other users !

Todo

serpico commented 4 weeks ago

Reply to https://github.com/openfoodfacts/open-prices/discussions/339#discussioncomment-10716735

I'm not opposed to it, but I'm concerned about some contributors wearing out, and again my receipts aren't that long.

Thinking of it, maybe some additional thought should be put into this, how long does it take to input X products, break down users by number of product input per session, etc...see if there's a relation, if the numbers drop. It might be linked to gamification ( an option for "hardcore" contributors ) or disabled by default in the parameters, just a thought though...

probably fit #171 as well

raphodn commented 4 weeks ago

You're right, I think I should specify a few things :

monsieurtanuki commented 4 weeks ago

My 2 cents

Sounds a bit like https://github.com/openfoodfacts/smooth-app/issues/5417 Not convinced at all it makes sense to store those new data in the model. I would rather consider it as a input help ("btw it's your 4th product, and 6.45€ spent so far"). Storing them implies data consistency maintenance. Computing them on the fly should be easy, though.

raphodn commented 4 weeks ago

Also missing : the number of products bought (for instance 2x nutella)

serpico commented 4 weeks ago

If the number of products is added, I feel it should be linked/connected/available somehow to the list feature on smoothie down the road, whether it's product(s) user want to buy or even check the price of...on my shopping list I have items for this, some to buy others just to remember to take a pic to update the price on OP.

171

raphodn commented 4 weeks ago

This weekend during the offdays we talked quite a bit about "shopping sessions" (derived from a single receipt (1 session), or from GDPR requests (multiple sessions)). And building personal dashboards from them. And allowing users to dive in their previous sessions. Comparing over time. Having "basket scores". Etc

We will have to think about fitting this somewhere between the current Prices and Proofs models.

/ brainstorming

raphodn commented 3 weeks ago

cc @teolemon @raphael0202 can we talk about this on wednesday ? Or give your input here :)

raphodn commented 3 weeks ago

Storing them implies data consistency maintenance. Computing them on the fly should be easy, though.

We don't/won't use it for data consistency, because there is too many edge cases :

But it could definitely help :

It's the idea of seperating "personal spendings" with "contributing to Open Prices". It will not always be 100% consistent/shared I agree

raphael0202 commented 2 weeks ago

I would be in favor of adding a new field to the Proof table to add number of items + total amount. But how this data will be filled in, that's another question ;) One project I really want to tackle in the coming months is the automatic extraction of product name and price from receipts (and store address & date), it would speed up considerably the process of adding prices through receipts. The total amount and the number of prices would be informations extracted using the model. However, in our model schema, we should take care of separating "gold data" (data submitted by the user) from data inferred from models, so that we can be sure of what has been validated manually.

monsieurtanuki commented 2 weeks ago

I would be in favor of adding a new field to the Proof table to add number of items + total amount. But how this data will be filled in, that's another question ;)

Again, not convinced by that field addition, as they can be computed on the fly after creation, or during creation for user for input double-checks. In addition to that, @teolemon recently complained again that in Smoothie we don't offer the feature "add prices to an 'old' proof from the proof gallery". I said "What's the use case?". He mentioned an actual personal case of "a 48 line proof from which I entered 10 prices once, and I want to complete the rest later". TL;DR the number of items and the total amount are not related to a proof in a 1-to-1 relationship, therefore they have nothing to do at the proof level. Unless you're interested for stats reason in the typical number of items of receipts, regardless of the prices actually entered, but then that's another story.

One project I really want to tackle in the coming months is the automatic extraction of product name and price from receipts (and store address & date), it would speed up considerably the process of adding prices through receipts.

I even imagined a step further, when I painfully collected price tags for skyr and fromage blanc. Some kind of "price tag session": I set the date, the location, and then I provide a list of price tag pictures, that contain both the barcode and the price, like that: image And "à la Robotoff", I'm being asked to confirm the barcode and the price suggestions.

raphodn commented 2 weeks ago

as they can be computed on the fly after creation, or during creation for user for input double-checks.

again, users will not always necessarily add all the products on a given receipt. but having the full amount (taking into account receipt-wide discounts for instance) is the first step towards consumption-tracking features.

Some kind of "price tag session"

Yes we discussed this during the OFFdays and during a weekly meeting, the long-term goal would be to move the price tag addition to a platform à la Hunger Games, where it would be crowdsourced/verified. It's price data, but not consumption data, so a notch below in terms of value.

raphodn commented 2 weeks ago

Linked subject (possibly in another issue): allow users to input the number bought for a given item. Say in a receipt I buy 2x Snickers, I will add its price once, but I want to store somewhere the info that it was bought in a larger quantity. This would rather be stored on the Price model. For instance receipt_quantity. Defaults to 1.

monsieurtanuki commented 2 weeks ago

As a user I'm interested in prices rather than in consumption tracking, and therefore I would skip the additional input of quantities. That said, no objection against adding the receipt_quantity field in the Price model, with a default of 1.