@undp/data-viz 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +45 -45
- package/dist/index.js +9179 -9082
- package/dist/index.umd.js +46 -46
- package/package.json +173 -173
- package/readme.md +6 -7
package/package.json
CHANGED
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@undp/data-viz",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "./dist/index.cjs",
|
|
5
|
-
"module": "./dist/index.js",
|
|
6
|
-
"browser": "./dist/index.umd.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist/index.js",
|
|
10
|
-
"dist/index.cjs",
|
|
11
|
-
"dist/index.umd.js",
|
|
12
|
-
"dist/index.d.ts",
|
|
13
|
-
"dist/style.css"
|
|
14
|
-
],
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"require": "./dist/index.cjs",
|
|
18
|
-
"import": "./dist/index.js"
|
|
19
|
-
},
|
|
20
|
-
"./dist/style.css": {
|
|
21
|
-
"import": "./dist/style.css",
|
|
22
|
-
"require": "./dist/style.css"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"publishConfig": {
|
|
26
|
-
"access": "public"
|
|
27
|
-
},
|
|
28
|
-
"type": "module",
|
|
29
|
-
"description": "The open source graphing library build by UNDP",
|
|
30
|
-
"private": false,
|
|
31
|
-
"repository": {
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/UNDP-Data/
|
|
34
|
-
},
|
|
35
|
-
"author": "United Nations Development Programme",
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/UNDP-Data/
|
|
39
|
-
},
|
|
40
|
-
"homepage": "https://
|
|
41
|
-
"scripts": {
|
|
42
|
-
"dev": "vite",
|
|
43
|
-
"build": "tsc && vite build",
|
|
44
|
-
"preview": "vite preview",
|
|
45
|
-
"storybook": "storybook dev -p 6006",
|
|
46
|
-
"build-storybook": "storybook build",
|
|
47
|
-
"clean": "rimraf node_modules && rimraf dist"
|
|
48
|
-
},
|
|
49
|
-
"keywords": [
|
|
50
|
-
"UNDP",
|
|
51
|
-
"United Nations",
|
|
52
|
-
"React",
|
|
53
|
-
"visualization",
|
|
54
|
-
"data visualization",
|
|
55
|
-
"graphing",
|
|
56
|
-
"plotting",
|
|
57
|
-
"graphs",
|
|
58
|
-
"maps"
|
|
59
|
-
],
|
|
60
|
-
"dependencies": {
|
|
61
|
-
"@dnd-kit/core": "^6.3.1",
|
|
62
|
-
"@dnd-kit/modifiers": "^9.0.0",
|
|
63
|
-
"@undp/design-system-react": "^0.0.1",
|
|
64
|
-
"ajv": "^8.17.1",
|
|
65
|
-
"d3-array": "^3.2.4",
|
|
66
|
-
"d3-delaunay": "^6.0.4",
|
|
67
|
-
"d3-force": "^3.0.0",
|
|
68
|
-
"d3-format": "^3.1.0",
|
|
69
|
-
"d3-geo": "^3.1.1",
|
|
70
|
-
"d3-hierarchy": "^3.1.2",
|
|
71
|
-
"d3-sankey": "^0.12.3",
|
|
72
|
-
"d3-scale": "^4.0.2",
|
|
73
|
-
"d3-selection": "^3.0.0",
|
|
74
|
-
"d3-shape": "^3.2.0",
|
|
75
|
-
"d3-zoom": "^3.0.0",
|
|
76
|
-
"date-fns": "^4.1.0",
|
|
77
|
-
"dom-to-svg": "^0.12.2",
|
|
78
|
-
"fast-deep-equal": "^3.1.3",
|
|
79
|
-
"file-saver": "^2.0.5",
|
|
80
|
-
"handlebars": "^4.7.8",
|
|
81
|
-
"html2canvas": "^1.4.1",
|
|
82
|
-
"lodash.flattendeep": "^4.4.0",
|
|
83
|
-
"lodash.groupby": "^4.6.0",
|
|
84
|
-
"lodash.intersection": "^4.4.0",
|
|
85
|
-
"lodash.max": "^4.0.1",
|
|
86
|
-
"lodash.maxby": "^4.6.0",
|
|
87
|
-
"lodash.min": "^4.0.1",
|
|
88
|
-
"lodash.minby": "^4.6.0",
|
|
89
|
-
"lodash.orderby": "^4.6.0",
|
|
90
|
-
"lodash.sortby": "^4.7.0",
|
|
91
|
-
"lodash.sum": "^4.0.2",
|
|
92
|
-
"lodash.uniq": "^4.5.0",
|
|
93
|
-
"lodash.uniqby": "^4.7.0",
|
|
94
|
-
"marked": "^15.0.8",
|
|
95
|
-
"math-expression-evaluator": "^2.0.6",
|
|
96
|
-
"motion": "^12.7.4",
|
|
97
|
-
"papaparse": "^5.5.2",
|
|
98
|
-
"pmtiles": "^4.3.0",
|
|
99
|
-
"react-csv": "^2.2.2",
|
|
100
|
-
"simple-statistics": "^7.8.8",
|
|
101
|
-
"xss": "^1.0.15"
|
|
102
|
-
},
|
|
103
|
-
"peerDependencies": {
|
|
104
|
-
"maplibre-gl": "^5.3.1",
|
|
105
|
-
"react": "^19.1.0",
|
|
106
|
-
"react-dom": "^19.1.0",
|
|
107
|
-
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
108
|
-
},
|
|
109
|
-
"devDependencies": {
|
|
110
|
-
"@chromatic-com/storybook": "^3.2.6",
|
|
111
|
-
"@storybook/addon-essentials": "^8.6.11",
|
|
112
|
-
"@storybook/addon-interactions": "^8.6.11",
|
|
113
|
-
"@storybook/addon-onboarding": "^8.6.11",
|
|
114
|
-
"@storybook/blocks": "^8.6.11",
|
|
115
|
-
"@storybook/react": "^8.6.11",
|
|
116
|
-
"@storybook/react-vite": "^8.6.11",
|
|
117
|
-
"@storybook/test": "^8.6.12",
|
|
118
|
-
"@types/d3-array": "^3.0.5",
|
|
119
|
-
"@types/d3-delaunay": "^6.0.4",
|
|
120
|
-
"@types/d3-force": "^3.0.10",
|
|
121
|
-
"@types/d3-format": "^3.0.1",
|
|
122
|
-
"@types/d3-geo": "^3.0.3",
|
|
123
|
-
"@types/d3-hierarchy": "^3.1.7",
|
|
124
|
-
"@types/d3-sankey": "^0.12.4",
|
|
125
|
-
"@types/d3-scale": "^4.0.3",
|
|
126
|
-
"@types/d3-selection": "^3.0.5",
|
|
127
|
-
"@types/d3-shape": "^3.1.1",
|
|
128
|
-
"@types/d3-zoom": "^3.0.3",
|
|
129
|
-
"@types/dom-to-image": "^2.6.4",
|
|
130
|
-
"@types/file-saver": "^2.0.5",
|
|
131
|
-
"@types/lodash.flattendeep": "^4.4.9",
|
|
132
|
-
"@types/lodash.groupby": "^4.6.9",
|
|
133
|
-
"@types/lodash.intersection": "^4.4.9",
|
|
134
|
-
"@types/lodash.isequal": "^4.5.8",
|
|
135
|
-
"@types/lodash.max": "^4.0.7",
|
|
136
|
-
"@types/lodash.maxby": "^4.6.7",
|
|
137
|
-
"@types/lodash.min": "^4.0.7",
|
|
138
|
-
"@types/lodash.minby": "^4.6.7",
|
|
139
|
-
"@types/lodash.orderby": "^4.6.9",
|
|
140
|
-
"@types/lodash.sortby": "^4.7.7",
|
|
141
|
-
"@types/lodash.sum": "^4.0.7",
|
|
142
|
-
"@types/lodash.uniq": "^4.5.9",
|
|
143
|
-
"@types/lodash.uniqby": "^4.7.7",
|
|
144
|
-
"@types/math-expression-evaluator": "^1.3.3",
|
|
145
|
-
"@types/node": "^20.14.10",
|
|
146
|
-
"@types/papaparse": "^5.3.14",
|
|
147
|
-
"@types/react": "^18.0.27",
|
|
148
|
-
"@types/react-csv": "^1.1.3",
|
|
149
|
-
"@types/react-dom": "^18.0.10",
|
|
150
|
-
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
151
|
-
"@typescript-eslint/parser": "^8.30.1",
|
|
152
|
-
"@vitejs/plugin-react": "^4.4.0",
|
|
153
|
-
"eslint": "^9.25.0",
|
|
154
|
-
"eslint-config-love": "^119.0.0",
|
|
155
|
-
"eslint-config-prettier": "^10.1.2",
|
|
156
|
-
"eslint-plugin-import": "^2.31.0",
|
|
157
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
158
|
-
"eslint-plugin-n": "^17.17.0",
|
|
159
|
-
"eslint-plugin-prettier": "^5.2.6",
|
|
160
|
-
"eslint-plugin-promise": "^7.2.1",
|
|
161
|
-
"eslint-plugin-react": "^7.37.5",
|
|
162
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
163
|
-
"eslint-plugin-storybook": "^0.12.0",
|
|
164
|
-
"prettier": "^3.5.3",
|
|
165
|
-
"react-docgen-typescript": "^2.2.2",
|
|
166
|
-
"rimraf": "^6.0.1",
|
|
167
|
-
"storybook": "^8.6.12",
|
|
168
|
-
"typescript": "^5.7.3",
|
|
169
|
-
"vite": "^6.3.2",
|
|
170
|
-
"vite-plugin-dts": "^4.5.3",
|
|
171
|
-
"vite-plugin-eslint": "^1.8.1"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@undp/data-viz",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"main": "./dist/index.cjs",
|
|
5
|
+
"module": "./dist/index.js",
|
|
6
|
+
"browser": "./dist/index.umd.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/index.js",
|
|
10
|
+
"dist/index.cjs",
|
|
11
|
+
"dist/index.umd.js",
|
|
12
|
+
"dist/index.d.ts",
|
|
13
|
+
"dist/style.css"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./dist/style.css": {
|
|
21
|
+
"import": "./dist/style.css",
|
|
22
|
+
"require": "./dist/style.css"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"description": "The open source graphing library build by UNDP",
|
|
30
|
+
"private": false,
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/UNDP-Data/undp-visualization-library.git"
|
|
34
|
+
},
|
|
35
|
+
"author": "United Nations Development Programme",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/UNDP-Data/undp-visualization-library/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://jolly-field-038560703.6.azurestaticapps.net/",
|
|
41
|
+
"scripts": {
|
|
42
|
+
"dev": "vite",
|
|
43
|
+
"build": "tsc && vite build",
|
|
44
|
+
"preview": "vite preview",
|
|
45
|
+
"storybook": "storybook dev -p 6006",
|
|
46
|
+
"build-storybook": "storybook build",
|
|
47
|
+
"clean": "rimraf node_modules && rimraf dist"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"UNDP",
|
|
51
|
+
"United Nations",
|
|
52
|
+
"React",
|
|
53
|
+
"visualization",
|
|
54
|
+
"data visualization",
|
|
55
|
+
"graphing",
|
|
56
|
+
"plotting",
|
|
57
|
+
"graphs",
|
|
58
|
+
"maps"
|
|
59
|
+
],
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@dnd-kit/core": "^6.3.1",
|
|
62
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
63
|
+
"@undp/design-system-react": "^0.0.1",
|
|
64
|
+
"ajv": "^8.17.1",
|
|
65
|
+
"d3-array": "^3.2.4",
|
|
66
|
+
"d3-delaunay": "^6.0.4",
|
|
67
|
+
"d3-force": "^3.0.0",
|
|
68
|
+
"d3-format": "^3.1.0",
|
|
69
|
+
"d3-geo": "^3.1.1",
|
|
70
|
+
"d3-hierarchy": "^3.1.2",
|
|
71
|
+
"d3-sankey": "^0.12.3",
|
|
72
|
+
"d3-scale": "^4.0.2",
|
|
73
|
+
"d3-selection": "^3.0.0",
|
|
74
|
+
"d3-shape": "^3.2.0",
|
|
75
|
+
"d3-zoom": "^3.0.0",
|
|
76
|
+
"date-fns": "^4.1.0",
|
|
77
|
+
"dom-to-svg": "^0.12.2",
|
|
78
|
+
"fast-deep-equal": "^3.1.3",
|
|
79
|
+
"file-saver": "^2.0.5",
|
|
80
|
+
"handlebars": "^4.7.8",
|
|
81
|
+
"html2canvas": "^1.4.1",
|
|
82
|
+
"lodash.flattendeep": "^4.4.0",
|
|
83
|
+
"lodash.groupby": "^4.6.0",
|
|
84
|
+
"lodash.intersection": "^4.4.0",
|
|
85
|
+
"lodash.max": "^4.0.1",
|
|
86
|
+
"lodash.maxby": "^4.6.0",
|
|
87
|
+
"lodash.min": "^4.0.1",
|
|
88
|
+
"lodash.minby": "^4.6.0",
|
|
89
|
+
"lodash.orderby": "^4.6.0",
|
|
90
|
+
"lodash.sortby": "^4.7.0",
|
|
91
|
+
"lodash.sum": "^4.0.2",
|
|
92
|
+
"lodash.uniq": "^4.5.0",
|
|
93
|
+
"lodash.uniqby": "^4.7.0",
|
|
94
|
+
"marked": "^15.0.8",
|
|
95
|
+
"math-expression-evaluator": "^2.0.6",
|
|
96
|
+
"motion": "^12.7.4",
|
|
97
|
+
"papaparse": "^5.5.2",
|
|
98
|
+
"pmtiles": "^4.3.0",
|
|
99
|
+
"react-csv": "^2.2.2",
|
|
100
|
+
"simple-statistics": "^7.8.8",
|
|
101
|
+
"xss": "^1.0.15"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"maplibre-gl": "^5.3.1",
|
|
105
|
+
"react": "^19.1.0",
|
|
106
|
+
"react-dom": "^19.1.0",
|
|
107
|
+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
108
|
+
},
|
|
109
|
+
"devDependencies": {
|
|
110
|
+
"@chromatic-com/storybook": "^3.2.6",
|
|
111
|
+
"@storybook/addon-essentials": "^8.6.11",
|
|
112
|
+
"@storybook/addon-interactions": "^8.6.11",
|
|
113
|
+
"@storybook/addon-onboarding": "^8.6.11",
|
|
114
|
+
"@storybook/blocks": "^8.6.11",
|
|
115
|
+
"@storybook/react": "^8.6.11",
|
|
116
|
+
"@storybook/react-vite": "^8.6.11",
|
|
117
|
+
"@storybook/test": "^8.6.12",
|
|
118
|
+
"@types/d3-array": "^3.0.5",
|
|
119
|
+
"@types/d3-delaunay": "^6.0.4",
|
|
120
|
+
"@types/d3-force": "^3.0.10",
|
|
121
|
+
"@types/d3-format": "^3.0.1",
|
|
122
|
+
"@types/d3-geo": "^3.0.3",
|
|
123
|
+
"@types/d3-hierarchy": "^3.1.7",
|
|
124
|
+
"@types/d3-sankey": "^0.12.4",
|
|
125
|
+
"@types/d3-scale": "^4.0.3",
|
|
126
|
+
"@types/d3-selection": "^3.0.5",
|
|
127
|
+
"@types/d3-shape": "^3.1.1",
|
|
128
|
+
"@types/d3-zoom": "^3.0.3",
|
|
129
|
+
"@types/dom-to-image": "^2.6.4",
|
|
130
|
+
"@types/file-saver": "^2.0.5",
|
|
131
|
+
"@types/lodash.flattendeep": "^4.4.9",
|
|
132
|
+
"@types/lodash.groupby": "^4.6.9",
|
|
133
|
+
"@types/lodash.intersection": "^4.4.9",
|
|
134
|
+
"@types/lodash.isequal": "^4.5.8",
|
|
135
|
+
"@types/lodash.max": "^4.0.7",
|
|
136
|
+
"@types/lodash.maxby": "^4.6.7",
|
|
137
|
+
"@types/lodash.min": "^4.0.7",
|
|
138
|
+
"@types/lodash.minby": "^4.6.7",
|
|
139
|
+
"@types/lodash.orderby": "^4.6.9",
|
|
140
|
+
"@types/lodash.sortby": "^4.7.7",
|
|
141
|
+
"@types/lodash.sum": "^4.0.7",
|
|
142
|
+
"@types/lodash.uniq": "^4.5.9",
|
|
143
|
+
"@types/lodash.uniqby": "^4.7.7",
|
|
144
|
+
"@types/math-expression-evaluator": "^1.3.3",
|
|
145
|
+
"@types/node": "^20.14.10",
|
|
146
|
+
"@types/papaparse": "^5.3.14",
|
|
147
|
+
"@types/react": "^18.0.27",
|
|
148
|
+
"@types/react-csv": "^1.1.3",
|
|
149
|
+
"@types/react-dom": "^18.0.10",
|
|
150
|
+
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
151
|
+
"@typescript-eslint/parser": "^8.30.1",
|
|
152
|
+
"@vitejs/plugin-react": "^4.4.0",
|
|
153
|
+
"eslint": "^9.25.0",
|
|
154
|
+
"eslint-config-love": "^119.0.0",
|
|
155
|
+
"eslint-config-prettier": "^10.1.2",
|
|
156
|
+
"eslint-plugin-import": "^2.31.0",
|
|
157
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
158
|
+
"eslint-plugin-n": "^17.17.0",
|
|
159
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
160
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
161
|
+
"eslint-plugin-react": "^7.37.5",
|
|
162
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
163
|
+
"eslint-plugin-storybook": "^0.12.0",
|
|
164
|
+
"prettier": "^3.5.3",
|
|
165
|
+
"react-docgen-typescript": "^2.2.2",
|
|
166
|
+
"rimraf": "^6.0.1",
|
|
167
|
+
"storybook": "^8.6.12",
|
|
168
|
+
"typescript": "^5.7.3",
|
|
169
|
+
"vite": "^6.3.2",
|
|
170
|
+
"vite-plugin-dts": "^4.5.3",
|
|
171
|
+
"vite-plugin-eslint": "^1.8.1"
|
|
172
|
+
}
|
|
173
|
+
}
|
package/readme.md
CHANGED
|
@@ -9,25 +9,25 @@ Detailed documentation can be found [here](https://orange-bay-04736e710.4.azures
|
|
|
9
9
|
### Installation
|
|
10
10
|
__Using npm__
|
|
11
11
|
```
|
|
12
|
-
npm i @undp
|
|
12
|
+
npm i @undp/data-viz
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
__Using yarn__
|
|
17
17
|
```
|
|
18
|
-
yarn add @undp
|
|
18
|
+
yarn add @undp/data-viz
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### Import
|
|
22
22
|
It is recommended to import what you need and the use it. For example, import the `HorizontalBarGraph` like this:
|
|
23
23
|
```
|
|
24
|
-
import { HorizontalBarGraph } from '@undp
|
|
24
|
+
import { HorizontalBarGraph } from '@undp/data-viz'
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
It is also recommended to import the css because some setting expect the CSS to be imported to look good. You can import the css file like this:
|
|
29
29
|
```
|
|
30
|
-
import '@undp
|
|
30
|
+
import '@undp/data-viz/dist/style.css';
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
### TypeScript
|
|
@@ -49,7 +49,6 @@ The dependencies that are pre-installed wit the library:
|
|
|
49
49
|
* Various Lodash libraries - For array and data manipulation
|
|
50
50
|
* lodash.flattendeep
|
|
51
51
|
* lodash.intersection
|
|
52
|
-
* lodash.isequal
|
|
53
52
|
* lodash.max
|
|
54
53
|
* lodash.maxby
|
|
55
54
|
* lodash.min
|
|
@@ -62,8 +61,8 @@ The dependencies that are pre-installed wit the library:
|
|
|
62
61
|
* maplibre-gl - For Maplibre maps
|
|
63
62
|
* pmtiles - For adding pmtiles to Maplibre maps
|
|
64
63
|
* papaparse - For loading and parsing csv from links
|
|
65
|
-
*
|
|
66
|
-
*
|
|
64
|
+
* motion - For creating animations in the animated graphs
|
|
65
|
+
* dnd-kit - For creating comparison maps
|
|
67
66
|
* simple-statistics - For statistical functions
|
|
68
67
|
* xss - For cleaning up cross scripting from user-submitted HTML
|
|
69
68
|
* ajv - For schema validation
|