ahmadawais / corona-cli

🦠 Track the Coronavirus disease (COVID-19) in the command line. Worldwide for all countries, for one country, and the US States. Fast response time (< 100ms). https://x.com/MrAhmadAwais
https://NodeCLI.com
MIT License
1.84k stars 190 forks source link

DEV: added csv export to states #103

Open Shivathanu opened 4 years ago

Shivathanu commented 4 years ago

Description:

Added CSV export option along with the chart display for additional visualization option.

Instructions:

The csv file generation is configured with the states feature. The output is a csv file with the data stored in output folder.

Run command:

corona --s states

Fixes #98

milespossing commented 4 years ago

this works, but the command you've provided doesn't seem to. If corona states were to be run it works perfectly and yields a csv.

yuntaeJ commented 4 years ago

I solved that problem using directory checking process

 var fs=require('fs');

        if (!fs.existsSync('./output')){
            fs.mkdirSync('./output');
        }