From 378f9004cc645ef99b4ccc1c87077529566bbd37 Mon Sep 17 00:00:00 2001 From: "CR (covid cron)" <cramakri+covid-cron@ethz.ch> Date: Tue, 21 Apr 2020 22:08:13 +0000 Subject: [PATCH] renku rerun data/covidtracking/states-metadata.json data/covidtracking/states-daily.json --- .../4cd3481674d6469c84431a2cae839e41.cwl | 120 +++++++++++++++ data/covidtracking/states-daily.json | 4 +- data/covidtracking/states-metadata.json | 4 +- runs/download-covidtracking-data.runs.ipynb | 144 +++++++++--------- 4 files changed, 196 insertions(+), 76 deletions(-) create mode 100644 .renku/workflow/4cd3481674d6469c84431a2cae839e41.cwl diff --git a/.renku/workflow/4cd3481674d6469c84431a2cae839e41.cwl b/.renku/workflow/4cd3481674d6469c84431a2cae839e41.cwl new file mode 100644 index 000000000..4dfcafb5b --- /dev/null +++ b/.renku/workflow/4cd3481674d6469c84431a2cae839e41.cwl @@ -0,0 +1,120 @@ +class: Workflow +cwlVersion: v1.0 +hints: [] +inputs: + input_1: + default: out_folder + 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: states-metadata.json + streamable: false + type: string + input_6: + default: states-daily.json + streamable: false + type: string +outputs: + output_0: + outputSource: step_1/output_1 + streamable: false + type: Directory + output_3: + outputSource: step_1/output_0 + streamable: false + type: File +requirements: [] +steps: + step_1: + in: + input_1: input_1 + input_2: input_2 + input_3: input_3 + input_4: input_4 + out: + - output_1 + - output_0 + run: a17d560c41a54f5aa307ce5f3c5effe5_papermill.cwl + step_2: + in: + filename: input_5 + 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 + class: InlineJavascriptRequirement + - &id002 + class: InitialWorkDirRequirement + listing: $(inputs.input_directory.listing) + successCodes: [] + temporaryFailCodes: [] + step_3: + in: + filename: input_6 + input_directory: step_1/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 + - *id002 + successCodes: [] + temporaryFailCodes: [] diff --git a/data/covidtracking/states-daily.json b/data/covidtracking/states-daily.json index 0055f84df..23eecf3ed 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:98f82a5b65d02f0a717ed6030c45888d1684f9a25887ff1b1b3510b3b5e29424 -size 1234525 +oid sha256:aabaf92ddac15e79847cfe725b4ea1dc6f95bae48ab824b4ad3fb3d230f0839c +size 1296997 diff --git a/data/covidtracking/states-metadata.json b/data/covidtracking/states-metadata.json index 74d937fcc..91869fdd0 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:71e330ddff6f2314bcdda80dd2311315c1cad1dcd22dc534c5f35de31dbec8a3 -size 28275 +oid sha256:e09dc92ab8fd8ee1b8f62d98ab273afb13132e32eac757e6ee4128e6c5d975f3 +size 28635 diff --git a/runs/download-covidtracking-data.runs.ipynb b/runs/download-covidtracking-data.runs.ipynb index 628587f24..e5850d550 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": 0.670971, - "end_time": "2020-04-20T09:46:45.215508", + "duration": 5.532004, + "end_time": "2020-04-21T22:08:11.855758", "exception": false, - "start_time": "2020-04-20T09:46:44.544537", + "start_time": "2020-04-21T22:08:06.323754", "status": "completed" }, "tags": [] @@ -25,10 +25,10 @@ "execution_count": 2, "metadata": { "papermill": { - "duration": 0.017354, - "end_time": "2020-04-20T09:46:45.242288", + "duration": 0.018553, + "end_time": "2020-04-21T22:08:11.885551", "exception": false, - "start_time": "2020-04-20T09:46:45.224934", + "start_time": "2020-04-21T22:08:11.866998", "status": "completed" }, "tags": [ @@ -46,10 +46,10 @@ "execution_count": 3, "metadata": { "papermill": { - "duration": 0.017449, - "end_time": "2020-04-20T09:46:45.268250", + "duration": 0.020644, + "end_time": "2020-04-21T22:08:11.915312", "exception": false, - "start_time": "2020-04-20T09:46:45.250801", + "start_time": "2020-04-21T22:08:11.894668", "status": "completed" }, "tags": [ @@ -59,7 +59,7 @@ "outputs": [], "source": [ "# Parameters\n", - "PAPERMILL_INPUT_PATH = \"/tmp/ukjvdt8w/notebooks/process/download-covidtracking-data.ipynb\"\n", + "PAPERMILL_INPUT_PATH = \"/tmp/ho22unoi/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.007493, - "end_time": "2020-04-20T09:46:45.284450", + "duration": 0.00694, + "end_time": "2020-04-21T22:08:11.931022", "exception": false, - "start_time": "2020-04-20T09:46:45.276957", + "start_time": "2020-04-21T22:08:11.924082", "status": "completed" }, "tags": [] @@ -87,10 +87,10 @@ "execution_count": 4, "metadata": { "papermill": { - "duration": 0.698636, - "end_time": "2020-04-20T09:46:45.990193", + "duration": 0.203156, + "end_time": "2020-04-21T22:08:12.141364", "exception": false, - "start_time": "2020-04-20T09:46:45.291557", + "start_time": "2020-04-21T22:08:11.938208", "status": "completed" }, "tags": [] @@ -107,10 +107,10 @@ "execution_count": 5, "metadata": { "papermill": { - "duration": 0.022706, - "end_time": "2020-04-20T09:46:46.025249", + "duration": 0.021073, + "end_time": "2020-04-21T22:08:12.174309", "exception": false, - "start_time": "2020-04-20T09:46:46.002543", + "start_time": "2020-04-21T22:08:12.153236", "status": "completed" }, "tags": [] @@ -129,10 +129,10 @@ "execution_count": 6, "metadata": { "papermill": { - "duration": 0.065726, - "end_time": "2020-04-20T09:46:46.100845", + "duration": 0.074361, + "end_time": "2020-04-21T22:08:12.258143", "exception": false, - "start_time": "2020-04-20T09:46:46.035119", + "start_time": "2020-04-21T22:08:12.183782", "status": "completed" }, "tags": [] @@ -246,10 +246,10 @@ "cell_type": "markdown", "metadata": { "papermill": { - "duration": 0.008043, - "end_time": "2020-04-20T09:46:46.120804", + "duration": 0.011041, + "end_time": "2020-04-21T22:08:12.281752", "exception": false, - "start_time": "2020-04-20T09:46:46.112761", + "start_time": "2020-04-21T22:08:12.270711", "status": "completed" }, "tags": [] @@ -263,10 +263,10 @@ "execution_count": 7, "metadata": { "papermill": { - "duration": 0.16965, - "end_time": "2020-04-20T09:46:46.298759", + "duration": 0.252539, + "end_time": "2020-04-21T22:08:12.544413", "exception": false, - "start_time": "2020-04-20T09:46:46.129109", + "start_time": "2020-04-21T22:08:12.291874", "status": "completed" }, "tags": [] @@ -283,10 +283,10 @@ "execution_count": 8, "metadata": { "papermill": { - "duration": 0.027576, - "end_time": "2020-04-20T09:46:46.338007", + "duration": 0.025859, + "end_time": "2020-04-21T22:08:12.580466", "exception": false, - "start_time": "2020-04-20T09:46:46.310431", + "start_time": "2020-04-21T22:08:12.554607", "status": "completed" }, "tags": [] @@ -305,10 +305,10 @@ "execution_count": 9, "metadata": { "papermill": { - "duration": 0.116367, - "end_time": "2020-04-20T09:46:46.465702", + "duration": 0.119658, + "end_time": "2020-04-21T22:08:12.712624", "exception": false, - "start_time": "2020-04-20T09:46:46.349335", + "start_time": "2020-04-21T22:08:12.592966", "status": "completed" }, "tags": [] @@ -318,7 +318,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2508 data points\n" + "2620 data points\n" ] }, { @@ -368,51 +368,51 @@ " <tbody>\n", " <tr>\n", " <th>0</th>\n", - " <td>20200419</td>\n", + " <td>20200421</td>\n", " <td>AK</td>\n", - " <td>319.0</td>\n", - " <td>9576.0</td>\n", + " <td>329.0</td>\n", + " <td>10790.0</td>\n", " <td>NaN</td>\n", - " <td>37.0</td>\n", + " <td>42.0</td>\n", " <td>36.0</td>\n", " <td>NaN</td>\n", " <td>NaN</td>\n", " <td>NaN</td>\n", " <td>...</td>\n", " <td>36.0</td>\n", - " <td>9895.0</td>\n", - " <td>9895.0</td>\n", - " <td>9895.0</td>\n", + " <td>11119.0</td>\n", + " <td>11119.0</td>\n", + " <td>11119.0</td>\n", " <td>2</td>\n", " <td>0.0</td>\n", " <td>0.0</td>\n", - " <td>235.0</td>\n", - " <td>5.0</td>\n", - " <td>240.0</td>\n", + " <td>987.0</td>\n", + " <td>8.0</td>\n", + " <td>995.0</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", - " <td>20200419</td>\n", + " <td>20200421</td>\n", " <td>AL</td>\n", - " <td>4837.0</td>\n", - " <td>40875.0</td>\n", + " <td>5231.0</td>\n", + " <td>43295.0</td>\n", " <td>NaN</td>\n", " <td>NaN</td>\n", - " <td>641.0</td>\n", + " <td>699.0</td>\n", " <td>NaN</td>\n", " <td>260.0</td>\n", " <td>NaN</td>\n", " <td>...</td>\n", - " <td>641.0</td>\n", - " <td>45712.0</td>\n", - " <td>45712.0</td>\n", - " <td>45712.0</td>\n", + " <td>699.0</td>\n", + " <td>48526.0</td>\n", + " <td>48526.0</td>\n", + " <td>48526.0</td>\n", " <td>1</td>\n", - " <td>8.0</td>\n", - " <td>21.0</td>\n", - " <td>2992.0</td>\n", - " <td>182.0</td>\n", - " <td>3174.0</td>\n", + " <td>10.0</td>\n", + " <td>58.0</td>\n", + " <td>2420.0</td>\n", + " <td>206.0</td>\n", + " <td>2626.0</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", @@ -421,24 +421,24 @@ ], "text/plain": [ " date state positive negative pending hospitalizedCurrently \\\n", - "0 20200419 AK 319.0 9576.0 NaN 37.0 \n", - "1 20200419 AL 4837.0 40875.0 NaN NaN \n", + "0 20200421 AK 329.0 10790.0 NaN 42.0 \n", + "1 20200421 AL 5231.0 43295.0 NaN NaN \n", "\n", " hospitalizedCumulative inIcuCurrently inIcuCumulative \\\n", "0 36.0 NaN NaN \n", - "1 641.0 NaN 260.0 \n", + "1 699.0 NaN 260.0 \n", "\n", " onVentilatorCurrently ... hospitalized total totalTestResults \\\n", - "0 NaN ... 36.0 9895.0 9895.0 \n", - "1 NaN ... 641.0 45712.0 45712.0 \n", + "0 NaN ... 36.0 11119.0 11119.0 \n", + "1 NaN ... 699.0 48526.0 48526.0 \n", "\n", " posNeg fips deathIncrease hospitalizedIncrease negativeIncrease \\\n", - "0 9895.0 2 0.0 0.0 235.0 \n", - "1 45712.0 1 8.0 21.0 2992.0 \n", + "0 11119.0 2 0.0 0.0 987.0 \n", + "1 48526.0 1 10.0 58.0 2420.0 \n", "\n", " positiveIncrease totalTestResultsIncrease \n", - "0 5.0 240.0 \n", - "1 182.0 3174.0 \n", + "0 8.0 995.0 \n", + "1 206.0 2626.0 \n", "\n", "[2 rows x 25 columns]" ] @@ -474,18 +474,18 @@ "version": "3.7.3" }, "papermill": { - "duration": 3.15694, - "end_time": "2020-04-20T09:46:46.789934", + "duration": 8.64246, + "end_time": "2020-04-21T22:08:13.031600", "environment_variables": {}, "exception": null, - "input_path": "/tmp/ukjvdt8w/notebooks/process/download-covidtracking-data.ipynb", + "input_path": "/tmp/ho22unoi/notebooks/process/download-covidtracking-data.ipynb", "output_path": "runs/download-covidtracking-data.runs.ipynb", "parameters": { - "PAPERMILL_INPUT_PATH": "/tmp/ukjvdt8w/notebooks/process/download-covidtracking-data.ipynb", + "PAPERMILL_INPUT_PATH": "/tmp/ho22unoi/notebooks/process/download-covidtracking-data.ipynb", "PAPERMILL_OUTPUT_PATH": "runs/download-covidtracking-data.runs.ipynb", "out_folder": "data/covidtracking" }, - "start_time": "2020-04-20T09:46:43.632994", + "start_time": "2020-04-21T22:08:04.389140", "version": "1.1.0" } }, -- GitLab