Skip to content

Instantly share code, notes, and snippets.

@coppeliaMLA
Last active June 20, 2016 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coppeliaMLA/0d255c2fde6eee884a97b1d7566599e2 to your computer and use it in GitHub Desktop.
Save coppeliaMLA/0d255c2fde6eee884a97b1d7566599e2 to your computer and use it in GitHub Desktop.
<head>
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.16/d3.min.js"></script>
<style> #mapid {
height: 800px;
} </style>
</head>
<body>
<div id="mapid"></div>
<script>
var json = {
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"features": [
{
"type": "Feature",
"id": 7242,
"properties": {
"CMWD11CD": "E36007243",
"CMWD11NM": "Abbey Wood",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.3926
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.1211, 51.4963],
[0.1221, 51.4824],
[0.1242, 51.4768],
[0.1207, 51.4785],
[0.1185, 51.4789],
[0.1155, 51.4762],
[0.1111, 51.4781],
[0.1099, 51.478],
[0.1093, 51.479],
[0.1077, 51.4796],
[0.1071, 51.4804],
[0.106, 51.4806],
[0.1052, 51.4812],
[0.1065, 51.4846],
[0.1044, 51.4851],
[0.1057, 51.4895],
[0.1018, 51.4894],
[0.1036, 51.4953],
[0.121, 51.5008],
[0.1211, 51.4963]
]
]
]
}
},
{
"type": "Feature",
"id": 7243,
"properties": {
"CMWD11CD": "E36007244",
"CMWD11NM": "Blackheath Westcombe",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.466
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0235, 51.4764],
[0.0289, 51.4679],
[0.0281, 51.4677],
[0.0284, 51.467],
[0.0279, 51.4665],
[0.0274, 51.4665],
[0.0264, 51.4671],
[0.0217, 51.4645],
[0.0201, 51.4661],
[0.0162, 51.4649],
[0.0093, 51.464],
[0.0091, 51.4659],
[0.0132, 51.4668],
[0.0127, 51.4674],
[0.0131, 51.4681],
[0.0126, 51.4698],
[0.0135, 51.4699],
[0.0163, 51.469],
[0.0165, 51.4691],
[0.0167, 51.4695],
[0.0154, 51.4716],
[0.015, 51.4731],
[0.0181, 51.4739],
[0.0121, 51.4732],
[0.0052, 51.4796],
[0.0014, 51.4821],
[0.0016, 51.4828],
[0.0052, 51.4827],
[0.0202, 51.4844],
[0.0208, 51.4816],
[0.0235, 51.4764]
]
]
]
}
},
{
"type": "Feature",
"id": 7244,
"properties": {
"CMWD11CD": "E36007245",
"CMWD11NM": "Charlton",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.5727
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0497, 51.4848],
[0.0491, 51.4843],
[0.0512, 51.4819],
[0.0521, 51.4802],
[0.0488, 51.4795],
[0.0475, 51.4761],
[0.0471, 51.4753],
[0.0455, 51.4771],
[0.0458, 51.4773],
[0.0439, 51.479],
[0.0378, 51.4796],
[0.0365, 51.4794],
[0.0344, 51.4751],
[0.0293, 51.476],
[0.0293, 51.4774],
[0.0275, 51.4772],
[0.027, 51.4775],
[0.0271, 51.4763],
[0.0252, 51.4765],
[0.0251, 51.4762],
[0.0235, 51.4764],
[0.0208, 51.4816],
[0.0202, 51.4844],
[0.0244, 51.4848],
[0.0282, 51.4862],
[0.0351, 51.4877],
[0.0397, 51.4894],
[0.0427, 51.487],
[0.044, 51.4876],
[0.0447, 51.4871],
[0.047, 51.4841],
[0.0474, 51.4844],
[0.048, 51.4841],
[0.0493, 51.4851],
[0.0497, 51.4848]
]
]
]
}
},
{
"type": "Feature",
"id": 7245,
"properties": {
"CMWD11CD": "E36007246",
"CMWD11NM": "Coldharbour and New Eltham",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.5009
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0482, 51.4405],
[0.0719, 51.4379],
[0.0759, 51.4345],
[0.0764, 51.434],
[0.0757, 51.4336],
[0.0761, 51.4333],
[0.0747, 51.4322],
[0.0753, 51.432],
[0.0748, 51.4308],
[0.0743, 51.4315],
[0.0733, 51.4318],
[0.073, 51.4314],
[0.0735, 51.4313],
[0.0719, 51.4297],
[0.0669, 51.4267],
[0.0664, 51.4263],
[0.0666, 51.426],
[0.0642, 51.4254],
[0.0644, 51.425],
[0.0632, 51.4242],
[0.0617, 51.4237],
[0.0609, 51.4251],
[0.0586, 51.4246],
[0.0582, 51.4249],
[0.0548, 51.4275],
[0.051, 51.4315],
[0.0478, 51.4338],
[0.0451, 51.4362],
[0.0452, 51.4366],
[0.0433, 51.4377],
[0.0422, 51.4395],
[0.0397, 51.441],
[0.0413, 51.442],
[0.0482, 51.4405]
]
]
]
}
},
{
"type": "Feature",
"id": 7246,
"properties": {
"CMWD11CD": "E36007247",
"CMWD11NM": "Eltham North",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.9563
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0823, 51.4616],
[0.0829, 51.4598],
[0.0786, 51.4593],
[0.0788, 51.4591],
[0.073, 51.4583],
[0.0735, 51.4568],
[0.069, 51.4544],
[0.0666, 51.4536],
[0.0677, 51.4523],
[0.0671, 51.4522],
[0.0673, 51.4518],
[0.0627, 51.4507],
[0.0523, 51.4508],
[0.0488, 51.4514],
[0.0486, 51.4523],
[0.0517, 51.4529],
[0.0502, 51.4574],
[0.0496, 51.4576],
[0.0489, 51.4593],
[0.0484, 51.4595],
[0.0486, 51.46],
[0.0496, 51.46],
[0.0495, 51.4609],
[0.0506, 51.4633],
[0.0465, 51.4644],
[0.0505, 51.4669],
[0.0525, 51.468],
[0.0533, 51.4681],
[0.0539, 51.468],
[0.0538, 51.4678],
[0.057, 51.4676],
[0.0588, 51.4636],
[0.0637, 51.4639],
[0.0682, 51.4649],
[0.068, 51.4625],
[0.0717, 51.4627],
[0.0752, 51.462],
[0.0823, 51.4616]
]
]
]
}
},
{
"type": "Feature",
"id": 7247,
"properties": {
"CMWD11CD": "E36007248",
"CMWD11NM": "Eltham South",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.206
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.086, 51.4556],
[0.0868, 51.4505],
[0.088, 51.4475],
[0.0873, 51.4457],
[0.0863, 51.4453],
[0.0874, 51.4432],
[0.0863, 51.4432],
[0.0847, 51.4426],
[0.0832, 51.4435],
[0.0828, 51.4433],
[0.0828, 51.4428],
[0.0844, 51.442],
[0.0818, 51.44],
[0.0809, 51.4404],
[0.0788, 51.4381],
[0.079, 51.438],
[0.0784, 51.4371],
[0.0778, 51.4364],
[0.0765, 51.4369],
[0.075, 51.4359],
[0.0765, 51.4349],
[0.0759, 51.4345],
[0.0719, 51.4379],
[0.0482, 51.4405],
[0.0482, 51.4408],
[0.0498, 51.4408],
[0.0498, 51.441],
[0.0467, 51.4414],
[0.0473, 51.4428],
[0.0442, 51.4438],
[0.0454, 51.4445],
[0.0459, 51.4468],
[0.0468, 51.4483],
[0.0471, 51.4515],
[0.0488, 51.4514],
[0.0523, 51.4508],
[0.0627, 51.4507],
[0.0673, 51.4518],
[0.0671, 51.4522],
[0.0677, 51.4523],
[0.0666, 51.4536],
[0.069, 51.4544],
[0.0735, 51.4568],
[0.073, 51.4583],
[0.0788, 51.4591],
[0.0814, 51.4578],
[0.0857, 51.4566],
[0.086, 51.4556]
]
]
]
}
},
{
"type": "Feature",
"id": 7248,
"properties": {
"CMWD11CD": "E36007249",
"CMWD11NM": "Eltham West",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.9021
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0465, 51.4644],
[0.0506, 51.4633],
[0.0495, 51.4609],
[0.0496, 51.46],
[0.0486, 51.46],
[0.0484, 51.4595],
[0.0489, 51.4593],
[0.0496, 51.4576],
[0.0502, 51.4574],
[0.0517, 51.4529],
[0.0486, 51.4523],
[0.0488, 51.4514],
[0.0471, 51.4515],
[0.0453, 51.4516],
[0.042, 51.4524],
[0.0368, 51.4529],
[0.0363, 51.4541],
[0.0343, 51.4536],
[0.0344, 51.453],
[0.0305, 51.4529],
[0.0262, 51.4535],
[0.0266, 51.4565],
[0.0263, 51.4594],
[0.0226, 51.459],
[0.0209, 51.4624],
[0.0212, 51.4644],
[0.0217, 51.4645],
[0.0264, 51.4671],
[0.0274, 51.4665],
[0.0279, 51.4665],
[0.0284, 51.467],
[0.0281, 51.4677],
[0.0289, 51.4679],
[0.03, 51.4659],
[0.0336, 51.4647],
[0.0388, 51.4622],
[0.0387, 51.4629],
[0.0399, 51.4635],
[0.0465, 51.4644]
]
]
]
}
},
{
"type": "Feature",
"id": 7249,
"properties": {
"CMWD11CD": "E36007250",
"CMWD11NM": "Glyndon",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.2085
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0855, 51.4898],
[0.0854, 51.4891],
[0.0859, 51.489],
[0.0854, 51.4878],
[0.0849, 51.4879],
[0.0847, 51.4874],
[0.0879, 51.4869],
[0.0871, 51.4851],
[0.0892, 51.4852],
[0.0906, 51.486],
[0.091, 51.4855],
[0.0912, 51.4839],
[0.0908, 51.4822],
[0.0899, 51.4807],
[0.0878, 51.4798],
[0.0801, 51.4809],
[0.0737, 51.4816],
[0.0734, 51.4823],
[0.074, 51.4829],
[0.073, 51.4833],
[0.0735, 51.4856],
[0.0732, 51.4892],
[0.0729, 51.491],
[0.0747, 51.4908],
[0.0776, 51.4911],
[0.0786, 51.4939],
[0.0781, 51.4949],
[0.0765, 51.4949],
[0.0762, 51.4959],
[0.0824, 51.4989],
[0.084, 51.4981],
[0.0846, 51.4981],
[0.0836, 51.4941],
[0.0825, 51.4935],
[0.0837, 51.4924],
[0.0853, 51.4926],
[0.086, 51.4924],
[0.086, 51.4909],
[0.0851, 51.4901],
[0.0855, 51.4898]
]
]
]
}
},
{
"type": "Feature",
"id": 7250,
"properties": {
"CMWD11CD": "E36007251",
"CMWD11NM": "Greenwich West",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.0615
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[-0.0046, 51.4847],
[-0.002, 51.4814],
[0.0014, 51.4821],
[0.0052, 51.4796],
[0.0121, 51.4732],
[-0.001, 51.4718],
[-0.0081, 51.4728],
[-0.0125, 51.4723],
[-0.0141, 51.4727],
[-0.0145, 51.4719],
[-0.0152, 51.4718],
[-0.0131, 51.4689],
[-0.0151, 51.468],
[-0.0166, 51.4692],
[-0.0169, 51.4691],
[-0.0171, 51.4693],
[-0.0191, 51.4699],
[-0.0193, 51.4705],
[-0.0187, 51.4706],
[-0.0193, 51.472],
[-0.0202, 51.4722],
[-0.0201, 51.4731],
[-0.0218, 51.474],
[-0.0227, 51.474],
[-0.0228, 51.4745],
[-0.0227, 51.4753],
[-0.0212, 51.4752],
[-0.0204, 51.4758],
[-0.0206, 51.4765],
[-0.0199, 51.4769],
[-0.0196, 51.4767],
[-0.0188, 51.4773],
[-0.019, 51.4782],
[-0.0184, 51.4794],
[-0.0169, 51.4801],
[-0.0157, 51.4817],
[-0.015, 51.4818],
[-0.0179, 51.4825],
[-0.018, 51.4832],
[-0.0163, 51.4832],
[-0.0163, 51.483],
[-0.0155, 51.4828],
[-0.0153, 51.4831],
[-0.0111, 51.4831],
[-0.0099, 51.4836],
[-0.0073, 51.4838],
[-0.0046, 51.4847]
],
[
[-0.0165, 51.4816],
[-0.0171, 51.4804],
[-0.0179, 51.4809],
[-0.0184, 51.4808],
[-0.0204, 51.4802],
[-0.0204, 51.4799],
[-0.0231, 51.4796],
[-0.0232, 51.4807],
[-0.0264, 51.4815],
[-0.0258, 51.4822],
[-0.0248, 51.4855],
[-0.0226, 51.4845],
[-0.0188, 51.4835],
[-0.0182, 51.482],
[-0.0165, 51.4816]
]
]
]
}
},
{
"type": "Feature",
"id": 7251,
"properties": {
"CMWD11CD": "E36007252",
"CMWD11NM": "Kidbrooke with Hornfair",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.3851
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0475, 51.4761],
[0.049, 51.4754],
[0.0473, 51.4739],
[0.0481, 51.4725],
[0.055, 51.4711],
[0.0546, 51.4696],
[0.0533, 51.4681],
[0.0525, 51.468],
[0.0505, 51.4669],
[0.0465, 51.4644],
[0.0399, 51.4635],
[0.0387, 51.4629],
[0.0388, 51.4622],
[0.0336, 51.4647],
[0.03, 51.4659],
[0.0289, 51.4679],
[0.0235, 51.4764],
[0.0251, 51.4762],
[0.0252, 51.4765],
[0.0271, 51.4763],
[0.027, 51.4775],
[0.0275, 51.4772],
[0.0293, 51.4774],
[0.0293, 51.476],
[0.0344, 51.4751],
[0.0365, 51.4794],
[0.0378, 51.4796],
[0.0439, 51.479],
[0.0458, 51.4773],
[0.0455, 51.4771],
[0.0471, 51.4753],
[0.0475, 51.4761]
]
]
]
}
},
{
"type": "Feature",
"id": 7252,
"properties": {
"CMWD11CD": "E36007253",
"CMWD11NM": "Middle Park and Sutcliffe",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.0308
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0217, 51.4645],
[0.0212, 51.4644],
[0.0209, 51.4624],
[0.0226, 51.459],
[0.0263, 51.4594],
[0.0266, 51.4565],
[0.0262, 51.4535],
[0.0305, 51.4529],
[0.0344, 51.453],
[0.0343, 51.4536],
[0.0363, 51.4541],
[0.0368, 51.4529],
[0.042, 51.4524],
[0.0453, 51.4516],
[0.0471, 51.4515],
[0.0468, 51.4483],
[0.0459, 51.4468],
[0.0454, 51.4445],
[0.0442, 51.4438],
[0.0473, 51.4428],
[0.0467, 51.4414],
[0.0498, 51.441],
[0.0498, 51.4408],
[0.0482, 51.4408],
[0.0482, 51.4405],
[0.0413, 51.442],
[0.0397, 51.441],
[0.0355, 51.4424],
[0.0335, 51.4436],
[0.0306, 51.4443],
[0.0294, 51.4417],
[0.0278, 51.4415],
[0.0254, 51.4417],
[0.0215, 51.4427],
[0.0206, 51.4442],
[0.0215, 51.4444],
[0.0212, 51.4467],
[0.0229, 51.4472],
[0.0224, 51.4481],
[0.0219, 51.449],
[0.0151, 51.45],
[0.0149, 51.4506],
[0.0151, 51.4502],
[0.0199, 51.4507],
[0.0195, 51.4517],
[0.0183, 51.4516],
[0.0175, 51.455],
[0.014, 51.4557],
[0.0115, 51.4567],
[0.0099, 51.4593],
[0.0098, 51.4625],
[0.0093, 51.464],
[0.0162, 51.4649],
[0.0201, 51.4661],
[0.0217, 51.4645]
]
]
]
}
},
{
"type": "Feature",
"id": 7253,
"properties": {
"CMWD11CD": "E36007254",
"CMWD11NM": "Peninsula",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.4356
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.029, 51.4939],
[0.03, 51.4912],
[0.0299, 51.4901],
[0.031, 51.488],
[0.0341, 51.4885],
[0.0351, 51.4877],
[0.0282, 51.4862],
[0.0244, 51.4848],
[0.0202, 51.4844],
[0.0052, 51.4827],
[0.0016, 51.4828],
[0.0014, 51.4821],
[-0.002, 51.4814],
[-0.0046, 51.4847],
[-0.0034, 51.4849],
[-0.002, 51.4856],
[-0.0023, 51.4859],
[-0.0017, 51.4862],
[-0.0017, 51.4859],
[0.0001, 51.4869],
[0.0016, 51.4885],
[0.002, 51.4885],
[0.0024, 51.4899],
[0.0024, 51.493],
[0.002, 51.4929],
[0.0016, 51.494],
[0.001, 51.4944],
[0.0012, 51.4948],
[0.0009, 51.4955],
[-0.0003, 51.4952],
[-0.001, 51.4964],
[-0.0023, 51.5001],
[-0.0023, 51.5013],
[-0.0019, 51.5013],
[-0.0019, 51.5019],
[-0.0015, 51.502],
[-0.002, 51.5021],
[-0.0017, 51.5029],
[0.0008, 51.5045],
[0.0033, 51.5049],
[0.0051, 51.5043],
[0.0115, 51.4989],
[0.0157, 51.4959],
[0.0192, 51.4948],
[0.0217, 51.4945],
[0.0216, 51.494],
[0.022, 51.4939],
[0.0223, 51.4943],
[0.0244, 51.4939],
[0.029, 51.4939]
]
]
]
}
},
{
"type": "Feature",
"id": 7254,
"properties": {
"CMWD11CD": "E36007255",
"CMWD11NM": "Plumstead",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.3249
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.1155, 51.4762],
[0.114, 51.4752],
[0.1126, 51.4735],
[0.1118, 51.4732],
[0.1082, 51.4761],
[0.1062, 51.475],
[0.1056, 51.4755],
[0.1052, 51.4752],
[0.1049, 51.4755],
[0.1034, 51.4746],
[0.1025, 51.4749],
[0.102, 51.4745],
[0.1002, 51.4752],
[0.0982, 51.4755],
[0.0985, 51.4762],
[0.0959, 51.4764],
[0.0949, 51.477],
[0.0936, 51.4772],
[0.0936, 51.4776],
[0.0897, 51.4785],
[0.0878, 51.4798],
[0.0899, 51.4807],
[0.0908, 51.4822],
[0.0912, 51.4839],
[0.091, 51.4855],
[0.0906, 51.486],
[0.0892, 51.4852],
[0.0871, 51.4851],
[0.0879, 51.4869],
[0.0847, 51.4874],
[0.0849, 51.4879],
[0.0854, 51.4878],
[0.0859, 51.489],
[0.0854, 51.4891],
[0.0855, 51.4898],
[0.0869, 51.49],
[0.1036, 51.4953],
[0.1018, 51.4894],
[0.1057, 51.4895],
[0.1044, 51.4851],
[0.1065, 51.4846],
[0.1052, 51.4812],
[0.106, 51.4806],
[0.1071, 51.4804],
[0.1077, 51.4796],
[0.1093, 51.479],
[0.1099, 51.478],
[0.1111, 51.4781],
[0.1155, 51.4762]
]
]
]
}
},
{
"type": "Feature",
"id": 7255,
"properties": {
"CMWD11CD": "E36007256",
"CMWD11NM": "Shooters Hill",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.35
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0878, 51.4798],
[0.0897, 51.4785],
[0.0936, 51.4776],
[0.0936, 51.4772],
[0.0949, 51.477],
[0.0959, 51.4764],
[0.0985, 51.4762],
[0.0982, 51.4755],
[0.0965, 51.4732],
[0.0945, 51.4733],
[0.0932, 51.473],
[0.0913, 51.4721],
[0.089, 51.4704],
[0.0858, 51.4694],
[0.0848, 51.4687],
[0.0832, 51.4665],
[0.0823, 51.4666],
[0.0822, 51.4647],
[0.0826, 51.4636],
[0.0823, 51.4616],
[0.0752, 51.462],
[0.0717, 51.4627],
[0.068, 51.4625],
[0.0682, 51.4649],
[0.0637, 51.4639],
[0.0588, 51.4636],
[0.057, 51.4676],
[0.0538, 51.4678],
[0.0539, 51.468],
[0.0533, 51.4681],
[0.0546, 51.4696],
[0.055, 51.4711],
[0.0581, 51.4706],
[0.0583, 51.4711],
[0.0589, 51.4711],
[0.0603, 51.4725],
[0.0606, 51.4736],
[0.0614, 51.4741],
[0.0618, 51.4759],
[0.0687, 51.4796],
[0.0691, 51.4783],
[0.0722, 51.4788],
[0.0771, 51.4781],
[0.0774, 51.4787],
[0.078, 51.4787],
[0.078, 51.479],
[0.0787, 51.4792],
[0.0794, 51.4805],
[0.08, 51.4804],
[0.0801, 51.4809],
[0.0878, 51.4798]
]
]
]
}
},
{
"type": "Feature",
"id": 7256,
"properties": {
"CMWD11CD": "E36007257",
"CMWD11NM": "Thamesmead Moorings",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.7503
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.121, 51.5008],
[0.1036, 51.4953],
[0.0869, 51.49],
[0.0855, 51.4898],
[0.0851, 51.4901],
[0.086, 51.4909],
[0.086, 51.4924],
[0.0853, 51.4926],
[0.0837, 51.4924],
[0.0825, 51.4935],
[0.0836, 51.4941],
[0.0846, 51.4981],
[0.084, 51.4981],
[0.0824, 51.4989],
[0.0866, 51.5035],
[0.0876, 51.504],
[0.0879, 51.5056],
[0.092, 51.509],
[0.0946, 51.509],
[0.0973, 51.5095],
[0.1002, 51.5097],
[0.1069, 51.5094],
[0.1135, 51.5102],
[0.1202, 51.5114],
[0.1205, 51.511],
[0.121, 51.5008]
]
]
]
}
},
{
"type": "Feature",
"id": 7257,
"properties": {
"CMWD11CD": "E36007258",
"CMWD11NM": "Woolwich Common",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.1099
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0732, 51.4892],
[0.0735, 51.4856],
[0.073, 51.4833],
[0.074, 51.4829],
[0.0734, 51.4823],
[0.0737, 51.4816],
[0.0801, 51.4809],
[0.08, 51.4804],
[0.0794, 51.4805],
[0.0787, 51.4792],
[0.078, 51.479],
[0.078, 51.4787],
[0.0774, 51.4787],
[0.0771, 51.4781],
[0.0722, 51.4788],
[0.0691, 51.4783],
[0.0687, 51.4796],
[0.0618, 51.4759],
[0.0614, 51.4741],
[0.0606, 51.4736],
[0.0603, 51.4725],
[0.0589, 51.4711],
[0.0583, 51.4711],
[0.0581, 51.4706],
[0.055, 51.4711],
[0.0481, 51.4725],
[0.0473, 51.4739],
[0.049, 51.4754],
[0.0475, 51.4761],
[0.0488, 51.4795],
[0.0521, 51.4802],
[0.0512, 51.4819],
[0.0491, 51.4843],
[0.0497, 51.4848],
[0.0509, 51.4853],
[0.0506, 51.4856],
[0.0537, 51.487],
[0.0609, 51.4877],
[0.0669, 51.4901],
[0.0675, 51.4894],
[0.0685, 51.49],
[0.0713, 51.4892],
[0.0732, 51.4892]
]
]
]
}
},
{
"type": "Feature",
"id": 7258,
"properties": {
"CMWD11CD": "E36007259",
"CMWD11NM": "Woolwich Riverside",
"CMWD11NMW": {},
"LAD11CD": "E09000011",
"LAD11NM": "Greenwich",
"LAD11NMW": {},
"rand_pct": 0.3919
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[0.0762, 51.4959],
[0.0765, 51.4949],
[0.0781, 51.4949],
[0.0786, 51.4939],
[0.0776, 51.4911],
[0.0747, 51.4908],
[0.0729, 51.491],
[0.0732, 51.4892],
[0.0713, 51.4892],
[0.0685, 51.49],
[0.0675, 51.4894],
[0.0669, 51.4901],
[0.0609, 51.4877],
[0.0537, 51.487],
[0.0506, 51.4856],
[0.0509, 51.4853],
[0.0497, 51.4848],
[0.0493, 51.4851],
[0.048, 51.4841],
[0.0474, 51.4844],
[0.047, 51.4841],
[0.0447, 51.4871],
[0.044, 51.4876],
[0.0427, 51.487],
[0.0397, 51.4894],
[0.0351, 51.4877],
[0.0341, 51.4885],
[0.031, 51.488],
[0.0299, 51.4901],
[0.03, 51.4912],
[0.029, 51.4939],
[0.0402, 51.4955],
[0.0577, 51.4945],
[0.058, 51.4941],
[0.0581, 51.4945],
[0.0588, 51.4945],
[0.0589, 51.4942],
[0.0592, 51.4945],
[0.0641, 51.4945],
[0.0641, 51.4947],
[0.0703, 51.4952],
[0.0759, 51.4961],
[0.0762, 51.4959]
]
]
]
}
}
]
};
var mymap = L.map('mapid').setView([51.46, 0], 12);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18,
id: 'mapbox.streets-basic',
accessToken: 'pk.eyJ1Ijoic2ltb25yYXBlciIsImEiOiJjaXBncHFob2UwMDBvdnJudHZqajA5bmJxIn0.LfOyy3BUvPeFTNPqyz9iNQ'
}).addTo(mymap);
var quantize = d3.scale.quantize()
.domain([0, 1])
.range(["#e5e5ff", "#b2b2ff", "#7f7fff", "#4c4cff"]);
L.geoJson(json, {
style: function(feature) {
return {
fillColor: quantize(+feature.properties.rand_pct),
weight: 2,
opacity: 1,
color: 'white',
dashArray: '3',
fillOpacity: 0.5
};
}
}).addTo(mymap);
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment