{"id":16221964,"url":"https://github.com/chinmaykunkikar/generate-graph-json","last_synced_at":"2026-04-27T18:03:55.114Z","repository":{"id":96046353,"uuid":"262297320","full_name":"chinmaykunkikar/generate-graph-json","owner":"chinmaykunkikar","description":"Input information (like id, label, latitude, and longitude) and generate the data in JSON Graph Format","archived":false,"fork":false,"pushed_at":"2020-05-09T09:54:31.000Z","size":28,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T01:38:16.970Z","etag":null,"topics":["cli","nodejs","transit-map"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chinmaykunkikar.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":"2020-05-08T10:44:17.000Z","updated_at":"2024-07-31T17:53:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f03b3b0-9a02-4b7e-afe8-334d8c1470be","html_url":"https://github.com/chinmaykunkikar/generate-graph-json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinmaykunkikar%2Fgenerate-graph-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinmaykunkikar%2Fgenerate-graph-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinmaykunkikar%2Fgenerate-graph-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinmaykunkikar%2Fgenerate-graph-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chinmaykunkikar","download_url":"https://codeload.github.com/chinmaykunkikar/generate-graph-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755570,"owners_count":20990622,"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":["cli","nodejs","transit-map"],"created_at":"2024-10-10T12:10:33.038Z","updated_at":"2026-04-27T18:03:55.054Z","avatar_url":"https://github.com/chinmaykunkikar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generate Graph (in JSON)\n\n`get_station.js` is a helper script that will help in generating a `graph.json` which will be used as the input for [juliuste/transit-map](https://github.com/juliuste/transit-map).\n\n---\nThe input `graph.json` must be in the [JSON Graph Format](http://jsongraphformat.info/). It will look something like -\n```js\n{\n    \"nodes\": [ // list of all nodes\n        {\n            \"id\": \"DR\", // required\n            \"label\": \"Dadar\", // optional\n            \"metadata\": {\n                \"x\": 0.702342, // x-coordinate in mercator, required\n                \"y\": 0.444534 // y-coordinate in mercator, required\n            }\n        }\n    ],\n    \"edges\": [ // list of all edges\n        {\n            \"source\": \"DR\", // required\n            \"target\": \"PR\", // required\n            \"metadata\": {\n                \"line\": \"Central\" // optional\n            }\n        }\n    ],\n    \"lines\": [ // list of all lines, optional\n        {\n            \"id\": \"Central\",\n            \"color\": \"#ABDA1E\",\n            \"group\": \"Central\"\n        }\n    ]\n}\n```\n---\n\n### Requirements\n* [`node.js`](https://nodejs.org) 8.0+\n* [`gurobi_cl`](https://gurobi.com) 7.5+ (Free academic license)\n* [`juliuste/projections`](https://github.com/juliuste/projections) in parent working directory\n\n### Usage\nThis script has a CLI which will generate a `graph.json` as shown above by taking inputs from the user as documented below -\n\n```\nUSAGE: get_station.js [-n][-e][-l][-m][-c]\n```\nOption | Description\n------:|:------------------------\n|-n    | Add station nodes      |\n|-e    | Add station edges      |\n|-l    | Add a new line         |\n|-m    | Generate the input file|\n|-c    | Set new working city   |\n\n* **`-n`** : adding new station nodes will take the required parameters:\n*`(id, label, latitude, longitude)`*\n* **`-e`** : adding new station edges will take the required parameters:\n*`(source, target, line)`*\n* **`-l`** : adding new line will take the required parameters:\n*`(id, color, group)`*\n* **`-m`** : generating a *`$city.input.json`* file needs *`$city_nodes.json`*, *`$city_edges.json`* and *`$city_lines.json`* files present in the *`working/$city`* directory\n* **`-c`** : will set a new working city by modifying *`config.json`* file.\n\n## Contributing\nIf you have a question, found a bug, or want to propose a feature, feel free to open a new issue.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinmaykunkikar%2Fgenerate-graph-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinmaykunkikar%2Fgenerate-graph-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinmaykunkikar%2Fgenerate-graph-json/lists"}