The API is called using a batch curl
request with two variables referencing artist name
and artist id
tables (not included in this repo).
Those raw JSON are then iterated over using jq
filters setup for each type of requested object, creating new filtered JSON of only the desired key : value pairs.
Python is used to create and segment out individual tables, with headers based off of the dict keys. For batch processing:
$ find ./ -maxdepth 1 -type f -name "*.json" -exec ./chartmetric.py "{}" ../../temp \;
The generated objects can then be merged by awk
to create a merged spreadsheet of data.
$ awk 'FNR == 1 && NR!=1{next;}{print}' *_metric.csv > merged.csv
-
Notifications
You must be signed in to change notification settings - Fork 0
protrolium/chartmetric-api-scraper
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
working directory for JSON > CSV workflow
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published