From 87fd65d0e2985a18905e252137ce772ad2ecdbf8 Mon Sep 17 00:00:00 2001 From: "CR (covid cron)" <cramakri+covid-cron@ethz.ch> Date: Tue, 14 Apr 2020 07:25:23 +0000 Subject: [PATCH] renku rerun data/covidtracking/states-metadata.json data/covidtracking/states-daily.json --- .../b841533a5b4940f0b591cfa704e86674.cwl | 148 +++++++++++++++++ data/covidtracking/states-daily.json | 4 +- data/covidtracking/states-metadata.json | 4 +- runs/download-covidtracking-data.runs.ipynb | 150 +++++++++--------- 4 files changed, 227 insertions(+), 79 deletions(-) create mode 100644 .renku/workflow/b841533a5b4940f0b591cfa704e86674.cwl diff --git a/.renku/workflow/b841533a5b4940f0b591cfa704e86674.cwl b/.renku/workflow/b841533a5b4940f0b591cfa704e86674.cwl new file mode 100644 index 000000000..b04828698 --- /dev/null +++ b/.renku/workflow/b841533a5b4940f0b591cfa704e86674.cwl @@ -0,0 +1,148 @@ +class: Workflow +cwlVersion: v1.0 +hints: [] +inputs: + input_1: + default: out_folder + streamable: false + type: string + input_10: + default: states-metadata.json + streamable: false + type: string + input_2: + default: data/covidtracking + streamable: false + type: string + input_3: + default: + class: File + path: ../../notebooks/process/download-covidtracking-data.ipynb + streamable: false + type: File + input_4: + default: runs/download-covidtracking-data.runs.ipynb + streamable: false + type: string + input_5: + default: out_folder + streamable: false + type: string + input_6: + default: data/covidtracking + streamable: false + type: string + input_7: + default: + class: File + path: ../../notebooks/process/download-covidtracking-data.ipynb + streamable: false + type: File + input_8: + default: runs/download-covidtracking-data.runs.ipynb + streamable: false + type: string + input_9: + default: states-daily.json + streamable: false + type: string +outputs: + output_0: + outputSource: step_1/output_0 + streamable: false + type: File + output_3: + outputSource: step_1/output_1 + streamable: false + type: Directory +requirements: [] +steps: + step_1: + in: + input_1: input_1 + input_2: input_2 + input_3: input_3 + input_4: input_4 + out: + - output_0 + - output_1 + run: a17d560c41a54f5aa307ce5f3c5effe5_papermill.cwl + step_2: + in: + input_1: input_5 + input_2: input_6 + input_3: input_7 + input_4: input_8 + out: + - output_0 + - output_1 + run: a17d560c41a54f5aa307ce5f3c5effe5_papermill.cwl + step_3: + in: + filename: input_9 + input_directory: step_2/output_1 + out: + - output_file + run: + arguments: [] + baseCommand: + - 'true' + class: CommandLineTool + cwlVersion: v1.0 + hints: [] + inputs: + filename: + default: states-daily.json + streamable: false + type: string + input_directory: + streamable: false + type: Directory + outputs: + output_file: + outputBinding: + glob: $(inputs.filename) + streamable: false + type: File + permanentFailCodes: [] + requirements: + - &id001 + class: InlineJavascriptRequirement + - &id002 + class: InitialWorkDirRequirement + listing: $(inputs.input_directory.listing) + successCodes: [] + temporaryFailCodes: [] + step_4: + in: + filename: input_10 + input_directory: step_1/output_1 + out: + - output_file + run: + arguments: [] + baseCommand: + - 'true' + class: CommandLineTool + cwlVersion: v1.0 + hints: [] + inputs: + filename: + default: states-metadata.json + streamable: false + type: string + input_directory: + streamable: false + type: Directory + outputs: + output_file: + outputBinding: + glob: $(inputs.filename) + streamable: false + type: File + permanentFailCodes: [] + requirements: + - *id001 + - *id002 + successCodes: [] + temporaryFailCodes: [] diff --git a/data/covidtracking/states-daily.json b/data/covidtracking/states-daily.json index 5121d0016..170e3e5d2 100644 --- a/data/covidtracking/states-daily.json +++ b/data/covidtracking/states-daily.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea956c215a6571a4dacec07b3dbd77d9e37b5aeb360b0765e1637dd7202d6d97 -size 1014851 +oid sha256:ec936832d654871aa4d6683c980863415ca4815d42c5ae515389279bbfec19d6 +size 1045984 diff --git a/data/covidtracking/states-metadata.json b/data/covidtracking/states-metadata.json index 96cd905db..460f365c0 100644 --- a/data/covidtracking/states-metadata.json +++ b/data/covidtracking/states-metadata.json @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4815f2cceb7c2c32731794ab5b04dd129ea7f7ad3df2b54b0295d3eb55f1f767 -size 27071 +oid sha256:45eedd74dfc95f1330400740f8e25ce63adfcaef3082729afa9d76cb284a869b +size 27113 diff --git a/runs/download-covidtracking-data.runs.ipynb b/runs/download-covidtracking-data.runs.ipynb index c557160dd..0ae908d0a 100644 --- a/runs/download-covidtracking-data.runs.ipynb +++ b/runs/download-covidtracking-data.runs.ipynb @@ -5,10 +5,10 @@ "execution_count": 1, "metadata": { "papermill": { - "duration": 3.890284, - "end_time": "2020-04-13T07:24:35.128446", + "duration": 2.928723, + "end_time": "2020-04-14T07:25:18.173122", "exception": false, - "start_time": "2020-04-13T07:24:31.238162", + "start_time": "2020-04-14T07:25:15.244399", "status": "completed" }, "tags": [] @@ -25,10 +25,10 @@ "execution_count": 2, "metadata": { "papermill": { - "duration": 0.024841, - "end_time": "2020-04-13T07:24:35.168873", + "duration": 0.025148, + "end_time": "2020-04-14T07:25:18.213431", "exception": false, - "start_time": "2020-04-13T07:24:35.144032", + "start_time": "2020-04-14T07:25:18.188283", "status": "completed" }, "tags": [ @@ -46,10 +46,10 @@ "execution_count": 3, "metadata": { "papermill": { - "duration": 0.024245, - "end_time": "2020-04-13T07:24:35.201283", + "duration": 0.021431, + "end_time": "2020-04-14T07:25:18.244432", "exception": false, - "start_time": "2020-04-13T07:24:35.177038", + "start_time": "2020-04-14T07:25:18.223001", "status": "completed" }, "tags": [ @@ -59,7 +59,7 @@ "outputs": [], "source": [ "# Parameters\n", - "PAPERMILL_INPUT_PATH = \"/tmp/1yrezeoo/notebooks/process/download-covidtracking-data.ipynb\"\n", + "PAPERMILL_INPUT_PATH = \"/tmp/y5i25jab/notebooks/process/download-covidtracking-data.ipynb\"\n", "PAPERMILL_OUTPUT_PATH = \"runs/download-covidtracking-data.runs.ipynb\"\n", "out_folder = \"data/covidtracking\"\n" ] @@ -68,10 +68,10 @@ "cell_type": "markdown", "metadata": { "papermill": { - "duration": 0.007503, - "end_time": "2020-04-13T07:24:35.217583", + "duration": 0.005677, + "end_time": "2020-04-14T07:25:18.257346", "exception": false, - "start_time": "2020-04-13T07:24:35.210080", + "start_time": "2020-04-14T07:25:18.251669", "status": "completed" }, "tags": [] @@ -87,10 +87,10 @@ "execution_count": 4, "metadata": { "papermill": { - "duration": 0.191268, - "end_time": "2020-04-13T07:24:35.414542", + "duration": 0.601563, + "end_time": "2020-04-14T07:25:18.864512", "exception": false, - "start_time": "2020-04-13T07:24:35.223274", + "start_time": "2020-04-14T07:25:18.262949", "status": "completed" }, "tags": [] @@ -107,10 +107,10 @@ "execution_count": 5, "metadata": { "papermill": { - "duration": 0.026264, - "end_time": "2020-04-13T07:24:35.456863", + "duration": 0.027589, + "end_time": "2020-04-14T07:25:18.907156", "exception": false, - "start_time": "2020-04-13T07:24:35.430599", + "start_time": "2020-04-14T07:25:18.879567", "status": "completed" }, "tags": [] @@ -129,10 +129,10 @@ "execution_count": 6, "metadata": { "papermill": { - "duration": 0.072516, - "end_time": "2020-04-13T07:24:35.542366", + "duration": 0.076892, + "end_time": "2020-04-14T07:25:18.996665", "exception": false, - "start_time": "2020-04-13T07:24:35.469850", + "start_time": "2020-04-14T07:25:18.919773", "status": "completed" }, "tags": [] @@ -246,10 +246,10 @@ "cell_type": "markdown", "metadata": { "papermill": { - "duration": 0.008042, - "end_time": "2020-04-13T07:24:35.563359", + "duration": 0.008701, + "end_time": "2020-04-14T07:25:19.019188", "exception": false, - "start_time": "2020-04-13T07:24:35.555317", + "start_time": "2020-04-14T07:25:19.010487", "status": "completed" }, "tags": [] @@ -263,10 +263,10 @@ "execution_count": 7, "metadata": { "papermill": { - "duration": 0.214373, - "end_time": "2020-04-13T07:24:35.784160", + "duration": 0.331311, + "end_time": "2020-04-14T07:25:19.357567", "exception": false, - "start_time": "2020-04-13T07:24:35.569787", + "start_time": "2020-04-14T07:25:19.026256", "status": "completed" }, "tags": [] @@ -283,10 +283,10 @@ "execution_count": 8, "metadata": { "papermill": { - "duration": 0.028526, - "end_time": "2020-04-13T07:24:35.827965", + "duration": 0.03064, + "end_time": "2020-04-14T07:25:19.402444", "exception": false, - "start_time": "2020-04-13T07:24:35.799439", + "start_time": "2020-04-14T07:25:19.371804", "status": "completed" }, "tags": [] @@ -305,10 +305,10 @@ "execution_count": 9, "metadata": { "papermill": { - "duration": 0.105363, - "end_time": "2020-04-13T07:24:35.945309", + "duration": 0.107173, + "end_time": "2020-04-14T07:25:19.520920", "exception": false, - "start_time": "2020-04-13T07:24:35.839946", + "start_time": "2020-04-14T07:25:19.413747", "status": "completed" }, "tags": [] @@ -318,7 +318,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2112 data points\n" + "2168 data points\n" ] }, { @@ -368,51 +368,51 @@ " <tbody>\n", " <tr>\n", " <th>0</th>\n", - " <td>20200412</td>\n", + " <td>20200413</td>\n", " <td>AK</td>\n", - " <td>272.0</td>\n", - " <td>7766.0</td>\n", + " <td>277.0</td>\n", + " <td>7553.0</td>\n", " <td>NaN</td>\n", " <td>NaN</td>\n", - " <td>31.0</td>\n", + " <td>32.0</td>\n", " <td>NaN</td>\n", " <td>NaN</td>\n", " <td>NaN</td>\n", " <td>...</td>\n", - " <td>31.0</td>\n", - " <td>8038.0</td>\n", - " <td>8038.0</td>\n", - " <td>8038.0</td>\n", + " <td>32.0</td>\n", + " <td>7830.0</td>\n", + " <td>7830.0</td>\n", + " <td>7830.0</td>\n", " <td>2</td>\n", " <td>0.0</td>\n", - " <td>0.0</td>\n", - " <td>291.0</td>\n", - " <td>15.0</td>\n", - " <td>306.0</td>\n", + " <td>1.0</td>\n", + " <td>-213.0</td>\n", + " <td>5.0</td>\n", + " <td>-208.0</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", - " <td>20200412</td>\n", + " <td>20200413</td>\n", " <td>AL</td>\n", - " <td>3525.0</td>\n", - " <td>18058.0</td>\n", + " <td>3734.0</td>\n", + " <td>25448.0</td>\n", " <td>NaN</td>\n", " <td>NaN</td>\n", - " <td>437.0</td>\n", + " <td>457.0</td>\n", " <td>NaN</td>\n", " <td>189.0</td>\n", " <td>NaN</td>\n", " <td>...</td>\n", - " <td>437.0</td>\n", - " <td>21583.0</td>\n", - " <td>21583.0</td>\n", - " <td>21583.0</td>\n", + " <td>457.0</td>\n", + " <td>29182.0</td>\n", + " <td>29182.0</td>\n", + " <td>29182.0</td>\n", " <td>1</td>\n", - " <td>2.0</td>\n", - " <td>35.0</td>\n", - " <td>0.0</td>\n", - " <td>334.0</td>\n", - " <td>334.0</td>\n", + " <td>6.0</td>\n", + " <td>20.0</td>\n", + " <td>7390.0</td>\n", + " <td>209.0</td>\n", + " <td>7599.0</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", @@ -421,24 +421,24 @@ ], "text/plain": [ " date state positive negative pending hospitalizedCurrently \\\n", - "0 20200412 AK 272.0 7766.0 NaN NaN \n", - "1 20200412 AL 3525.0 18058.0 NaN NaN \n", + "0 20200413 AK 277.0 7553.0 NaN NaN \n", + "1 20200413 AL 3734.0 25448.0 NaN NaN \n", "\n", " hospitalizedCumulative inIcuCurrently inIcuCumulative \\\n", - "0 31.0 NaN NaN \n", - "1 437.0 NaN 189.0 \n", + "0 32.0 NaN NaN \n", + "1 457.0 NaN 189.0 \n", "\n", " onVentilatorCurrently ... hospitalized total totalTestResults \\\n", - "0 NaN ... 31.0 8038.0 8038.0 \n", - "1 NaN ... 437.0 21583.0 21583.0 \n", + "0 NaN ... 32.0 7830.0 7830.0 \n", + "1 NaN ... 457.0 29182.0 29182.0 \n", "\n", " posNeg fips deathIncrease hospitalizedIncrease negativeIncrease \\\n", - "0 8038.0 2 0.0 0.0 291.0 \n", - "1 21583.0 1 2.0 35.0 0.0 \n", + "0 7830.0 2 0.0 1.0 -213.0 \n", + "1 29182.0 1 6.0 20.0 7390.0 \n", "\n", " positiveIncrease totalTestResultsIncrease \n", - "0 15.0 306.0 \n", - "1 334.0 334.0 \n", + "0 5.0 -208.0 \n", + "1 209.0 7599.0 \n", "\n", "[2 rows x 25 columns]" ] @@ -474,18 +474,18 @@ "version": "3.7.3" }, "papermill": { - "duration": 6.078507, - "end_time": "2020-04-13T07:24:36.274997", + "duration": 6.524857, + "end_time": "2020-04-14T07:25:19.946947", "environment_variables": {}, "exception": null, - "input_path": "/tmp/1yrezeoo/notebooks/process/download-covidtracking-data.ipynb", + "input_path": "/tmp/y5i25jab/notebooks/process/download-covidtracking-data.ipynb", "output_path": "runs/download-covidtracking-data.runs.ipynb", "parameters": { - "PAPERMILL_INPUT_PATH": "/tmp/1yrezeoo/notebooks/process/download-covidtracking-data.ipynb", + "PAPERMILL_INPUT_PATH": "/tmp/y5i25jab/notebooks/process/download-covidtracking-data.ipynb", "PAPERMILL_OUTPUT_PATH": "runs/download-covidtracking-data.runs.ipynb", "out_folder": "data/covidtracking" }, - "start_time": "2020-04-13T07:24:30.196490", + "start_time": "2020-04-14T07:25:13.422090", "version": "1.1.0" } }, -- GitLab