Friday, November 13, 2020

Things They Should Invent: search and sort grocery websites by nutritional information

In the course of ordinary, in-store, non-pandemic grocery shopping, we often pick up items off the shelf and read the labels. 

During the pandemic, we aren't supposed to be handling items we don't buy. Also during the pandemic, many people are shopping online (either for delivery or for in-store pickup), and (at least according to the marketing emails I'm being bombarded with) grocery store chains seem to be encouraging this.

One thing grocery chains could do to make online shopping easier and to discourage people from handling things in store is for store websites to have extremely robust searching and sorting by ingredients and/or nutritional information.

They often have ingredients and nutritional information that you can click on for individual products, but searchable and sortable would be far more convenient and user-friendly.

Examples:

- Show me all products from the "salad dressing" category sorted in ascending order of sugar content, so I can choose the lowest sugar salad dressing that meets my tastes.

- Let me use the Boolean NOT function to exclude all products that contain my allergens.

This information is already in grocery stores' computers - you can see it when you look up specific products on their website. People already know how to program computers to do things like sorting and boolean search. 

If they could let us do this on store website, it would improve uptake of online shopping and reducing handling of items in-store, and may also introduce consumers to new products that meet their needs better than what they were buying before. A win for everyone!

1 comment:

Lorraine said...

I’ve been advocating various elements of what you’re describing here since around the turn of the century. I call itpubwan, a word I coined originally to mean "public wide area network (or WAN)" but the use cases I came up with for it since then have had more to do with databasing than networking. As for ranked searches of foodstuffs, I recently wrote abrief article on thatin dev.to. That article assumes a little knowledge of SQL, but clearly you’re pretty database literate as you’re talking about boolean not functions and sorting in ascending order. As you point out: "People already know how to program computers to do things like sorting and boolean search." As they say in theSix Million Dollar Manopening credits, "we have the technology." What we don’t have is direct access to the data needed to construct a database such as you describe. The reasons for that are pretty much intellectual property, especially if you consider trade secrets to be part of intellectual property. To have a systematic understanding of the food industry’s range of product offerings is to reverse engineer that industry’s business model. At the point of sale, for example, you get a paper receipt? Why not the option of a machine-readable receipt? Certainly the trasaction itself will appear on your statement (including your online statement) if you charge it using a credit or debit card. But would a machine-readable itemized receipt be too much to ask for? You get a machine-readable receipt with Instacart and the like, in the sense that the receipt is represented as a table in an HTML document. But what would be really nice would be an option to export as Excel or CSV or something, and of course it would be especially nice if UPC (or EAN) barcode were one of the columns, as it serves as a unique identifier of products.

The dev.to article I referenced earlier pertains to a public dataset maintained by the United States Department of Agriculture (but as far as I know downloadable worldwide) called Food Data Central. That database contains many brand-name products, but by no means all, but among major brands, anyway, it should suffice to produce the ranking of salad dressings by sugar content that you describe.

The key is to create an accurate mapping between barcode numbers used "in the trade" to NDB_NO, which is the primary key field to denote foods in the Food Data Central database. That would be a data entry task, and a fairly tedious one, and a fairly inexact one even assuming good-faith effort. I’ve been toying with the idea of doing a Kickstarter or the like to defray some of the expense of amassing a few thousand entries of a UPC-to-NDB table which might hopefully amount to enough of a critical mass to snowball into a useful public reference database given some volunteer recruiting and network effects, but then I inevitably retreat from the idea, sink into despair, assuming that maybe there’s a law of economics that says Information Does Not Want To Be Free, or maybe that food and related companies would come out with the cease and desist letters or even SLAPP lawsuits as a knee jerk response, who knows.

I must thank you profusely for your present blog post as it had not occurred to me that one of the opportunities to exploit the COVID crisis might be as an excuse to implement Pubwan, as the public health need for relatively hands-free (but well-informed) grocery shopping, it could be argued, could outweigh the business community’s interest in trade secrets or a proprietary point of sale interface or whatever.