Skip to content

Commit

Permalink
Shift to v26
Browse files Browse the repository at this point in the history
  • Loading branch information
sudev-chirappat committed Apr 21, 2021
1 parent 2036c0c commit 51d2333
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
SHEET_ID_v23: ${{ secrets.SHEET_ID_v23 }}
SHEET_ID_v24: ${{ secrets.SHEET_ID_v24 }}
SHEET_ID_v25: ${{ secrets.SHEET_ID_v25 }}
SHEET_ID_v26: ${{ secrets.SHEET_ID_v26 }}
RESOURCES_SHEET_ID: ${{ secrets.RESOURCES_SHEET_ID }}
SHEET_LOCALE: ${{ secrets.SHEET_LOCALE }}
STUCK_BOT: ${{ secrets.STUCK_BOT }}
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ These are the files available
| :green_heart: | raw_data22 | <https://api.covid19india.org/csv/latest/raw_data22.csv> | Jan 09th to Jan 31st |
| :green_heart: | raw_data23 | <https://api.covid19india.org/csv/latest/raw_data23.csv> | Feb 01st to Feb 27st |
| :green_heart: | raw_data24 | <https://api.covid19india.org/csv/latest/raw_data24.csv> | Feb 28th to Mar 31st |
| :green_heart: | raw_data25 | <https://api.covid19india.org/csv/latest/raw_data25.csv> | Apr 01st onwards |
| :green_heart: | raw_data25 | <https://api.covid19india.org/csv/latest/raw_data25.csv> | Apr 01st to Apr 20th |
| :green_heart: | raw_data26 | <https://api.covid19india.org/csv/latest/raw_data26.csv> | Apr 01st onwards |


#### Other Sheets

Expand All @@ -65,11 +67,6 @@ These are the files available
- Use raw data files only if you need to analyze the demographics or notes related at a patient level
- Always try to use the aggregated numbers above as they have been treated for discrepancies

#### How to

If you prefer working on a Google Sheet instead of downloading the files and would like the data to reflect the latest version - below is an example to live fetch this CSV to a spreadsheet.
> :rocket: Quick example : Apply the formula `=IMPORTDATA("https://api.covid19india.org/csv/latest/state_wise.csv")` in A1 cell of a Google Sheets to get the state data for analysis :)
#### Contributing

- If you notice issues, have questions or want to suggest enhancements, please raise an issue in the repo.
Expand All @@ -80,6 +77,4 @@ A more detailed note of the columns present in the data may be found in the json

- [Documentation](https://api.covid19india.org/documentation)



..................................................
10 changes: 3 additions & 7 deletions documentation/csv/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ These are the files available
| :green_heart: | raw_data22 | <https://api.covid19india.org/csv/latest/raw_data22.csv> | Jan 09th to Jan 31st |
| :green_heart: | raw_data23 | <https://api.covid19india.org/csv/latest/raw_data23.csv> | Feb 01st to Feb 27st |
| :green_heart: | raw_data24 | <https://api.covid19india.org/csv/latest/raw_data24.csv> | Feb 28th to Mar 31st |
| :green_heart: | raw_data25 | <https://api.covid19india.org/csv/latest/raw_data25.csv> | Apr 01st onwards |
| :green_heart: | raw_data25 | <https://api.covid19india.org/csv/latest/raw_data25.csv> | Apr 01st to Apr 20th |
| :green_heart: | raw_data26 | <https://api.covid19india.org/csv/latest/raw_data26.csv> | Apr 01st onwards |


#### Other Sheets
Expand All @@ -57,7 +58,7 @@ These are the files available
| :green_heart: | icmr_labs_statewise | <https://api.covid19india.org/csv/latest/icmr_labs_statewise.csv> | Number of Labs in each state as per ICMR |
| :green_heart: | sources_list | <https://api.covid19india.org/csv/latest/sources_list.csv> | List of sources that we are using. |
| :green_heart: | rtpcr_samples_collected | <http://api.covid19india.org/csv/latest/icmr_rtpcr_tests_daily.csv> | Number of RTPCR samples collected statewise in ICMR Application |
| :broken_heart: | vaccine_doses_administered_statewise | <http://api.covid19india.org/csv/latest/vaccine_doses_statewise.csv> | Number of vaccine doses administered statewise |
| :green_heart: | vaccine_doses_administered_statewise | <http://api.covid19india.org/csv/latest/vaccine_doses_statewise.csv> | Number of vaccine doses administered statewise |
| :green_heart: | cowin_vaccine_data_statewise | <http://api.covid19india.org/csv/latest/cowin_vaccine_data_statewise.csv> | Key data points from CoWin database at a state level |
| :green_heart: | cowin_vaccine_data_districtwise | <http://api.covid19india.org/csv/latest/cowin_vaccine_data_districtwise.csv> | Key data points from CoWin database at a district level |

Expand All @@ -66,11 +67,6 @@ These are the files available
- Use raw data files only if you need to analyze the demographics or notes related at a patient level
- Always try to use the aggregated numbers above as they have been treated for discrepancies

#### How to

If you prefer working on a Google Sheet instead of downloading the files and would like the data to reflect the latest version - below is an example to live fetch this CSV to a spreadsheet.
> :rocket: Quick example : Apply the formula `=IMPORTDATA("https://api.covid19india.org/csv/latest/state_wise.csv")` in A1 cell of a Google Sheets to get the state data for analysis :)
#### Contributing

- If you notice issues, have questions or want to suggest enhancements, please raise an issue in the repo.
Expand Down
6 changes: 5 additions & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ const SHEET_V22 = process.env.SHEET_ID_v22
const SHEET_V23 = process.env.SHEET_ID_v23
const SHEET_V24 = process.env.SHEET_ID_v24
const SHEET_V25 = process.env.SHEET_ID_v25
const SHEET_V26 = process.env.SHEET_ID_v26

const SHEET = process.env.SHEET_ID_v25
const SHEET = process.env.SHEET_ID_v26

const SHEET_RESOURCES = process.env.RESOURCES_SHEET_ID
const SHEET_LOCALE = process.env.SHEET_LOCALE
Expand Down Expand Up @@ -78,6 +79,7 @@ const FILE_RAW_DATA_22 = '/raw_data22.json'
const FILE_RAW_DATA_23 = '/raw_data23.json'
const FILE_RAW_DATA_24 = '/raw_data24.json'
const FILE_RAW_DATA_25 = '/raw_data25.json'
const FILE_RAW_DATA_26 = '/raw_data26.json'
const FILE_DEATHS_RECOVERIES_1 = '/deaths_recoveries1.json'
const FILE_DEATHS_RECOVERIES_2 = '/deaths_recoveries2.json'
const FILE_DISTRICTS = '/district_wise.json'
Expand Down Expand Up @@ -125,6 +127,7 @@ module.exports = {
SHEET_v23: SHEET_V23,
SHEET_v24: SHEET_V24,
SHEET_v25: SHEET_V25,
SHEET_v26: SHEET_V26,
SHEET_RESOURCES,
SHEET_LOCALE,
SHEET_RAW_DATA,
Expand Down Expand Up @@ -171,6 +174,7 @@ module.exports = {
FILE_RAW_DATA_23,
FILE_RAW_DATA_24,
FILE_RAW_DATA_25,
FILE_RAW_DATA_26,
// FILE_DEATHS_RECOVERIES,
FILE_DEATHS_RECOVERIES_1,
FILE_DEATHS_RECOVERIES_2,
Expand Down
6 changes: 6 additions & 0 deletions src/sheet-to-json_generic.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ const c = require('../lib/constants');
file: c.FILE_RAW_DATA_25
})

await task({
sheet: c.SHEET_v26,
tabs: { raw_data: c.SHEET_RAW_DATA },
file: c.FILE_RAW_DATA_26
})

// uncomment below if v1 sheet has updates
// await task({
// sheet: c.SHEET_v1,
Expand Down
10 changes: 8 additions & 2 deletions src/sheets-to-csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const PUBLISHED_SHEET_ID_22 = '2PACX-1vTwNTdGXrAa-RHrvb-bE51qE2UMEVO9tb45o_W_djH
const PUBLISHED_SHEET_ID_23 = '2PACX-1vRtezerCCxfVaYMerTEyPITsoDO_dx5UpTNcsU6YE8tTsmCflpHmx_0NZDKgPu47wB0_2vfIuxXopnF'
const PUBLISHED_SHEET_ID_24 = '2PACX-1vTVvDzqqG3GF1hyvQ9AAq7SXFr0FizVordgnL9kVAionTzwrgIM3pvMY6o1K8EoMnU1oiIJYZ2Ju6V_'
const PUBLISHED_SHEET_ID_25 = '2PACX-1vSJL0LHDI8dBKtTM3Q3mozy4AW3GUfunNSkkrdrftX3CgjQ3JyrxkqBU_6sr44T2wkZR6NMq2vp1UAf'
const PUBLISHED_SHEET_ID_25 = '2PACX-1vQGs1RLLszaHsZa59xaA-z-de1dZR0mBEX2K3GcJ_OSlE0zI05oTw22-nFcIUypcxpSKhEJaFG0I9SJ'


const SHEETS_V1 = [
Expand Down Expand Up @@ -139,9 +140,13 @@ const SHEETS_V24 = [
['raw_data24', '0']
]


const SHEETS_V25 = [
['raw_data25', '0'],
['raw_data25', '0']
]


const SHEETS_V26 = [
['raw_data26', '0'],
['state_wise', '1896310216'],
['state_wise_daily', '1395461826'],
['sources_list', '704389477'],
Expand Down Expand Up @@ -207,4 +212,5 @@ async function sheetsToCSV (sheets, pubId) {
// await sheetsToCSV(SHEETS_V23, PUBLISHED_SHEET_ID_23)
await sheetsToCSV(SHEETS_V24, PUBLISHED_SHEET_ID_24)
await sheetsToCSV(SHEETS_V25, PUBLISHED_SHEET_ID_25)
await sheetsToCSV(SHEETS_V26, PUBLISHED_SHEET_ID_26)
})()

0 comments on commit 51d2333

Please sign in to comment.