# Şube ve Mağaza Lokasyon Performansı: Toplam Ciro Neden Yanıltır?

> Ekvador'da 54 şubeli bir market zincirinin 4,6 yıllık satış kaydı: toplam hacimle sıralama ile açık gün başına sıralama arasında 15 sıraya varan fark, %54'lük tek eyalet yoğunlaşması ve veri setinde para alanı olmadığı için hesaplanamayan beş KPI.

Kaynak: https://ozgurnurettinozturk.com/sube-ve-magaza-lokasyon-performansi | Bu sayfanin HTML surumu ayni adrestedir ve Ingilizce cevirisini de icerir.

---
# Şube ve Mağaza Lokasyon Performansı: Toplam Ciro Neden Yanıltır?

Şube karşılaştırmasında en sık yapılan hata, mağazaları dönem boyunca sattıkları
toplam miktara göre sıralamaktır. Bu projede Ekvador'da **54 şubeli bir market zincirinin
4,6 yıllık gerçek satış kaydını** — 3.000.888 satır, 83.606 açık şube-günü — inceledim.
Ama işe sıralamayla değil bir ölçüm sorusuyla başladım: veri setindeki “satış” alanı
*para değil, miktar*.

**8,0×**En yoğun ile en sakin şube arasındaki fark

**15 sıra**İki sıralama yöntemi arasındaki en büyük kayma

**%54,0**Tek eyaletin (Pichincha) hacim payı

**5 KPI**Brief'in istediği ama hesaplanamayan metrik

## Veri ve kapsam

Kaynak, Ekvador merkezli **Corporación Favorita** market zincirinin Kaggle'da
yayımlanmış satış kaydı: **01.01.2013 – 15.08.2017**, 1.684 gün, 54 şube, 22 şehir,
16 eyalet, 33 ürün kategorisi. Her satır bir şubenin bir gündeki bir kategorideki satışı; buna şube
nitelikleri, günlük işlem sayısı, tatil takvimi ve petrol fiyatı eşlik ediyor.

Veri gerçek bir zincire ait ve anonimleştirilmemiş: şube adları yerine numara kullanılmış ama
şehir ve eyalet adları açık. Lisans Kaggle yarışma kurallarına tabi — araştırma serbest, ham verinin
yeniden dağıtımı değil. **Bu sayfa ve rapor hiçbir ham satır içermiyor**; yalnızca
toplulaştırılmış sonuçlar var, ham dosyalar yerel klasörde kalıyor.

Veri setinde koordinat, adres veya posta kodu yok. Bu yüzden nokta haritası
çizmedim: enlem-boylam üretmek, olmayan bir kesinliği uydurmak olurdu. Bölge analizi eyalet
düzeyinde yapıldı ve şube düzeyinde hiçbir konum ifşa edilmedi.

## Ölçüm sorusu: “satış” para mı, miktar mı?

Kaggle'ın alan açıklaması `sales` için “toplam satış” diyor ve kesirli
değerlerin mümkün olduğunu ekliyor. Bu iki şekilde okunabilir: **para** (kuruşlar
yüzünden kesirli) ya da **miktar** (1,5 kg peynir yüzünden kesirli). Hangisi olduğunu
veriye sordum.

**Grafik — Kesirli değerlerin kategoriye göre oranı:** Satış değeri sıfırdan büyük satırlarda, değerin tam sayı olmadığı satırların payı. Para birimi olsaydı bu oran kategoriden bağımsız olurdu.

Sonuç tartışmaya kapalı: kesirli değerler **yalnızca tartıyla satılan kategorilerde**
var. MEATS %99,9, POULTRY %99,9, PRODUCE %80,3, DELI %69,4. Buna karşılık BEVERAGES, CLEANING,
“LIQUOR,WINE,BEER” ve MAGAZINES dahil **paketli 24 kategorinin hiçbirinde tek bir
kesirli değer yok**. Kuruş olsaydı bir şişe deterjanın tutarı da küsuratlı olurdu.

## Hesaplanamayan beş KPI

Bu tek bulgu brief'in istediği metriklerin bir kısmını doğrudan imkânsız kılıyor. Uydurmak yerine
formüllerini ve her biri için eksik olan alanı yazdım:

Metrik | Gereken alan | Neden yok |

Parasal ciro | ürün veya işlem düzeyinde fiyat | Veri setinde para birimi içeren tek bir alan yok. |

Ortalama sepet tutarı | aynı fiyat alanı | Yerine işlem başına *birim* hesaplandı; aynı şey değil. |

Ziyaretçi başına dönüşüm | kapı sayacı veya trafik ölçümü | `transactions` ziyaretçiyi değil, satın alanı sayar. |

Metrekare başına satış | mağaza alanı | `stores.csv` dosyasında alan bilgisi yok. |

Personel verimliliği | vardiya / bordro kaydı | Operasyon verisi bu sette yok. |

Geriye kalan ölçülebilir çekirdek yine de küçük değil: **141,5 milyon işlem, 1.074 milyon
birim satış**, kategori kırılımı, şube nitelikleri ve takvim. Bunun üstüne on iki KPI kurdum
ve hepsini **açık şube-günü** paydasıyla tanımladım — kapalı günler hiçbir ortalamanın
paydasına girmiyor.

Sayfa boyunca “trafik” değil “işlem” deniyor.
`transactions` fiş sayısıdır; mağazaya girip hiçbir şey almadan çıkan kişi bu sayıya
girmez, dolayısıyla dönüşüm oranı hesaplanamaz.

## “Eksik değer yok” yanıltıcı bir cümle

Ham veri ilk bakışta kusursuz görünüyor: her şube-gün-kategori için bir satır var, boş hücre yok.
Ama sıfır yazılmış satırların önemli bir kısmı aslında **şubenin henüz var olmadığı
günlere** ait.

**Grafik — Şubelerin veri kapsamı ve kapanış dönemleri:** Her satır bir şube. Soluk kısım: şube henüz açılmamış. Pembe bloklar: beş günden uzun kesintisiz kapanış.

Beş hazırlık kararı aldım. **Açılış öncesi günler atıldı**: bir şubenin serisi ilk
satış yaptığı gün başlar, 8 şube 2013'ten sonra açılmış ve toplam 6.729 şube-gün analizden çıktı.
Bunlar kapalı gün değil; şube yoktu. **Kapalı gün türetildi**: açılış sonrası toplam
satışın sıfır olduğu gün — 601 şube-gün, 196'sı 1 Ocak. **Uzun kapanışlar ayrı ele
alındı**: 6 şubede beş günden uzun kesintisiz blok var, en uzunu 18 numaralı şubede
**110 gün**.

**Eksik işlem kayıtları NaN bırakıldı**: 118 açık şube-gününde satış var ama işlem
kaydı yok; sıfır yazmak hem işlem sayısını hem sepeti bozardı. Ve **karşılaştırma ortak
pencerede yapıldı**: 10.10.2015 – 15.08.2017 arası 676 gün, 52 numaralı şube dışındaki tüm
şubelerin açık olduğu en geniş aralık.

25 Aralık dört yılın tamamında takvimde hiç yok. Eksik veri gibi doldurmadım;
zincir genelinde kapanış olarak not ettim.

## Toplam hacimle sıralama ne kadar yanıltıyor?

Bu, kolayca bir varsayım olarak bırakılabilecek bir iddia. Ölçtüm.

**Grafik — Aynı şubeler, iki farklı sıralama:** Solda tüm geçmişin toplam satış miktarına göre sıra; sağda ortak pencerede açık gün başına ortalama işleme göre sıra. Vurgulananlar en çok yer değiştiren altı şube.

İki sıralamanın Spearman korelasyonu **0,929** — yüksek, ama bire bir değil.
Ortalama **4,3 sıra**, en fazla **15 sıra** oynama var ve
**19 şube** beş sıradan fazla hareket ediyor. Sebep basit: sonradan açılan ve uzun
kapanış yaşayan şubeler toplam hacimde otomatik olarak dibe düşüyor.

En uç örnek 52 numaralı şube. Toplam hacimde **54. ve son sırada**, çünkü 20.04.2017
tarihinde açılmış ve veride yalnızca 118 günü var. Açık gün başına bakıldığında ise günlük
**2.334 işlemle** zincir medyanının (1.353) epey üstünde. Buna rağmen onu sıralamaya
koymadım: 118 gün yalnızca 2017 Nisan–Ağustos'unu kapsıyor, yani diğer şubelerle aynı mevsimleri
görmedi.

Bu yüzden sayfadaki bütün karşılaştırmalar üç kurala bağlı: **(a)** paydada açık gün
sayısı var, toplam gün değil; **(b)** karşılaştırma ortak pencerede yapılıyor;
**(c)** yeterli gözlemi olmayan şube sıralanmıyor.

## Şube karşılaştırması

**Grafik — Şube başına günlük ortalama işlem (ortak pencere):** 53 şube, 10.10.2015 – 15.08.2017. Renkler davranış gruplarını gösterir. Şube 52 yeterli gözlemi olmadığı için yok.

En yoğun şube (44 numaralı, Quito) günde ortalama **4.402 işlem** yapıyor; en sakin
şube (26 numaralı, Guayaquil) **553**. Aradaki fark **8,0 kat**. Bu farkın
ne kadarının lokasyondan, ne kadarının mağaza büyüklüğünden geldiğini bu veriyle ayıramıyorum —
metrekare bilgisi yok.

Şube | Şehir | Tip | Günlük işlem | İşlem başına birim | Hafta sonu endeksi |

44 | Quito | A | 4.402 | 10,38 | 123,0 |

47 | Quito | A | 3.926 | 9,72 | 126,8 |

45 | Quito | A | 3.757 | 10,91 | 127,2 |

3 | Quito | D | 3.241 | 11,78 | 118,2 |

13 | Latacunga | C | 890 | 7,88 | 119,7 |

35 | Playas | C | 703 | 8,08 | 116,5 |

32 | Guayaquil | C | 621 | 7,02 | 112,2 |

26 | Guayaquil | D | 553 | 9,24 | 110,4 |

En yoğun dört ve en sakin dört şube. Düşük işlem düşük performans demek değildir:
küçük bir yerleşimdeki şube az işlem yapar ama kendi ölçeğinde iyi olabilir. Karşılaştırmayı bu
yüzden gruplar içinde kurdum.

**Grafik — Mağaza tipine göre performans:** Zincirin kendi A–E tiplemesi. Tiplerin tanımı veri setinde açıklanmamıştır.

Zincirin kendi A–E tiplemesi **bir büyüklük merdiveni değil**. Tip A açık ara önde
(günlük 3.228 işlem) ama geri kalan dört tip harf sırasını izlemiyor: tip C (15 şube) günlük 997
işlemle hem tip D'nin (1.586) hem tip E'nin (1.215) altında. Tip E işlem sayısında en düşüklerden
biri olmasına rağmen işlem başına birimde en yüksek (10,37). Tiplerin ne anlama geldiği veri setinde
açıklanmamış; bu yüzden tipi yalnızca betimleyici olarak kullandım.

## Bölge analizi mi, yoğunlaşma tablosu mu?

**Grafik — Eyalet bazında şube başına günlük işlem ve hacim payı:** Çubuk uzunluğu şube başına günlük ortalama işlem; sağdaki yüzde eyaletin toplam hacimdeki payı. Tek şubeli eyaletlerde bu değerler tek bir mağazanın performansıdır.

Zincir coğrafi olarak dengesiz: **19 şube Pichincha'da** (başkent Quito) ve hacmin
**%54,0'ını** üretiyor. İkinci sırada 11 şubeyle Guayas (%15,5). Geri kalan 14 eyalet
hacmin dörtte birinden azını oluşturuyor ve **7 eyalette tek bir şube var**.

Bu yüzden tabloyu bir bölge performansı karşılaştırması olarak sunmuyorum. **Tek şubeli bir
eyaletin “ortalaması” o şubenin kendisidir** ve o eyaletin pazar potansiyeli
hakkında hiçbir şey söylemez. Eyaletler arası farkların ne kadarının nüfus, gelir ve rekabetten
geldiğini ölçecek veri bu sette yok.

## Davranış grupları — ve ayrışmanın zayıflığı

Zincirin kendi `cluster` alanı var (17 küme) ama nasıl kurulduğu belgelenmemiş ve
4 küme tek şubeli. Karşılaştırmayı adil kılmak için davranışa dayalı kendi gruplamamı kurdum: Ward
hiyerarşik kümeleme, altı standartlaştırılmış özellik (log günlük işlem, işlem başına birim, kategori
genişliği, hafta sonu endeksi, tatil endeksi, promosyon yoğunluğu).

**Grafik — Davranış grupları: işlem hacmi ve hafta sonu davranışı:** Her daire bir şube. Daire çapı işlem başına birimi gösterir. Sarı çizginin altındaki şubelerde hafta sonu hafta içinden sakindir.

Küme sayısı silhouette skoruna göre seçildi ve en iyisi **k=3'te 0,284** çıktı
(k=4: 0,233, k=5: 0,204). Bu **zayıftan ortaya bir ayrışma**: şubeler net kümelere
ayrılmıyor, sürekli bir yelpaze oluşturuyor. Bunu gizlemiyorum — gruplar kesin sınıflar değil,
bir şubeyi tüm zincir yerine kendine benzeyen şubelerle karşılaştırmak için kurulmuş bir çerçeve.

Grup | Şube | Günlük işlem (medyan) | İşlem başına birim | Kategori genişliği | Hafta sonu endeksi |

Grup 1 | 29 | 1.591 | 9,87 | %88,4 | 123,5 |

Grup 2 | 7 | 1.514 | 8,33 | %88,4 | 93,4 |

Grup 3 | 17 | 895 | 8,11 | %76,1 | 111,6 |

Grupları ayıran asıl değişken **hafta sonu davranışı**. Grup 2'nin yedi şubesinde
hafta sonu endeksi medyanı 93,4 — yani *cumartesi ve pazar hafta içinden daha sakin*. Grup
1'de aynı endeks 123,5. İşlem hacimleri neredeyse eşit olmasına rağmen (1.514'e 1.591) bu iki grup
farklı müşteri profillerine hizmet ediyor olmalı. Veri bunun sebebini söylemiyor; iş bölgesi, ulaşım
veya yerleşim farkı olabilir.

## Mevsimsellik, tatiller ve büyüme

**Grafik — Açık şube-günü başına ortalama işlem, aylık:** Şube sayısı dönem boyunca arttığı için toplam değil, şube-gün başına ortalama gösteriliyor.

**Grafik — Mevsimsellik: ay ve hafta günü endeksleri:** 100 = dönem ortalaması. Hafta günü endeksleri ortak pencereden, ay endeksleri tüm geçmişten.

Aralık endeksi **120,7** ile yılın en yüksek ayı, en düşük ay Ekim (96,0). Hafta
içinde en sakin gün perşembe (92,3), en yoğun gün cumartesi (114,5). **Tatiller sanılanın
aksine sakin değil**: tatil günlerinde ortalama işlem 1.850, normal günlerde 1.626 — endeks
**113,8**. Markette tatil, kapanma değil hazırlık günü demek. Maaş günü etkisi ise
beklenenden küçük: endeks 101,4.

Bu bölümde **aradığımı bulamadığım bir test** de var. 16 Nisan 2016'da Ekvador'un
kıyı kesimini vuran depremin Manabí ve Esmeraldas'taki şubelerde ayrı bir iz bırakacağını
varsaydım. Depremden önceki 28 günle sonraki 14 günü karşılaştırdığımda ülke genelinde medyan
değişim %5,1, deprem bölgesindeki üç şubede %5,6, diğerlerinde %5,0. **Ayırt edilebilir bir
bölgesel fark yok.** Boş sonucu olduğu gibi bırakıyorum: gözlenen artış ülke genelinde ve
muhtemelen stoklamayla ilgili, ama bu veriyle depremin etkisini diğer etkenlerden ayıracak bir
tasarım kurulamaz.

**Grafik — Like-for-like yıllık büyüme, şube bazında:** 53 şubenin aynı 12 aylık pencerelerindeki günlük ortalama işlem değişimi. Yeni açılan şubeler bu hesaba girmez.

Like-for-like büyüme medyanı **%0,7**: zincir büyümüyor da küçülmüyor da. 32 şube
artıda, 21 şube ekside. En hızlı büyüyen 25 numaralı şube (Salinas, %13,5); en çok gerileyen
33 numaralı şube (Quevedo, %−7,0).

## Ürün karması ve şube sapmaları

**Grafik — Kategori payları (ortak pencere):** Satış miktarının kategorilere dağılımı. Miktar bazlı olduğu için pahalı ama az satan kategoriler burada küçük görünür.

Karma son derece yoğun: ilk üç kategori (GROCERY I, BEVERAGES, PRODUCE) hacmin
**%66,7'sini** oluşturuyor; en küçük beş kategorinin toplam payı %0,04.

**Grafik — Şubelerin kategori karmasının ülke ortalamasından sapması:** En çok sapan 20 şube ve en büyük 8 kategori. Yeşil: ülke payının üstünde, pembe: altında. Sayılar yüzde puan farkıdır.

Sapmalar küçük değil. 13 numaralı şubede (Latacunga) GROCERY I payı ülke ortalamasının
**12,1 puan üstünde**. En büyük kategori GROCERY I'in şubeler arası payı %20,7 ile
%41,8 arasında değişiyor — ülke ortalaması %29,7.

Bu sapmaların nedeni iki farklı şey olabilir ve **veri ikisini ayırt etmiyor**:
yerel talep farkı (müşteri gerçekten o kategoriyi az alıyor) ya da arz kararı (raf alanı az, tedarik
zayıf). Aşağıdaki üçüncü öneri tam olarak bu ayrımı yapmak için tasarlandı.

## Bulgular: 27 bulgu, 22 şube

Her şubeyi *kendi davranış grubunun* medyanıyla karşılaştırıp eşiği aşan farkları topladım:
işlem başına birimde %10, kategori genişliğinde %8, hafta sonu endeksinde %12 altta kalmak, açık gün
oranının %97'nin altına düşmesi ve büyümenin grup medyanının 8 puan altında kalması.

**Grafik — Bulgu matrisi:** Satırlar bulgu türü, sütunlar şube. Renk yoğunluğu farkın büyüklüğünü gösterir.

En net bulgu hafta sonu. **8 şubede hafta sonu endeksi 100'ün altında**; en düşüğü
1 numaralı şubede (Quito) **52,7** — yani cumartesi-pazar işlem hacmi hafta içinin
yarısı. Zincir medyanı 117,1 olduğu için bu şubeler gerçekten farklı bir ritimde çalışıyor.

**Tuzak**

### Promosyon verisi

Promosyon yoğunluğu ile günlük işlem arasında şubeler arası korelasyon 0,707. Bu
“promosyon işlemi artırıyor” demek *değildir*: promosyon kararı zaten şubenin
durumuna göre verilmiş olabilir. Ters nedensellik.

**Tercih**

### Eşikler

%10, %8 ve %12 eşikleri analitik tercihtir, veriden okunmuş değil. Başka eşikler başka bir
bulgu listesi üretir; eşikler bu yüzden açıkça yazılı.

## Aksiyon önerileri: beş hipotez, beş test

Önerilerin hiçbiri vaat değil. Her biri bir **hipotez + test tasarımı**; her birinde
ölçülecek metrik, kontrol grubu ve uyarı ayrı yazılı. “Şu kadar kazanç sağlar” cümlesi
hiçbirinde yok, çünkü elimdeki veri gözlemsel ve farklar nedensel değil.

- **Düşük sepetli şubelerde çapraz yerleşim denemesi.** 15 şubede işlem başına birim grup medyanının %10 altında. Eş gruptan eşleştirilmiş şube çiftleri, 8 hafta; birincil metrik işlem başına birim, koruyucu metrik işlem sayısı (düşmemeli).

- **Hafta sonu endeksi düşük şubelerde çalışma saati testi.** Ama bu önce bir *ölçüm* önerisi: veri setinde saat kırılımı yok, hangi saatlerin boş olduğu bilinemez.

- **Eş gruba göre eksik kategorilerin raf testi.** 12 şube-kategori çiftinde pay grup medyanının en az 1,5 puan altında. 12 hafta raf genişletme, aynı gruptan iki kontrol şube, toplam şube hacmi yamyamlık kontrolü olarak izlenir.

- **Planlı kapanışların takvime çekilmesi.** 6 şubede beş günden uzun kapanış bloğu var; bunlar yılın düşük endeksli aylarına alınırsa kayıp işlem azalır.

- **Trafik ölçümünün kurulması.** Dönüşüm oranı olmadan düşük işlemin nedeni — az ziyaretçi mi, düşük dönüşüm mü — ayırt edilemez. Bu bir analiz sonucu değil, projenin en büyük ölçüm boşluğu.

## Sınırlar

**Para yok** — ciro, sepet tutarı, marj ve kârlılık hesaplanamadı; miktar bazlı
sıralama pahalı ürün satan şubeyi olduğundan küçük gösterir. **Ziyaretçi yok** —
dönüşüm oranı hesaplanamadı. **Metrekare yok** — 8,0 kat farkın ne kadarının
büyüklükten geldiği bilinmiyor. **Saat yok** — gün içi yoğunluk görülemiyor.

Ölçülmeyen etkenler de en az bunlar kadar önemli: müşteri profili (nüfus, gelir, yaş), rekabet,
fiziksel bağlam (otopark, toplu taşıma, AVM içi mi cadde mi) ve operasyon (personel, kasa adedi,
stok tükenmesi) veride hiç yok. Şubeler arası farkların büyük kısmı bu etkenlerden geliyor olabilir.

Yöntemden gelen sınırlar: hiçbir fark “şundan kaynaklanıyor” diye sunulmadı; davranış
grupları zayıf ayrışıyor (silhouette 0,284) ve grup medyanına göre hesaplanan bütün farklar bu
belirsizliği taşıyor; “satış sıfır = kapalı” varsayımı türetilmiş bir alandır.
Sonuçlar Ekvador'daki bu zincire ve 2013–2017 dönemine aittir.

## Sonuç

Bu projenin asıl çıktısı bir şube sıralaması değil, **bir sıralamanın hangi koşullarda
okunabilir olduğunun gösterilmesi**. Aynı 54 şube, aynı veri: toplam hacimle sıralandığında
bir tablo, açık gün paydası ve ortak pencereyle sıralandığında 15 sıraya varan farkla başka bir
tablo çıkıyor. Hiçbiri veri hatası değil — hepsi ölçüm tercihi.

Teslimat tek dosyalık, çevrimdışı çalışan bir HTML rapordur: 14 bölüm, 13 gömülü SVG, kaynak
CSV'lerden yedi Python betiğiyle yeniden üretilebilir.

The commonest mistake in comparing retail branches is ranking them by the
total they sold over the period. In this project I analysed **4.6 years of real sales records
from a 54-branch grocery chain in Ecuador** — 3,000,888 rows, 83,606 open branch-days. But I
did not start with a ranking. I started with a measurement question: the “sales” field
in this dataset is *not money, it is quantity*.

**8.0×**Gap between the busiest and the quietest branch

**15 places**Largest shift between the two ranking methods

**54.0%**Share of volume in one province (Pichincha)

**5 KPIs**Metrics the brief asked for that cannot be computed

## Data and scope

The source is the published Kaggle sales record of **Corporación Favorita**, an
Ecuadorian grocery chain: **1 January 2013 – 15 August 2017**, 1,684 days, 54 branches,
22 cities, 16 provinces, 33 product families. Each row is one branch's sales in one category on one
day, accompanied by store attributes, daily transaction counts, a holiday calendar and oil prices.

The data belongs to a real chain and is not anonymised: branches are numbered rather than named,
but city and province names are open. The licence follows Kaggle competition rules — research is
free, redistribution of the raw data is not. **Neither this page nor the report contains a
single raw row**; only aggregated results, with the raw files kept locally.

The dataset holds no coordinates, addresses or postcodes, so I drew no point map:
inventing latitude and longitude would be inventing a precision that does not exist. Regional
analysis is at province level and no branch-level location is disclosed.

## Is “sales” money or quantity?

Kaggle's field description calls `sales` “total sales” and notes that
fractional values are possible. That can be read two ways: **money** (fractional
because of cents) or **quantity** (fractional because of 1.5 kg of cheese). I put the
question to the data.

**Grafik — Share of fractional values by category:** Among rows with sales above zero, the share whose value is not a whole number. If the field were currency, this share would not depend on the category.

The answer is not open to debate: fractional values appear **only in categories sold by
weight** — MEATS 99.9%, POULTRY 99.9%, PRODUCE 80.3%, DELI 69.4%. Across the 24 packaged
categories, including BEVERAGES, CLEANING, LIQUOR/WINE/BEER and MAGAZINES, **there is not a
single fractional value**. If this were currency, a bottle of detergent would carry cents too.

## The five KPIs that cannot be computed

That one finding makes part of the brief directly impossible. Rather than invent numbers, I wrote
down each formula and the field that is missing: **monetary revenue** (no price field
anywhere), **average basket value** (same missing field; units per transaction is not
the same thing), **conversion per visitor** (`transactions` counts buyers,
not visitors), **sales per square metre** (no floor area in `stores.csv`)
and **staff productivity** (no shift or payroll data).

What remains is still substantial: **141.5 million transactions, 1,074 million units**,
the category breakdown, store attributes and the calendar. I defined twelve KPIs on that core, every
one of them with **open branch-days** in the denominator — closed days enter no average.

Throughout, the word is “transactions”, never “traffic”.
`transactions` counts receipts; someone who walks in and buys nothing is not in that
number, so no conversion rate can be computed.

## “No missing values” is a misleading sentence

The raw data looks flawless: one row per branch-day-category, no empty cells. But a large share
of the rows written as zero belong to **days on which the branch did not yet exist**.

**Grafik — Data coverage and closure periods by branch:** One row per branch. Faded: the branch had not opened yet. Pink blocks: unbroken closures longer than five days.

Five preparation decisions followed. **Pre-opening days were dropped**: a branch's
series begins on its first day of sales, 8 branches opened after 2013, and 6,729 branch-days left
the analysis. Those are not closed days; there was no branch. **Closed days were derived**
as post-opening days with zero total sales — 601 branch-days, 196 of them on 1 January.
**Long closures were handled separately**: 6 branches have an unbroken block longer
than five days, the longest **110 days** at branch 18.

**Missing transaction counts were left as NaN**: 118 open branch-days have sales but
no transaction record, and writing zero would have corrupted both the count and the basket. And
**all comparisons run in a common window**: 10 October 2015 – 15 August 2017, 676 days,
the widest span over which every branch except number 52 was open.

## How much does ranking by total volume mislead?

This is a claim that could easily be left as an assumption. I measured it.

**Grafik — The same branches, two different rankings:** Left: rank by total quantity sold over all history. Right: rank by average transactions per open day in the common window. The highlighted six move the most.

The Spearman correlation between the two rankings is **0.929** — high, but not
one-to-one. The average shift is **4.3 places**, the largest **15 places**,
and **19 branches** move more than five. The reason is simple: branches that opened late
or endured long closures sink automatically in a total-volume ranking.

Branch 52 is the extreme case. It sits **54th and last** on total volume, because it
opened on 20 April 2017 and the data holds only 118 of its days. Per open day it runs
**2,334 transactions**, well above the chain median of 1,353. I still kept it out of the
rankings: 118 days cover only April–August 2017, so it never saw the same seasons as the others.

Hence the three rules behind every comparison here: **(a)** the denominator is open
days, not calendar days; **(b)** comparisons run in the common window;
**(c)** a branch without enough observations is not ranked.

## Comparing the branches

**Grafik — Average daily transactions per branch (common window):** 53 branches, 10 October 2015 – 15 August 2017. Colours show the behavioural groups. Branch 52 is absent for lack of observations.

The busiest branch (number 44, Quito) averages **4,402 transactions a day**; the
quietest (number 26, Guayaquil) **553**. The gap is **8.0×**. How much of
that comes from location and how much from store size cannot be separated here — there is no floor
area in the data.

Few transactions does not mean poor performance: a branch in a small town does
little volume and may still be strong for its scale. That is why the comparison is built inside
behavioural groups.

**Grafik — Performance by store type:** The chain's own A–E typing. The dataset never defines what the types mean.

The chain's own A–E typing is **not a size ladder**. Type A leads clearly (3,228
transactions a day) but the remaining four do not follow the alphabet: type C (15 branches) averages
997, below both type D (1,586) and type E (1,215). Type E is among the lowest in transactions yet
the highest in units per transaction (10.37). The dataset never explains what the types mean, so I
use them descriptively only.

## Regional analysis, or a concentration table?

**Grafik — Daily transactions per branch and volume share by province:** Bar length is average daily transactions per branch; the percentage on the right is the province's share of total volume. In single-branch provinces these are one store's numbers.

The chain is geographically lopsided: **19 branches sit in Pichincha** (the capital,
Quito) and produce **54.0%** of volume. Guayas is second with 11 branches (15.5%). The
remaining 14 provinces account for less than a quarter, and **7 provinces hold a single
branch**.

So I do not present this as a regional performance comparison. **The “average”
of a single-branch province is that branch itself** and says nothing about the province's
market potential. Nothing in this dataset measures population, income or competition.

## Behavioural groups — and how weakly they separate

The chain has its own `cluster` field (17 clusters), but how it was built is
undocumented and 4 clusters hold a single branch. To make comparison fair I built my own grouping
from behaviour: Ward hierarchical clustering on six standardised features (log daily transactions,
units per transaction, category breadth, weekend index, holiday index, promotion intensity).

**Grafik — Behavioural groups: transaction volume and weekend behaviour:** Each circle is a branch; circle diameter shows units per transaction. Below the yellow line, weekends are quieter than weekdays.

The number of clusters was chosen by silhouette score, and the best was **0.284 at
k=3** (k=4: 0.233, k=5: 0.204). That is a **weak-to-moderate separation**:
branches do not fall into clean clusters, they form a continuum. I do not hide it — the groups are
not firm classes, they are a frame for comparing a branch against branches like it rather than
against the whole chain.

The variable that really separates the groups is **weekend behaviour**. In the seven
branches of group 2 the median weekend index is 93.4 — *Saturday and Sunday are quieter than
weekdays*. In group 1 the same index is 123.5. Their transaction volumes are almost identical
(1,514 against 1,591), so these two groups must serve different customer profiles. The data does not
say why; a business district, transport links or settlement pattern would all fit.

## Seasonality, holidays and growth

**Grafik — Average transactions per open branch-day, monthly:** The branch count grows over the period, so this is an average per branch-day rather than a total.

December is the strongest month at an index of **120.7**, October the weakest at
96.0. Thursday is the quietest weekday (92.3), Saturday the busiest (114.5). **Holidays are
not quiet**, contrary to expectation: 1,850 transactions on holidays against 1,626 on normal
days — an index of **113.8**. In a grocery chain a holiday is a preparation day, not a
closure. The payday effect is smaller than expected: index 101.4.

**Grafik — Seasonality: month and weekday indices:** 100 = period average. Weekday indices come from the common window, month indices from all history.

This section also contains **a test that found nothing**. I assumed the earthquake
that struck Ecuador's coast on 16 April 2016 would leave a distinct mark on the branches in Manabí
and Esmeraldas. Comparing the 28 days before with the 14 days after, the median change was 5.1%
nationally, 5.6% at the three branches in the earthquake zone and 5.0% elsewhere. **There is
no distinguishable regional difference.** I leave the null result as it is: the observed rise
is nationwide and probably about stockpiling, and this data cannot support a design that separates
the earthquake from everything else.

**Grafik — Like-for-like annual growth by branch:** Change in average daily transactions across identical 12-month windows for 53 branches. Newly opened branches are excluded.

Median like-for-like growth is **0.7%**: the chain is neither growing nor shrinking.
32 branches are up, 21 down. The fastest riser is branch 25 (Salinas, 13.5%); the steepest decline
is branch 33 (Quevedo, −7.0%).

## Product mix and branch deviations

**Grafik — Category shares (common window):** Distribution of sales quantity across categories. Being quantity-based, expensive but low-volume categories look small here.

The mix is extremely concentrated: the top three categories (GROCERY I, BEVERAGES, PRODUCE) make
up **66.7%** of volume; the smallest five together come to 0.04%.

**Grafik — Deviation of each branch's category mix from the national average:** The 20 most deviant branches and the 8 largest categories. Green: above the national share, pink: below. Figures are percentage points.

The deviations are not small. At branch 13 (Latacunga) the GROCERY I share runs
**12.1 points above** the national average. Across branches that share ranges from
20.7% to 41.8%, against a national 29.7%.

Two different causes could produce this and **the data does not tell them apart**:
genuine local demand, or a supply decision (little shelf space, weak replenishment). The third
recommendation below is designed precisely to separate them.

## Findings: 27 of them, across 22 branches

I compared every branch against the median of *its own behavioural group* and collected
the gaps beyond a threshold: 10% below on units per transaction, 8% on category breadth, 12% on the
weekend index, an open-day ratio under 97%, and growth 8 points below the group median.

**Grafik — Finding matrix:** Rows are finding types, columns are branches. Colour intensity shows the size of the gap.

The clearest finding is the weekend. **Eight branches have a weekend index below 100**;
the lowest is branch 1 in Quito at **52.7** — Saturday and Sunday run at half the
weekday volume. With a chain median of 117.1, these branches genuinely operate to a different rhythm.

Two cautions belong with the findings. The cross-branch correlation of 0.707 between promotion
intensity and daily transactions **does not mean promotions raise transactions**: the
promotion decision may already follow the branch's situation — reverse causality. And the 10%, 8%
and 12% thresholds are an analytical choice, not something read from the data; other thresholds
would produce a different list, which is why they are written down.

## Recommendations: five hypotheses, five tests

None of these is a promise. Each is a **hypothesis plus a test design**, with its
metric, its control group and its caveat written separately. None says “this will earn
X”, because the data is observational and the differences are not causal.

- **Cross-merchandising trial in low-basket branches.** 15 branches sit 10% below their group median on units per transaction. Matched pairs from the same group, 8 weeks; primary metric units per transaction, guardrail metric transaction count (must not fall).

- **Opening-hours test in low-weekend branches.** This is first a *measurement* proposal: the dataset has no hourly breakdown, so which hours are empty cannot be known.

- **Shelf test for categories missing against the peer group.** 12 branch-category pairs sit at least 1.5 points below the group median. 12 weeks of shelf expansion, two control branches from the same group, total branch volume watched for cannibalisation.

- **Moving planned closures in the calendar.** Six branches have closure blocks longer than five days; shifting them into low-index months reduces lost transactions.

- **Installing traffic measurement.** Without a conversion rate, the cause of low transactions — few visitors or poor conversion — cannot be identified. This is not an analytical result; it is the largest measurement gap in the project.

## Limitations

**No money** — revenue, basket value, margin and profitability could not be
computed, and a quantity-based ranking understates a branch selling expensive goods.
**No visitors** — no conversion rate. **No floor area** — how much of the
8.0× gap comes from size is unknown. **No hours** — intraday load is invisible.

The unmeasured factors matter just as much: customer profile (population, income, age),
competition, physical context (parking, public transport, mall or street) and operations (staff,
checkouts, stock-outs) are all absent. A large part of the differences between branches may come
from exactly these.

Method limits: no difference anywhere is presented as “caused by” anything; the
behavioural groups separate weakly (silhouette 0.284) and every gap measured against a group median
carries that uncertainty; “zero sales means closed” is a derived field. The findings
belong to this chain in Ecuador and to 2013–2017.

## Conclusion

The real output of this project is not a branch ranking but **a demonstration of the
conditions under which a ranking can be read at all**. The same 54 branches and the same
data give one table when ranked by total volume and another — differing by up to 15 places — when
ranked per open day in a common window. Neither is a data error; both are measurement choices.

The deliverable is a single-file, offline HTML report: 14 sections, 13 embedded SVGs,
reproducible from the source CSVs with seven Python scripts.
