Skip to content
Raphaël Odini edited this page Oct 6, 2024 · 13 revisions

Products

Top products with prices

unique_scans_n

Date Flavor Top 100 Top 1000
2024-08-24 OFF 80 567
2024-09-13 OFF 81 583
LIMIT = 100
queryset = Product.objects.filter(source="off").order_by("-unique_scans_n")[:LIMIT].values_list("price_count", flat=True)
len(list(filter(lambda pc: pc != 0, list(queryset))))

Number of products with prices per flavor

Date OFF OPF OBF OPPF unknown
2024-09-13 16046 / 3390281 201 / 15618 157 / 30634 33 / 9713 2476 / 4441
from open_prices.products import constants as product_constants
for flavor in product_constants.SOURCE_LIST + [None]:
    print(flavor, Product.objects.filter(source=flavor).filter(price_count__gte=1).count(), "/", Product.objects.filter(source=flavor).count())

Locations

Top countries

from collections import Counter

queryset = Price.objects.values_list("location__osm_address_country", flat=True)
Counter(queryset)

Top cities

from collections import Counter
from django.db.models import F, Value, CharField
from django.db.models.functions import Concat

queryset = Location.objects.annotate(city_country=Concat(F("location__osm_address_city"), Value(":"), F("location__osm_address_country"), output_field=CharField())).values_list("city_country", flat=True)

Counter(queryset)
// top 30, stats from 18/09/2024 (550 results)

'Grenoble, France': 6661,
'Belley, France': 5273,
'Bergen, Norge': 4115,
'Miribel, France': 2752,
'Paris, France': 1123,
'Échirolles, France': 1036,
'Canteleu, France': 858,
'Noyelles-Godault, France': 777,
'Marcq-en-Barœul, France': 687,
'Berlin, Deutschland': 483,
'Veynes, France': 452,
'Nantes, France': 408,
'Münster, Deutschland': 341,
'Levallois-Perret, France': 339,
'Le Kremlin-Bicêtre, France': 304,
'Vincennes, France': 288,
'Lille, France': 285,
'Gap, France': 263,
'Lyon, France': 246,
'Bezons, France': 243,
'Bresson, France': 211,
'Strausberg, Deutschland': 181,
'Avignon, France': 168,
'Mons-en-Barœul, France': 164,
'Aulnay-sous-Bois, France': 148,
'Sant Feliu de Llobregat, España': 143,
'Huningue, France': 131,
'Villeurbanne, France': 125,
'Donzère, France': 115,
'Ouistreham, France': 115
(...)

Top location OSM types

from collections import Counter
from django.db.models import F, Value, CharField
from django.db.models.functions import Concat

queryset = Location.objects.annotate(osm_tag=Concat(F("osm_tag_key"), Value(":"), F("osm_tag_value"), output_field=CharField())).values_list("osm_tag", flat=True)

Counter(queryset)
// top 30, stats from 08/09/2024 (961 locations)

'shop:supermarket': 614,
'shop:convenience': 76,
'boundary:administrative': 25,
'amenity:fuel': 18,
'shop:chemist': 13,
'shop:variety_store': 13,
'place:house': 7,
'highway:bus_stop': 7,
'shop:bakery': 7,
'shop:mall': 7,
'shop:deli': 7,
'shop:frozen_food': 6,
'landuse:retail': 6,
'amenity:pharmacy': 6,
'railway:station': 6,
'landuse:construction': 5,
'shop:greengrocer': 5,
'shop:furniture': 5,
'landuse:industrial': 4,
'shop:department_store': 4,
'shop:farm': 4,
'building:yes': 4,
'shop:wholesale': 4,
'shop:books': 3,
'amenity:fast_food': 3,
'shop:sports': 3,
'place:city': 3,
'shop:doityourself': 3,
'amenity:cafe': 3,
'place:suburb': 3
(...)

Top location "names"

from collections import Counter

queryset = Price.objects.values_list("location__osm_name", flat=True)

Counter(queryset)
// top 30, stats from 18/09/2024 (490 results)

'Auchan': 6220,
'Carrefour Market': 3455,
'Auchan Supermarché': 2889,
'Intermarché': 1850,
'Extra Danmarksplass': 1572,
'Super U': 1186,
'Monoprix': 1153,
"L'Éléfàn": 1137,
'E.Leclerc': 953,
'E. Leclerc': 742,
'Lidl': 686,
'Carrefour': 507,
'Carrefour City': 477,
'Kiwi Bøhmergaten': 443,
'U Express': 428,
'Netto': 391,
'Bunnpris Damsgård': 383,
'Rema 1000 Marken': 317,
'Circle K Viken': 299,
'Aldi': 267,
'Naturalia': 242,
"Bio C' Bon": 234,
'Biocoop': 224,
'Picard': 222,
'Rema 1000 Danmarksplass': 220,
'Intermarché Super Bresson': 211,
'Gigaboks Åsane': 208,
"L'Eau Vive": 200,
'Satoriz Échirolles': 187,
'Europris Xhibition': 175
(...)