From b5af6f1cd554b57504554056fd6a239e8da4244c Mon Sep 17 00:00:00 2001 From: Jon Seddon Date: Mon, 20 Jul 2020 17:26:29 +0100 Subject: [PATCH] Look at number of requests uploaded --- .gitignore | 1 + d9_6.ipynb | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..763513e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.ipynb_checkpoints diff --git a/d9_6.ipynb b/d9_6.ipynb index a27363a..9c0e1fc 100644 --- a/d9_6.ipynb +++ b/d9_6.ipynb @@ -85,12 +85,10 @@ " institute__short_name__in=['MOHC', 'NERC'],\n", " experiment__short_name__in=expts,\n", " rip_code__in=mohc_stream2_members,\n", - " datafile__isnull=False\n", "))\n", "\n", "others = DataRequest.objects.filter(\n", " experiment__short_name__in=expts,\n", - " datafile__isnull=False\n", ").exclude(\n", " # Exclude MOHC Stream 2\n", " institute__short_name__in=['MOHC', 'NERC'],\n", @@ -102,7 +100,7 @@ " rip_code='r1i1p1f1'\n", ").distinct()\n", "\n", - "stream_1_2 = hadgem_s2 | others" + "stream_1_2 = (hadgem_s2 | others).filter(datafile__isnull=False)" ] }, { @@ -131,7 +129,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "30955 data requests were uploaded consisting of 1.5 PB\n" + "31048 data requests were uploaded consisting of 1.5 PB\n" ] } ], @@ -175,8 +173,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "5941 unique data requests were restored, 19.2% of the total uploaded\n", - "417.6 TB of unique data requests were restored, 26.5% of the volume uploaded\n" + "6070 unique data requests were restored, 19.6% of the total uploaded\n", + "426.3 TB of unique data requests were restored, 27.3% of the volume uploaded\n" ] } ], @@ -187,6 +185,33 @@ " f'were restored, '\n", " f'{volume_stream_1_2_restored / volume_stream_1_2:.1%} of the volume uploaded')" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Find planned Stream 1 and 2 (ignore additional HadGEM)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "60275 data requests were originally planned to be uploaded. 31048 data requests were actually uploaded, which is 51.5% of the number planned\n" + ] + } + ], + "source": [ + "stream_1_2_planned = hadgem_s2 | others\n", + "print(f'{stream_1_2_planned.count()} data requests were originally planned to be uploaded. '\n", + " f'{stream_1_2.count()} data requests were actually uploaded, which is '\n", + " f'{stream_1_2.count() / stream_1_2_planned.count():.1%} of the number planned')" + ] } ], "metadata": { @@ -205,7 +230,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.6.7" } }, "nbformat": 4,