{"id":25103176,"url":"https://github.com/laothes/community-dectection-airlines","last_synced_at":"2025-04-02T07:12:54.921Z","repository":{"id":266292387,"uuid":"897942870","full_name":"laothes/Community-Dectection-Airlines","owner":"laothes","description":"Python implementations of Community Detection Algorithms, including Cliques, k-cores, SNN,  IHCS, LCMA, Girvan-Newman.","archived":false,"fork":false,"pushed_at":"2024-12-15T03:13:30.000Z","size":7104,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T21:39:00.762Z","etag":null,"topics":["cliques","community-detection","flights","girvan-newman-algorithm","ihcs","k-core","lcma","master","pyecharts","snn"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laothes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-12-03T14:09:49.000Z","updated_at":"2024-12-15T03:13:33.000Z","dependencies_parsed_at":"2024-12-11T17:27:07.335Z","dependency_job_id":"c4cc6e74-caf3-4dd7-b19f-7e1dc67ce038","html_url":"https://github.com/laothes/Community-Dectection-Airlines","commit_stats":null,"previous_names":["laothes/community-dectection-airlines.github.io","laothes/community-dectection-airlines"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laothes%2FCommunity-Dectection-Airlines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laothes%2FCommunity-Dectection-Airlines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laothes%2FCommunity-Dectection-Airlines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laothes%2FCommunity-Dectection-Airlines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laothes","download_url":"https://codeload.github.com/laothes/Community-Dectection-Airlines/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246769972,"owners_count":20830771,"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":["cliques","community-detection","flights","girvan-newman-algorithm","ihcs","k-core","lcma","master","pyecharts","snn"],"created_at":"2025-02-07T21:39:05.661Z","updated_at":"2025-04-02T07:12:54.899Z","avatar_url":"https://github.com/laothes.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Community Detection in Airport Networks\n\nThis repository implements various community detection algorithms in Python to analyze airport networks. The algorithms aim to identify clusters of airports with high connectivity within the network.\n\n## Project Structure\n\n```\n.\n├── data/\n│   ├── airports.dat    # Airport information dataset\n│   └── routes.dat      # Flight routes dataset\n├── echart/            # Dynamic visualization results\n│   ├── AirportBased/  # Visualizations for airport-based analysis\n│   │   └── *.html     # Interactive network visualizations\n│   └── RouteBased/    # Visualizations for route-based analysis\n│       └── *.html     # Interactive network visualizations\n├── algorithms/\n│   ├── ihcs.py        # Iterated Highly Connected Subgraphs implementation\n│   ├── lcma.py        # Local Clique Merging Algorithm implementation\n│   ├── snn.py         # Shared Near Neighbor implementation\n│   └── divisive.py    # Modified Girvan-Newman algorithm implementation\n├── notebooks/\n│   ├── community-detection_airportbased.ipynb    # Airport-based analysis\n│   └── community-detection_routebased.ipynb      # Route-based analysis\n└── requirements.txt\n```\n\n## Data Source\n\nThis project utilizes data from OpenFlights: https://openflights.org/data.php.\n- `airports.dat`: Contains airport information including ID, name, location, etc.\n- `routes.dat`: Contains route information including source and destination airports.\n\n## Implemented Algorithms\n\n* **Cliques**: Identifies complete subgraphs where every pair of nodes is connected.\n* **k-cores**: Finds dense subgraphs where each node has at least k neighbors within the subgraph.\n* **Shared Near Neighbor (SNN)**: Groups nodes based on the number of shared neighbors they have.\n* **Iterated Highly Connected Subgraphs (IHCS)**: Iteratively identifies and merges highly connected subgraphs.\n* **Local Clique Merging Algorithm (LCMA)**: Progressively merges local cliques to form larger communities.\n* **Girvan-Newman Algorithm**: A divisive hierarchical clustering algorithm based on edge betweenness centrality, adapted specifically for airport networks.\n\n## Dependencies\n\nCore Dependencies:\n* networkx (for graph manipulation and algorithms)\n* pandas (for data manipulation)\n* numpy (for numerical operations)\n* pyecharts (for network visualization)\n    - pyecharts.charts\n    - pyecharts.options\n    - pyecharts.globals\n\nPython Standard Library:\n* typing (for type hints)\n* itertools (for combinatorial operations)\n* collections (for specialized container datatypes)\n\nYou can install all required packages using:\n```bash\npip install -r requirements.txt\n```\n\n## Analysis Notebooks\n\nThe project includes two main analysis notebooks with different network construction approaches:\n\n1. `community-detection_airportbased.ipynb`\n   - Airport-centric network construction:\n     * Filters airports based on minimum flight threshold (n = 300 flights)\n     * Only includes routes where both source and destination airports meet this threshold\n     * Results in a network focused on major aviation hubs\n   - Implements all algorithms using this filtered network structure\n   - Visualizes communities and their relationships\n   - Suitable for analyzing patterns among major airports\n\n2. `community-detection_routebased.ipynb`\n   - Route-centric network construction:\n     * Filters routes based on minimum frequency threshold (n = 5 occurrences)\n     * Only includes airports that appear in these filtered routes\n     * Results in a network focused on frequently used connections\n   - Implements all algorithms using this filtered network structure\n   - Includes route-specific visualizations and analysis\n   - Better for analyzing actual flight traffic patterns\n\nBoth approaches allow for adjusting the threshold n to analyze different network densities and focus on different aspects of the air transportation network.\n\n## Independent Algorithm Implementations\n\nThe project features four custom algorithm implementations:\n\n1. `ihcs.py` - Iterated Highly Connected Subgraphs\n   - Iteratively identifies dense subgraphs\n   - Merges subgraphs based on connectivity thresholds\n   - Optimized for airport network analysis\n\n2. `lcma.py` - Local Clique Merging Algorithm\n   - Identifies and merges local cliques\n   - Progressive community formation\n   - Specifically adapted for airport connectivity patterns\n\n3. `snn.py` - Shared Near Neighbor\n   - Groups nodes based on shared neighbor counts\n   - Identifies communities through neighbor similarity\n   - Effective for finding naturally clustered airports\n\n4. `divisive.py` - Modified Girvan-Newman Algorithm\n   - Based on NetworkX's girvan_newman implementation\n   - Customized for airport network analysis\n   - Uses edge betweenness centrality to identify community boundaries\n   - Includes additional geographical considerations for airport communities\n\n## Visualization Results\n\nThe `echart` folder contains interactive HTML visualizations organized by analysis type:\n\n### Airport-Based Analysis (`echart/AirportBased/`)\n- Network visualizations based on airport connectivity\n- Communities detected using airport-centric approach\n- Geographic distribution of major airport hubs\n\n### Route-Based Analysis (`echart/RouteBased/`)\n- Network visualizations based on route frequency\n- Communities detected using route-centric approach\n- Frequent route pattern visualizations\n\n### Visualization Suggestions\n\n1. Display Dimensions:\n   - Width: 1600px\n   - Height: 800px\n   - **Note**: Best viewed on large screens or displays with at least 1920×1080 resolution\n\n2. Viewing Instructions:\n   - Open any `.html` file in the respective folders using a web browser\n   - Allow a few moments for large visualizations to fully render\n   - Use browser zoom controls to adjust the view if needed\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n* OpenFlights.org for providing the airport network dataset\n* NetworkX developers for the graph analysis library\n* PyeCharts team for the visualization tools","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaothes%2Fcommunity-dectection-airlines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaothes%2Fcommunity-dectection-airlines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaothes%2Fcommunity-dectection-airlines/lists"}