How to convert data in a TAGS (Twitter Archiving Google Sheet) Archive sheet to json using a Node.js CLI tool
Assumptions with these instructions:
- you've already got your copy of the TAGS Google Spreadsheet set up working with your Twitter dev account
- install Node.js (and its package manager NPM which allows you to quickly install modular Node packages that perform specific tasks). NPM is included when you install Node. Read how to quickly install Node on your operating system on this NPM blog post. If you don't already have Node set up, I think it's a good idea to do so because it provides a wide range of software tools that do one job well (usually). Very applicable to all sorts of needs from digital humanities, to bio informatics, to web dev and more.
-
Open your command line and install the Node package csv2json. The following command installs the package globally so that it can be accessed on the command line.
npm install --global csv2json
-
Download the TAGS
Archive
sheet as a csv file. -
Run the following command to make csv2json convert the csv file to a valid json file:
csv2json input.csv output.json
where input.csv
is the path to your downloaded Archive data as csv, and output.json
is the path to the json file you want to create.