Skip to content

Commit 46290ac

Browse files
committed
Add plot highlighting directories with very few authors
1 parent b898b16 commit 46290ac

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

jupyter/GitHistoryGeneral.ipynb

+38
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,44 @@
766766
"figure.show(**plotly_treemap_figure_show_settings)"
767767
]
768768
},
769+
{
770+
"cell_type": "markdown",
771+
"id": "485b5194",
772+
"metadata": {},
773+
"source": [
774+
"### Directories with very few different authors"
775+
]
776+
},
777+
{
778+
"cell_type": "code",
779+
"execution_count": null,
780+
"id": "3175be23",
781+
"metadata": {},
782+
"outputs": [],
783+
"source": [
784+
"git_commit_authors_per_directory_low_focus = add_quantile_limited_column(git_files_with_commit_statistics, \"authorCount\", 0.33)\n",
785+
"\n",
786+
"author_count_top_limit = git_commit_authors_per_directory_low_focus['authorCount_limited'].max().astype(int).astype(str)\n",
787+
"author_count_top_limit_label_alias = {author_count_top_limit: author_count_top_limit + ' or more'}\n",
788+
"\n",
789+
"figure = plotly_graph_objects.Figure(plotly_graph_objects.Treemap(\n",
790+
" create_treemap_commit_statistics_settings(git_commit_authors_per_directory_low_focus),\n",
791+
" # Without values, much more squares are shown which gives a much better overview. The drawback is that the fileCount isn't visible.\n",
792+
" # values = git_commit_authors_per_directory['fileCount'],\n",
793+
" marker=dict(\n",
794+
" **plotly_treemap_marker_base_colorscale,\n",
795+
" colors=git_commit_authors_per_directory_low_focus['authorCount_limited'], \n",
796+
" colorbar=dict(title=\"Authors\", labelalias=author_count_top_limit_label_alias),\n",
797+
" reversescale=True\n",
798+
" ),\n",
799+
"))\n",
800+
"figure.update_layout(\n",
801+
" **plotly_treemap_layout_base_settings,\n",
802+
" title='Number of distinct commit authors (red/black = ony one or very few authors)',\n",
803+
")\n",
804+
"figure.show(**plotly_treemap_figure_show_settings)"
805+
]
806+
},
769807
{
770808
"cell_type": "markdown",
771809
"id": "5dbceaef",

0 commit comments

Comments
 (0)