eurostat-map 4.3.58 → 4.4.1
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/README.md +113 -49
- package/build/215.eurostatmap.min.js +1 -1
- package/build/215.eurostatmap.min.js.map +1 -1
- package/build/eurostatmap.js +11757 -12996
- package/build/eurostatmap.min.js +2 -4
- package/build/eurostatmap.min.js.map +1 -1
- package/build/package.json +87 -0
- package/build/types/core/DorlingSettings.d.ts +29 -0
- package/build/types/core/GridCartogramSettings.d.ts +30 -0
- package/build/types/core/InsetConfig.d.ts +23 -0
- package/build/types/core/MapConfig.d.ts +95 -0
- package/build/types/core/MapInstance.d.ts +349 -0
- package/build/types/core/MinimapConfig.d.ts +11 -0
- package/build/types/core/TooltipConfig.d.ts +16 -0
- package/build/types/core/decoration/CoastalMarginSettings.d.ts +21 -0
- package/build/types/core/decoration/ScalebarConfig.d.ts +48 -0
- package/build/types/core/decoration/StampConfig.d.ts +71 -0
- package/build/types/core/geo/centroids.d.ts +33 -0
- package/build/types/core/geo/geometries.d.ts +71 -0
- package/build/types/core/geo/kosovo.d.ts +12 -0
- package/build/types/core/geo/proj4.d.ts +26 -0
- package/build/types/core/geo/projection.d.ts +29 -0
- package/build/types/core/insets.d.ts +16 -0
- package/build/types/core/layout.d.ts +23 -0
- package/build/types/core/locations.d.ts +55 -0
- package/build/types/core/minimaps.d.ts +20 -0
- package/build/types/core/scale.d.ts +30 -0
- package/build/types/core/stat/StatConfig.d.ts +27 -0
- package/build/types/core/stat/StatData.d.ts +113 -0
- package/build/types/core/utils.d.ts +198 -0
- package/build/types/core/zoom.d.ts +21 -0
- package/build/types/index.d.ts +253 -0
- package/build/types/legend/CategoricalLegendConfig.d.ts +13 -0
- package/build/types/legend/CoxcombLegendConfig.d.ts +85 -0
- package/build/types/legend/LegendConfig.d.ts +51 -0
- package/build/types/legend/MushroomLegendConfig.d.ts +56 -0
- package/build/types/legend/PatternFillLegendConfig.d.ts +11 -0
- package/build/types/legend/PieChartLegendConfig.d.ts +68 -0
- package/build/types/legend/SparklineLegendConfig.d.ts +6 -0
- package/build/types/legend/StripeCompositionLegendConfig.d.ts +11 -0
- package/build/types/legend/WaffleLegendConfig.d.ts +74 -0
- package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +59 -0
- package/build/types/legend/choropleth/ChoroplethLegendConfig.d.ts +0 -0
- package/build/types/legend/choropleth/HistogramLegendConfig.d.ts +26 -0
- package/build/types/legend/choropleth/TrivariateLegendConfig.d.ts +32 -0
- package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +2 -0
- package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +2 -0
- package/build/types/legend/choropleth/legend-choropleth.d.ts +2 -0
- package/build/types/legend/composition/BarChartLegendConfig.d.ts +68 -0
- package/build/types/legend/composition/CoxcombLegendConfig.d.ts +85 -0
- package/build/types/legend/composition/PieChartLegendConfig.d.ts +68 -0
- package/build/types/legend/composition/SparklineLegendConfig.d.ts +94 -0
- package/build/types/legend/composition/StripeCompositionLegendConfig.d.ts +11 -0
- package/build/types/legend/composition/WaffleLegendConfig.d.ts +74 -0
- package/build/types/legend/composition/legend-bar-chart.d.ts +2 -0
- package/build/types/legend/flow/FlowLegendConfig.d.ts +0 -0
- package/build/types/legend/flow/FlowMapLegendConfig.d.ts +117 -0
- package/build/types/legend/flow/legend-flow.d.ts +2 -0
- package/build/types/legend/legend-categorical.d.ts +2 -0
- package/build/types/legend/legend-continuous.d.ts +2 -0
- package/build/types/legend/legend-discrete.d.ts +2 -0
- package/build/types/legend/legend.d.ts +13 -0
- package/build/types/legend/proportional-symbol/PropSymbolLegendConfig.d.ts +0 -0
- package/build/types/legend/proportional-symbol/ProportionalSymbolsLegendConfig.d.ts +134 -0
- package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +2 -0
- package/build/types/map-types/CategoricalMap.d.ts +21 -0
- package/build/types/map-types/CategoricalMapConfig.d.ts +11 -0
- package/build/types/map-types/CateogricalMapConfig.d.ts +11 -0
- package/build/types/map-types/MapType.d.ts +34 -0
- package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +23 -0
- package/build/types/map-types/choropleth/BivariateChoroplethMap.d.ts +39 -0
- package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +35 -0
- package/build/types/map-types/choropleth/ChoroplethMap.d.ts +48 -0
- package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +28 -0
- package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +15 -0
- package/build/types/map-types/choropleth/ValueByAlphaConfig.d.ts +8 -0
- package/build/types/map-types/choropleth/ValueByAlphaMap.d.ts +9 -0
- package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +4 -0
- package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +4 -0
- package/build/types/map-types/choropleth/map-choropleth.d.ts +47 -0
- package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +4 -0
- package/build/types/map-types/composition/BarMap.d.ts +86 -0
- package/build/types/map-types/composition/BarMapConfig.d.ts +30 -0
- package/build/types/map-types/composition/CompositionStatConfig.d.ts +34 -0
- package/build/types/map-types/composition/CoxcombMap.d.ts +42 -0
- package/build/types/map-types/composition/CoxcombMapConfig.d.ts +18 -0
- package/build/types/map-types/composition/PieMap.d.ts +62 -0
- package/build/types/map-types/composition/PieMapConfig.d.ts +24 -0
- package/build/types/map-types/composition/SparkMap.d.ts +46 -0
- package/build/types/map-types/composition/SparkMapConfig.d.ts +25 -0
- package/build/types/map-types/composition/StripeMap.d.ts +43 -0
- package/build/types/map-types/composition/StripeMapConfig.d.ts +16 -0
- package/build/types/map-types/composition/WaffleMap.d.ts +71 -0
- package/build/types/map-types/composition/WaffleMapConfig.d.ts +25 -0
- package/build/types/map-types/composition/bar/BarMap.d.ts +79 -0
- package/build/types/map-types/composition/bar/BarMapConfig.d.ts +54 -0
- package/build/types/map-types/composition/composition-map.d.ts +25 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +46 -0
- package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +32 -0
- package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +16 -0
- package/build/types/map-types/composition/map-bar.d.ts +5 -0
- package/build/types/map-types/composition/map-coxcomb.d.ts +5 -0
- package/build/types/map-types/composition/map-pie.d.ts +10 -0
- package/build/types/map-types/composition/map-spark.d.ts +5 -0
- package/build/types/map-types/composition/map-stripe.d.ts +5 -0
- package/build/types/map-types/composition/map-waffle.d.ts +5 -0
- package/build/types/map-types/composition/pie/PieMap.d.ts +69 -0
- package/build/types/map-types/composition/pie/PieMapConfig.d.ts +42 -0
- package/build/types/map-types/composition/stripe/StripeMap.d.ts +52 -0
- package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +28 -0
- package/build/types/map-types/composition/waffle/WaffleMap.d.ts +78 -0
- package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +44 -0
- package/build/types/map-types/flow/FlowMap.d.ts +97 -0
- package/build/types/map-types/flow/FlowMapConfig.d.ts +158 -0
- package/build/types/map-types/flow/map-flow.d.ts +5 -0
- package/build/types/map-types/map-categorical.d.ts +19 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +17 -0
- package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +90 -0
- package/build/types/map-types/proportional-symbol/map-proportional-symbols.d.ts +35 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +30 -0
- package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +20 -0
- package/build/types/map-types/spark/SparkMap.d.ts +52 -0
- package/build/types/map-types/spark/SparkMapConfig.d.ts +42 -0
- package/build/types/map-types/spark/SparkStatConfig.d.ts +16 -0
- package/build/types/utils/FillPatternOptions.d.ts +17 -0
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -4,22 +4,35 @@
|
|
|
4
4
|
<img src="https://img.shields.io/badge/license-EUPL-success" alt="license">
|
|
5
5
|
<a href="http://www.awesomeofficialstatistics.org"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Official Statistics"></a>
|
|
6
6
|
</div>
|
|
7
|
+
|
|
8
|
+
# eurostat-map: JavaScript & TypeScript Mapping Library for Eurostat Data
|
|
9
|
+
|
|
7
10
|
<br>
|
|
8
11
|
<div align="center">
|
|
9
12
|
<img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/eurostat-map-logo-cropped.png" alt="examples" width="400"/>
|
|
10
13
|
</div>
|
|
11
14
|
<div align="center">
|
|
12
|
-
<em>
|
|
15
|
+
<em>Build publication-ready statistical maps of Europe in minutes.</em>
|
|
13
16
|
</div>
|
|
14
17
|
|
|
15
|
-
<hr>
|
|
16
|
-
|
|
17
18
|
<div align="center">
|
|
18
|
-
|
|
19
|
+
<strong>D3-based mapping library for Eurostat and custom data, with built-in map types for analytical storytelling.</strong>
|
|
19
20
|
</div>
|
|
21
|
+
|
|
20
22
|
<div align="center">
|
|
21
|
-
|
|
23
|
+
<a href="docs/reference.md"><strong>API docs</strong></a> ·
|
|
24
|
+
<a href="https://eurostat.github.io/eurostat-map/examples/population-density.html"><strong>Live examples</strong></a> ·
|
|
25
|
+
<a href="https://observablehq.com/collection/@eurostat-ws/eurostatmap-js"><strong>Quickstart notebook</strong></a>
|
|
22
26
|
</div>
|
|
27
|
+
|
|
28
|
+
## At a Glance
|
|
29
|
+
|
|
30
|
+
- **Interactive SVG maps** rendered using **D3.js**.
|
|
31
|
+
- **TypeScript support** with built-in definition typings.
|
|
32
|
+
- **NUTS geometries** fetched dynamically via the **Nuts2json API** (TopoJSON format).
|
|
33
|
+
- **Eurostat API integration** using the **JSON-stat** standard.
|
|
34
|
+
|
|
35
|
+
<hr>
|
|
23
36
|
<br>
|
|
24
37
|
<div align="center">
|
|
25
38
|
<a href="https://eurostat.github.io/eurostat-map/examples/population-density.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/examples.gif" alt="examples" width="600"/> </a>
|
|
@@ -27,11 +40,14 @@ Based on D3 and designed for Eurostat data but compatible with custom geometries
|
|
|
27
40
|
|
|
28
41
|
---
|
|
29
42
|
|
|
30
|
-
##
|
|
43
|
+
## Resources
|
|
31
44
|
|
|
32
|
-
- [
|
|
45
|
+
- [Quick Start](#quick-start)
|
|
46
|
+
- [What You Can Build](#what-you-can-build)
|
|
47
|
+
- [Examples by Use Case](#examples-by-use-case)
|
|
33
48
|
- [Installation](#installation)
|
|
34
49
|
- [Documentation](#documentation)
|
|
50
|
+
- [Developer Path](#developer-path)
|
|
35
51
|
- [Technical details](#technical-details)
|
|
36
52
|
- [About](#about)
|
|
37
53
|
- [Contribute](#contribute)
|
|
@@ -40,38 +56,69 @@ Based on D3 and designed for Eurostat data but compatible with custom geometries
|
|
|
40
56
|
|
|
41
57
|
---
|
|
42
58
|
|
|
43
|
-
##
|
|
59
|
+
## Quick Start
|
|
44
60
|
|
|
45
|
-
|
|
61
|
+
```bash
|
|
62
|
+
npm install eurostat-map
|
|
63
|
+
```
|
|
46
64
|
|
|
47
65
|
```javascript
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
.
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
map.statData().setData({ ES: 3, FR: 2, DE: 5 })
|
|
66
|
+
import eurostatmap from 'eurostat-map'
|
|
67
|
+
|
|
68
|
+
eurostatmap
|
|
69
|
+
.map('choropleth')
|
|
70
|
+
.title('Population density in Europe')
|
|
71
|
+
.stat({ eurostatDatasetCode: 'demo_r_d3dens', unitText: 'people/km²' })
|
|
72
|
+
.legend({ x: 500, y: 180, title: 'Density, people/km²' })
|
|
73
|
+
.build()
|
|
57
74
|
```
|
|
58
75
|
|
|
59
|
-
|
|
76
|
+
Want a guided setup? Try the notebook:
|
|
60
77
|
https://observablehq.com/@joewdavies/eurostat-map-js
|
|
61
78
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
- [
|
|
67
|
-
- [
|
|
68
|
-
- [
|
|
69
|
-
- [
|
|
70
|
-
- [
|
|
71
|
-
- [
|
|
72
|
-
- [
|
|
73
|
-
- [
|
|
74
|
-
- [
|
|
79
|
+
## What You Can Build
|
|
80
|
+
|
|
81
|
+
- [Choropleth](https://eurostat.github.io/eurostat-map/examples/population-density.html): classed or continuous regional shading.
|
|
82
|
+
- [Value-by-alpha](docs/reference.md): dual encoding with color and opacity.
|
|
83
|
+
- [Bivariate choropleth](https://eurostat.github.io/eurostat-map/examples/pop-unemploy-bivariate.html): two variables in one map.
|
|
84
|
+
- [Trivariate choropleth](https://eurostat.github.io/eurostat-map/examples/trivariate.html): three-variable ternary coloring.
|
|
85
|
+
- [Categorical](https://eurostat.github.io/eurostat-map/examples/categorical.html): discrete class-based mapping.
|
|
86
|
+
- [Proportional symbols](https://eurostat.github.io/eurostat-map/examples/prop-circles.html): size-based symbol encoding.
|
|
87
|
+
- [Mushroom](https://eurostat.github.io/eurostat-map/examples/mushroom.html): bilateral symbol comparison per region.
|
|
88
|
+
- [Pie composition](https://eurostat.github.io/eurostat-map/examples/prop-piecharts.html): proportional category shares.
|
|
89
|
+
- [Bar composition](docs/reference.md): grouped/stacked regional breakdowns.
|
|
90
|
+
- [Stripe composition](https://eurostat.github.io/eurostat-map/examples/livestock_composition.html): compact stripe-based composition.
|
|
91
|
+
- [Waffle composition](https://eurostat.github.io/eurostat-map/examples/waffle.html): grid-cell composition breakdowns.
|
|
92
|
+
- [Coxcomb composition](https://eurostat.github.io/eurostat-map/examples/coxcomb.html): radial composition profiles.
|
|
93
|
+
- [Sparkline](https://eurostat.github.io/eurostat-map/examples/sparklines.html): in-map time series microcharts.
|
|
94
|
+
- [Flow map](https://eurostat.github.io/eurostat-map/examples/flowmap.html): directional links between territories.
|
|
95
|
+
|
|
96
|
+
## Examples by Use Case
|
|
97
|
+
|
|
98
|
+
### Core analytical maps
|
|
99
|
+
|
|
100
|
+
- [Population density choropleth](https://eurostat.github.io/eurostat-map/examples/population-density.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/population-density.html))
|
|
101
|
+
- [Proportional circles](https://eurostat.github.io/eurostat-map/examples/prop-circles.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/prop-circles.html))
|
|
102
|
+
- [Categorical NUTS typology](https://eurostat.github.io/eurostat-map/examples/categorical.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/categorical.html))
|
|
103
|
+
- [World map](https://eurostat.github.io/eurostat-map/examples/world.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/world.html))
|
|
104
|
+
|
|
105
|
+
### Composition and structure
|
|
106
|
+
|
|
107
|
+
- [Proportional pie charts](https://eurostat.github.io/eurostat-map/examples/prop-piecharts.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/prop-piecharts.html))
|
|
108
|
+
- [Farm size composition](https://eurostat.github.io/eurostat-map/examples/farm_size.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/farm_size.html))
|
|
109
|
+
- [Livestock composition](https://eurostat.github.io/eurostat-map/examples/livestock_composition.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/livestock_composition.html))
|
|
110
|
+
|
|
111
|
+
### Time and change
|
|
112
|
+
|
|
113
|
+
- [Population change](https://eurostat.github.io/eurostat-map/examples/population-change.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/population-change.html))
|
|
114
|
+
- [Sparklines since 2012](https://eurostat.github.io/eurostat-map/examples/sparklines.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/sparklines.html))
|
|
115
|
+
- [20 years of GDP change](https://eurostat.github.io/eurostat-map/examples/small_multiple.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/small_multiple.html))
|
|
116
|
+
|
|
117
|
+
### Relationships and advanced views
|
|
118
|
+
|
|
119
|
+
- [Bivariate unemployment/population](https://eurostat.github.io/eurostat-map/examples/pop-unemploy-bivariate.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/pop-unemploy-bivariate.html))
|
|
120
|
+
- [Flow map](https://eurostat.github.io/eurostat-map/examples/flowmap.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/flowmap.html))
|
|
121
|
+
- [Country focus: Spain](https://eurostat.github.io/eurostat-map/examples/spain.html) (see [code](https://github.com/eurostat/eurostat-map/blob/master/examples/spain.html))
|
|
75
122
|
|
|
76
123
|
## Installation
|
|
77
124
|
|
|
@@ -84,13 +131,13 @@ npm install eurostat-map
|
|
|
84
131
|
then
|
|
85
132
|
|
|
86
133
|
```javascript
|
|
87
|
-
import eurostatmap from '
|
|
134
|
+
import eurostatmap from 'eurostat-map'
|
|
88
135
|
```
|
|
89
136
|
|
|
90
137
|
or
|
|
91
138
|
|
|
92
139
|
```javascript
|
|
93
|
-
eurostatmap = require('
|
|
140
|
+
const eurostatmap = require('eurostat-map')
|
|
94
141
|
```
|
|
95
142
|
|
|
96
143
|
### Standalone
|
|
@@ -113,24 +160,41 @@ where X.Y.Z is a [version number](https://www.npmjs.com/package/eurostat-map?act
|
|
|
113
160
|
|
|
114
161
|
For detailed documentation see the **[API reference page](docs/reference.md)**.
|
|
115
162
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- [Choropleth map](docs/reference.md#choropleth-map).
|
|
119
|
-
- [Proportional symbol map](docs/reference.md#proportional-symbol-map).
|
|
120
|
-
- [Pie chart map](docs/reference.md#proportional-pie-chart-map).
|
|
121
|
-
- [Categorical map](docs/reference.md#categorical-map).
|
|
122
|
-
- [Bivariate choropleth map](docs/reference.md#bivariate-choropleth-map).
|
|
123
|
-
- [Stripe composition map](docs/reference.md#stripe-composition-map).
|
|
124
|
-
- [Sparkline map](docs/reference.md#sparkline-map).
|
|
125
|
-
- [Flow map](docs/reference.md#flow-map).
|
|
126
|
-
- [Ternary choropleth](docs/reference.md#trivariate-choropleth-map).
|
|
127
|
-
- [Coxcomb map](docs/reference.md#coxcomb-map).
|
|
128
|
-
- [Mushroom map](docs/reference.md#mushroom-map).
|
|
129
|
-
- [Waffle map](docs/reference.md#waffle-map).
|
|
130
|
-
- [Cartograms](docs/reference.md#cartograms).
|
|
163
|
+
You can jump directly to map-type sections from the table of contents in [docs/reference.md](docs/reference.md).
|
|
131
164
|
|
|
132
165
|
Anything unclear or missing? Feel free to [ask](https://github.com/eurostat/eurostat.js/issues/new)!
|
|
133
166
|
|
|
167
|
+
## Developer Path
|
|
168
|
+
|
|
169
|
+
### Local setup
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npm install
|
|
173
|
+
npm run server
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Build and quality checks
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
npm run build-prod
|
|
180
|
+
npm run format
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Where to start in the codebase
|
|
184
|
+
|
|
185
|
+
- Factory and map creation: [src/eurostat-map.js](src/eurostat-map.js)
|
|
186
|
+
- Core map scaffolding: [src/core/map-instance.js](src/core/map-instance.js), [src/core/stat-map.js](src/core/stat-map.js)
|
|
187
|
+
- Map types: [src/map-types](src/map-types)
|
|
188
|
+
- Legend system: [src/legend](src/legend)
|
|
189
|
+
- Type declarations: [src/types](src/types)
|
|
190
|
+
|
|
191
|
+
### Contribution flow
|
|
192
|
+
|
|
193
|
+
1. Pick an issue or propose one in Discussions/Issues.
|
|
194
|
+
2. Add or update an example in [examples](examples) when changing behavior.
|
|
195
|
+
3. Run build and formatting before opening a PR.
|
|
196
|
+
4. Link relevant docs updates in [docs/reference.md](docs/reference.md) when APIs change.
|
|
197
|
+
|
|
134
198
|
## Technical details
|
|
135
199
|
|
|
136
200
|
Maps based on [NUTS regions](http://ec.europa.eu/eurostat/web/nuts/overview) rely on [Nuts2json API](https://github.com/eurostat/Nuts2json) and [TopoJSON](https://github.com/mbostock/topojson/wiki) format. Statistical data are accessed using [Eurostat STATISTICS API](https://wikis.ec.europa.eu/display/EUROSTATHELP/API+-+Getting+started+with+statistics+API) for [JSON-stat](https://json-stat.org/) data. The data are decoded and queried using [JSON-stat library](https://json-stat.com/). Custom data can also be used with `map.statData().setData({ES:3,FR:2,DE:5})`. Maps are rendered as SVG maps using [D3.js library](https://d3js.org/).
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! /*! eurostat-map v4.
|
|
1
|
+
/*! /*! eurostat-map v4.4.1 | 2026 Eurostat | EUPL License. See https://github.com/eurostat/eurostat-map/blob/master/LICENSE * / */
|
|
2
2
|
!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.eurostatmap=t():e.eurostatmap=t()}(self,()=>(onmessage=function onmessage(e){var t=e.data,o=t.nodes,r=t.radii,n=t.strengthX,s=t.strengthY,i=t.iterations,p=t.d3URL;importScripts(p||"https://unpkg.com/d3@7/dist/d3.min.js");for(var a=o.map(function(e,t){return e.x=e.properties.centroid[0],e.y=e.properties.centroid[1],e.r=r[t],e}),c=d3.forceSimulation(a).force("x",d3.forceX(function(e){return e.properties.centroid[0]}).strength(n)).force("y",d3.forceY(function(e){return e.properties.centroid[1]}).strength(s)).force("collide",d3.forceCollide(function(e){return e.r}).iterations(i)).stop(),d=Math.ceil(Math.log(c.alphaMin())/Math.log(1-c.alphaDecay())),f=0;f<d;f++)c.tick(),f%10==0&&postMessage({type:"progress",progress:f,total:d});postMessage({type:"end",nodes:a}),self.close()},{}));
|
|
3
3
|
//# sourceMappingURL=215.eurostatmap.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"215.eurostatmap.min.js","mappings":";CAAA,
|
|
1
|
+
{"version":3,"file":"215.eurostatmap.min.js","mappings":";CAAA,SAAAA,iCAAAC,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,GAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,KCTDC,UAAY,SAAZA,UAAaC,GACT,IAAAC,EAA8ED,EAAME,KAArEC,EAAUF,EAAjBG,MAAmBC,EAAKJ,EAALI,MAAOC,EAASL,EAATK,UAAWC,EAASN,EAATM,UAAWC,EAAUP,EAAVO,WAAYC,EAAKR,EAALQ,MAGpEC,cAAcD,GAAS,yCAkBvB,IAhBA,IAAML,EAAQD,EAAWQ,IAAI,SAACC,EAAGC,GAI7B,OAHAD,EAAEE,EAAIF,EAAEG,WAAWC,SAAS,GAC5BJ,EAAEK,EAAIL,EAAEG,WAAWC,SAAS,GAC5BJ,EAAEM,EAAIb,EAAMQ,GACLD,CACX,GAEMO,EAAMC,GACPC,gBAAgBjB,GAChBkB,MAAM,IAAKF,GAAGG,OAAO,SAACC,GAAC,OAAKA,EAAET,WAAWC,SAAS,EAAE,GAAES,SAASnB,IAC/DgB,MAAM,IAAKF,GAAGM,OAAO,SAACF,GAAC,OAAKA,EAAET,WAAWC,SAAS,EAAE,GAAES,SAASlB,IAC/De,MAAM,UAAWF,GAAGO,aAAa,SAACH,GAAC,OAAKA,EAAEN,CAAC,GAAEV,WAAWA,IACxDoB,OAECC,EAASC,KAAKC,KAAKD,KAAKE,IAAIb,EAAIc,YAAcH,KAAKE,IAAI,EAAIb,EAAIe,eAE5DrB,EAAI,EAAGA,EAAIgB,EAAQhB,IACxBM,EAAIgB,OACAtB,EAAI,IAAO,GACXuB,YAAY,CAAEC,KAAM,WAAYC,SAAUzB,EAAG0B,MAAOV,IAI5DO,YAAY,CAAEC,KAAM,MAAOjC,MAAAA,IAC3BN,KAAK0C,OACT","sources":["webpack://eurostatmap/webpack/universalModuleDefinition","webpack://eurostatmap/./src/core/dorling/dorling-worker.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"eurostatmap\"] = factory();\n\telse\n\t\troot[\"eurostatmap\"] = factory();\n})(self, () => {\nreturn ","onmessage = (event) => {\r\n const { nodes: inputNodes, radii, strengthX, strengthY, iterations, d3URL } = event.data\r\n\r\n // Load D3 dynamically into the worker\r\n importScripts(d3URL || 'https://unpkg.com/d3@7/dist/d3.min.js')\r\n\r\n const nodes = inputNodes.map((n, i) => {\r\n n.x = n.properties.centroid[0]\r\n n.y = n.properties.centroid[1]\r\n n.r = radii[i]\r\n return n\r\n })\r\n\r\n const sim = d3\r\n .forceSimulation(nodes)\r\n .force('x', d3.forceX((d) => d.properties.centroid[0]).strength(strengthX))\r\n .force('y', d3.forceY((d) => d.properties.centroid[1]).strength(strengthY))\r\n .force('collide', d3.forceCollide((d) => d.r).iterations(iterations))\r\n .stop()\r\n\r\n const nTicks = Math.ceil(Math.log(sim.alphaMin()) / Math.log(1 - sim.alphaDecay()))\r\n\r\n for (let i = 0; i < nTicks; i++) {\r\n sim.tick()\r\n if (i % 10 === 0) {\r\n postMessage({ type: 'progress', progress: i, total: nTicks })\r\n }\r\n }\r\n\r\n postMessage({ type: 'end', nodes })\r\n self.close()\r\n}\r\n"],"names":["webpackUniversalModuleDefinition","root","factory","exports","module","define","amd","self","onmessage","event","_event$data","data","inputNodes","nodes","radii","strengthX","strengthY","iterations","d3URL","importScripts","map","n","i","x","properties","centroid","y","r","sim","d3","forceSimulation","force","forceX","d","strength","forceY","forceCollide","stop","nTicks","Math","ceil","log","alphaMin","alphaDecay","tick","postMessage","type","progress","total","close"],"sourceRoot":""}
|