Work in progress towards making a hexgrid map of the uk --- draw the counties, then assign a circle to each of counties, then use force layout with collision detection to force the circles not to collide
Also draw a hexagon grid, then after force layout has finished, assinged te hexagons closest to the circle to be blue
Add in function so when you click on a colored hexagon, you are 'moving' that to a new position when you click on uncolored hexagon
collision code adapted form /mbostock/1804919, inspired by https://github.com/kristw/gridmap-layout-thailand
xxxxxxxxxx
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
</head>
<body>
<div id="mapContainer"></div>
<div><button id="exportDataBtn">Export</button></div>
<script src="hexgrid.js"></script>
</body>
</html>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js
https://d3js.org/topojson.v1.min.js