Skip to content
Snippets Groups Projects

hide code cell in stat notebook

Merged Vuillaume requested to merge more_stats into master
1 file
+ 22
21
Compare changes
  • Side-by-side
  • Inline
@@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "dbb762f7",
"id": "fff204bf-3164-4844-a13d-e88b6231970a",
"metadata": {
"nbsphinx": "hidden"
},
@@ -34,27 +34,6 @@
"plt.style.use('seaborn-v0_8-colorblind')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b9668e64",
"metadata": {
"nbsphinx": "hidden"
},
"outputs": [],
"source": [
"title = f\"## OSSR statistics generated the {date.today()}\"\n",
"\n",
"ossr_records = get_ossr_records()\n",
"stats_names = ['downloads', 'unique_downloads', 'views', 'unique_views', ]\n",
"sum_stats = {key: sum([int(rec.data['stats'][key]) for rec in ossr_records]) for key in stats_names}\n",
"\n",
"text = f\"## There are {len(ossr_records)} records in the OSSR.\\n\"\n",
"for key, value in sum_stats.items():\n",
" text+=f\"{key.replace('_', ' ')}: {value}\\n\\n\"\n",
" \n"
]
},
{
"cell_type": "code",
"execution_count": null,
@@ -100,10 +79,30 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b9992892-a857-46a4-adc9-2a18f2889e35",
"metadata": {},
"id": "b9668e64",
"metadata": {
"nbsphinx": "hidden"
},
"outputs": [],
"source": []
"source": [
"title = f\"## OSSR statistics generated the {date.today()}\\n\"\n",
"\n",
"ossr_records = get_ossr_records()\n",
"stats_names = ['downloads', 'unique_downloads', 'views', 'unique_views', ]\n",
"sum_stats = {key: sum([int(rec.data['stats'][key]) for rec in ossr_records]) for key in stats_names}\n",
"\n",
"text = title + \"\\n\" + f\"### There are {len(ossr_records)} records in the OSSR.\\n\"\n",
"\n",
"for n in sum_stats:\n",
" text += f\"| {n.replace('_', ' ')} \"\n",
"text += \"| \\n\"\n",
"for n in sum_stats:\n",
" text += \"|----\"\n",
"text += \"| \\n\"\n",
"for k, v in sum_stats.items():\n",
" text += f\"| {v} \"\n",
"text += \"| \\n\""
]
},
{
"cell_type": "code",
@@ -112,7 +111,7 @@
"metadata": {},
"outputs": [],
"source": [
"md(title)"
"md(text)"
]
},
{
@@ -121,9 +120,7 @@
"id": "df351e32",
"metadata": {},
"outputs": [],
"source": [
"md(text)"
]
"source": []
},
{
"cell_type": "code",
@@ -192,13 +189,13 @@
"metadata": {},
"outputs": [],
"source": [
"fig = create_word_cloud(keywords)"
"create_word_cloud(keywords);"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8cc6ae00-b2e3-4ee2-ba1c-373ff9cf0d6f",
"id": "12f81935-16e7-4aba-a6a9-474cd2ad081f",
"metadata": {},
"outputs": [],
"source": []
Loading