{"id":20119248,"url":"https://github.com/harrystevens/adr-election-node","last_synced_at":"2026-02-17T18:34:14.345Z","repository":{"id":32962039,"uuid":"106675082","full_name":"HarryStevens/adr-election-node","owner":"HarryStevens","description":"Scrape data about an election from ADR","archived":false,"fork":false,"pushed_at":"2022-12-07T04:28:10.000Z","size":18830,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T14:37:10.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://harryjstevens.com/projects/indian-candidate-details/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HarryStevens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-12T09:50:39.000Z","updated_at":"2024-12-07T22:40:57.000Z","dependencies_parsed_at":"2023-01-14T23:00:47.315Z","dependency_job_id":null,"html_url":"https://github.com/HarryStevens/adr-election-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HarryStevens/adr-election-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryStevens%2Fadr-election-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryStevens%2Fadr-election-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryStevens%2Fadr-election-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryStevens%2Fadr-election-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HarryStevens","download_url":"https://codeload.github.com/HarryStevens/adr-election-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryStevens%2Fadr-election-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29552798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T18:16:07.221Z","status":"ssl_error","status_checked_at":"2026-02-17T18:16:04.782Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-13T19:14:54.429Z","updated_at":"2026-02-17T18:34:09.332Z","avatar_url":"https://github.com/HarryStevens.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adr-election-node\nScrape data about an election from ADR.\n\n## Setup\n```bash\ngit clone git@github.com:HarryStevens/adr-election-node.git\ncd adr-election-node\nnpm install\n```\n\n## Usage\n### Scrape\n```bash\nnode scrape # get details of all candidates for an election\n```\n\n### Process\nAfter you've run the scraper, you can run the processors. These are not necessary, but they are useful if you want to match this data with other datasets.\n```bash\nnode process/ac_nos.js # add assembly constituency numbers (and any other properties you like) from a lookup table, which can be found in meta_data/constituency_lookup. see \"Make a constituency lookup\" below.\nnode process/partify.js # get party full names (all the parties need to be added to party-time first)\n```\n\n## Add an election\nAdd the appropriate object to `meta_data/elections.js`. It must include the state name, election year, and the id from the election's myneta.info URL. For instance, if the URL is `myneta.info/mah2004/`, the id is `mah2004`.\n\n## Make a constituency lookup\nUnfortunately, myneta.info uses the wrong constituency IDs. If you want to cross reference the ADR data with other data – say, from the Election Commission – you will need the constituency IDs, because the constituency names often appear with different spellings in different datasets. \n\nYou can run `node process/ac_nos.js` to add constituency IDs to the ADR data. But before you can do that, you need to make a lookup file and add it to `meta_data/constituency_lookup/`. It must be a javascript file. Its name must match the id from the elections's myneta.info URL. It must be an array of objects where each object represents an assembly constituency and has the properties `constituency` and `ac_no`. It can have additional properties such as `district`, `reservations` and `sub_region`. To see an example of a lookup file, [see this](https://github.com/HarryStevens/adr-election-node/blob/master/meta_data/constituency_lookup/HimachalPradesh2017.js).\n\n## Add full party names\nYou can also run `node process/partify.js` to add a column called `party_eci` to the data, which contains the full party name used by the Election Commission. This script uses [party-time](https://github.com/HarryStevens/party-time) to match the party abbreviations from ADR with the full party names. It is possible that party-time will not already have all of the abbreviations you need in its database. To find out, run the partify script on your file, check the output, and see if any of the parties in the `party_eci` column are still abbreviations. If they are, you'll need to add them to [party-time's parties database](https://github.com/HarryStevens/party-time/blob/master/src/data/parties.json).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrystevens%2Fadr-election-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharrystevens%2Fadr-election-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrystevens%2Fadr-election-node/lists"}