This is a python script which crawls Scratch projects and collects data about block usage. The result is stored in a CSV file. Note that the script does not attempt to collect data from projects uploaded from Scratch 2.0 due to their inconsistent handling in scratchattach.
This uses scratchattach to fetch data from Scratch projects.
The path file where the CSV is generated can be changed at the top of the file.