diff --git a/components/LineChart.js b/components/LineChart.js new file mode 100644 index 0000000..b0d8713 --- /dev/null +++ b/components/LineChart.js @@ -0,0 +1,88 @@ +import React, { useRef, useEffect } from 'react' +import { select } from 'd3-selection' +import { scaleLinear } from 'd3-scale' +import { line } from 'd3-shape' +import { axisLeft, axisBottom } from 'd3-axis' +import { extent, max } from 'd3-array' + +// Example lineChart taken from https://www.newline.co/fullstack-d3 by Amelia Wattenberger + +// Draw canvas + +export const LineChart = ({ + data, + yAccessor, + xAccessor, + aspectRatio = 0.4, +}) => { + const wrapperRef = useRef() + + useEffect(() => { + if (!wrapperRef.current) { + return + } + + const dimensions = { + width: 1000, + height: 1000 * aspectRatio, + margin: { + top: 15, + right: 15, + bottom: 40, + left: 60, + }, + } + dimensions.boundedWidth = + dimensions.width - dimensions.margin.left - dimensions.margin.right + dimensions.boundedHeight = + dimensions.height - dimensions.margin.top - dimensions.margin.bottom + const wrapper = select(wrapperRef.current) + .append('svg') + .attr('viewBox', `0 0 ${dimensions.width} ${dimensions.height}`) + + const bounds = wrapper + .append('g') + .style( + 'transform', + `translate(${dimensions.margin.left}px, ${dimensions.margin.top}px)` + ) + + // Create scales + + const yScale = scaleLinear() + .domain([0, max(data, yAccessor)]) + .range([dimensions.boundedHeight, 0]) + + const xScale = scaleLinear() + .domain(extent(data, xAccessor)) + .range([0, dimensions.boundedWidth]) + + // Draw data + + const lineGenerator = line() + .x((d) => xScale(xAccessor(d))) + .y((d) => yScale(yAccessor(d))) + + bounds + .append('path') + .attr('d', lineGenerator(data)) + .attr('fill', 'none') + .attr('stroke', '#af9358') + .attr('stroke-width', 2) + + // Draw peripherals + + const yAxisGenerator = axisLeft().scale(yScale) + + bounds.append('g').call(yAxisGenerator) + + const xAxisGenerator = axisBottom().scale(xScale).ticks(null, 'd') + + bounds + .append('g') + .call(xAxisGenerator) + .style('transform', `translateY(${dimensions.boundedHeight}px)`) + }, [wrapperRef]) + + return
+} diff --git a/data/district_count.json b/data/district_count.json new file mode 100644 index 0000000..d1473f2 --- /dev/null +++ b/data/district_count.json @@ -0,0 +1,226 @@ +{ + "schema": { + "fields": [ + { + "name": "index", + "type": "integer" + }, + { + "name": "region_id", + "type": "string" + }, + { + "name": "year", + "type": "string" + }, + { + "name": "measure", + "type": "string" + }, + { + "name": "value", + "type": "integer" + }, + { + "name": "statistic", + "type": "string" + } + ], + "primaryKey": ["index"], + "pandas_version": "0.20.0" + }, + "data": [ + { + "index": 0, + "region_id": "DG", + "year": "1995", + "measure": "GEM001", + "value": 14626, + "statistic": "11111" + }, + { + "index": 1, + "region_id": "DG", + "year": "1996", + "measure": "GEM001", + "value": 14561, + "statistic": "11111" + }, + { + "index": 2, + "region_id": "DG", + "year": "1997", + "measure": "GEM001", + "value": 14302, + "statistic": "11111" + }, + { + "index": 3, + "region_id": "DG", + "year": "1998", + "measure": "GEM001", + "value": 14197, + "statistic": "11111" + }, + { + "index": 4, + "region_id": "DG", + "year": "1999", + "measure": "GEM001", + "value": 13854, + "statistic": "11111" + }, + { + "index": 5, + "region_id": "DG", + "year": "2000", + "measure": "GEM001", + "value": 13837, + "statistic": "11111" + }, + { + "index": 6, + "region_id": "DG", + "year": "2001", + "measure": "GEM001", + "value": 13416, + "statistic": "11111" + }, + { + "index": 7, + "region_id": "DG", + "year": "2002", + "measure": "GEM001", + "value": 13148, + "statistic": "11111" + }, + { + "index": 8, + "region_id": "DG", + "year": "2003", + "measure": "GEM001", + "value": 12631, + "statistic": "11111" + }, + { + "index": 9, + "region_id": "DG", + "year": "2004", + "measure": "GEM001", + "value": 12431, + "statistic": "11111" + }, + { + "index": 10, + "region_id": "DG", + "year": "2005", + "measure": "GEM001", + "value": 12340, + "statistic": "11111" + }, + { + "index": 11, + "region_id": "DG", + "year": "2006", + "measure": "GEM001", + "value": 12312, + "statistic": "11111" + }, + { + "index": 12, + "region_id": "DG", + "year": "2007", + "measure": "GEM001", + "value": 12263, + "statistic": "11111" + }, + { + "index": 13, + "region_id": "DG", + "year": "2008", + "measure": "GEM001", + "value": 12227, + "statistic": "11111" + }, + { + "index": 14, + "region_id": "DG", + "year": "2009", + "measure": "GEM001", + "value": 11993, + "statistic": "11111" + }, + { + "index": 15, + "region_id": "DG", + "year": "2010", + "measure": "GEM001", + "value": 11442, + "statistic": "11111" + }, + { + "index": 16, + "region_id": "DG", + "year": "2011", + "measure": "GEM001", + "value": 11292, + "statistic": "11111" + }, + { + "index": 17, + "region_id": "DG", + "year": "2012", + "measure": "GEM001", + "value": 11220, + "statistic": "11111" + }, + { + "index": 18, + "region_id": "DG", + "year": "2013", + "measure": "GEM001", + "value": 11161, + "statistic": "11111" + }, + { + "index": 19, + "region_id": "DG", + "year": "2014", + "measure": "GEM001", + "value": 11116, + "statistic": "11111" + }, + { + "index": 20, + "region_id": "DG", + "year": "2015", + "measure": "GEM001", + "value": 11092, + "statistic": "11111" + }, + { + "index": 21, + "region_id": "DG", + "year": "2016", + "measure": "GEM001", + "value": 11059, + "statistic": "11111" + }, + { + "index": 22, + "region_id": "DG", + "year": "2017", + "measure": "GEM001", + "value": 11054, + "statistic": "11111" + }, + { + "index": 23, + "region_id": "DG", + "year": "2018", + "measure": "GEM001", + "value": 11014, + "statistic": "11111" + } + ] +} diff --git a/package.json b/package.json index cf1b00b..af5f6e9 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,13 @@ "homepage": "https://github.com/datenguide/explorable_explanations#readme", "dependencies": { "clsx": "^1.1.0", + "d3-array": "^2.4.0", + "d3-axis": "^1.0.12", + "d3-line": "^0.0.1", "d3-request": "^1.0.6", + "d3-scale": "^3.2.1", + "d3-selection": "^1.4.1", + "d3-shape": "^1.3.7", "react-map-gl": "^5.2.5", "topojson": "^3.0.2" }, @@ -51,6 +57,19 @@ "@storybook/addon-links": "^5.3.18", "@storybook/addons": "^5.3.18", "@storybook/react": "^5.3.18", + "@types/babel__core": "^7.1.7", + "@types/babel__preset-env": "^7.9.0", + "@types/d3-axis": "^1.0.12", + "@types/d3-request": "^1.0.5", + "@types/d3-scale": "^2.2.0", + "@types/d3-selection": "^1.4.1", + "@types/eslint": "6.8.0", + "@types/prettier": "2.0.0", + "@types/react": "^16.9.35", + "@types/react-dom": "^16.9.8", + "@types/react-map-gl": "^5.2.3", + "@types/sass": "^1.16.0", + "@types/topojson": "^3.2.2", "babel-eslint": "10.1.0", "babel-loader": "^8.1.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", @@ -75,11 +94,6 @@ "sass-loader": "^8.0.2", "webpack-cli": "^3.3.11" }, - "peerDependencies": { - "react": "^16.13.1", - "react-dom": "^16.13.1", - "react-map-gl": "^5.2.5" - }, "eslintConfig": { "parser": "babel-eslint", "rules": { diff --git a/stories/3-LineChart.stories.js b/stories/3-LineChart.stories.js new file mode 100644 index 0000000..51b098a --- /dev/null +++ b/stories/3-LineChart.stories.js @@ -0,0 +1,20 @@ +import React from 'react' +import { LineChart } from '../components/LineChart' + +import rawData from '../data/district_count.json' + +export default { + title: 'LineChart', + component: LineChart, +} + +export const lineChart = () => { + return ( + e.value} + xAccessor={(e) => e.year} + aspectRatio={0.9} + /> + ) +} diff --git a/yarn.lock b/yarn.lock index 1087151..3c1f30c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -276,6 +276,11 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/parser@^7.1.0": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" + integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== + "@babel/parser@^7.7.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": version "7.9.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" @@ -877,6 +882,15 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/types@^7.0.0", "@babel/types@^7.3.0": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== + dependencies: + "@babel/helper-validator-identifier" "^7.9.5" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" @@ -1532,11 +1546,108 @@ resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== +"@types/babel__core@^7.1.7": + version "7.1.7" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89" + integrity sha512-RL62NqSFPCDK2FM1pSDH0scHpJvsXtZNiYlMB73DgPBaG1E38ZYVL+ei5EkWRbr+KC4YNiAUNBnRj+bgwpgjMw== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.1" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04" + integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__preset-env@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@types/babel__preset-env/-/babel__preset-env-7.9.0.tgz#9498eeb833ce9bd8324dd8a26a45886bc4426aa8" + integrity sha512-0W1P7wGyx1dSYFtwUoqc7IbtB50brA249GdfhwHbnPbrHM/aOM1NIMbzp290DaCowSnnRNnpMR8O4HU4dxYx0Q== + +"@types/babel__template@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" + integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.11.tgz#1ae3010e8bf8851d324878b42acec71986486d18" + integrity sha512-ddHK5icION5U6q11+tV2f9Mo6CZVuT8GJKld2q9LqHSZbvLbH34Kcu2yFGckZut453+eQU6btIA3RihmnRgI+Q== + dependencies: + "@babel/types" "^7.3.0" + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/d3-axis@^1.0.12": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@types/d3-axis/-/d3-axis-1.0.12.tgz#8c124edfcc02f3b3a9cdaa2a28b8a20341401799" + integrity sha512-BZISgSD5M8TgURyNtcPAmUB9sk490CO1Thb6/gIn0WZTt3Y50IssX+2Z0vTccoqZksUDTep0b+o4ofXslvNbqg== + dependencies: + "@types/d3-selection" "*" + +"@types/d3-dsv@*": + version "1.0.36" + resolved "https://registry.yarnpkg.com/@types/d3-dsv/-/d3-dsv-1.0.36.tgz#e91129d7c02b1b814838d001e921e8b9a67153d0" + integrity sha512-jbIWQ27QJcBNMZbQv0NSQMHnBDCmxghAxePxgyiPH1XPCRkOsTBei7jcdi3fDrUCGpCV3lKrSZFSlOkhUQVClA== + +"@types/d3-request@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/d3-request/-/d3-request-1.0.5.tgz#a2717ab95cd1e504662f52802aff1476af38cce4" + integrity sha512-X+/c/qXp92o056C5Qbcp7jL27YRHpmIqOchHb/WB7NwFFqkBtAircqO7oKWv2GTtX4LyEqiDF9gqXsV+ldOlIg== + dependencies: + "@types/d3-dsv" "*" + +"@types/d3-scale@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.2.0.tgz#e5987a2857365823eb26ed5eb21bc566c4dcf1c0" + integrity sha512-oQFanN0/PiR2oySHfj+zAAkK1/p4LD32Nt1TMVmzk+bYHk7vgIg/iTXQWitp1cIkDw4LMdcgvO63wL+mNs47YA== + dependencies: + "@types/d3-time" "*" + +"@types/d3-selection@*", "@types/d3-selection@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@types/d3-selection/-/d3-selection-1.4.1.tgz#fa1f8710a6b5d7cfe5c6caa61d161be7cae4a022" + integrity sha512-bv8IfFYo/xG6dxri9OwDnK3yCagYPeRIjTlrcdYJSx+FDWlCeBDepIHUpqROmhPtZ53jyna0aUajZRk0I3rXNA== + +"@types/d3-time@*": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-1.0.10.tgz#d338c7feac93a98a32aac875d1100f92c7b61f4f" + integrity sha512-aKf62rRQafDQmSiv1NylKhIMmznsjRN+MnXRXTqHoqm0U/UZzVpdrtRnSIfdiLS616OuC1soYeX1dBg2n1u8Xw== + +"@types/eslint@6.8.0": + version "6.8.0" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-6.8.0.tgz#5f2289b9f01316da7cf31c9e63109a10602a23cb" + integrity sha512-hqzmggoxkOubpgTdcOltkfc5N8IftRJqU70d1jbOISjjZVPvjcr+CLi2CI70hx1SUIRkLgpglTy9w28nGe2Hsw== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "0.0.44" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.44.tgz#980cc5a29a3ef3bea6ff1f7d021047d7ea575e21" + integrity sha512-iaIVzr+w2ZJ5HkidlZ3EJM8VTZb2MJLCjw3V+505yVts0gRC4UMvjw0d1HPtGqI/HQC/KdsYtayfzl+AXY2R8g== + +"@types/geojson@*": + version "7946.0.7" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.7.tgz#c8fa532b60a0042219cdf173ca21a975ef0666ad" + integrity sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ== + +"@types/gl-matrix@*": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@types/gl-matrix/-/gl-matrix-2.4.5.tgz#80630d88fb74ff8897a2a2855a8a700e6ee19d3e" + integrity sha512-0L8Mq1+oaIW0oVzGUDbSW+HnTjCNb4CmoIQE5BkoHt/A7x20z0MJ1PnwfH3atty/vbWLGgvJwVu2Mz3SKFiEFw== + "@types/history@*": version "4.7.5" resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.5.tgz#527d20ef68571a4af02ed74350164e7a67544860" @@ -1552,11 +1663,18 @@ resolved "https://registry.yarnpkg.com/@types/is-function/-/is-function-1.0.0.tgz#1b0b819b1636c7baf0d6785d030d12edf70c3e83" integrity sha512-iTs9HReBu7evG77Q4EC8hZnqRt57irBDkK9nvmHroiOIVwYMQc4IvYvdRgwKfYepunIY7Oh/dBuuld+Gj9uo6w== -"@types/json-schema@^7.0.3": +"@types/json-schema@*", "@types/json-schema@^7.0.3": version "7.0.4" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== +"@types/mapbox-gl@*": + version "1.9.1" + resolved "https://registry.yarnpkg.com/@types/mapbox-gl/-/mapbox-gl-1.9.1.tgz#78b62f8a1ead78bc525a4c1db84bb71fa0fcc579" + integrity sha512-5LS/fljbGjCPfjtOK5+pz8TT0PL4bBXTnN/PDbPtTQMqQdY/KWTWE4jRPuo0fL5wctd543DCptEUTydn+JK+gA== + dependencies: + "@types/geojson" "*" + "@types/minimatch@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1577,6 +1695,11 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== +"@types/prettier@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.0.0.tgz#dc85454b953178cc6043df5208b9e949b54a3bc4" + integrity sha512-/rM+sWiuOZ5dvuVzV37sUuklsbg+JPOP8d+nNFlo2ZtfpzPiPvh1/gc8liWOLBqe+sR+ZM7guPaIcTt6UZTo7Q== + "@types/prop-types@*": version "15.7.3" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" @@ -1595,6 +1718,23 @@ "@types/history" "*" "@types/react" "*" +"@types/react-dom@^16.9.8": + version "16.9.8" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.8.tgz#fe4c1e11dfc67155733dfa6aa65108b4971cb423" + integrity sha512-ykkPQ+5nFknnlU6lDd947WbQ6TE3NNzbQAkInC2EKY1qeYdTKp7onFusmYZb+ityzx2YviqT6BXSu+LyWWJwcA== + dependencies: + "@types/react" "*" + +"@types/react-map-gl@^5.2.3": + version "5.2.3" + resolved "https://registry.yarnpkg.com/@types/react-map-gl/-/react-map-gl-5.2.3.tgz#a18564c1056d22be36461ba94d7c1426dfe06402" + integrity sha512-SzFDgwCj2i+MoPtWbcWpamqC37vuxgz/guFhzK+DfhMSBueKVkaI8cJmH+XcBVp5RuliMgBWvCtFhmXy41jHjg== + dependencies: + "@types/geojson" "*" + "@types/mapbox-gl" "*" + "@types/react" "*" + "@types/viewport-mercator-project" "*" + "@types/react-syntax-highlighter@11.0.4": version "11.0.4" resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-11.0.4.tgz#d86d17697db62f98046874f62fdb3e53a0bbc4cd" @@ -1617,6 +1757,21 @@ "@types/prop-types" "*" csstype "^2.2.0" +"@types/react@^16.9.35": + version "16.9.35" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.35.tgz#a0830d172e8aadd9bd41709ba2281a3124bbd368" + integrity sha512-q0n0SsWcGc8nDqH2GJfWQWUOmZSJhXV64CjVN5SvcNti3TdEaA3AH0D8DwNmMdzjMAC/78tB8nAZIlV8yTz+zQ== + dependencies: + "@types/prop-types" "*" + csstype "^2.2.0" + +"@types/sass@^1.16.0": + version "1.16.0" + resolved "https://registry.yarnpkg.com/@types/sass/-/sass-1.16.0.tgz#b41ac1c17fa68ffb57d43e2360486ef526b3d57d" + integrity sha512-2XZovu4NwcqmtZtsBR5XYLw18T8cBCnU2USFHTnYLLHz9fkhnoEMoDsqShJIOFsFhn5aJHjweiUUdTrDGujegA== + dependencies: + "@types/node" "*" + "@types/source-list-map@*": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" @@ -1627,6 +1782,48 @@ resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.5.tgz#9adbc12950582aa65ead76bffdf39fe0c27a3c02" integrity sha512-/gG2M/Imw7cQFp8PGvz/SwocNrmKFjFsm5Pb8HdbHkZ1K8pmuPzOX4VeVoiEecFCVf4CsN1r3/BRvx+6sNqwtQ== +"@types/topojson-client@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/topojson-client/-/topojson-client-3.0.0.tgz#2517fae5abbdd3052eb191747c7d0bc268d69918" + integrity sha512-HZH6E8XMhjkDEkkpe3HuIg95COuvjdnyy0EKrh8rAi1f6o/V6P3ly1kGyU2E8bpAffXDd2r+Rk5ceMX4XkqHnA== + dependencies: + "@types/geojson" "*" + "@types/topojson-specification" "*" + +"@types/topojson-server@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/topojson-server/-/topojson-server-3.0.0.tgz#b668fc808831763320db8f3b339ee168c2e2e5dc" + integrity sha512-OdIgHf+9hbEOdrZEoIaE6staRbCyssznjtggIySUqvWOk9xWK0lodLnn7ks3l8H+wgMTgelEXqyBmAtlyn0fvA== + dependencies: + "@types/geojson" "*" + "@types/topojson-specification" "*" + +"@types/topojson-simplify@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/topojson-simplify/-/topojson-simplify-3.0.0.tgz#54ad7e2f172c662c07ad390e5cf965c147093e65" + integrity sha512-hfrvjZ/KbdAFBgJzdPfkixHgMNbhRvvFSCIOga1rAeluksFV9sSTWx+N4vZymqcfz1J+yMZfP2SCRt+/DHsJCQ== + dependencies: + "@types/geojson" "*" + "@types/topojson-specification" "*" + +"@types/topojson-specification@*": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/topojson-specification/-/topojson-specification-1.0.1.tgz#a80cb294290b79f2d674d3f5938c544ed2bd9d80" + integrity sha512-ZZYZUgkmUls9Uhxx2WZNt9f/h2+H3abUUjOVmq+AaaDFckC5oAwd+MDp95kBirk+XCXrYj0hfpI6DSUiJMrpYQ== + dependencies: + "@types/geojson" "*" + +"@types/topojson@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@types/topojson/-/topojson-3.2.2.tgz#96136313ba6a1df3df8931b722400828e027ee94" + integrity sha512-CwIJKe3YmNZ4oMcjJ//+8IXe6YA+znX6DXe0alCEoMoiWEM97QfjuP9BhPdvSU4pa0ZgghYJYtKcTprZhJm7Kw== + dependencies: + "@types/geojson" "*" + "@types/topojson-client" "*" + "@types/topojson-server" "*" + "@types/topojson-simplify" "*" + "@types/topojson-specification" "*" + "@types/uglify-js@*": version "3.9.0" resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.9.0.tgz#4490a140ca82aa855ad68093829e7fd6ae94ea87" @@ -1634,6 +1831,13 @@ dependencies: source-map "^0.6.1" +"@types/viewport-mercator-project@*": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@types/viewport-mercator-project/-/viewport-mercator-project-6.1.0.tgz#df6964a08daa18e24761e38320d34429f09898cf" + integrity sha512-wbdVb9Uvb9dX/EAtugpD3tMqsBVFQqVFYNdK5B7wUhZHK8G2gMWd+wq14JEn2h96Yq4trDQrpWVna8S8FTLM8A== + dependencies: + "@types/gl-matrix" "*" + "@types/webpack-env@^1.15.0": version "1.15.1" resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.1.tgz#c8e84705e08eed430b5e15b39c65b0944e4d1422" @@ -3943,11 +4147,26 @@ cyclist@^1.0.1: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= +"d3-array@1.2.0 - 2", d3-array@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-2.4.0.tgz#87f8b9ad11088769c82b5ea846bcb1cc9393f242" + integrity sha512-KQ41bAF2BMakf/HdKT865ALd4cgND6VcIztVQZUTt0+BH3RWy6ZYnHghVXf6NFjt2ritLr8H1T8LreAAlfiNcw== + +d3-axis@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-1.0.12.tgz#cdf20ba210cfbb43795af33756886fb3638daac9" + integrity sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ== + d3-collection@1: version "1.0.7" resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e" integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A== +d3-color@1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a" + integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q== + d3-dispatch@1: version "1.0.6" resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.6.tgz#00d37bcee4dd8cd97729dd893a0ac29caaba5d58" @@ -3962,6 +4181,30 @@ d3-dsv@1: iconv-lite "0.4" rw "1" +d3-format@1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.4.tgz#356925f28d0fd7c7983bfad593726fce46844030" + integrity sha512-TWks25e7t8/cqctxCmxpUuzZN11QxIA7YrMbram94zMQ0PXjE4LVIMe/f6a4+xxL8HQ3OsAFULOINQi1pE62Aw== + +d3-interpolate@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987" + integrity sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA== + dependencies: + d3-color "1" + +d3-line@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/d3-line/-/d3-line-0.0.1.tgz#417091aa2a84792a3d50a09c60098c50b0714a89" + integrity sha1-QXCRqiqEeSo9UKCcYAmMULBxSok= + dependencies: + d3 "^3.5.16" + +d3-path@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" + integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== + d3-request@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/d3-request/-/d3-request-1.0.6.tgz#a1044a9ef4ec28c824171c9379fae6d79474b19f" @@ -3972,6 +4215,46 @@ d3-request@^1.0.6: d3-dsv "1" xmlhttprequest "1" +d3-scale@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-3.2.1.tgz#da1684adce7261b4bc7a76fe193d887f0e909e69" + integrity sha512-huz5byJO/6MPpz6Q8d4lg7GgSpTjIZW/l+1MQkzKfu2u8P6hjaXaStOpmyrD6ymKoW87d2QVFCKvSjLwjzx/rA== + dependencies: + d3-array "1.2.0 - 2" + d3-format "1" + d3-interpolate "^1.2.0" + d3-time "1" + d3-time-format "2" + +d3-selection@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.1.tgz#98eedbbe085fbda5bafa2f9e3f3a2f4d7d622a98" + integrity sha512-BTIbRjv/m5rcVTfBs4AMBLKs4x8XaaLkwm28KWu9S2vKNqXkXt2AH2Qf0sdPZHjFxcWg/YL53zcqAz+3g4/7PA== + +d3-shape@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" + integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== + dependencies: + d3-path "1" + +d3-time-format@2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.2.3.tgz#0c9a12ee28342b2037e5ea1cf0b9eb4dd75f29cb" + integrity sha512-RAHNnD8+XvC4Zc4d2A56Uw0yJoM7bsvOlJR33bclxq399Rak/b9bhvu/InjxdWhPtkgU53JJcleJTGkNRnN6IA== + dependencies: + d3-time "1" + +d3-time@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1" + integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== + +d3@^3.5.16: + version "3.5.17" + resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" + integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"