Update app.py
Browse files
app.py
CHANGED
|
@@ -31,35 +31,58 @@ if sidebar_option == "Introductory Tutorial":
|
|
| 31 |
|
| 32 |
# Add content descriptions
|
| 33 |
descriptions = [
|
| 34 |
-
("Basic: Properties", "
|
| 35 |
-
("Basic: Read and Write Graphs", "
|
| 36 |
-
("Basic: Simple Graph", "
|
| 37 |
-
("Basic: Simple Graph Directed", "
|
| 38 |
-
("Drawing: Custom Node Position", "
|
| 39 |
-
("Drawing: Cluster Layout", "
|
| 40 |
-
("Drawing: Degree Analysis", "
|
| 41 |
-
|
| 42 |
-
("Drawing:
|
| 43 |
-
|
| 44 |
-
("Drawing:
|
| 45 |
-
|
| 46 |
-
("Drawing:
|
| 47 |
-
|
| 48 |
-
("Drawing:
|
| 49 |
-
|
| 50 |
-
("Drawing:
|
| 51 |
-
|
| 52 |
-
("Drawing:
|
| 53 |
-
|
| 54 |
-
("
|
| 55 |
-
|
| 56 |
-
("
|
| 57 |
-
|
| 58 |
-
("
|
| 59 |
-
|
| 60 |
-
("
|
| 61 |
-
|
| 62 |
-
("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
]
|
| 64 |
|
| 65 |
for title, desc in descriptions:
|
|
|
|
| 31 |
|
| 32 |
# Add content descriptions
|
| 33 |
descriptions = [
|
| 34 |
+
("Basic: Properties", "This option provides insights into the foundational aspects of a graph. You can count nodes (individual points) and edges (connections between nodes). For example, in a graph representing a social network, the nodes could be people, and the edges could represent friendships. The degree distribution tells how many connections each node has, helping identify influential nodes."),
|
| 35 |
+
("Basic: Read and Write Graphs", "This feature lets you load graphs from files or save your current graph for later use. For instance, if you have a graph stored in a GML file, you can load it and analyze it in your program. Similarly, you can save graphs as adjacency lists or edge lists for portability."),
|
| 36 |
+
("Basic: Simple Graph", "This generates simple, undirected graphs where edges don’t have a direction. For example, a graph showing roads between cities where travel is possible in both directions. You can create specific structures like a star graph (one central hub) or a cycle graph (nodes connected in a loop)."),
|
| 37 |
+
("Basic: Simple Graph Directed", "Directed graphs have edges with a direction. They are useful for workflows or dependencies. For example, in a project plan, a directed graph might show tasks with arrows indicating the order in which they need to be completed."),
|
| 38 |
+
("Drawing: Custom Node Position", "This feature allows you to manually set where each node appears on the graph. For example, in a family tree, you might want to position nodes to reflect generational hierarchies rather than relying on an automatic layout."),
|
| 39 |
+
("Drawing: Cluster Layout", "Nodes are grouped into clusters based on their connections. For instance, in a network of social media users, this could highlight friend groups. Each group would appear as a tight cluster in the visualization."),
|
| 40 |
+
("Drawing: Degree Analysis", "This visualizes the connections (or degree) of nodes. For example, in a transportation network, hubs like airports can be highlighted because they have the highest degree, representing more connections to other nodes.
|
| 41 |
+
"),
|
| 42 |
+
("Drawing: Ego Graph", "Focuses on a single node and its immediate connections. For instance, if you want to see all direct friends of a specific person on a social network, this feature isolates that person and their relationships.
|
| 43 |
+
"),
|
| 44 |
+
("Drawing: Eigenvalues", "Eigenvalues come from the graph’s Laplacian matrix and reveal structural properties. For example, in community detection, eigenvalues can help identify clusters or measure the connectivity of a graph.
|
| 45 |
+
"),
|
| 46 |
+
("Drawing: House With Colors", "Displays a basic "house graph," a simple structure that resembles a house. For example, you could use it for teaching graph theory basics, with color-coded nodes and edges representing different parts of the structure.
|
| 47 |
+
"),
|
| 48 |
+
("Drawing: Labels and Colors", "This lets you customize the appearance of nodes and edges by adding labels or colors. For example, in a roadmap, cities (nodes) can be color-coded by region, and roads (edges) can have labels for distance.
|
| 49 |
+
"),
|
| 50 |
+
("Drawing: Multipartite Layout", "Creates multipartite graphs where nodes are divided into layers, and edges only connect nodes from different layers. For instance, in a university, one layer could represent professors and another students, with edges indicating which professor teaches which student.
|
| 51 |
+
"),
|
| 52 |
+
("Drawing: Node Colormap", "Applies color gradients to nodes based on their properties, like degree or centrality. For example, nodes in a social network can be shaded to show influence, with darker colors for highly connected individuals.
|
| 53 |
+
"),
|
| 54 |
+
("Drawing: Rainbow Coloring", "This colorful feature assigns different colors to edges, helping differentiate them. For example, in a circular graph, this can show the relative positions of connections, making it visually appealing.
|
| 55 |
+
"),
|
| 56 |
+
("Drawing: Random Geometric Graph", "Generates graphs where nodes are connected if they’re within a specific distance. For example, in a wireless sensor network, nodes represent sensors, and edges show connectivity based on signal range.
|
| 57 |
+
"),
|
| 58 |
+
("Drawing: Self-loops", "Visualizes edges that start and end at the same node. For example, in a citation network, a self-loop could represent a researcher citing their previous work.
|
| 59 |
+
"),
|
| 60 |
+
("Drawing: Simple Path", "Displays simple linear graphs where nodes connect in a sequence. For example, it could represent a production line where each step depends on the previous one.
|
| 61 |
+
"),
|
| 62 |
+
("Drawing: Spectral Embedding", "Uses a mathematical technique to arrange nodes in a lower-dimensional space. For example, you can visualize clusters in a high-dimensional dataset in a way that preserves their relationships.
|
| 63 |
+
"),
|
| 64 |
+
("Drawing: Traveling Salesman Problem", "Visualizes solutions to the Traveling Salesman Problem (TSP), where the goal is to find the shortest route visiting every node once. For example, a delivery route optimization can use this to minimize travel costs.
|
| 65 |
+
"),
|
| 66 |
+
("Drawing: Weighted Graph", "Shows graphs with weighted edges. For example, in a flight network, edge weights can represent ticket prices or distances, with thicker edges for higher weights.
|
| 67 |
+
"),
|
| 68 |
+
("3D Drawing: Animations of 3D Rotation", "Generates 3D graphs with rotation animations. For example, you can visualize molecule structures or spatial relationships dynamically.
|
| 69 |
+
"),
|
| 70 |
+
("3D Drawing: Basic Matplotlib", "Creates 3D graph visualizations using Matplotlib, letting you explore spatial relationships. For example, you could map a city’s buildings in 3D space.
|
| 71 |
+
"),
|
| 72 |
+
("Graph: DAG - Topological Layout", "Displays Directed Acyclic Graphs (DAGs) in a topological order. For example, it can represent workflows or dependency graphs where tasks need to follow a sequence.
|
| 73 |
+
"),
|
| 74 |
+
("Graph: Erdos Renyi", "Generates random graphs where edges appear based on a probability. For example, you can model random connections in a network to study statistical properties.
|
| 75 |
+
"),
|
| 76 |
+
("Graph: Karate Club", "This graph is a classic benchmark in network science, showing relationships in a club. It’s often used for community detection and teaching graph analysis.
|
| 77 |
+
"),
|
| 78 |
+
("Graph: Minimum Spanning Tree", "Extracts a tree from the graph connecting all nodes with the minimum total edge weight. For example, this is used in network design to minimize cable or pipeline costs.
|
| 79 |
+
"),
|
| 80 |
+
("Graph: Triads", "Analyzes three-node structures (triads). For example, in social networks, closed triads (triangles) indicate strong relationships among three people.
|
| 81 |
+
"),
|
| 82 |
+
("Algorithms: Cycle Detection", "Detects cycles in graphs, useful for spotting feedback loops or circular dependencies. For example, in a dependency graph, it can help identify tasks that reference each other.
|
| 83 |
+
"),
|
| 84 |
+
("Algorithms: Greedy Coloring", "Colors nodes so that no two adjacent nodes share the same color. For example, in exam scheduling, this ensures no two overlapping exams are assigned the same room.
|
| 85 |
+
")
|
| 86 |
]
|
| 87 |
|
| 88 |
for title, desc in descriptions:
|