-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEV: added csv export to states #103
base: master
Are you sure you want to change the base?
Conversation
this works, but the command you've provided doesn't seem to. If |
|
||
const csvWriter = createCsvWriter({ | ||
path: 'output/chart.csv', | ||
header: [ | ||
{id: 'state', title: 'State'}, | ||
{id: 'cases', title: 'Cases'}, | ||
{id: 'todayCases', title: 'Cases (today)'}, | ||
{id: 'deaths', title: 'Deaths'}, | ||
{id: 'todayDeaths', title: 'Deaths (today)'}, | ||
{id: 'active', title: 'Active'}, | ||
] | ||
}); | ||
|
||
csvWriter.writeRecords(allStates); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corona states
throws an error when the output folder does not exist. I suggest creating the directory if it doesn't exist before writing the records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I want to add code to remove this bug. How do I do this? Should I clone, make amends and then do a PR ? or something else ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i suggest you can clone and add a new commit to this pr with the fix, thanks
I solved that problem using directory checking process
|
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