{"id":23188769,"url":"https://github.com/whdhdyt21/graph-transformation-dijkstra-python","last_synced_at":"2025-07-13T07:36:08.352Z","repository":{"id":212781964,"uuid":"732301780","full_name":"whdhdyt21/Graph-Transformation-Dijkstra-Python","owner":"whdhdyt21","description":"Determining the Shortest Route, Transforming Graph to Adjacency Matrix and Incidence Matrix using Dijkstra's Algorithm in Python with NetworkX","archived":false,"fork":false,"pushed_at":"2024-05-21T01:30:55.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T13:43:40.012Z","etag":null,"topics":["dijkstra-algorithm","graph","networkx-graph","networkx-library","shortest-path-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whdhdyt21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-16T08:09:38.000Z","updated_at":"2024-05-21T16:57:56.000Z","dependencies_parsed_at":"2023-12-16T09:34:08.634Z","dependency_job_id":"242bab01-cfcb-4523-a727-606febe4d450","html_url":"https://github.com/whdhdyt21/Graph-Transformation-Dijkstra-Python","commit_stats":null,"previous_names":["whdhdyt21/graph-transformation-dijkstra-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whdhdyt21%2FGraph-Transformation-Dijkstra-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whdhdyt21%2FGraph-Transformation-Dijkstra-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whdhdyt21%2FGraph-Transformation-Dijkstra-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whdhdyt21%2FGraph-Transformation-Dijkstra-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whdhdyt21","download_url":"https://codeload.github.com/whdhdyt21/Graph-Transformation-Dijkstra-Python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294462,"owners_count":20915338,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dijkstra-algorithm","graph","networkx-graph","networkx-library","shortest-path-algorithm"],"created_at":"2024-12-18T11:15:35.334Z","updated_at":"2025-04-05T05:45:40.020Z","avatar_url":"https://github.com/whdhdyt21.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graph-Transformation-Dijkstra-Python\n\nDetermining the Shortest Route, Transforming Graph to Adjacency Matrix and Incidence Matrix using Dijkstra's Algorithm in Python with NetworkX\n\n## Overview\n\nThis project demonstrates how to create a graph, transform it into an adjacency matrix and incidence matrix, and find the shortest path using Dijkstra's algorithm. The implementation is done in Python using the NetworkX library.\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.x\n- NetworkX\n- Matplotlib\n\nInstall the necessary libraries using pip:\n\n```sh\npip install networkx matplotlib\n```\n\n### Running the Code\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/whdhdyt21/Graph-Transformation-Dijkstra-Python.git\n    cd Graph-Transformation-Dijkstra-Python\n    ```\n\n2. Run the `graph.ipynb` notebook in Google Colab or any local Jupyter Notebook environment.\n\n### Features\n\n1. **Shortest Path Calculation**:\n   - Use Dijkstra's algorithm to find the shortest path between two nodes.\n   \n2. **Graph Transformation**:\n   - Convert the graph into an adjacency matrix.\n   - Convert the graph into an incidence matrix.\n\n3. **Edge Weight Modification**:\n   - Modify the weight of an edge in the graph.\n\n4. **Graph Visualization**:\n   - Visualize the graph with nodes and edges labeled with distances.\n\n### Usage\n\nThe code prompts the user for input to define the graph's nodes and edges along with their distances. After setting up the graph, a menu is displayed to perform various operations:\n\n1. **Find Shortest Path**:\n   - Enter the start and end nodes to find the shortest path and distance.\n   \n2. **Change Edge Weight**:\n   - Specify an edge and its new weight to update the graph.\n   \n3. **Graph Information**:\n   - Display the number of nodes and edges in the graph.\n   \n4. **Display Adjacency Matrix**:\n   - Show the adjacency matrix of the graph.\n   \n5. **Display Incidence Matrix**:\n   - Show the incidence matrix of the graph.\n   \n6. **Exit**:\n   - Exit the program.\n\n### Notes\n\n- Ensure you input valid numbers when prompted for nodes, edges, and weights.\n- The visualization is generated using Matplotlib and may not display properly in some environments.\n\n## Acknowledgements\n\n- [NetworkX Documentation](https://networkx.github.io/documentation/stable/)\n- [Matplotlib Documentation](https://matplotlib.org/stable/contents.html)\n\n## Contact\n\nFor any issues or inquiries, please open an issue in this repository or contact the maintainer at [your email].\n\nEnjoy exploring graph transformations and shortest path algorithms!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhdhdyt21%2Fgraph-transformation-dijkstra-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhdhdyt21%2Fgraph-transformation-dijkstra-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhdhdyt21%2Fgraph-transformation-dijkstra-python/lists"}