Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
eossr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab has been updated. More info
here
.
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ESCAPE2020
WP3
eossr
Merge requests
!254
hide code cell in stat notebook
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
hide code cell in stat notebook
more_stats
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Vuillaume
requested to merge
more_stats
into
master
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
21c10774
1 commit,
2 years ago
1 file
+
22
−
21
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
docs/notebooks/ossr_statistics.ipynb
+
28
−
31
Options
@@ -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(t
itle
)"
"md(t
ext
)"
]
},
{
@@ -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-373ff9cf0d6
f",
"id": "
12f81935-16e7-4aba-a6a9-474cd2ad081
f",
"metadata": {},
"outputs": [],
"source": []
Loading