Skip to content

docs: community detection guide #844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 35 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
28f8cec
add: community detection guide docs - wip
Jul 29, 2025
5632575
fix: ipython warning
BeaMarton13 Jul 31, 2025
1d700a8
fix: remove all warnings
BeaMarton13 Jul 31, 2025
be75a60
add: notebooks and made community detection guide prettier
Jul 31, 2025
3981103
delete: unused files
Jul 31, 2025
91b1b5f
delete: ipynb_checkpoints
BeaMarton13 Jul 31, 2025
0f36868
add: all modularities w plot
BeaMarton13 Aug 1, 2025
035c579
add: LPA test
BeaMarton13 Aug 1, 2025
4679657
Merge remote-tracking branch 'upstream/develop' into feat/community-d…
BeaMarton13 Aug 4, 2025
a99dcf0
removed checkpoints
BeaMarton13 Aug 4, 2025
99db9fd
add: working with clusterings
BeaMarton13 Aug 4, 2025
29e17dd
add: updated modularity
BeaMarton13 Aug 4, 2025
06b22bd
add: fixed seed for grid graph
BeaMarton13 Aug 4, 2025
c9417de
add: new resolution params
BeaMarton13 Aug 4, 2025
61bb0c2
add: updated notebooks
BeaMarton13 Aug 4, 2025
4be130d
add: updated mkdoc
BeaMarton13 Aug 5, 2025
612d756
add: download button - wip
BeaMarton13 Aug 5, 2025
6a8d874
fix: unclickable card
BeaMarton13 Aug 5, 2025
e88e9e7
add: change color on download hover
BeaMarton13 Aug 5, 2025
7708a03
add: updated modularity
BeaMarton13 Aug 6, 2025
8eef8d0
fix: PR comments
BeaMarton13 Aug 6, 2025
ef2fb40
add: updated title for working with clusterings and removed extra new…
BeaMarton13 Aug 6, 2025
f763788
add: lower case and moved sierpinski methods to functions
BeaMarton13 Aug 6, 2025
6ca7c75
add: LPA description
BeaMarton13 Aug 6, 2025
ea6d5e8
add: new sphinx version, resolution paramter update and reordered tab…
BeaMarton13 Aug 6, 2025
76dfe11
Merge remote-tracking branch 'upstream/develop' into feat/community-d…
BeaMarton13 Aug 6, 2025
e5eaa80
delete: interactive_resolution_on_sierpinski
BeaMarton13 Aug 7, 2025
e675c03
add: updated resoltuion parameter
BeaMarton13 Aug 7, 2025
3eb5565
fix: remove plot function
BeaMarton13 Aug 7, 2025
3eb8e3c
add: more space before titles
BeaMarton13 Aug 7, 2025
0623371
add: weighted clustering for GoT
BeaMarton13 Aug 7, 2025
1fb27aa
add: minor refactoring on significance and smaller note block in init…
BeaMarton13 Aug 8, 2025
c0233aa
add: minor changes
BeaMarton13 Aug 8, 2025
ea0ff51
add: smaller note box
BeaMarton13 Aug 8, 2025
ef96b4c
fix: remove duplicate plots and unused functions
BeaMarton13 Aug 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions doc/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,93 @@
max-width: 100%;
overflow: visible;
}

/* Custom CSS for colored cards */
/* Base card styling for better visual appearance */
.sd-card {
border: none !important;
border-radius: 8px !important;
position: relative;
padding: 1em; /* Adjust padding as needed */
color: white;
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Hover effect */
.sd-card:hover {
transform: translateY(-3px); /* Slightly lift card */
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

/* Card titles inside the body */
.sd-card-body h3, .sd-card-body strong {
font-size: 1.2em;
font-weight: bold;
margin-bottom: 0.5em;
color: white !important;
}

/* Ensure the main content block has flexible spacing */
.sd-card-body {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}

/* Download button container inside the card */
.sd-card-body .download-container {
position: relative;
z-index: 10; /* A high number to make sure it's on top */
margin-top: auto; /* Push to the bottom */
text-align: right;
}

/* The actual button inside the container */
.sd-card-body .download-button {
background-color: #f8f9fa;
color: #212529;
border: 1px solid #ced4da;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}

.download-link {
text-decoration: none !important;
}

.download-button {
padding: 8px 16px;
background-color: #2980b9;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.3s;
}

.download-button:hover {
background-color: #3498db;
}

/* Colored cards (your colors are good) */
.card-red-orange { background-color: #FF6633; }
.card-deep-orange { background-color: #FF8C40; }
.card-yellow-orange { background-color: #FFA500; }
.card-light-green { background-color: #7ED957; }
.card-medium-green { background-color: #70B341; }
.card-dark-green { background-color: #4CAF50; }
.card-light-blue { background-color: #409ED8; }
.card-medium-blue { background-color: #007BFF; }
.card-deep-blue { background-color: #0056b3; }
.card-light-purple { background-color: #BF40BF; }
.card-medium-purple { background-color: #800080; }
.card-deep-purple { background-color: #4B0082; }

section h1,
section h2,
section h3 {
margin-top: 35px;
}
228 changes: 228 additions & 0 deletions doc/source/community_detection_guide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
Community Detection Guide
=========================================

This documentation provides an overview of the notebooks available in the community detection guide.

.. toctree::
:maxdepth: 2
:hidden:

community_detection_guide/notebooks/initial_workflow.ipynb
community_detection_guide/notebooks/community_detection_algorithms.ipynb
community_detection_guide/notebooks/test_significance_of_community.ipynb
community_detection_guide/notebooks/generating_and_visualizing_clusters.ipynb
community_detection_guide/notebooks/hierarchical_clustering.ipynb
community_detection_guide/notebooks/modularity.ipynb
community_detection_guide/notebooks/resolution.ipynb
community_detection_guide/notebooks/consensus_clustering.ipynb
community_detection_guide/notebooks/membership_vector.ipynb
community_detection_guide/notebooks/working_with_clusterings.ipynb
community_detection_guide/notebooks/functions.ipynb

.. grid:: 2 2 3 3
:gutter: 3

.. grid-item-card:: Initial Workflow
:link: community_detection_guide/notebooks/initial_workflow
:link-type: doc
:class-card: sd-card-hover card-red-orange
:shadow: sm

.. **Overview:** This notebook is a quick start guide to community detection in igraph. It covers the initial workflow for detecting communities in networks. (If you look for a more practical learning experience, we recommend starting with this notebook.)

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/initial_workflow.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Community Detection Algorithms
:link: community_detection_guide/notebooks/community_detection_algorithms
:link-type: doc
:class-card: sd-card-hover card-deep-orange
:shadow: sm

.. **Overview:** This notebook covers various community detection algorithms available in igraph. It provides a detailed explanation of these algorithms and when to use them.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/community_detection_algorithms.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Significance of Community Structure
:link: community_detection_guide/notebooks/test_significance_of_community
:link-type: doc
:class-card: sd-card-hover card-yellow-orange
:shadow: sm

.. **Overview:** This notebook provides methods to test the significance of detected communities.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/test_significance_of_community.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Generating and Visualizing Clusters
:link: community_detection_guide/notebooks/generating_and_visualizing_clusters
:link-type: doc
:class-card: sd-card-hover card-dark-green
:shadow: sm

.. **Overview:** This notebook provides various methods for generating and visualizing clusters in networks. It includes techniques for visualizing community structures.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/generating_and_visualizing_clusters.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Hierarchical Clustering
:link: community_detection_guide/notebooks/hierarchical_clustering
:link-type: doc
:class-card: sd-card-hover card-medium-green
:shadow: sm

.. **Overview:** This notebook describes hierarchical clustering. It explains how to perform hierarchical clustering on networks and visualize the results.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/hierarchical_clustering.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Modularity
:link: community_detection_guide/notebooks/modularity
:link-type: doc
:class-card: sd-card-hover card-light-green
:shadow: sm

.. **Overview:** This notebook introduces the concept of modularity in community detection.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/modularity.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Resolution Parameter
:link: community_detection_guide/notebooks/resolution
:link-type: doc
:class-card: sd-card-hover card-deep-blue
:shadow: sm

.. **Overview:** This notebook introduces the concept of resolution parameter on the Sierpinski triangle.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/resolution.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Consensus Clustering
:link: community_detection_guide/notebooks/consensus_clustering
:link-type: doc
:class-card: sd-card-hover card-medium-blue
:shadow: sm

.. **Overview:** This notebook introduces the method of consensus clustering by combining multiple clustering results.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/consensus_clustering.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Membership Vector
:link: community_detection_guide/notebooks/membership_vector
:link-type: doc
:class-card: sd-card-hover card-light-blue
:shadow: sm

.. **Overview:** This notebook introduces membership vectors in igraph.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/membership_vector.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Working with Clusterings
:link: community_detection_guide/notebooks/working_with_clusterings
:link-type: doc
:class-card: sd-card-hover card-deep-purple
:shadow: sm

.. **Overview:** This notebook describes how to work with clusterings in igraph.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/working_with_clusterings.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

.. grid-item-card:: Helper Functions
:link: community_detection_guide/notebooks/functions
:link-type: doc
:class-card: sd-card-hover card-medium-purple
:shadow: sm

.. **Overview:** This notebook introduces all the helper functions used in the community detection guide. It provides a collection of utility functions for community detection tasks.

.. raw:: html

<div class="download-container">
<a href="community_detection_guide/notebooks/functions.ipynb" download>
<button type="button" class="download-button">
<i class="fa-solid fa-download"></i> Download Notebook
</button>
</a>
</div>

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Loading
Loading