openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
660 stars 389 forks source link

feat: script to count product contributions by year #10957

Closed stephanegigandet closed 1 week ago

stephanegigandet commented 3 weeks ago

Sample output on the dev test database:

year    active_editors  new_editors products_edited products_added  total_products
2012    2   2   1   1   1
2013    5   4   3   2   3
2014    6   4   3   2   5
2015    7   3   6   5   10
2016    6   4   5   3   13
2017    12  7   27  21  34
2018    21  11  55  44  78
2019    26  18  74  40  118
2020    31  17  120 53  171
2021    34  21  92  40  211
2022    36  17  147 67  278
2023    55  30  117 34  312
2024    48  21  96  49  361
all 159 159 361 361 361

Output on the whole database: https://docs.google.com/spreadsheets/d/11nrerWDwzFV1gZb0i16TI_shh9C3XgddYn5KcGl4DO8/edit?gid=0#gid=0

john-gom commented 3 weeks ago

You are aware that we can do this in off-query now as well, right?

stephanegigandet commented 3 weeks ago

You are aware that we can do this in off-query now as well, right?

Hi @john-gom , right, we have all the events there now? I need to look into it. Should I just connect to the postgres db directly and query the events table?

john-gom commented 3 weeks ago

You are aware that we can do this in off-query now as well, right?

Hi @john-gom , right, we have all the events there now? I need to look into it. Should I just connect to the postgres db directly and query the events table?

There is a view called product_updates_by_owner in the views schema. There is a viewer postgres user with a password of off

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud