{"id":19474447,"url":"https://github.com/shoorick/tram-age","last_synced_at":"2025-10-19T08:51:09.321Z","repository":{"id":56397953,"uuid":"310413472","full_name":"shoorick/tram-age","owner":"shoorick","description":"Compute age of public transportation in Russian cities","archived":false,"fork":false,"pushed_at":"2020-11-10T22:15:49.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-10T19:25:19.229Z","etag":null,"topics":["grabbing-content","python3","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/shoorick.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}},"created_at":"2020-11-05T20:46:53.000Z","updated_at":"2022-06-04T22:48:38.000Z","dependencies_parsed_at":"2022-08-15T18:00:37.519Z","dependency_job_id":null,"html_url":"https://github.com/shoorick/tram-age","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoorick%2Ftram-age","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoorick%2Ftram-age/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoorick%2Ftram-age/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoorick%2Ftram-age/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shoorick","download_url":"https://codeload.github.com/shoorick/tram-age/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232982710,"owners_count":18606454,"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":["grabbing-content","python3","statistics"],"created_at":"2024-11-10T19:24:59.577Z","updated_at":"2025-10-19T08:51:09.223Z","avatar_url":"https://github.com/shoorick.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compute age of trams in Russian cities\n\nThe most of systems of public transportation in Russia uses ancient wagons.\nList of passenger vehicles by particular city is available at URL like https://transphoto.org/list.php?serv=0\u0026cid=54\u0026t=1, list of Russian cities available at https://transphoto.org/country/1/\n\nThis program fetches data for specified city and type of transportation and then make some statistical computation.\n\n## Preparing\n\n```bash\nmake prepare\n. env/bin/activate\n```\n\nor\n\n```bash\nsudo apt install pip3-venv\npython3 -m venv env\n. env/bin/activate\npip install -r requirements.txt\n```\n\n## Usage\n\n```bash\ncompute.py [-h] [-c CITY] [-t TYPE] [-l LANGUAGE]\n```\n\n### Optional arguments\n\n* `-h`, `--help` — show help message and exit\n* `-c` _CITY_, `--city` _CITY_ — number or name\n   (default city is Moscow)\n* `-t` _TYPE_, `--type` _TYPE_ — transportation type\n   (digit `1` to `9` or name, default value is tram)\n* `-l` _CODE_, `--language` _CODE_ —\n   [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)\n   language code (default is `ru` for Russian)\n* `-o` _FILE_, `--output` _FILE_ — output frequency table to file.\n   Format detected by filename without case sensitivity.\n\n#### File formats\n\n* CSV — Comma Separated Values — `file.csv`\n* HTML — Hypertext Markup Language — `file.htm`, `file.html`\n* JSON — JavaScript Notation Object — `file.json`, `file.js`\n* Microsoft Excel — `file.xls` (legacy), `file.xlsx`\n\n\n## Examples\n\nIt's possible to use digital IDs\n\n```\n$ python compute.py --city 229 --type 2\nМиасс, троллейбус\n-----------------\n1987       1 #\n1988       3 ###\n1989       1 #\n1992       2 ##\n1993       2 ##\n2002       2 ##\n2004       1 #\n2005       1 #\n2006       1 #\n2007       1 #\n2008       3 ###\n2009       6 ######\n2011       1 #\n2020       2 ##\n------------\nTotal     28\nMean: 2002.6, median: 2006.5, modes: [2009]\n```\n\nor human readable names\n\n```\n$ python compute.py --city Ekb --type metro --language en\nYekaterinburg, metro\n--------------------\n1988       6 ######\n1989      39 #######################################\n2011       8 ########\n2019       8 ########\n------------\nTotal     61\nMean: 1995.7, median: 1989.0, modes: [1989]\n```\n\nNames can be specified in English or in Russian.\nThere are aliases for cities and types for example:\n* metro = metropolitain = subway = underground\n* tramway = tram = tm\n* SPb = Saint Petersburg = Petersburg\n\n## See also\n\n* https://transphoto.org/country/1/\n* https://www.facebook.com/chelurban/posts/927689021093721\n* http://shoorick.ru/2017/11/10/old-trams/\n\n## Author\n\nAlexander Sapozhnikov\nhttp://shoorick.ru/\n\u003cshoorick@cpan.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoorick%2Ftram-age","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshoorick%2Ftram-age","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoorick%2Ftram-age/lists"}