{"id":50782732,"url":"https://github.com/mogalina/graph-rank-dynamics","last_synced_at":"2026-06-12T05:01:34.769Z","repository":{"id":353219387,"uuid":"1218447346","full_name":"Mogalina/graph-rank-dynamics","owner":"Mogalina","description":"Computational engine for analyzing how importance propagates through directed graphs.","archived":false,"fork":false,"pushed_at":"2026-04-22T23:35:52.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T01:25:52.421Z","etag":null,"topics":["data-visualization","education","graph-theory","page-rank","statistics"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Mogalina.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T22:17:51.000Z","updated_at":"2026-04-22T23:35:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Mogalina/graph-rank-dynamics","commit_stats":null,"previous_names":["mogalina/graph-rank-dynamics"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Mogalina/graph-rank-dynamics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mogalina%2Fgraph-rank-dynamics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mogalina%2Fgraph-rank-dynamics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mogalina%2Fgraph-rank-dynamics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mogalina%2Fgraph-rank-dynamics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mogalina","download_url":"https://codeload.github.com/Mogalina/graph-rank-dynamics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mogalina%2Fgraph-rank-dynamics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data-visualization","education","graph-theory","page-rank","statistics"],"created_at":"2026-06-12T05:01:33.997Z","updated_at":"2026-06-12T05:01:34.763Z","avatar_url":"https://github.com/Mogalina.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graph Rank Dynamics\n\n## Abstract\nThis project provides a robust, lightweight Python implementation of the **PageRank algorithm**, originally developed by Larry Page and Sergey Brin for ranking web pages. The script utilizes the **power iteration method** to calculate a probability distribution representing the likelihood that a person randomly clicking on links will arrive at any particular node. It handling complex graph structures, including \"dangling nodes\" (nodes with zero outbound links), through a stochastic redistribution mechanism.\n\n## Motivation\nMeasuring the relative importance of elements within a networked system is a fundamental task in various fields, including search engine optimization (SEO), social network analysis, and bibliometrics. While many implementations exist, this tool aims to provide a transparent and extensible framework that combines core algorithmic logic with automated connectivity statistics, directly facilitating quantitative research and data analysis.\n\n## Implementation Details\nThe algorithm computes the stationary distribution of a Markov chain using the following iterative formula:\n\n$$\nPR(v) = \\frac{1-d}{N} + d \\left( \\sum_{u \\in In(v)} \\frac{PR(u)}{Out(u)} + \\sum_{s \\in Dangling} \\frac{PR(s)}{N} \\right)\n$$\n\nWhere:\n- $d$ is the **damping factor** (default: 0.85).\n- $N$ is the total number of nodes in the graph.\n- $PR(u)$ is the PageRank of node $u$.\n- $Out(u)$ is the outbound degree of node $u$.\n\nThe script employs **NumPy** for optimized vector operations, ensuring scalability for medium-sized datasets.\n\n## Usage\n### Prerequisites\n- Python 3.7+\n- NumPy\n\n### Execution\nProvide a text file representing a directed graph where each line contains a source node and a target node separated by whitespace:\n```bash\npython pagerank.py \u003cfilename\u003e\n```\n\n## Output Format\nThe results are exported to a structured `results.csv` file containing:\n- **rank**: The ordinal position based on importance.\n- **node_id**: The original identifier from the input file.\n- **pagerank_score**: The normalized probability score.\n- **contribution_percentage**: The percentage share of the total network importance.\n- **incoming_links**: Count of edges pointing to the node.\n- **outgoing_links**: Count of edges originating from the node.\n- **total_links**: Combined link count (in + out).\n\n---\n*Created for node importance analysis and graph topology research.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmogalina%2Fgraph-rank-dynamics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmogalina%2Fgraph-rank-dynamics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmogalina%2Fgraph-rank-dynamics/lists"}