├── .DS_Store ├── .gitattributes ├── .gitignore ├── README.md ├── Side-by-side-map ├── .DS_Store ├── css │ ├── .DS_Store │ ├── .Rhistory │ ├── bootstrap-grid.css │ ├── chosen.css │ ├── mapbox-gl-compare.css │ └── mapbox-gl.css ├── data │ ├── config.json │ ├── data.csv │ ├── geogLA2017EW.json │ └── style.json ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── .DS_Store │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── jquery-3.0.0.slim.min.js │ ├── limit.js │ ├── mapbox-gl-compare.js │ ├── mapbox-gl-sync-move.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── select2.min.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── changeovertime ├── .DS_Store ├── css │ ├── bootstrap.min.css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ ├── map.css │ └── mapbox-gl.css ├── data │ ├── config.json │ ├── data0.csv │ ├── data1.csv │ ├── data2.csv │ ├── data3.csv │ ├── geog.json │ └── style.json ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── images │ ├── .DS_Store │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── fast-forward.png │ ├── fast-forward.svg │ ├── icons--chevron-down.svg │ ├── pause.png │ ├── pause.svg │ ├── play.png │ ├── play.svg │ ├── rewind.png │ ├── rewind.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── d3-simple-slider.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── hexmap ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ ├── chosen.custom.css │ └── styles.css ├── data │ ├── config.json │ ├── config_new.json │ ├── data.csv │ ├── data.xls │ └── geography.json ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── fallback.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen.jquery.js │ ├── d3-queue.min.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ └── topojson.v2.min.js ├── lsoa-small-area └── houseprice │ ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ ├── global.css │ └── mapbox-gl.css │ ├── data │ ├── config.json │ ├── data.csv │ └── style.json │ ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── closeblue.svg │ └── image.png │ ├── index.html │ └── js │ ├── chosen.jquery.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── msoa ├── covid-death-map │ ├── css │ │ ├── Thumbs.db │ │ ├── bootstrap.min.css │ │ ├── chosen-sprite.png │ │ ├── chosen-sprite@2x.png │ │ ├── chosen.css │ │ ├── global.css │ │ └── mapbox-gl.css │ ├── data │ │ ├── areacentroidshp.json │ │ ├── countyua.json │ │ ├── countyuabound.json │ │ ├── data.csv │ │ ├── datadownload.xlsx │ │ ├── msoacentroids.geojson │ │ ├── msoacentroidshp.json │ │ └── style.json │ ├── embed │ │ ├── css │ │ │ ├── Thumbs.db │ │ │ ├── bootstrap.min.css │ │ │ ├── chosen-sprite.png │ │ │ ├── chosen-sprite@2x.png │ │ │ ├── chosen.css │ │ │ ├── global.css │ │ │ └── mapbox-gl.css │ │ ├── data │ │ │ ├── areacentroidshp.json │ │ │ ├── countyua.json │ │ │ ├── countyuabound.json │ │ │ ├── data.csv │ │ │ ├── msoacentroids.geojson │ │ │ ├── msoacentroidshp.json │ │ │ └── style.json │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── gzip.js │ │ ├── images │ │ │ ├── Thumbs.db │ │ │ ├── chosen-sprite.png │ │ │ ├── chosen-sprite@2x.png │ │ │ ├── closeblue.svg │ │ │ └── image.png │ │ ├── index.html │ │ ├── js │ │ │ ├── d3-queue.min.js │ │ │ ├── d3.v4.min.js │ │ │ ├── mapbox-gl.js │ │ │ ├── topojson.v2.min.js │ │ │ └── turf.min.js │ │ ├── main.js │ │ └── parent.html │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── images │ │ ├── Thumbs.db │ │ ├── chosen-sprite.png │ │ ├── chosen-sprite@2x.png │ │ ├── closeblue.svg │ │ └── image.png │ ├── index.html │ ├── js │ │ ├── d3-queue.min.js │ │ ├── d3.v4.min.js │ │ ├── mapbox-gl.js │ │ ├── topojson.v2.min.js │ │ └── turf.min.js │ └── main.js ├── multimap │ ├── css │ │ ├── bootstrap_min.css │ │ ├── chosen-sprite.png │ │ ├── chosen-sprite@2x.png │ │ ├── chosen.css │ │ ├── global.css │ │ ├── images │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ └── mapbox-gl.css │ ├── data │ │ ├── config.json │ │ ├── data.csv │ │ └── style.json │ ├── datadownload.xlsx │ ├── images │ │ ├── chosen-sprite.png │ │ ├── chosen-sprite@2x.png │ │ ├── closeblue.svg │ │ └── image.png │ ├── index.html │ └── js │ │ ├── bootstrap.min.js │ │ ├── chosen.jquery.js │ │ ├── colorbrewer.js │ │ ├── d3-queue.min.js │ │ ├── limit.js │ │ ├── mapbox-gl.js │ │ ├── modernizr.min.js │ │ ├── script.js │ │ ├── simple-statistics.min.js │ │ ├── topojson.v2.min.js │ │ └── turf.min.js └── simplemap │ ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ ├── global.css │ └── mapbox-gl.css │ ├── data │ ├── config.json │ ├── data.csv │ └── style.json │ ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── closeblue.svg │ └── image.png │ ├── index.html │ └── js │ ├── chosen.jquery.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── multimap ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ └── mapbox-gl.css ├── data │ ├── config.json │ ├── data.csv │ ├── geog.json │ └── style.json ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── multimap_simplebar ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ └── mapbox-gl.css ├── data │ ├── config.json │ ├── geog.json │ ├── style.json │ └── ttw_map1.csv ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── multimap_vertical-scale ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ └── mapbox-gl.css ├── data │ ├── config.json │ ├── data.csv │ ├── geog.json │ └── style.json ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── multiple_characteristics_map ├── .DS_Store ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ └── mapbox-gl.css ├── data │ ├── chnglem.csv │ ├── config.json │ ├── geog.json │ ├── geogEngLA2017.json │ ├── geogL.json │ ├── geojsonew.json │ ├── mortality.csv │ └── style.json ├── images │ ├── Thumbs.db │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── fast-forward.png │ ├── fast-forward.svg │ ├── icons--chevron-down.svg │ ├── pause.png │ ├── pause.svg │ ├── play.png │ ├── play.svg │ ├── rewind.png │ ├── rewind.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html ├── js │ ├── Thumbs.db │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── script3d.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── mortality.csv └── mortality.xlsx ├── simplemap ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ └── mapbox-gl.css ├── data │ ├── config.json │ ├── data.csv │ ├── geog.json │ └── style.json ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── simplemap_beeswarm ├── .DS_Store ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ └── mapbox-gl.css ├── data │ ├── .DS_Store │ ├── Dummy data - adult social care.xlsx │ ├── config.json │ ├── data.csv │ ├── datajenks.csv │ ├── geog.json │ ├── geogEngCUA2.json │ └── style.json ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── simplemap_stackedbar ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ └── mapbox-gl.css ├── data │ ├── config.json │ ├── data.csv │ ├── datadownload.csv │ ├── geog.json │ └── style.json ├── images │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── mapbox-gl.js │ ├── modernizr.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js ├── small-multiple ├── css │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ └── chosen.css ├── data │ ├── config.js │ ├── data.csv │ ├── geog.json │ └── style.json ├── images │ ├── Thumbs.db │ ├── caret-down-solid.svg │ ├── chosen-sprite-sm-white.png │ ├── chosen-sprite-sm.png │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── fallback.png │ ├── icons--chevron-down.png │ ├── icons--chevron-down.svg │ ├── x_close.svg │ └── x_close_slate.svg ├── index.html └── js │ ├── chosen.jquery.js │ ├── chosen.jquery.min.js │ ├── chosen.order.jquery.js │ ├── chroma.min.js │ ├── colorbrewer.js │ ├── d3-queue.min.js │ ├── limit.js │ ├── modernizr.svg.min.js │ ├── script.js │ ├── simple-statistics.min.js │ ├── topojson.v2.min.js │ └── turf.min.js └── symbolmap ├── .DS_Store ├── data ├── .DS_Store ├── countyua.json ├── countyuaE&W.json ├── countyuaScot_HA_EngWale_UA.json ├── countyuabound.json ├── countyuaboundold.json ├── countyuaboundscot_HA_Engwale_UA.json ├── countyuascot.geojson └── style.json ├── index.html ├── js ├── d3-queue.min.js ├── topojson.v2.min.js └── turf.min.js └── main.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | simplemap_beeswarm/.DS_Store 2 | simplemap_beeswarm/.DS_Store 3 | simplemap/.DS_Store 4 | multimap/.DS_Store 5 | multiple_characteristics_map/.DS_Store 6 | multiple_characteristics_map/.DS_Store 7 | Side-by-side-map/.DS_Store 8 | simplemap/.DS_Store 9 | .DS_Store 10 | 11 | .DS_Store 12 | .DS_Store 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Common map templates 2 | 3 | ## Contains map templates: 4 | 5 | - [Simple map](https://onsvisual.github.io/maptemplates/simplemap/index.html) 6 | - [Map with line chart showing change over time](https://onsvisual.github.io/maptemplates/changeovertime/index.html) 7 | - [Multiple maps ](https://onsvisual.github.io/maptemplates/multimap/index.html) 8 | - [Multimap with simple bar chart](https://onsvisual.github.io/maptemplates/multimap_simplebar/index.html) 9 | - [Multimap with vertical scale](https://onsvisual.github.io/maptemplates/multimap_vertical-scale/index.html) 10 | - [Simple map with beeswarm ](https://onsvisual.github.io/maptemplates/simplemap_beeswarm/index.html) 11 | - [Simple map with stacked bar chart](https://onsvisual.github.io/maptemplates/simplemap_stackedbar/index.html) 12 | - [Mutiple characteristics map ](https://onsvisual.github.io/maptemplates/multiple_characteristics_map/index.html) 13 | - [Side by side map](https://onsvisual.github.io/maptemplates/Side-by-side-map/index.html) 14 | - [Hexmap](https://onsvisual.github.io/maptemplates/hexmap/) 15 | - [LSOA house price map](https://onsvisual.github.io/maptemplates/lsoa-small-area/houseprice/index.html) 16 | - [MSOA deaths map](https://onsvisual.github.io/maptemplates/msoa/covid-death-map/index.html) 17 | - [MSOA simple map](https://onsvisual.github.io/maptemplates/msoa/simplemap/index.html) 18 | - [MSOA multimap](https://onsvisual.github.io/maptemplates/msoa/multimap/) 19 | 20 | -------------------------------------------------------------------------------- /Side-by-side-map/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/Side-by-side-map/.DS_Store -------------------------------------------------------------------------------- /Side-by-side-map/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/Side-by-side-map/css/.DS_Store -------------------------------------------------------------------------------- /Side-by-side-map/css/.Rhistory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/Side-by-side-map/css/.Rhistory -------------------------------------------------------------------------------- /Side-by-side-map/css/mapbox-gl-compare.css: -------------------------------------------------------------------------------- 1 | .mapboxgl-compare { 2 | background-color:#fff; 3 | position:absolute; 4 | width:2px; 5 | height:100%; 6 | z-index:0; 7 | } 8 | .mapboxgl-compare .compare-swiper-vertical { 9 | background-color:#3887be; 10 | box-shadow:inset 0 0 0 2px #fff; 11 | display:inline-block; 12 | border-radius:50%; 13 | position:absolute; 14 | width:60px; 15 | height:60px; 16 | top:50%; 17 | left:-30px; 18 | margin:-30px 1px 0; 19 | color: #fff; 20 | cursor:ew-resize; 21 | background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiICAgd2lkdGg9IjYwIiAgIGhlaWdodD0iNjAiICAgdmVyc2lvbj0iMS4xIiAgIHZpZXdCb3g9IjAgMCA2MCA2MCIgICBpZD0ic3ZnNTQzNCIgICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxK2RldmVsK29zeG1lbnUgcjEyOTExIiAgIHNvZGlwb2RpOmRvY25hbWU9Imwtci5zdmciPiAgPG1ldGFkYXRhICAgICBpZD0ibWV0YWRhdGE1NDQ0Ij4gICAgPHJkZjpSREY+ICAgICAgPGNjOldvcmsgICAgICAgICByZGY6YWJvdXQ9IiI+ICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4gICAgICAgIDxkYzp0eXBlICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPiAgICAgICAgPGRjOnRpdGxlPjwvZGM6dGl0bGU+ICAgICAgPC9jYzpXb3JrPiAgICA8L3JkZjpSREY+ICA8L21ldGFkYXRhPiAgPGRlZnMgICAgIGlkPSJkZWZzNTQ0MiIgLz4gIDxzb2RpcG9kaTpuYW1lZHZpZXcgICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiIgICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IiAgICAgYm9yZGVyb3BhY2l0eT0iMSIgICAgIG9iamVjdHRvbGVyYW5jZT0iMTAiICAgICBncmlkdG9sZXJhbmNlPSIxMCIgICAgIGd1aWRldG9sZXJhbmNlPSIxMCIgICAgIGlua3NjYXBlOnBhZ2VvcGFjaXR5PSIwIiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIgICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTI4NiIgICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijc1MSIgICAgIGlkPSJuYW1lZHZpZXc1NDQwIiAgICAgc2hvd2dyaWQ9InRydWUiICAgICBpbmtzY2FwZTp6b29tPSI0IiAgICAgaW5rc2NhcGU6Y3g9IjI1Ljg4OTgzMSIgICAgIGlua3NjYXBlOmN5PSIzNC4zODE4MzMiICAgICBpbmtzY2FwZTp3aW5kb3cteD0iMCIgICAgIGlua3NjYXBlOndpbmRvdy15PSIyMyIgICAgIGlua3NjYXBlOndpbmRvdy1tYXhpbWl6ZWQ9IjAiICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc1NDM0IiAgICAgaW5rc2NhcGU6b2JqZWN0LW5vZGVzPSJ0cnVlIiAgICAgaW5rc2NhcGU6c25hcC1zbW9vdGgtbm9kZXM9InRydWUiPiAgICA8aW5rc2NhcGU6Z3JpZCAgICAgICB0eXBlPSJ4eWdyaWQiICAgICAgIGlkPSJncmlkNTk4OSIgLz4gIDwvc29kaXBvZGk6bmFtZWR2aWV3PiAgPHBhdGggICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjFweDtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjptaXRlcjtzdHJva2Utb3BhY2l0eToxIiAgICAgZD0iTSAyNSAyNCBMIDE2IDMwIEwgMjUgMzYgTCAyNSAyNCB6IE0gMzUgMjQgTCAzNSAzNiBMIDQ0IDMwIEwgMzUgMjQgeiAiICAgICBpZD0icGF0aDU5OTUiIC8+PC9zdmc+); 22 | } 23 | 24 | .mapboxgl-compare-horizontal { 25 | position:relative; 26 | width:100%; 27 | height:2px; 28 | } 29 | .mapboxgl-compare .compare-swiper-horizontal { 30 | background-color:#3887be; 31 | box-shadow:inset 0 0 0 2px #fff; 32 | display:inline-block; 33 | border-radius:50%; 34 | position:absolute; 35 | width:60px; 36 | height:60px; 37 | top:50%; 38 | left:50%; 39 | margin:-30px 1px 0; 40 | color: #fff; 41 | cursor:ns-resize; 42 | background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiICAgd2lkdGg9IjYwIiAgIGhlaWdodD0iNjAiICAgdmVyc2lvbj0iMS4xIiAgIHZpZXdCb3g9IjAgMCA2MCA2MCIgICBpZD0ic3ZnNTQzNCIgICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxK2RldmVsK29zeG1lbnUgcjEyOTExIiAgIHNvZGlwb2RpOmRvY25hbWU9Imwtci5zdmciPiAgPG1ldGFkYXRhICAgICBpZD0ibWV0YWRhdGE1NDQ0Ij4gICAgPHJkZjpSREY+ICAgICAgPGNjOldvcmsgICAgICAgICByZGY6YWJvdXQ9IiI+ICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4gICAgICAgIDxkYzp0eXBlICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPiAgICAgICAgPGRjOnRpdGxlPjwvZGM6dGl0bGU+ICAgICAgPC9jYzpXb3JrPiAgICA8L3JkZjpSREY+ICA8L21ldGFkYXRhPiAgPGRlZnMgICAgIGlkPSJkZWZzNTQ0MiIgLz4gIDxzb2RpcG9kaTpuYW1lZHZpZXcgICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiIgICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IiAgICAgYm9yZGVyb3BhY2l0eT0iMSIgICAgIG9iamVjdHRvbGVyYW5jZT0iMTAiICAgICBncmlkdG9sZXJhbmNlPSIxMCIgICAgIGd1aWRldG9sZXJhbmNlPSIxMCIgICAgIGlua3NjYXBlOnBhZ2VvcGFjaXR5PSIwIiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIgICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTI4NiIgICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijc1MSIgICAgIGlkPSJuYW1lZHZpZXc1NDQwIiAgICAgc2hvd2dyaWQ9InRydWUiICAgICBpbmtzY2FwZTp6b29tPSI0IiAgICAgaW5rc2NhcGU6Y3g9IjI1Ljg4OTgzMSIgICAgIGlua3NjYXBlOmN5PSIzNC4zODE4MzMiICAgICBpbmtzY2FwZTp3aW5kb3cteD0iMCIgICAgIGlua3NjYXBlOndpbmRvdy15PSIyMyIgICAgIGlua3NjYXBlOndpbmRvdy1tYXhpbWl6ZWQ9IjAiICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc1NDM0IiAgICAgaW5rc2NhcGU6b2JqZWN0LW5vZGVzPSJ0cnVlIiAgICAgaW5rc2NhcGU6c25hcC1zbW9vdGgtbm9kZXM9InRydWUiPiAgICA8aW5rc2NhcGU6Z3JpZCAgICAgICB0eXBlPSJ4eWdyaWQiICAgICAgIGlkPSJncmlkNTk4OSIgLz4gIDwvc29kaXBvZGk6bmFtZWR2aWV3PiAgPHBhdGggICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjFweDtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjptaXRlcjtzdHJva2Utb3BhY2l0eToxIiAgICAgZD0iTSAyNSAyNCBMIDE2IDMwIEwgMjUgMzYgTCAyNSAyNCB6IE0gMzUgMjQgTCAzNSAzNiBMIDQ0IDMwIEwgMzUgMjQgeiAiICAgICBpZD0icGF0aDU5OTUiIC8+PC9zdmc+); 43 | transform: rotate(90deg) 44 | } 45 | -------------------------------------------------------------------------------- /Side-by-side-map/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Short term visits by local authority", 3 | "varcolour": "PuBu", 4 | "varunit": "% short-term visits", 5 | "displaydecimals": 2, 6 | "legenddecimals": 2, 7 | "breaks": "jenks", 8 | "dropticks": true, 9 | "numberBreaks": 5, 10 | "varname1":"Students", 11 | "varname2":"Workers", 12 | "legendLabel1":"Students: ", 13 | "legendLabel2":"Workers: ", 14 | "mapLeftLabel":"Students", 15 | "mapRightLabel":"Workers" 16 | }} 17 | -------------------------------------------------------------------------------- /Side-by-side-map/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/Side-by-side-map/images/chosen-sprite.png -------------------------------------------------------------------------------- /Side-by-side-map/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/Side-by-side-map/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /Side-by-side-map/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Side-by-side-map/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /Side-by-side-map/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /Side-by-side-map/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Side-by-side map 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 207 | 208 | 209 | 210 | 213 | 214 |
215 |

216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 250 | 251 | 254 | 255 | 256 | 257 | -------------------------------------------------------------------------------- /Side-by-side-map/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/Side-by-side-map/js/.DS_Store -------------------------------------------------------------------------------- /Side-by-side-map/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /Side-by-side-map/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /Side-by-side-map/js/mapbox-gl-sync-move.js: -------------------------------------------------------------------------------- 1 | function moveToMapPosition (master, clones) { 2 | var center = master.getCenter(); 3 | var zoom = master.getZoom(); 4 | var bearing = master.getBearing(); 5 | var pitch = master.getPitch(); 6 | 7 | clones.forEach(function (clone) { 8 | clone.jumpTo({ 9 | center: center, 10 | zoom: zoom, 11 | bearing: bearing, 12 | pitch: pitch 13 | }); 14 | }); 15 | } 16 | 17 | // Sync movements of two maps. 18 | // 19 | // All interactions that result in movement end up firing 20 | // a "move" event. The trick here, though, is to 21 | // ensure that movements don't cycle from one map 22 | // to the other and back again, because such a cycle 23 | // - could cause an infinite loop 24 | // - prematurely halts prolonged movements like 25 | // double-click zooming, box-zooming, and flying 26 | function syncMaps () { 27 | var maps; 28 | var argLen = arguments.length; 29 | if (argLen === 1) { 30 | maps = arguments[0]; 31 | } else { 32 | maps = []; 33 | for (var i = 0; i < argLen; i++) { 34 | maps.push(arguments[i]); 35 | } 36 | } 37 | 38 | // Create all the movement functions, because if they're created every time 39 | // they wouldn't be the same and couldn't be removed. 40 | var fns = []; 41 | maps.forEach(function (map, index) { 42 | fns[index] = sync.bind(null, map, maps.filter(function (o, i) { return i !== index; })); 43 | }); 44 | 45 | function on () { 46 | maps.forEach(function (map, index) { 47 | map.on('move', fns[index]); 48 | }); 49 | } 50 | 51 | function off () { 52 | maps.forEach(function (map, index) { 53 | map.off('move', fns[index]); 54 | }); 55 | } 56 | 57 | // When one map moves, we turn off the movement listeners 58 | // on all the maps, move it, then turn the listeners on again 59 | function sync (master, clones) { 60 | off(); 61 | moveToMapPosition(master, clones); 62 | on(); 63 | } 64 | 65 | on(); 66 | return function(){ off(); fns = []; }; 67 | } 68 | 69 | module.exports = syncMaps; 70 | -------------------------------------------------------------------------------- /changeovertime/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/.DS_Store -------------------------------------------------------------------------------- /changeovertime/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/css/chosen-sprite.png -------------------------------------------------------------------------------- /changeovertime/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /changeovertime/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Time series map about life expectancy", 3 | "varcolour": "YlGnBu", 4 | "varlabels": ["Per 1,000 population","Per 100 sales"], 5 | "timeload": "last", 6 | "play":false, 7 | "timepoints": ["2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016"], 8 | "varunit": ["First time buyer mortgages per 1,000 population","First time buyer mortgages per 100 house sales"], 9 | "displaydecimals": 1, 10 | "legenddecimals": 1, 11 | "dateParse": "%Y", 12 | "dateFormat": "%Y", 13 | "timelineLabelsDT":["2006","2011","2016"], 14 | "breaks": [[-10,0,5,10,15,20],[-5,0,5,10,15,20]], 15 | "dropticks": true, 16 | "numberBreaks": 5, 17 | "sourcetext": "Office for National Statistics analysis using data from the Financial Conduct Authority", 18 | "chartLabels": ["1","2"], 19 | "average": [ 20 | ["6.2","5.5","3.0","3.1","3.0","2.9","3.2","3.9","4.5","4.4","4.8","5.0","5.1","5.1","4.4","5.9","5.3","4.1","1","2","3","4"], 21 | ["24.9","23.3","24.9","27.1","25.4","25.0","27.4","28.1","28.4","27.5","30.0","30.8","33.8","35.0","34.2","32.4","35.4","38.3"] 22 | ], 23 | "averageText":"UK Average", 24 | "nullcolour":"#dadada", 25 | "keyHeight": 250, 26 | "keyMargin": { 27 | "top": 110, 28 | "right": 37, 29 | "left": 60 30 | } 31 | }} 32 | -------------------------------------------------------------------------------- /changeovertime/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /changeovertime/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /changeovertime/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /changeovertime/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /changeovertime/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/images/.DS_Store -------------------------------------------------------------------------------- /changeovertime/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/images/chosen-sprite.png -------------------------------------------------------------------------------- /changeovertime/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /changeovertime/images/fast-forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/images/fast-forward.png -------------------------------------------------------------------------------- /changeovertime/images/fast-forward.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /changeovertime/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /changeovertime/images/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/images/pause.png -------------------------------------------------------------------------------- /changeovertime/images/pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /changeovertime/images/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/images/play.png -------------------------------------------------------------------------------- /changeovertime/images/play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /changeovertime/images/rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/images/rewind.png -------------------------------------------------------------------------------- /changeovertime/images/rewind.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /changeovertime/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /changeovertime/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /changeovertime/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Change over time map with line chart 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 |
28 | 30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |

40 |
41 | 42 |
43 |
44 | 47 | 50 | 53 |
54 |
55 |
56 |

57 |
58 | 59 |
60 |
61 |
62 |
63 |
64 |
65 | 66 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /changeovertime/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/js/chosen-sprite.png -------------------------------------------------------------------------------- /changeovertime/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/changeovertime/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /changeovertime/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /changeovertime/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /hexmap/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/hexmap/css/chosen-sprite.png -------------------------------------------------------------------------------- /hexmap/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/hexmap/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /hexmap/css/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-bottom: 60px; 3 | font-family: 'Open Sans', Arial, Helvetica, sans-serif 4 | } 5 | 6 | img { 7 | max-width: 100%; 8 | } 9 | 10 | #areanm { 11 | font-size: 18px; 12 | font-weight: bold; 13 | color: #000; 14 | height: 30px; 15 | margin: 20px 0 10px 3px; 16 | } 17 | 18 | .btn { 19 | vertical-align: middle; 20 | margin-right: 10px; 21 | padding: 10px 20px; 22 | } 23 | 24 | .btn:focus { 25 | box-shadow: 0 0 0px 3pt orange; 26 | } 27 | 28 | .keys path { 29 | display: none; 30 | 31 | } 32 | 33 | .keys line { 34 | stroke: #000; 35 | shape-rendering: crispEdges; 36 | } 37 | 38 | .keys { 39 | font-size: 10px; 40 | fill: #666; 41 | } 42 | 43 | .selected { 44 | stroke: #990000; 45 | stroke-width: 2px; 46 | } 47 | 48 | #key rect { 49 | stroke: #666; 50 | stroke-width: 0.5px; 51 | z-index: +1; 52 | } 53 | 54 | .svgRect { 55 | fill: white; 56 | fill-opacity: 0.0; 57 | } 58 | 59 | /* Zoom CSS */ 60 | 61 | .zoom-control-zoom a, 62 | .zoom-control-layers-toggle { 63 | background-position: 50% 50%; 64 | background-repeat: no-repeat; 65 | display: block; 66 | } 67 | 68 | .zoom-control-zoom a { 69 | width: 22px; 70 | height: 22px; 71 | text-align: center; 72 | text-decoration: none; 73 | color: #5381ca; 74 | } 75 | 76 | .zoom-control-zoom-in { 77 | cursor: pointer; 78 | font: bold 18px / 24px Arial, Helvetica, sans- serif; 79 | } 80 | 81 | .zoom-control-zoom-in:hover { 82 | color: #fff; 83 | background-color: #5381ca; 84 | } 85 | 86 | 87 | .zoom-bar-part { 88 | background-color: rgba(255, 255, 255, 0.8); 89 | border-bottom: 1px solid #aaa; 90 | } 91 | 92 | .zoom-control-zoom-out { 93 | cursor: pointer; 94 | font: bold 23px / 20px Tahoma, Verdana, sans-serif; 95 | } 96 | 97 | .zoom-control-zoom-out:hover { 98 | color: #fff; 99 | background-color: #5381ca; 100 | } 101 | 102 | .zoom-bar-part:focus { 103 | box-shadow: 0 0 0 3pt orange; 104 | background-color: #414042; 105 | color: #ededed; 106 | 107 | } 108 | 109 | .zoom-bar-part-bottom { 110 | border-bottom: none; 111 | } 112 | 113 | .zoom-container { 114 | margin-left: 5px; 115 | margin-top: 30px; 116 | position: absolute; 117 | left: 0px; 118 | top: 0px; 119 | } 120 | 121 | .zoom-bar { 122 | 123 | border: 1px solid #59a4da; 124 | } 125 | 126 | .zoom-popup-pane, 127 | .zoom-control { 128 | cursor: auto; 129 | } 130 | 131 | .zoom-control { 132 | float: left; 133 | clear: both; 134 | } 135 | 136 | .zoom-control { 137 | z-index: 1; 138 | pointer-events: auto; 139 | } 140 | 141 | .areaname { 142 | margin: 0px; 143 | font-size: 12px; 144 | } 145 | 146 | .graphUnitSVGs { 147 | border: 2px solid #fff; 148 | } 149 | 150 | 151 | .graphUnitSVGs text { 152 | font-size: 14px; 153 | fill: #000; 154 | } 155 | 156 | .keys text { 157 | font-size: 12px; 158 | fill: #000; 159 | } 160 | 161 | .graphUnitSVGs line, 162 | .keys line { 163 | font-size: 11px; 164 | stroke: #AAAAAA; 165 | } 166 | 167 | .svgTitle { 168 | text-anchor: start; 169 | } 170 | 171 | .total { 172 | max-width: 600px; 173 | margin: 0 auto; 174 | } 175 | 176 | #ChartFooterDiv,#footer h4{ 177 | margin: 16px 0 16px 0; 178 | font-size: 16px; 179 | line-height: 32px; 180 | padding: 24px 0 0 0; 181 | font-weight: 700; 182 | color: #323132; 183 | } 184 | 185 | #ChartFooterDiv{ 186 | padding-top: 0!important; 187 | margin-top:0!important 188 | } 189 | 190 | @media (max-width:767px) { 191 | #ChartFooterDiv, #footer h4{ 192 | line-height: 24px; 193 | margin: 16px 0 16px 0; 194 | } 195 | } 196 | 197 | 198 | 199 | 200 | .visuallyhidden { 201 | position: absolute; 202 | width: 1px; 203 | height: 1px; 204 | margin: -1px; 205 | padding: 0; 206 | overflow: hidden; 207 | clip: rect(0, 0, 0, 0); 208 | border: 0; 209 | } 210 | 211 | .relative { 212 | position: relative; 213 | } 214 | -------------------------------------------------------------------------------- /hexmap/data/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ons": { 3 | "visualisationTitle": "Population estimates for UK, England and Wales, Scotland and Northern Ireland: mid-2016", 4 | "sourceUrl": "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/annualmidyearpopulationestimates/mid2016", 5 | "graphic_data_url": "data/data.csv", 6 | "fieldsToIgnore": ["AREACD", "AREANM"], 7 | "varcolour": ["#d8b365", "#f6e8c3", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"], 8 | "yAxisLabel": "%", 9 | "unitofmeasure": ["%", "%", "%", "%"], 10 | "numRows_sm_md_lg": [4, 2, 2], 11 | "numColumns_sm_md_lg": [1, 2, 2], 12 | "breakDivisions": 6, 13 | "breaks": [ 14 | [0.00, 0.00, 3.5, 5.7, 6.4, 8.4, 11.4], 15 | [0.00, 0.00, 3.5, 5.7, 6.4, 8.4, 11.4], 16 | [-2.5, -0.6, 0.0, 0.6, 1.2, 1.8, 7.32] 17 | ], 18 | "source":"Population estimates for UK, England and Wales, Scotland and Northern Ireland – Office for National Statistics" 19 | 20 | }, 21 | "optional": { 22 | "margin_sm": [5, 5, 0, 5], 23 | "margin_md": [5, 5, 0, 20], 24 | "margin_lg": [5, 5, 0, 20], 25 | "aspectRatio_sm": [16, 16], 26 | "aspectRatio_md": [16, 18], 27 | "aspectRatio_lg": [14, 16], 28 | "mobileBreakpoint": 510 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /hexmap/data/config_new.json: -------------------------------------------------------------------------------- 1 | { 2 | "ons": { 3 | "visualisationTitle": "Population estimates for UK, England and Wales, Scotland and Northern Ireland: mid-2016", 4 | "sourceUrl": "https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/bulletins/annualmidyearpopulationestimates/mid2016", 5 | "varcolour": ["#d8b365", "#f6e8c3", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"], 6 | "varlabels": ["House prices", "Average Salary", "Public sector employment", "% with degree"], 7 | "varload": 2, 8 | "varunit": ["£'s", "£'s per week", "per cent", "per cent"], 9 | "displaydecimals": 0, 10 | "legenddecimals": 0, 11 | "breaks": ["jenks", "equal", [0, 20, 40, 50, 60, 100], "jenks"], 12 | "dropticks": true, 13 | "numberBreaks": [5, 3, 5, 6] 14 | } 15 | } -------------------------------------------------------------------------------- /hexmap/data/data.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/hexmap/data/data.xls -------------------------------------------------------------------------------- /hexmap/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/hexmap/images/chosen-sprite.png -------------------------------------------------------------------------------- /hexmap/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/hexmap/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /hexmap/images/fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/hexmap/images/fallback.png -------------------------------------------------------------------------------- /hexmap/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /hexmap/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /hexmap/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /hexmap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hex map 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 39 | 40 | 41 | 42 | 43 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |

64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | A series of maps showing UK population change between 2015 and 2016. 72 |
73 |
74 |
75 |
76 | 79 |
80 |
81 | 82 |
Download this chart
83 | 84 | Image 86 | .csv 88 | .xls 90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /hexmap/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/lsoa-small-area/houseprice/css/chosen-sprite.png -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/lsoa-small-area/houseprice/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Median house price", 3 | "varcolour": ["#7FCDBB", "#41B6C4", "#1D91C0", "#225EA8", "#0C2C84"], 4 | "varunit": "Median house price", 5 | "displaydecimals": 0, 6 | "legenddecimals": 0, 7 | "breaks": [25000,150000,232500,350000,925000,5000000], 8 | "dropticks": true, 9 | "numberBreaks": 5, 10 | "nullColour": "#666" 11 | }} 12 | -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/lsoa-small-area/houseprice/images/chosen-sprite.png -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/lsoa-small-area/houseprice/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/images/closeblue.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/lsoa-small-area/houseprice/images/image.png -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /lsoa-small-area/houseprice/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /msoa/covid-death-map/css/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/css/Thumbs.db -------------------------------------------------------------------------------- /msoa/covid-death-map/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/css/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/covid-death-map/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/covid-death-map/data/datadownload.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/data/datadownload.xlsx -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/css/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/css/Thumbs.db -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/css/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/data/data.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/data/data.csv -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/gzip.js: -------------------------------------------------------------------------------- 1 | module.exports = function(req, res, next) { 2 | if (req.url.endsWith('.pbf')) { 3 | next(); 4 | res.setHeader('Content-Encoding', 'gzip'); 5 | } else { 6 | next(); 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/images/Thumbs.db -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/images/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/images/closeblue.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/embed/images/image.png -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /msoa/covid-death-map/embed/parent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | MSOA bubble map 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 34 | 35 | 36 | 37 | 38 |
Parent page
39 |
40 | Enter a postcode with a space in between 41 | 42 |
43 | 44 |
45 | 46 | 47 |
48 |

49 |
50 | 51 |
52 | 53 |
Child page
54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 122 | 123 | 124 | 125 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /msoa/covid-death-map/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /msoa/covid-death-map/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /msoa/covid-death-map/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /msoa/covid-death-map/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /msoa/covid-death-map/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/images/Thumbs.db -------------------------------------------------------------------------------- /msoa/covid-death-map/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/images/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/covid-death-map/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/covid-death-map/images/closeblue.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /msoa/covid-death-map/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/covid-death-map/images/image.png -------------------------------------------------------------------------------- /msoa/covid-death-map/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /msoa/multimap/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/css/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/multimap/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/multimap/css/images/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/css/images/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /msoa/multimap/css/images/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/css/images/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /msoa/multimap/css/images/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/css/images/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /msoa/multimap/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Energy Efficiency", 3 | "varcolour": ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"], 4 | "varlabels": ["No central heating","Mains gas only","Electric only","Oil only","Renewable energy only"], 5 | "varunit": ["% of usual residents","% of usual residents","% of usual residents","% of usual residents","% of usual residents"], 6 | "varload":0, 7 | "displayFormat": [".1f",".1f",",.1f",",.1f",",.1f"], 8 | "displaySuffix":["","","","",""], 9 | "legendFormat": [".0f",".0f",",.0f",",.0f",",.0f"], 10 | "legenddecimals":[1,1,1,1,1], 11 | "breaks": [[0,1,2,3,4,18],[2,31,55,70,80,92],[1,6,12,21,42,84],[0,4,12,24,38,68],[0,1,2,4,6]], 12 | "dropticks": false, 13 | "numberBreaks": [5,5,5,5,4], 14 | "nullColour": "#DADADA", 15 | "source":"Office for National Statistics – Census 2021" 16 | }} -------------------------------------------------------------------------------- /msoa/multimap/datadownload.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/datadownload.xlsx -------------------------------------------------------------------------------- /msoa/multimap/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/images/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/multimap/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/multimap/images/closeblue.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /msoa/multimap/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/multimap/images/image.png -------------------------------------------------------------------------------- /msoa/multimap/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /msoa/multimap/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /msoa/simplemap/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/simplemap/css/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/simplemap/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/simplemap/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/simplemap/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Travelling less than 2km to work by MSOA", 3 | "varcolour": ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"], 4 | "varunit": "% travelling less than 2km to work", 5 | "displayFormat": ".0%", 6 | "legenddecimals": 2, 7 | "breaks": "jenks", 8 | "dropticks": true, 9 | "numberBreaks": 5, 10 | "nullColour": "#dadada", 11 | "source":"Office for National Statistics" 12 | }} 13 | -------------------------------------------------------------------------------- /msoa/simplemap/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/simplemap/images/chosen-sprite.png -------------------------------------------------------------------------------- /msoa/simplemap/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/simplemap/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /msoa/simplemap/images/closeblue.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /msoa/simplemap/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/msoa/simplemap/images/image.png -------------------------------------------------------------------------------- /msoa/simplemap/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /msoa/simplemap/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /multimap/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap/css/chosen-sprite.png -------------------------------------------------------------------------------- /multimap/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Census 2021 - dvc1915", 3 | "varcolour": [ 4 | ["#e1fcf8", "#9ccad5", "#5e99af", "#136a85", "#003b55"], 5 | ["#c4e2f5", "#84aad3", "#5473ae", "#2f3f81", "#000e56"], 6 | ["#edd4f8", "#db99c7", "#bf6096", "#95305d", "#640026"],"YlGnBu"], 7 | "varlabels": ["Under 15 years","15 to 64 years","65 years and over"], 8 | "varload": 1, 9 | "varunit": ["Percentage of all people","Percentage of all people","Percentage of all people","per cent"], 10 | "displaydecimals": 1, 11 | "legenddecimals":0, 12 | "breaks": [[13.0,14.4,15.7,17.1,18,19],[57.0,58.9,60.6,62.3,64,70],[14,19,21,23,26,28],[0,20,40,50,60,100],"equal"], 13 | "dropticks": false, 14 | "numberBreaks": [5,5,5,6] 15 | }} 16 | -------------------------------------------------------------------------------- /multimap/data/data.csv: -------------------------------------------------------------------------------- 1 | AREACD,AREANM,house,salary,publicsector,degree,age,nonukborn,health 2 | W06000001,Isle of Anglesey,16.1,57.5,26.4,99999,99999,99999,99999 3 | W06000002,Gwynedd,15.3,61.2,23.3,99999,99999,99999,99999 4 | W06000003,Conwy,15,57.8,27.4,99999,99999,99999,99999 5 | W06000004,Denbighshire,16.5,58.9,24.8,99999,99999,99999,99999 6 | W06000005,Flintshire,16.5,61.9,21.4,99999,99999,99999,99999 7 | W06000006,Wrexham,17.2,62.5,20.2,99999,99999,99999,99999 8 | W06000008,Ceredigion,13.1,61.1,25.7,99999,99999,99999,99999 9 | W06000009,Pembrokeshire,15.7,57.9,26.1,99999,99999,99999,99999 10 | W06000010,Carmarthenshire,16.2,59.7,24.2,99999,99999,99999,99999 11 | W06000011,Swansea,16,63.5,20.5,99999,99999,99999,99999 12 | W06000012,Neath Port Talbot,16.5,62.3,21.2,99999,99999,99999,99999 13 | W06000013,Bridgend,16.7,62.6,20.8,99999,99999,99999,99999 14 | W06000014,Vale of Glamorgan,17.5,60.6,21.9,99999,99999,99999,99999 15 | W06000015,Cardiff,17.1,68.4,14.5,99999,99999,99999,99999 16 | W06000016,Rhondda Cynon Taf,17.2,63.1,19.6,99999,99999,99999,99999 17 | W06000018,Caerphilly,17.3,62.6,20.2,99999,99999,99999,99999 18 | W06000019,Blaenau Gwent,16.4,63.2,20.3,99999,99999,99999,99999 19 | W06000020,Torfaen,17.3,62,20.7,99999,99999,99999,99999 20 | W06000021,Monmouthshire,14.8,59.4,25.8,99999,99999,99999,99999 21 | W06000022,Newport,19,64.2,17,99999,99999,99999,99999 22 | W06000023,Powys,14.4,57.7,27.8,99999,99999,99999,99999 23 | W06000024,Merthyr Tydfil,18,63.1,18.9,99999,99999,99999,99999 24 | -------------------------------------------------------------------------------- /multimap/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap/images/chosen-sprite.png -------------------------------------------------------------------------------- /multimap/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /multimap/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multimap/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multimap/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap/js/chosen-sprite.png -------------------------------------------------------------------------------- /multimap/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /multimap/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /multimap_simplebar/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_simplebar/css/chosen-sprite.png -------------------------------------------------------------------------------- /multimap_simplebar/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_simplebar/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap_simplebar/data/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ons": { 3 | "map": { 4 | "maptitle": "Travel to work", 5 | "varcolour": "Blues", 6 | "varunit": "Location quotient", 7 | "keyunit": "Great Britain average", 8 | "mapVarName": "High Technology Manufacturing", 9 | "displaydecimals": 1, 10 | "legenddecimals": 1, 11 | "breaks": "jenks", 12 | "dropticks": true, 13 | "numberBreaks": 5 14 | }, 15 | "bar" : { 16 | "graphic_data_url": "databars.csv", 17 | "colour_palette": { 18 | "1": "#24A79B", 19 | "0": "#ABC149" 20 | }, 21 | "keyNames": ["Great Britian share of total employment"], 22 | "legendLabels": {}, 23 | "sourceText":["ONS"], 24 | "xAxisLabel":"% of local employment", 25 | "xAxisScale": [0,0.65], 26 | "heightperstrip":35, 27 | "dotradius":3, 28 | "barMargin": {"top": 20, "right": 15, "bottom": 30, "left": 160}, 29 | "defaultBarVar": "default", 30 | "stackVar": "Method", 31 | "lineVar": "GB", 32 | "lineColour": "#FF9933", 33 | "lineLegendLabel": "England & Wales average", 34 | "mobileBreakpoint" : 610, 35 | "x_num_ticks_sm_md" : [3,4] 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /multimap_simplebar/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_simplebar/images/chosen-sprite.png -------------------------------------------------------------------------------- /multimap_simplebar/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_simplebar/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap_simplebar/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /multimap_simplebar/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multimap_simplebar/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multimap_simplebar/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_simplebar/js/chosen-sprite.png -------------------------------------------------------------------------------- /multimap_simplebar/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_simplebar/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap_simplebar/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /multimap_simplebar/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /multimap_vertical-scale/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_vertical-scale/css/chosen-sprite.png -------------------------------------------------------------------------------- /multimap_vertical-scale/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_vertical-scale/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap_vertical-scale/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Census 2021 - dvc1915", 3 | "varcolour": ["RdPu",["#3E558A","#958bba","#CAC6DE","#FED4A6","#FDA13C","#ED7320"],"RdPu",["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],["#c7e1de","#93c3c0","#65a2a8","#3c8096","#1a5c8b"],["#e4ceed","#ce9ed2","#bc6fab","#a83f7c","#890056"],["#bcd5e7","#85a9ce","#5b7db3","#395096","#172674"],["#e4ceed","#ce9ed2","#bc6fab","#a83f7c","#890056"],"YlGnBu"], 4 | "varlabels": ["2021","Percent change 2011-2021"], 5 | "varload":0, 6 | "varunit": ["People per square km","% change 2011-20"], 7 | "displayformat":[",.0f",",.1f",",.0f"], 8 | "legendformat": [",.0f",",.0f",",.0f"], 9 | "legenddecimals": ["0","0","0"], 10 | "breaks": [[0,100,200,400,800,1600,2600],[-10,-3,-1,0,3,6,10],[0,300,600,900,1200,1500,2600],[0,700,1400,2800,5600,11200],"jenks",[0,1500,3000,4500,6000,16000],[0,20,40,50,60,100],"equal"], 11 | "dropticks": [false,false,false], 12 | "dropticksmobile": [true,false,true], 13 | "numberBreaks": [6,6,6,6] 14 | }} 15 | -------------------------------------------------------------------------------- /multimap_vertical-scale/data/data.csv: -------------------------------------------------------------------------------- 1 | AREACD,AREANM,house,publicsector,salary,degree,age,nonukborn,health 2 | W06000001,Isle of Anglesey,97,-1,98,99999,99999,99999,99999 3 | W06000002,Gwynedd,46,-4.2,48,99999,99999,99999,99999 4 | W06000003,Conwy,102,0,102,99999,99999,99999,99999 5 | W06000004,Denbighshire,114,1.8,112,99999,99999,99999,99999 6 | W06000005,Flintshire,352,1.4,347,99999,99999,99999,99999 7 | W06000006,Wrexham,268,0,268,99999,99999,99999,99999 8 | W06000008,Ceredigion,40,-7,43,99999,99999,99999,99999 9 | W06000009,Pembrokeshire,76,0,76,99999,99999,99999,99999 10 | W06000010,Carmarthenshire,79,1.3,78,99999,99999,99999,99999 11 | W06000011,Swansea,632,-0.2,633,99999,99999,99999,99999 12 | W06000012,Neath Port Talbot,322,1.6,317,99999,99999,99999,99999 13 | W06000013,Bridgend,580,4.5,555,99999,99999,99999,99999 14 | W06000014,Vale of Glamorgan,398,4.2,382,99999,99999,99999,99999 15 | W06000015,Cardiff,2572,4.7,2456,99999,99999,99999,99999 16 | W06000016,Rhondda Cynon Taf,560,1.3,553,99999,99999,99999,99999 17 | W06000018,Caerphilly,634,-1.7,645,99999,99999,99999,99999 18 | W06000019,Blaenau Gwent,615,-4.2,642,99999,99999,99999,99999 19 | W06000020,Torfaen,734,1.2,725,99999,99999,99999,99999 20 | W06000021,Monmouthshire,110,1.9,108,99999,99999,99999,99999 21 | W06000022,Newport,838,9.5,765,99999,99999,99999,99999 22 | W06000023,Powys,26,0,26,99999,99999,99999,99999 23 | W06000024,Merthyr Tydfil,528,0,528,99999,99999,99999,99999 24 | -------------------------------------------------------------------------------- /multimap_vertical-scale/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_vertical-scale/images/chosen-sprite.png -------------------------------------------------------------------------------- /multimap_vertical-scale/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_vertical-scale/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap_vertical-scale/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /multimap_vertical-scale/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multimap_vertical-scale/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multimap_vertical-scale/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_vertical-scale/js/chosen-sprite.png -------------------------------------------------------------------------------- /multimap_vertical-scale/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multimap_vertical-scale/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multimap_vertical-scale/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /multimap_vertical-scale/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /multiple_characteristics_map/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/.DS_Store -------------------------------------------------------------------------------- /multiple_characteristics_map/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/css/chosen-sprite.png -------------------------------------------------------------------------------- /multiple_characteristics_map/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multiple_characteristics_map/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Mortality", 3 | "varcolour": [ 4 | "#f1eef6", 5 | "#bdc9e1", 6 | "#74a9cf", 7 | "#0570b0" 8 | ], 9 | "varunit": "change in months", 10 | "displaydecimals": 1, 11 | "decimalsOther": 1, 12 | "legenddecimals": 0, 13 | "breaks": "jenks", 14 | "customBreaksMapLegend":false, 15 | "breakPoints": [-13, 0, 5, 10, 18], 16 | "dropticks": false, 17 | "numberBreaks": 4, 18 | "columnMap": "Persons", 19 | "numberLegends": 1, 20 | "textChartTitle": "Mortality per 100,000 people", 21 | "labelNames": ["Persons", "Males", "Females", "Region-persons", "Region-males", "Region-females", "Country-persons", "Country-males", "Country-females"], 22 | "sourceText": "Office for National Statistics" 23 | }} 24 | -------------------------------------------------------------------------------- /multiple_characteristics_map/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/images/Thumbs.db -------------------------------------------------------------------------------- /multiple_characteristics_map/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/images/chosen-sprite.png -------------------------------------------------------------------------------- /multiple_characteristics_map/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multiple_characteristics_map/images/fast-forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/images/fast-forward.png -------------------------------------------------------------------------------- /multiple_characteristics_map/images/fast-forward.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /multiple_characteristics_map/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /multiple_characteristics_map/images/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/images/pause.png -------------------------------------------------------------------------------- /multiple_characteristics_map/images/pause.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /multiple_characteristics_map/images/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/images/play.png -------------------------------------------------------------------------------- /multiple_characteristics_map/images/play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /multiple_characteristics_map/images/rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/images/rewind.png -------------------------------------------------------------------------------- /multiple_characteristics_map/images/rewind.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /multiple_characteristics_map/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multiple_characteristics_map/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /multiple_characteristics_map/js/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/js/Thumbs.db -------------------------------------------------------------------------------- /multiple_characteristics_map/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/js/chosen-sprite.png -------------------------------------------------------------------------------- /multiple_characteristics_map/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /multiple_characteristics_map/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /multiple_characteristics_map/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /multiple_characteristics_map/js/script3d.js: -------------------------------------------------------------------------------- 1 | 2 | //test if browser supports webGL 3 | 4 | if(Modernizr.webgl) { 5 | 6 | //Load data and config file 7 | d3.queue() 8 | .defer(d3.csv, "data/chnglem.csv") 9 | .defer(d3.json, "data/config.json") 10 | .defer(d3.json, "data/geog.json") 11 | .await(ready); 12 | 13 | 14 | function ready (error, data, config, geog){ 15 | 16 | //Set up global variables 17 | dvc = {}; 18 | dvc.time = "yr1"; 19 | 20 | //Mapbox key (must hide) 21 | //mapboxgl.accessToken = 'pk.eyJ1Ijoib25zZGF0YXZpcyIsImEiOiJjamMxdDduNnAwNW9kMzJyMjQ0bHJmMnI1In0.3PkmH-GL8jBbiWlFB1IQ7Q'; 22 | 23 | //set max bounds (stops loading unnessary tiles 24 | var bounds = [ 25 | [-19.8544921875, 40.82380908513249], // Southwest coordinates 26 | [10.021484375, 68.478568831926395] // Northeast coordinates 27 | ]; 28 | 29 | //set up basemap 30 | var map = new mapboxgl.Map({ 31 | container: 'map', // container id 32 | style: 'https://free.tilehosting.com/styles/positron/style.json?key=ZBXiR1SHvcgszCLwyOFe', //stylesheet location 33 | center: [-2.5, 54], // starting position 34 | zoom: 4.5, // starting zoom 35 | pitch: 40, 36 | bearing: 20, 37 | maxBounds: bounds //set maximum boundaries 38 | }); 39 | 40 | // Add zoom and rotation controls to the map. 41 | map.addControl(new mapboxgl.NavigationControl()); 42 | 43 | // Add geolocation controls to the map. 44 | map.addControl(new mapboxgl.GeolocateControl({ 45 | positionOptions: { 46 | enableHighAccuracy: true 47 | }, 48 | trackUserLocation: true 49 | })); 50 | 51 | 52 | //set up d3 color scales 53 | 54 | console.log(colorbrewer.YlGn[5]); 55 | 56 | color = d3.scaleThreshold() 57 | .domain([0,10,20,30,40,50]) 58 | .range(colorbrewer.YlGn[5]); 59 | 60 | rateById = {}; 61 | areaById = {}; 62 | 63 | data.forEach(function(d) { rateById[d.AREACD] = +eval("d." + dvc.time); areaById[d.AREACD] = d.AREANM}); 64 | 65 | //convert topojson to geojson 66 | var areas = topojson.feature(geog, geog.objects.LA2014merc); 67 | 68 | areas.features.map(function(d,i) { 69 | 70 | d.properties.fill = color(rateById[d.properties.AREACD]) 71 | d.properties.height = rateById[d.properties.AREACD]*1000; 72 | 73 | console.log(d.properties.height); 74 | }); 75 | 76 | //cb(districts) 77 | 78 | map.on('load', function() { 79 | 80 | 81 | map.addSource('area', { 'type': 'geojson', 'data': areas }); 82 | 83 | 84 | map.addLayer({ 85 | 'id': 'area', 86 | 'type': 'fill-extrusion', 87 | 'source': 'area', 88 | 'layout': {}, 89 | 'paint': { 90 | 'fill-extrusion-color': { 91 | // Get the fill-extrusion-color from the source 'color' property. 92 | 'property': 'fill', 93 | 'type': 'identity' 94 | }, 95 | 'fill-extrusion-height': { 96 | // Get fill-extrusion-height from the source 'height' property. 97 | 'property': 'height', 98 | 'type': 'identity' 99 | }, 100 | 'fill-extrusion-base': 0, 101 | 'fill-extrusion-opacity': 0.7 102 | } 103 | }); 104 | 105 | 106 | map.addLayer({ 107 | 'id': 'areaOutline', 108 | 'type': 'fill', 109 | 'source': 'area', 110 | 'layout': {}, 111 | 'paint': { 112 | 'fill-color': 'rgba(0,0,0,0)', 113 | 'fill-opacity': 0.2, 114 | 'fill-outline-color': '#ccc' 115 | }, 116 | }); 117 | 118 | map.addLayer({ 119 | "id": "state-fills-hover", 120 | "type": "line", 121 | "source": "area", 122 | "layout": {}, 123 | "paint": { 124 | "line-color": "#000", 125 | "line-width": 2 126 | }, 127 | "filter": ["==", "AREACD", ""] 128 | }); 129 | 130 | //Highlight stroke on mouseover (and show area information) 131 | map.on("mousemove", "areaOutline", function(e) { 132 | console.log(e.features[0].properties.AREACD); 133 | map.setFilter("state-fills-hover", ["==", "AREACD", e.features[0].properties.AREACD]); 134 | showAreaInfo(e.features[0].properties.AREANM, rateById[e.features[0].properties.AREACD]); 135 | 136 | }); 137 | 138 | // Reset the state-fills-hover layer's filter when the mouse leaves the layer. 139 | map.on("mouseleave", "areaOutline", function() { 140 | map.setFilter("state-fills-hover", ["==", "AREACD", ""]); 141 | }); 142 | 143 | 144 | }); 145 | 146 | 147 | function showAreaInfo(name, percent_change) { 148 | console.log(percent_change); 149 | d3.select("#header").text(name + ": " + percent_change) 150 | 151 | 152 | 153 | } 154 | 155 | } 156 | 157 | } else { 158 | 159 | //provide fallback for browsers that don't support webGL 160 | 161 | } 162 | -------------------------------------------------------------------------------- /multiple_characteristics_map/mortality.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/multiple_characteristics_map/mortality.xlsx -------------------------------------------------------------------------------- /simplemap/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap/css/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "Map about...", 3 | "varcolour": "YlGnBu", 4 | "varunit": "£'s", 5 | "displaydecimals": 0, 6 | "legenddecimals": 0, 7 | "breaks": "equal", 8 | "dropticks": false, 9 | "numberBreaks": 5, 10 | "fillOpacity": 0.7, 11 | "backgroundColour": "#f2f3f0", 12 | "legendRectHeight": 8 13 | }} 14 | -------------------------------------------------------------------------------- /simplemap/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap/images/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /simplemap/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /simplemap/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /simplemap/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap/js/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /simplemap/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /simplemap_beeswarm/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/.DS_Store -------------------------------------------------------------------------------- /simplemap_beeswarm/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/css/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap_beeswarm/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap_beeswarm/data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/data/.DS_Store -------------------------------------------------------------------------------- /simplemap_beeswarm/data/Dummy data - adult social care.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/data/Dummy data - adult social care.xlsx -------------------------------------------------------------------------------- /simplemap_beeswarm/data/config.json: -------------------------------------------------------------------------------- 1 | {"ons":{ 2 | "maptitle": "map about life expectancy", 3 | "varcolour": "Blues", 4 | "varunit": "OADR", 5 | "displaydecimals": 1, 6 | "legenddecimals": 0, 7 | "breaks": "equal", 8 | "dropticks": false, 9 | "numberBreaks": 6, 10 | "essential" : { 11 | "graphic_data_url": "data.csv", 12 | "colour_palette": ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"], 13 | "sourceText":["Adult Social Care, ONS"], 14 | "xAxisLabel":"% hrte", 15 | "xAxisScale":[80,550], 16 | "heightperstrip":35, 17 | "dotradius":3 18 | }, 19 | "optional" : { 20 | "mobileBreakpoint" : 610, 21 | "x_num_ticks_sm_md" : [6,10] 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /simplemap_beeswarm/data/datajenks.csv: -------------------------------------------------------------------------------- 1 | value 2 | 88.656 3 | 108.772 4 | 109.036 5 | 114.543 6 | 117.955 7 | 124.757 8 | 136.944 9 | 140.51 10 | 143.323 11 | 145.775 12 | 154.688 13 | 160.437 14 | 161.162 15 | 164.637 16 | 164.702 17 | 176.218 18 | 176.51 19 | 180.588 20 | 183.433 21 | 185.943 22 | 187.809 23 | 189.986 24 | 195.358 25 | 196.207 26 | 200.377 27 | 200.982 28 | 202.304 29 | 203.839 30 | 204.6 31 | 212.922 32 | 214.438 33 | 215.133 34 | 215.592 35 | 217.498 36 | 220.247 37 | 220.555 38 | 224.307 39 | 225.293 40 | 228.045 41 | 228.816 42 | 231.787 43 | 232.397 44 | 232.683 45 | 236.203 46 | 241.241 47 | 244.009 48 | 246.504 49 | 250.812 50 | 251.358 51 | 251.75 52 | 252.549 53 | 253.476 54 | 256.999 55 | 258.585 56 | 260.487 57 | 261.041 58 | 268.44 59 | 271.696 60 | 276.176 61 | 276.722 62 | 278.075 63 | 281.847 64 | 283.498 65 | 283.852 66 | 285.944 67 | 286.967 68 | 290.774 69 | 291.453 70 | 292.916 71 | 293.413 72 | 296.35 73 | 296.766 74 | 297.745 75 | 297.864 76 | 298.158 77 | 298.921 78 | 299.5 79 | 299.925 80 | 300.229 81 | 301.879 82 | 302.858 83 | 305.002 84 | 309.348 85 | 310.138 86 | 310.546 87 | 311.437 88 | 311.961 89 | 313.221 90 | 313.598 91 | 314.479 92 | 315.672 93 | 317.605 94 | 318.405 95 | 319.273 96 | 319.44 97 | 320.402 98 | 320.627 99 | 320.898 100 | 322.355 101 | 322.812 102 | 325.873 103 | 329.83 104 | 334.19 105 | 335.268 106 | 338.69 107 | 341.885 108 | 344.261 109 | 344.283 110 | 345.34 111 | 345.521 112 | 347.483 113 | 349.248 114 | 350.985 115 | 351.283 116 | 352.37 117 | 354.137 118 | 355.173 119 | 356.084 120 | 357.553 121 | 363.803 122 | 364.69 123 | 365.693 124 | 365.889 125 | 366.187 126 | 367.801 127 | 373.9 128 | 375.739 129 | 388.369 130 | 389.047 131 | 394.01 132 | 394.91 133 | 402.748 134 | 405.022 135 | 407.297 136 | 409.962 137 | 419.241 138 | 420.16 139 | 423.35 140 | 423.579 141 | 425.604 142 | 429.588 143 | 430.612 144 | 434.344 145 | 437.585 146 | 438.067 147 | 442.352 148 | 451.493 149 | 456.986 150 | 465.558 151 | 483.281 152 | 505.954 153 | 543.11 -------------------------------------------------------------------------------- /simplemap_beeswarm/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/images/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap_beeswarm/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap_beeswarm/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /simplemap_beeswarm/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /simplemap_beeswarm/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /simplemap_beeswarm/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/js/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap_beeswarm/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_beeswarm/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap_beeswarm/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /simplemap_beeswarm/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /simplemap_stackedbar/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_stackedbar/css/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap_stackedbar/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_stackedbar/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap_stackedbar/data/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ons": { 3 | "map": { 4 | "maptitle": "Industries and public transport", 5 | "varcolour": "Blues", 6 | "varunit": "% bus and rail", 7 | "mapVarName": "mapvar", 8 | "displaydecimals": 1, 9 | "legenddecimals": 0, 10 | "breaks": [0,5,10,20,50,85], 11 | "dropticks": false, 12 | "numberBreaks": 5 13 | }, 14 | "bar" : { 15 | "graphic_data_url": "data.csv", 16 | "colour_palette": { 17 | "1": "#24A79B", 18 | "0": "#ABC149" 19 | }, 20 | "legendLabels": { 21 | "Bus": "0", 22 | "Rail": "1" 23 | }, 24 | "sourceText":["ONS 2011 Census"], 25 | "xAxisLabel":"% of local workforce", 26 | "xAxisScale": [0,5], 27 | "heightperstrip":35, 28 | "dotradius":3, 29 | "barMargin": {"top": 5, "right": 10, "bottom": 30, "left": 140}, 30 | "defaultBarVar": "default", 31 | "stackVar": "Method", 32 | "lineVar": "GB", 33 | "lineColour": "#005D60", 34 | "lineLegendLabel": "England & Wales average bus and rail", 35 | "mobileBreakpoint" : 610, 36 | "x_num_ticks_sm_md" : [3,4] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /simplemap_stackedbar/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_stackedbar/images/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap_stackedbar/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_stackedbar/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap_stackedbar/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /simplemap_stackedbar/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /simplemap_stackedbar/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /simplemap_stackedbar/js/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_stackedbar/js/chosen-sprite.png -------------------------------------------------------------------------------- /simplemap_stackedbar/js/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/simplemap_stackedbar/js/chosen-sprite@2x.png -------------------------------------------------------------------------------- /simplemap_stackedbar/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /simplemap_stackedbar/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /small-multiple/css/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/css/chosen-sprite.png -------------------------------------------------------------------------------- /small-multiple/css/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/css/chosen-sprite@2x.png -------------------------------------------------------------------------------- /small-multiple/data/config.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | "screenreadertext":"This graphic allows users to see the geographical spread of a change in GDP across England and Wales. See the accompanying data for the underlying figures.", 3 | "breaksAll": [-1000, -10, -5, -2, 0, 2, 5, 10, 1000], 4 | "legendBreaks":["10% and above","5% to 9.9%","2% to 4.9%","0% to 1.9%","-2% to 0%","-4.9% to -2%","-9.9% to -5%","-10% and below"], 5 | "colour": [ 6 | "#fff", 7 | "#8c510a", 8 | "#bf812d", 9 | "#dfc27d", 10 | "#f6e8c3", 11 | "#c7eae5", 12 | "#80cdc1", 13 | "#35978f", 14 | "#01665e" 15 | ], 16 | "margin":{ 17 | "top":15, 18 | "right":5, 19 | "bottom":10, 20 | "left":5 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /small-multiple/data/data.csv: -------------------------------------------------------------------------------- 1 | AREACD,AREANM,Total,"Agriculture, forestry and fishing",Total production industries,Mining and quarrying,Manufacturing,"Electricity, gas, steam and air","Water supply, sewerage",Construction,Total service industries,Wholesale and retail,Transport and storage,Accommodation and food service activities,Information and communication,Financial and insurance activities,Real estate activities,Professional scientific and technical activities,Administrative and support service activities,Public administration and defence,Education,Human health and social work activities,"Arts, entertainment and recreation",Other service activities,"Activities of households" 2 | E12000001,North East,-2.7,-2.1,-3.4,-1.2,-4.0,-2.9,3.7,-1.1,-2.7,-1.7,-7.6,-5.9,1.3,3.3,-0.4,-0.9,-0.6,-1.4,-10.7,-5.1,-11.4,0.8,-5.6 3 | E12000002,North West,-2.0,-1.4,2.2,5.4,2.8,-2.5,-1.0,-3.2,-2.9,-1.1,-3.5,-10.6,-1.9,0.5,-0.5,1.6,-1.9,-0.4,-15.3,-5.5,-1.5,-5.9,0.2 4 | E12000003,Yorkshire and The Humber,-3.6,-3.4,-3.3,-0.8,-3.6,-5.0,2.6,-3.7,-3.7,-7.7,-1.4,-9.1,-4.2,3.6,-0.8,-3.8,1.4,1.4,-17.1,-2.4,-3.2,-2.9,-1.1 5 | E12000004,East Midlands,-4.1,-2.8,-2.8,-0.5,-2.9,-4.6,1.4,-4.4,-4.5,-2.9,-3.1,-9.8,-7.5,2.2,-0.9,-3.4,-1.2,0.1,-20.0,-4.2,-3.8,-4.3,-4.5 6 | E12000005,West Midlands,-3.5,-2.3,-3.9,-1.8,-4.7,-0.7,1.3,-7.7,-3.0,-3.4,-2.3,-6.5,-7.0,2.4,-0.9,0.1,-10.4,-0.1,-5.5,-2.2,-2.9,-4.6,-2.0 7 | E12000006,East of England,-1.5,-0.7,0.6,2.4,0.5,-4.1,4.9,-4.9,-1.6,-2.4,-0.2,-9.3,-1.4,8.4,-0.9,-4.6,-3.7,0.2,1.8,-3.2,-2.9,-5.6,-1.6 8 | E12000007,London,-1.5,0.8,-2.9,-5.5,-1.6,-11.3,0.0,-4.7,-1.4,-6.6,-10.1,-9.4,1.5,2.6,0.2,0.5,-2.3,0.6,-7.4,-0.9,-10.4,-4.0,-2.2 9 | E12000008,South East,-3.4,-5.9,-4.9,-0.6,-4.4,-1.1,-10.1,-2.2,-3.2,-2.4,-5.4,-7.1,-1.5,1.6,-0.5,-0.7,-11.8,0.3,-12.7,-2.9,-4.5,-7.1,-3.5 10 | E12000009,South West,-2.8,-3.0,-4.0,-2.0,-2.0,-10.6,-10.5,-6.3,-2.3,-1.7,-7.7,-7.0,-4.0,0.7,-1.1,-0.3,-6.4,0.3,0.7,-5.0,-3.8,-1.3,-1.5 11 | W92000004,Wales,-2.4,-0.7,0.4,-2.5,0.5,-2.2,3.3,0.1,-3.5,-2.5,-10.5,-7.9,-3.6,0.1,0.0,0.3,-4.5,-0.7,-17.8,-2.0,-9.8,0.3,3.2 12 | -------------------------------------------------------------------------------- /small-multiple/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/images/Thumbs.db -------------------------------------------------------------------------------- /small-multiple/images/caret-down-solid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /small-multiple/images/chosen-sprite-sm-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/images/chosen-sprite-sm-white.png -------------------------------------------------------------------------------- /small-multiple/images/chosen-sprite-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/images/chosen-sprite-sm.png -------------------------------------------------------------------------------- /small-multiple/images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/images/chosen-sprite.png -------------------------------------------------------------------------------- /small-multiple/images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /small-multiple/images/fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/images/fallback.png -------------------------------------------------------------------------------- /small-multiple/images/icons--chevron-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ONSvisual/maptemplates/d99dc890dfc5598d67aa42177fdd580897756cf2/small-multiple/images/icons--chevron-down.png -------------------------------------------------------------------------------- /small-multiple/images/icons--chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | icons--chevron-down-thin 11 | Created with Sketch. 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /small-multiple/images/x_close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /small-multiple/images/x_close_slate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /small-multiple/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Small multiple map, regions 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 83 | 84 | 85 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 110 | 111 |
112 | 113 |
114 | 115 |
116 |

For a safer, faster, better experience online you should upgrade your browser. You will then be able to play with lovely interactive graphics such as this one.


117 |

Find out more about browsers

118 | 119 |
120 |
121 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /small-multiple/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); -------------------------------------------------------------------------------- /small-multiple/js/limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * debounce 3 | * @param {integer} milliseconds This param indicates the number of milliseconds 4 | * to wait after the last call before calling the original function. 5 | * @param {object} What "this" refers to in the returned function. 6 | * @return {function} This returns a function that when called will wait the 7 | * indicated number of milliseconds after the last call before 8 | * calling the original function. 9 | */ 10 | Function.prototype.debounce = function (milliseconds, context) { 11 | var baseFunction = this, 12 | timer = null, 13 | wait = milliseconds; 14 | 15 | return function () { 16 | var self = context || this, 17 | args = arguments; 18 | 19 | function complete() { 20 | baseFunction.apply(self, args); 21 | timer = null; 22 | } 23 | 24 | if (timer) { 25 | clearTimeout(timer); 26 | } 27 | 28 | timer = setTimeout(complete, wait); 29 | }; 30 | }; 31 | 32 | /** 33 | * throttle 34 | * @param {integer} milliseconds This param indicates the number of milliseconds 35 | * to wait between calls before calling the original function. 36 | * @param {object} What "this" refers to in the returned function. 37 | * @return {function} This returns a function that when called will wait the 38 | * indicated number of milliseconds between calls before 39 | * calling the original function. 40 | */ 41 | Function.prototype.throttle = function (milliseconds, context) { 42 | var baseFunction = this, 43 | lastEventTimestamp = null, 44 | limit = milliseconds; 45 | 46 | return function () { 47 | var self = context || this, 48 | args = arguments, 49 | now = Date.now(); 50 | 51 | if (!lastEventTimestamp || now - lastEventTimestamp >= limit) { 52 | lastEventTimestamp = now; 53 | baseFunction.apply(self, args); 54 | } 55 | }; 56 | }; -------------------------------------------------------------------------------- /small-multiple/js/modernizr.svg.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.7.1 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-svg 3 | */ 4 | ;window.Modernizr=function(a,b,c){function u(a){i.cssText=a}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function w(a,b){return typeof a===b}function x(a,b){return!!~(""+a).indexOf(b)}function y(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:w(f,"function")?f.bind(d||b):f}return!1}var d="2.7.1",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j,k={}.toString,l={svg:"http://www.w3.org/2000/svg"},m={},n={},o={},p=[],q=p.slice,r,s={}.hasOwnProperty,t;!w(s,"undefined")&&!w(s.call,"undefined")?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e}),m.svg=function(){return!!b.createElementNS&&!!b.createElementNS(l.svg,"svg").createSVGRect};for(var z in m)t(m,z)&&(r=z.toLowerCase(),e[r]=m[z](),p.push((e[r]?"":"no-")+r));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)t(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof enableClasses!="undefined"&&enableClasses&&(f.className+=" "+(b?"":"no-")+a),e[a]=b}return e},u(""),h=j=null,e._version=d,e}(this,this.document); -------------------------------------------------------------------------------- /small-multiple/js/script.js: -------------------------------------------------------------------------------- 1 | var pymChild = null; 2 | var chart_width = 245; 3 | var height = 288; 4 | var margin = config.margin 5 | 6 | // onload check to see if the web browser can handle 'inline svg' 7 | if (Modernizr.svg == true) { 8 | d3.select("#fallback").selectAll("*").remove(); 9 | d3.select("#screenreadertext").text(config.screenreadertext) 10 | d3.queue() 11 | .defer(d3.json, "data/geog.json") 12 | .defer(d3.csv, "data/data.csv") 13 | .await(ready); 14 | 15 | } // else leave fallback 16 | else { 17 | //use pym to create iframe containing fallback image (which is set as default) 18 | pymChild = new pym.Child(); 19 | if (pymChild) { 20 | pymChild.sendHeight(); 21 | } 22 | } // end else ... 23 | 24 | function ready(error, geog, data) { 25 | pymChild = new pym.Child(); 26 | setupdropdown(data); 27 | setupGeo(geog); 28 | setupScales(); 29 | createKey(config.legendBreaks,config.colour.reverse().slice(0,config.colour.length-1));//ignore the white colour 30 | dataObject=prepData(data); 31 | pymChild.sendHeight(); 32 | } 33 | 34 | function setupScales() { 35 | colour = d3.scaleThreshold() 36 | .domain(config.breaksAll) 37 | .range(config.colour); 38 | } 39 | 40 | function createKey(breaks,colours){ 41 | legend=d3.select("#legend").append('ul').attr('class','key') 42 | 43 | var foo = d3.zip(breaks,colours) 44 | 45 | var li=legend.selectAll('li') 46 | .data(foo) 47 | .enter() 48 | .append('li') 49 | 50 | li.append('b').style('background',function(d){return d[1]}) 51 | 52 | li.append('label').text(function(d){return d[0]}) 53 | } 54 | 55 | function prepData(data){ 56 | var dataObject={}; 57 | for(i=2;i 2 | 3 | 4 | 5 | 6 | Bubble map 7 | 8 | 9 | 10 | 11 | 12 | 13 | 67 | 68 | 69 | 70 |
71 |
72 |

73 |
74 |
75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /symbolmap/js/d3-queue.min.js: -------------------------------------------------------------------------------- 1 | // https://d3js.org/d3-queue/ Version 3.0.7. Copyright 2017 Mike Bostock. 2 | !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{n(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function n(t){for(;t._start=t._waiting&&t._active=0;)if((r=t._tasks[n])&&(t._tasks[n]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new i(t)}var l=[].slice,c={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})}); --------------------------------------------------------------------------------