{"id":16735351,"url":"https://github.com/g0bel1n/gravlaw-model","last_synced_at":"2025-03-15T20:45:40.414Z","repository":{"id":132774977,"uuid":"384786281","full_name":"g0bel1n/gravlaw-model","owner":"g0bel1n","description":"Gravlaw-model is a data visualization project for the econophysic's concept of Gravity law used for modeling inter-cities traffic.","archived":false,"fork":false,"pushed_at":"2022-07-03T16:59:39.000Z","size":13284,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T09:52:59.011Z","etag":null,"topics":["data-visualization","econophysics","gravity-model"],"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/g0bel1n.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":"2021-07-10T20:40:12.000Z","updated_at":"2024-01-31T10:11:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"572855a8-d8f1-4382-b115-84b8766b7fbe","html_url":"https://github.com/g0bel1n/gravlaw-model","commit_stats":{"total_commits":14,"total_committers":3,"mean_commits":4.666666666666667,"dds":0.5,"last_synced_commit":"683bf443a38e5737c6b44b40b3e4fe19fbb7b923"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0bel1n%2Fgravlaw-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0bel1n%2Fgravlaw-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0bel1n%2Fgravlaw-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g0bel1n%2Fgravlaw-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g0bel1n","download_url":"https://codeload.github.com/g0bel1n/gravlaw-model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790945,"owners_count":20348378,"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":["data-visualization","econophysics","gravity-model"],"created_at":"2024-10-13T00:05:42.463Z","updated_at":"2025-03-15T20:45:40.393Z","avatar_url":"https://github.com/g0bel1n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gravity Law Model Applied to inter-citis traffic\n\n[![Python application](https://github.com/iSab01/gravlaw-model/actions/workflows/python-app.yml/badge.svg)](https://github.com/iSab01/gravlaw-model/actions/workflows/python-app.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nVisualization of [this paper](https://arxiv.org/abs/0710.1274)\n\n**Abstract** : \nWe investigate the traffic flows of the Korean highway system, which contains both public and private transportation information. We find that the traffic flow $T_{i,j}$ between city $i$ and $j$ forms a gravity model, the metaphor of physical gravity as described in Newton's law of gravity, $$\\frac{P(i)P(j)}{r_{ij}^2}$$, where $P(i)$ represents the population of city $i$ and $r_{ij}$ the distance between cities $i$ and $j$. It is also shown that the highway network has a heavy tail even though the road network is a rather uniform and homogeneous one. Compared to the highway network, air and public ground transportation establish inhomogeneous systems and have power-law behaviors. by Woo-Sung Jung, Fengzhong Wang, H. Eugene Stanley\n\n\n## Demonstration\n\n![plot](https://github.com/iSab01/gravlaw-model/blob/master/ressources/GravLawModel_France.png)\n\nIn blue, we can see the actual average traffic per day. In black we have the estimated traffic. Please aknowledge the fact that the precise value is not the point of the simualtion. The goal is to examine **tendancies** to check if the model might be close to reality. Moreover, for visualization puroposes, the width of the black ligne is not proportionnal to the real flow, but to T[i,j]^(0,7). The purpose of such a non-linear transformation is to avoid having massive flows covering the image or the inverse, not seeing any small-medium flows.\n\n## OnBoarding\n\nAfter making sure that your environnement check out the requirements, you can use the following commands :\n\n```python\n\nfrom gravLawModel import GravLawModel\n\nmodel = GravLawModel(country=\"your_country_name\", iso_a3=\"your_country_isoa3_code\")\nmodel.flow_calculate()\nmodel.save()\n\n```\n\nFor now, real values are only available for France, but you can easily modify the code to plot those of another country, if you know where to find them of course. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg0bel1n%2Fgravlaw-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg0bel1n%2Fgravlaw-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg0bel1n%2Fgravlaw-model/lists"}