openfoodfoundation / Analytics

A repository to share progress on Analytics work
GNU Affero General Public License v3.0
0 stars 0 forks source link

Setup Impact Measurement KPIs #7

Open jaycmb opened 4 years ago

jaycmb commented 4 years ago

In Progress

Description / Problem

Currently we only started measuring business metrics. But making OFNs impact measurable is equally important, both to support decisions and for fundraising purposes.

Objective

Come up with a first set of KPIs (that are rather simple to measure with Metabase)

KPIs / Queries to be created

Objective 1: Sales Concentration: Hypothesis: OFN empowers many small food hubs and producers to sell (vs. having a small number of big food hubs and producers)

Objective 2: Market Access / Connecting Food Enterprises Empowering small scale producers by connecting them with different points to sell

Objective 3: Prioritizing sustainable and regenerative agriculture

RachL commented 2 years ago

ping @filipefurtad0 !

RachL commented 2 years ago

Not a papercut

filipefurtad0 commented 2 years ago

Proposing this expression (WIP):

SELECT distributor_id, sum(total) AS orders_sum FROM spree_orders GROUP BY distributor_id ORDER BY orders_sum DESC LIMIT 10;

Updated to consider the hub name (instead of ID) and orders in state = complete only:

SELECT name AS "Hub Name", sum(total) AS "Orders Total" FROM spree_orders, enterprises WHERE spree_orders.state = 'complete' AND spree_orders.distributor_id = enterprises.id GROUP BY "Hub Name" ORDER BY "Orders Total" desc LIMIT 10;