Line 1: |
Line 1: |
− | I'm also going to use this page for some tests. | + | I'm also going to use this page for some tests with https://www.mediawiki.org/wiki/Extension:External_Data . |
| | | |
| {{#get_web_data: | | {{#get_web_data: |
Line 45: |
Line 45: |
| {{!}} {{{code}}} | | {{!}} {{{code}}} |
| {{!}} {{{name}}} | | {{!}} {{{name}}} |
| + | }} |
| + | |} |
| + | |
| + | == Data quality test == |
| + | |
| + | {{#get_web_data: |
| + | url=https://world.openfoodfacts.org/category/vegetable-oils/nutrition-grade/b.json&fields=code,product_name&page_size=100&nocache=1 |
| + | |format=JSON |
| + | |use jsonpath |
| + | |data=count=$.count,code=$.products[*].code,name=$.products[*].product_name |
| + | |cache seconds=360 |
| + | |use stale cache |
| + | }} |
| + | |
| + | {{#get_web_data: |
| + | url=https://world.openfoodfacts.org/category/vegetable-oils.json&fields=count&nocache=1 |
| + | |format=JSON |
| + | |use jsonpath |
| + | |data=count_category=$.count |
| + | |cache seconds=360 |
| + | |use stale cache |
| + | }} |
| + | |
| + | {{#external_value:count}} of {{#external_value:count_category}} ({{#expr: ({{#external_value:count}} / {{#external_value:count_category}} * 100)round2}}%) vegetable oils with Nutri-Score B (100 products max displayed): |
| + | {| class="wikitable" |
| + | ! Name |
| + | ! Code |
| + | {{#for_external_table:<nowiki/> |
| + | {{!}}- |
| + | {{!}} {{{name}}} |
| + | {{!}} {{Product|{{{code}}}}} |
| }} | | }} |
| |} | | |} |