Difference between revisions of "Wikidata/Statistics"

From BITPlan Wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
<source lang='bash' highlight='1,2'>
 
<source lang='bash' highlight='1,2'>
 
wget "https://wikidata-todo.toolforge.org/stats.php?action=download" -O wikidatastats.json
 
wget "https://wikidata-todo.toolforge.org/stats.php?action=download" -O wikidatastats.json
cat wikidatastats.json| jq -r 'keys[] as $k | "\($k), \(.[$k] | .total_items)"'
+
cat wikidatastats.json| jq -r 'keys[] as $k | "\($k), \(.[$k] | .total_items)"' > wikidatastats.csv
 
</source>
 
</source>

Revision as of 16:00, 21 July 2022

wget "https://wikidata-todo.toolforge.org/stats.php?action=download" -O wikidatastats.json
cat wikidatastats.json| jq -r 'keys[] as $k | "\($k), \(.[$k] | .total_items)"' > wikidatastats.csv