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.
Files changed (126) hide show
  1. package/README.md +113 -49
  2. package/build/215.eurostatmap.min.js +1 -1
  3. package/build/215.eurostatmap.min.js.map +1 -1
  4. package/build/eurostatmap.js +11757 -12996
  5. package/build/eurostatmap.min.js +2 -4
  6. package/build/eurostatmap.min.js.map +1 -1
  7. package/build/package.json +87 -0
  8. package/build/types/core/DorlingSettings.d.ts +29 -0
  9. package/build/types/core/GridCartogramSettings.d.ts +30 -0
  10. package/build/types/core/InsetConfig.d.ts +23 -0
  11. package/build/types/core/MapConfig.d.ts +95 -0
  12. package/build/types/core/MapInstance.d.ts +349 -0
  13. package/build/types/core/MinimapConfig.d.ts +11 -0
  14. package/build/types/core/TooltipConfig.d.ts +16 -0
  15. package/build/types/core/decoration/CoastalMarginSettings.d.ts +21 -0
  16. package/build/types/core/decoration/ScalebarConfig.d.ts +48 -0
  17. package/build/types/core/decoration/StampConfig.d.ts +71 -0
  18. package/build/types/core/geo/centroids.d.ts +33 -0
  19. package/build/types/core/geo/geometries.d.ts +71 -0
  20. package/build/types/core/geo/kosovo.d.ts +12 -0
  21. package/build/types/core/geo/proj4.d.ts +26 -0
  22. package/build/types/core/geo/projection.d.ts +29 -0
  23. package/build/types/core/insets.d.ts +16 -0
  24. package/build/types/core/layout.d.ts +23 -0
  25. package/build/types/core/locations.d.ts +55 -0
  26. package/build/types/core/minimaps.d.ts +20 -0
  27. package/build/types/core/scale.d.ts +30 -0
  28. package/build/types/core/stat/StatConfig.d.ts +27 -0
  29. package/build/types/core/stat/StatData.d.ts +113 -0
  30. package/build/types/core/utils.d.ts +198 -0
  31. package/build/types/core/zoom.d.ts +21 -0
  32. package/build/types/index.d.ts +253 -0
  33. package/build/types/legend/CategoricalLegendConfig.d.ts +13 -0
  34. package/build/types/legend/CoxcombLegendConfig.d.ts +85 -0
  35. package/build/types/legend/LegendConfig.d.ts +51 -0
  36. package/build/types/legend/MushroomLegendConfig.d.ts +56 -0
  37. package/build/types/legend/PatternFillLegendConfig.d.ts +11 -0
  38. package/build/types/legend/PieChartLegendConfig.d.ts +68 -0
  39. package/build/types/legend/SparklineLegendConfig.d.ts +6 -0
  40. package/build/types/legend/StripeCompositionLegendConfig.d.ts +11 -0
  41. package/build/types/legend/WaffleLegendConfig.d.ts +74 -0
  42. package/build/types/legend/choropleth/BivariateLegendConfig.d.ts +59 -0
  43. package/build/types/legend/choropleth/ChoroplethLegendConfig.d.ts +0 -0
  44. package/build/types/legend/choropleth/HistogramLegendConfig.d.ts +26 -0
  45. package/build/types/legend/choropleth/TrivariateLegendConfig.d.ts +32 -0
  46. package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +2 -0
  47. package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +2 -0
  48. package/build/types/legend/choropleth/legend-choropleth.d.ts +2 -0
  49. package/build/types/legend/composition/BarChartLegendConfig.d.ts +68 -0
  50. package/build/types/legend/composition/CoxcombLegendConfig.d.ts +85 -0
  51. package/build/types/legend/composition/PieChartLegendConfig.d.ts +68 -0
  52. package/build/types/legend/composition/SparklineLegendConfig.d.ts +94 -0
  53. package/build/types/legend/composition/StripeCompositionLegendConfig.d.ts +11 -0
  54. package/build/types/legend/composition/WaffleLegendConfig.d.ts +74 -0
  55. package/build/types/legend/composition/legend-bar-chart.d.ts +2 -0
  56. package/build/types/legend/flow/FlowLegendConfig.d.ts +0 -0
  57. package/build/types/legend/flow/FlowMapLegendConfig.d.ts +117 -0
  58. package/build/types/legend/flow/legend-flow.d.ts +2 -0
  59. package/build/types/legend/legend-categorical.d.ts +2 -0
  60. package/build/types/legend/legend-continuous.d.ts +2 -0
  61. package/build/types/legend/legend-discrete.d.ts +2 -0
  62. package/build/types/legend/legend.d.ts +13 -0
  63. package/build/types/legend/proportional-symbol/PropSymbolLegendConfig.d.ts +0 -0
  64. package/build/types/legend/proportional-symbol/ProportionalSymbolsLegendConfig.d.ts +134 -0
  65. package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +2 -0
  66. package/build/types/map-types/CategoricalMap.d.ts +21 -0
  67. package/build/types/map-types/CategoricalMapConfig.d.ts +11 -0
  68. package/build/types/map-types/CateogricalMapConfig.d.ts +11 -0
  69. package/build/types/map-types/MapType.d.ts +34 -0
  70. package/build/types/map-types/choropleth/BivariateChoroplethConfig.d.ts +23 -0
  71. package/build/types/map-types/choropleth/BivariateChoroplethMap.d.ts +39 -0
  72. package/build/types/map-types/choropleth/ChoroplethConfig.d.ts +35 -0
  73. package/build/types/map-types/choropleth/ChoroplethMap.d.ts +48 -0
  74. package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +28 -0
  75. package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +15 -0
  76. package/build/types/map-types/choropleth/ValueByAlphaConfig.d.ts +8 -0
  77. package/build/types/map-types/choropleth/ValueByAlphaMap.d.ts +9 -0
  78. package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +4 -0
  79. package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +4 -0
  80. package/build/types/map-types/choropleth/map-choropleth.d.ts +47 -0
  81. package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +4 -0
  82. package/build/types/map-types/composition/BarMap.d.ts +86 -0
  83. package/build/types/map-types/composition/BarMapConfig.d.ts +30 -0
  84. package/build/types/map-types/composition/CompositionStatConfig.d.ts +34 -0
  85. package/build/types/map-types/composition/CoxcombMap.d.ts +42 -0
  86. package/build/types/map-types/composition/CoxcombMapConfig.d.ts +18 -0
  87. package/build/types/map-types/composition/PieMap.d.ts +62 -0
  88. package/build/types/map-types/composition/PieMapConfig.d.ts +24 -0
  89. package/build/types/map-types/composition/SparkMap.d.ts +46 -0
  90. package/build/types/map-types/composition/SparkMapConfig.d.ts +25 -0
  91. package/build/types/map-types/composition/StripeMap.d.ts +43 -0
  92. package/build/types/map-types/composition/StripeMapConfig.d.ts +16 -0
  93. package/build/types/map-types/composition/WaffleMap.d.ts +71 -0
  94. package/build/types/map-types/composition/WaffleMapConfig.d.ts +25 -0
  95. package/build/types/map-types/composition/bar/BarMap.d.ts +79 -0
  96. package/build/types/map-types/composition/bar/BarMapConfig.d.ts +54 -0
  97. package/build/types/map-types/composition/composition-map.d.ts +25 -0
  98. package/build/types/map-types/composition/coxcomb/CoxcombMap.d.ts +46 -0
  99. package/build/types/map-types/composition/coxcomb/CoxcombMapConfig.d.ts +32 -0
  100. package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +16 -0
  101. package/build/types/map-types/composition/map-bar.d.ts +5 -0
  102. package/build/types/map-types/composition/map-coxcomb.d.ts +5 -0
  103. package/build/types/map-types/composition/map-pie.d.ts +10 -0
  104. package/build/types/map-types/composition/map-spark.d.ts +5 -0
  105. package/build/types/map-types/composition/map-stripe.d.ts +5 -0
  106. package/build/types/map-types/composition/map-waffle.d.ts +5 -0
  107. package/build/types/map-types/composition/pie/PieMap.d.ts +69 -0
  108. package/build/types/map-types/composition/pie/PieMapConfig.d.ts +42 -0
  109. package/build/types/map-types/composition/stripe/StripeMap.d.ts +52 -0
  110. package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +28 -0
  111. package/build/types/map-types/composition/waffle/WaffleMap.d.ts +78 -0
  112. package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +44 -0
  113. package/build/types/map-types/flow/FlowMap.d.ts +97 -0
  114. package/build/types/map-types/flow/FlowMapConfig.d.ts +158 -0
  115. package/build/types/map-types/flow/map-flow.d.ts +5 -0
  116. package/build/types/map-types/map-categorical.d.ts +19 -0
  117. package/build/types/map-types/proportional-symbol/ProportionalSymbolConfig.d.ts +17 -0
  118. package/build/types/map-types/proportional-symbol/ProportionalSymbolMap.d.ts +90 -0
  119. package/build/types/map-types/proportional-symbol/map-proportional-symbols.d.ts +35 -0
  120. package/build/types/map-types/proportional-symbol/mushroom/MushroomMap.d.ts +30 -0
  121. package/build/types/map-types/proportional-symbol/mushroom/MushroomMapConfig.d.ts +20 -0
  122. package/build/types/map-types/spark/SparkMap.d.ts +52 -0
  123. package/build/types/map-types/spark/SparkMapConfig.d.ts +42 -0
  124. package/build/types/map-types/spark/SparkStatConfig.d.ts +16 -0
  125. package/build/types/utils/FillPatternOptions.d.ts +17 -0
  126. 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>Customizable thematic maps. See <strong><a href="docs/reference.md">documentation</a></strong>.</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
- Based on D3 and designed for Eurostat data but compatible with custom geometries and stats.
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
- Check out <a href="https://observablehq.com/collection/@eurostat-ws/eurostatmap-js" target="_blank">this observable notebook</a> for a quickstart guide.
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
- ## Table of Contents
43
+ ## Resources
31
44
 
32
- - [Examples](#examples)
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
- ## Examples
59
+ ## Quick Start
44
60
 
45
- You can build an interactive statistical map with just a few lines of code:
61
+ ```bash
62
+ npm install eurostat-map
63
+ ```
46
64
 
47
65
  ```javascript
48
- const map = eurostatmap
49
- .map('choropleth') // Specify the map type
50
- .title('Population density in Europe') // Add a title
51
- .stat({ eurostatDatasetCode: 'demo_r_d3dens', unitText: 'people/km²' }) // Configure dataset
52
- .legend({ x: 500, y: 180, title: 'Density, people/km²' }) // Add a legend
53
- .build() // Build the map
54
-
55
- // Or you can use your own statistics like so:
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
- For a quick tutorial check out this notebook:
76
+ Want a guided setup? Try the notebook:
60
77
  https://observablehq.com/@joewdavies/eurostat-map-js
61
78
 
62
- - [Population density](https://eurostat.github.io/eurostat-map/examples/population-density.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/population-density.html))
63
- - [Population map with proportional circles](https://eurostat.github.io/eurostat-map/examples/prop-circles.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/prop-circles.html))
64
- - [Causes of death with proportional pie charts](https://eurostat.github.io/eurostat-map/examples/prop-piecharts.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/prop-piecharts.html))
65
- - [Population change ](https://eurostat.github.io/eurostat-map/examples/population-change.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/population-change.html))
66
- - [NUTS typology as a categorical map](https://eurostat.github.io/eurostat-map/examples/categorical.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/categorical.html))
67
- - [Focus on Spain](https://eurostat.github.io/eurostat-map/examples/spain.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/spain.html))
68
- - [20 years of GDP change in Europe](https://eurostat.github.io/eurostat-map/examples/small_multiple.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/small_multiple.html))
69
- - [Unemployment/population relation](https://eurostat.github.io/eurostat-map/examples/pop-unemploy-bivariate.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/pop-unemploy-bivariate.html))
70
- - [Farm sizes composition](https://eurostat.github.io/eurostat-map/examples/farm_size.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/farm_size.html))
71
- - [Livestock composition](https://eurostat.github.io/eurostat-map/examples/livestock_composition.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/livestock_composition.html))
72
- - [Sparklines: Population in Europe since 2012](https://eurostat.github.io/eurostat-map/examples/sparklines.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/sparklines.html))
73
- - [World map](https://eurostat.github.io/eurostat-map/examples/world.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/world.html))
74
- - [Flow map](https://eurostat.github.io/eurostat-map/examples/flowmap.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/flowmap.html))
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 'eurostatmap'
134
+ import eurostatmap from 'eurostat-map'
88
135
  ```
89
136
 
90
137
  or
91
138
 
92
139
  ```javascript
93
- eurostatmap = require('eurostatmap')
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
- Code examples:
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.3.58 | 2026 Eurostat | EUPL License. See https://github.com/eurostat/eurostat-map/blob/master/LICENSE * / */
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,SAAUA,iCAAiCC,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,KCTTC,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,E","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":""}
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":""}