项目作者: TTitcombe

项目描述 :
A map of UK parliamentary constituencies created in D3
高级语言: JavaScript
项目地址: git://github.com/TTitcombe/ConstituencyMap-d3.git
创建时间: 2020-03-26T19:46:36Z
项目社区:https://github.com/TTitcombe/ConstituencyMap-d3

开源协议:MIT License

下载


ConstituencyMap

A map of UK parliamentary constituencies created in D3

UK parliamentary constituencies, coloured by elected party

How to run

  1. Clone this repository
  2. Navigate to the map directory in the repository and run a server. This can be done by:
    • Using a plugin on a JavaScript IDE
    • Run python -m http.server in the terminal
  3. Navigate in a browser to the localhost which contains the application

TODO

  • Offset constituency circles on alternate rows
  • Fit map to SVG size
    • Do this dynamically (without hard-coded numbers)
  • Combine map data with 2019 parliamentary results (pre-JS/d3)
    • Do this step in D3
  • Fill in missing constituencies in hexmap
  • Colour circles by party
  • Add legend
  • Use hexagons instead of circles
  • Make constituencies interactive

Data

  • uk_hex.csv
    • Coordinates of UK parliamentary constituencies (2017 boundaries) in hexmap format
    • Created by ODILeeds,
      released under MIT license
  • HoC-ge2019.csv
    • Results of the 2019 UK General Election
    • Provided by HoC library
  • combined_ge2019.csv
    • Merged uk_hex.csv and HoC-ge2019.csv
    • Removed some unused fields, such as individual part votes, from combined dataset
    • Note: Not all constituencies are present in both files.
      I believe this is because the ODI map uses the old (2017) boundaries.
      The hexmap will need to be updated.