{"id":18647277,"url":"https://github.com/ttitcombe/constituencymap","last_synced_at":"2025-04-11T13:30:50.989Z","repository":{"id":56867549,"uuid":"177111600","full_name":"TTitcombe/ConstituencyMap","owner":"TTitcombe","description":"Python code to generate political maps","archived":false,"fork":false,"pushed_at":"2019-10-20T13:43:41.000Z","size":58157,"stargazers_count":12,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-06T01:33:42.135Z","etag":null,"topics":["brexit","choropleth","choropleth-map","data-science","election-data","map","political-science","politics","united-kingdom","visualization"],"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/TTitcombe.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":"2019-03-22T09:32:12.000Z","updated_at":"2022-11-13T21:48:18.000Z","dependencies_parsed_at":"2022-08-20T05:12:59.268Z","dependency_job_id":null,"html_url":"https://github.com/TTitcombe/ConstituencyMap","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTitcombe%2FConstituencyMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTitcombe%2FConstituencyMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTitcombe%2FConstituencyMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TTitcombe%2FConstituencyMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TTitcombe","download_url":"https://codeload.github.com/TTitcombe/ConstituencyMap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223468296,"owners_count":17150123,"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":["brexit","choropleth","choropleth-map","data-science","election-data","map","political-science","politics","united-kingdom","visualization"],"created_at":"2024-11-07T06:25:28.771Z","updated_at":"2024-11-07T06:25:29.408Z","avatar_url":"https://github.com/TTitcombe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConstituencyMap\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TTitcombe/ConstituencyMap/master)\n\nThis project contains code to generate maps of the United Kingdom divided by constituency lines. One can supply constituency-level data, \nsuch as number of voters, to see the constituency break down of the data. The maps represent\nconstituencies as equally-sized hexagons. This can be invaluable for visualising maps in a way\nnot biased by landmass.\n\nStatic plots are generated using geopandas and matplotlib, and interactive maps\nare generated with altair.\n\n## Maps\nThe mapper classes are implemented in `map/`. Currently, only hex maps have been implemented. These maps are created using the fantastic tool by \n[ODILeeds](https://odileeds.org/projects/hexmaps/constituencies/). There is a script in `utils/hex_to_csv` \nwhich converts the \"hexjson\" files created by ODILeeds into csv files.\n\nThis repo uses data from the [Revoke Article 50 petition](https://petition.parliament.uk/petitions/241584) in the \nexample files to demonstrate how to create choropleth maps.\n\n## How to use\nRun the [`examples/`][examples], either by cloning the repo or using [binder][binder]\n\nin the root directory to see an example hexmap, using \ndata taken from the Revoke Article 50 petition.\nThis example file will show you how to use the **HexMap** class the create a choropleth map of the United Kingdom.\n\n### What are constituencies?\nThe United Kingdom of Great Britain and Northern Ireland operates elections under a first-past-the-post (fptp) system.\nThe nation is split into hundreds of **constituencies** of roughly the same number of citizens. \n\nIn General Elections, the politician with the most votes in each constituency is elected as that constituency's representative to the House of Commons,\nas one of 650 Members of Parliament (MP).\n\n[examples]: examples/\n[binder]: https://mybinder.org/v2/gh/TTitcombe/ConstituencyMap/master","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttitcombe%2Fconstituencymap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttitcombe%2Fconstituencymap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttitcombe%2Fconstituencymap/lists"}