eurostat-map 4.4.3 → 4.4.5

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 (39) hide show
  1. package/README.md +148 -147
  2. package/build/215.eurostatmap.min.js +1 -1
  3. package/build/215.eurostatmap.min.js.map +1 -1
  4. package/build/eurostatmap.js +2594 -1497
  5. package/build/eurostatmap.min.js +2 -2
  6. package/build/eurostatmap.min.js.map +1 -1
  7. package/build/package.json +87 -87
  8. package/build/types/core/MapConfig.d.ts +6 -0
  9. package/build/types/core/MapInstance.d.ts +8 -0
  10. package/build/types/index.d.ts +2 -1
  11. package/build/types/legend/choropleth/legend-choropleth-bivariate.d.ts +2 -2
  12. package/build/types/legend/choropleth/legend-choropleth-trivariate.d.ts +2 -2
  13. package/build/types/legend/choropleth/legend-choropleth.d.ts +2 -2
  14. package/build/types/legend/composition/legend-bar-chart.d.ts +2 -2
  15. package/build/types/legend/flow/legend-flow.d.ts +2 -2
  16. package/build/types/legend/legend-categorical.d.ts +2 -2
  17. package/build/types/legend/legend-continuous.d.ts +2 -2
  18. package/build/types/legend/legend-discrete.d.ts +2 -2
  19. package/build/types/legend/legend.d.ts +13 -13
  20. package/build/types/legend/proportional-symbol/legend-proportional-symbols.d.ts +2 -2
  21. package/build/types/map-types/CategoricalMapConfig.d.ts +11 -11
  22. package/build/types/map-types/choropleth/TrivariateChoroplethConfig.d.ts +25 -16
  23. package/build/types/map-types/choropleth/TrivariateChoroplethMap.d.ts +5 -2
  24. package/build/types/map-types/choropleth/map-choropleth-bivariate.d.ts +4 -4
  25. package/build/types/map-types/choropleth/map-choropleth-trivariate.d.ts +4 -4
  26. package/build/types/map-types/choropleth/map-value-by-alpha.d.ts +4 -4
  27. package/build/types/map-types/composition/CompositionStatConfig.d.ts +19 -3
  28. package/build/types/map-types/composition/coxcomb/CoxcombStatConfig.d.ts +1 -4
  29. package/build/types/map-types/composition/map-spark.d.ts +5 -5
  30. package/build/types/map-types/composition/map-stripe.d.ts +5 -5
  31. package/build/types/map-types/composition/pie/PieMap.d.ts +41 -22
  32. package/build/types/map-types/composition/pie/PieMapConfig.d.ts +24 -16
  33. package/build/types/map-types/composition/stripe/StripeMap.d.ts +12 -1
  34. package/build/types/map-types/composition/stripe/StripeMapConfig.d.ts +6 -0
  35. package/build/types/map-types/composition/waffle/WaffleMap.d.ts +45 -0
  36. package/build/types/map-types/composition/waffle/WaffleMapConfig.d.ts +24 -10
  37. package/build/types/map-types/flow/map-flow.d.ts +5 -5
  38. package/build/types/map-types/spark/SparkStatConfig.d.ts +21 -5
  39. package/package.json +15 -15
package/README.md CHANGED
@@ -1,147 +1,148 @@
1
- # eurostat-map: Data-Driven Maps
2
-
3
- <div align="center">
4
- <img src="https://img.shields.io/bundlephobia/min/eurostat-map" alt="npm bundle size">
5
- <img src="https://img.shields.io/npm/v/eurostat-map" alt="npm">
6
- <img src="https://img.shields.io/badge/license-EUPL-success" alt="license">
7
- <a href="http://www.awesomeofficialstatistics.org"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Official Statistics"></a>
8
- </div>
9
-
10
- <br>
11
- <div align="center">
12
- <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/eurostat-map-logo-cropped.png" alt="examples" width="400"/>
13
- </div>
14
- <div align="center">
15
- <em>Build publication-ready statistical maps of Europe in minutes.</em>
16
- </div>
17
-
18
- <div align="center">
19
- D3-based mapping library for Eurostat and custom data - the engine that powers <a href="https://gisco-services.ec.europa.eu/image/" target="_blank"><strong>IMAGE</strong></a>.
20
- </div>
21
-
22
- <div align="center">
23
- <a href="docs/reference.md" target="_blank"><strong>Documentation</strong></a> ·
24
- <a href="https://eurostat.github.io/eurostat-map/examples/index.html" target="_blank"><strong>Live examples</strong></a> ·
25
- <a href="https://observablehq.com/collection/@eurostat-ws/eurostatmap-js" target="_blank"><strong>Quickstart notebook</strong></a>
26
- </div>
27
- <hr>
28
-
29
- - **Interactive SVG maps** rendered using **D3.js**.
30
- - **TypeScript support** with built-in definition typings.
31
- - **NUTS geometries** fetched dynamically via the **Nuts2json API** (TopoJSON format).
32
- - **Eurostat API integration** using the **JSON-stat** standard.
33
-
34
- <hr>
35
- <br>
36
- <div align="center">
37
-
38
- <table>
39
- <tr>
40
- <td><a href="https://eurostat.github.io/eurostat-map/examples/choropleth/population-density.html" target="_blank"><img src="examples/img/previews/population-density.png" alt="Population density example" /></a></td>
41
- <td><a href="https://eurostat.github.io/eurostat-map/examples/proportional/prop-circles.html" target="_blank"><img src="examples/img/previews/prop-circles.png" alt="Proportional circles example" /></a></td>
42
- <td><a href="https://eurostat.github.io/eurostat-map/examples/flow/flowmap.html" target="_blank"><img src="examples/img/previews/flowmap.png" alt="Flow map example" /></a></td>
43
- <td><a href="https://eurostat.github.io/eurostat-map/examples/mushroom/mushroom.html" target="_blank"><img src="examples/img/previews/mushroom.png" alt="Mushroom map example" /></a></td>
44
- </tr>
45
- <tr>
46
- <td><a href="https://eurostat.github.io/eurostat-map/examples/sparklines/sparklines-grid-cartogram.html" target="_blank"><img src="examples/img/previews/sparklines-grid-cartogram.png" alt="Sparklines map example" /></a></td>
47
- <td><a href="https://eurostat.github.io/eurostat-map/examples/bivariate/pop-unemploy-bivariate.html" target="_blank"><img src="examples/img/previews/pop-unemploy-bivariate.png" alt="Bivariate map example" /></a></td>
48
- <td><a href="https://eurostat.github.io/eurostat-map/examples/trivariate/trivariate.html" target="_blank"><img src="examples/img/previews/trivariate.png" alt="Trivariate map example" /></a></td>
49
- <td><a href="https://eurostat.github.io/eurostat-map/examples/stripe/livestock_composition.html" target="_blank"><img src="examples/img/previews/livestock_composition.png" alt="Trivariate map example" /></a></td>
50
- </tr>
51
- </table>
52
- </div>
53
-
54
- ---
55
-
56
- ## Resources
57
-
58
- - [Quick Start](#quick-start)
59
- - [Examples](https://eurostat.github.io/eurostat-map/examples/index.html)
60
- - [Documentation](#documentation)
61
- - [Made with eurostat-map](#made-with-eurostat-map)
62
- - [About](#about)
63
- - [Contribute](#contribute)
64
- - [Copyright](#copyright)
65
- - [Disclaimer](#disclaimer)
66
-
67
- ---
68
-
69
- ## Quick Start
70
-
71
- ```bash
72
- npm install eurostat-map
73
- ```
74
-
75
- ```javascript
76
- import eurostatmap from 'eurostat-map'
77
- ```
78
-
79
- or
80
-
81
- ```javascript
82
- const eurostatmap = require('eurostat-map')
83
- ```
84
-
85
- or
86
-
87
- ```html
88
- <script src="https://unpkg.com/eurostat-map"></script>
89
- ```
90
-
91
- then
92
-
93
- ```javascript
94
- eurostatmap
95
- .map('choropleth')
96
- .title('Population density in Europe')
97
- .stat({ eurostatDatasetCode: 'demo_r_d3dens', unitText: 'people/km²' })
98
- .legend({ x: 500, y: 180, title: 'Density, people/km²' })
99
- .build()
100
- ```
101
-
102
- Want a guided setup? Try the notebook:
103
- https://observablehq.com/@joewdavies/eurostat-map-js
104
-
105
- ## Documentation
106
-
107
- For detailed documentation on what eurostat-map can do, see the **[documentation page](docs/reference.md)**.
108
-
109
- For generated, signature-accurate API docs from TypeScript/JSDoc, see [the API docs](https://eurostat.github.io/eurostat-map/docs/api/index.html).
110
-
111
- Anything unclear or missing? Feel free to [ask](https://github.com/eurostat/eurostat.js/issues/new)!
112
-
113
- ## Made with eurostat-map
114
-
115
- Here are some public projects and publications built with eurostat-map:
116
-
117
- - [IMAGE](https://gisco-services.ec.europa.eu/image/) - Eurostat's interactive map generator.
118
- - [Regions in Europe 2025](https://ec.europa.eu/eurostat/web/interactive-publications/regions-2025) - interactive publication.
119
- - [Eurostat Regional Yearbook](https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Eurostat_regional_yearbook) - interactive publication.
120
- - [Women make up 53% of science & technology ranks](https://ec.europa.eu/eurostat/web/products-eurostat-news/w/ddn-20260529-2)
121
- - [Average work week nearly 36 hours in the EU in 2025](https://ec.europa.eu/eurostat/en/web/products-eurostat-news/w/ddn-20260527-1)
122
- - [Tourism nights booked via platforms hit nearly 1 billion](https://ec.europa.eu/eurostat/en/web/products-eurostat-news/w/ddn-20260401-1)
123
- - [EU rail passengers made 8.7 billion trips in 2024](https://ec.europa.eu/eurostat/web/products-eurostat-news/w/ddn-20260514-1)
124
- - [EU life expectancy increases again and hits 81.5 years](https://ec.europa.eu/eurostat/web/products-eurostat-news/w/ddn-20260313-3)
125
-
126
- ## About
127
-
128
- eurostat-map is an open-source JavaScript library for building interactive, publication-ready statistical maps focused on Europe. It combines D3-based SVG rendering with direct support for Eurostat datasets (JSON-stat), NUTS geographies from Nuts2json, and custom data workflows, and includes map types such as choropleth, proportional symbols, cartograms, flow maps, and composition charts. The project is designed for analysts, journalists, and institutions that need reproducible, configurable map visualizations for both exploratory analysis and official communication.
129
-
130
- | | |
131
- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
132
- | _contributors_ | [<img src="https://github.com/jgaffuri.png" height="40" />](https://github.com/jgaffuri) [<img src="https://github.com/JoeWDavies.png" height="40" />](https://github.com/JoeWDavies) |
133
- | _version_ | See [npm](https://www.npmjs.com/package/eurostat-map?activeTab=versions) |
134
- | _status_ | Since 2018 |
135
- | _license_ | [EUPL 1.2](https://github.com/eurostat/Nuts2json/blob/master/LICENSE) |
136
-
137
- ## Contribute
138
-
139
- Feel free to [ask for assistance](https://github.com/eurostat/eurostat.js/issues/new), fork the project or simply star it (it's always a pleasure).
140
-
141
- ## Copyright
142
-
143
- The [Eurostat NUTS dataset](http://ec.europa.eu/eurostat/web/nuts/overview) is copyrighted. There are [specific provisions](https://ec.europa.eu/eurostat/web/gisco/geodata/statistical-units) for the usage of this dataset which must be respected. The usage of these data is subject to their acceptance. See the [Eurostat-GISCO website](https://ec.europa.eu/eurostat/web/gisco/geodata/statistical-units) for more information.
144
-
145
- ## Disclaimer
146
-
147
- The designations employed and the presentation of material on these maps do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence. Palestine*: This designation shall not be construed as recognition of a State of Palestine and is without prejudice to the individual positions of the Member States on this issue.
1
+ # eurostat-map: Data-Driven Maps
2
+
3
+ <div align="center">
4
+ <img src="https://img.shields.io/bundlephobia/min/eurostat-map" alt="npm bundle size">
5
+ <img src="https://img.shields.io/npm/v/eurostat-map" alt="npm">
6
+ <img src="https://img.shields.io/badge/license-EUPL-success" alt="license">
7
+ <a href="http://www.awesomeofficialstatistics.org"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Official Statistics"></a>
8
+ </div>
9
+
10
+ <br>
11
+ <div align="center">
12
+ <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/eurostat-map-logo-cropped.png" alt="examples" width="400"/>
13
+ </div>
14
+ <div align="center">
15
+ <em>Build publication-ready statistical maps of Europe in minutes.</em>
16
+ </div>
17
+
18
+ <div align="center">
19
+ D3-based mapping library for Eurostat and custom data - the engine that powers <a href="https://gisco-services.ec.europa.eu/image/" target="_blank"><strong>IMAGE</strong></a>.
20
+ </div>
21
+
22
+ <div align="center">
23
+ <a href="docs/reference.md" target="_blank"><strong>Documentation</strong></a> ·
24
+ <a href="https://eurostat.github.io/eurostat-map/examples/index.html" target="_blank"><strong>Live examples</strong></a> ·
25
+ <a href="https://observablehq.com/collection/@eurostat-ws/eurostatmap-js" target="_blank"><strong>Quickstart notebook</strong></a>
26
+ </div>
27
+ <hr>
28
+
29
+ - **Interactive SVG maps** rendered using **D3.js**.
30
+ - **TypeScript support** with built-in definition typings.
31
+ - **NUTS geometries** fetched dynamically via the **Nuts2json API** (TopoJSON format).
32
+ - **Eurostat API integration** using the **JSON-stat** standard.
33
+
34
+ <hr>
35
+ <br>
36
+ <div align="center">
37
+
38
+ <table>
39
+ <tr>
40
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/choropleth/population-density.html" target="_blank"><img src="examples/img/previews/choropleth/population-density.png" alt="Population density example" /></a></td>
41
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/proportional/prop-circles.html" target="_blank"><img src="examples/img/previews/proportional/prop-circles.png" alt="Proportional circles example" /></a></td>
42
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/flow/flowmap.html" target="_blank"><img src="examples/img/previews/flow/flowmap.png" alt="Flow map example" /></a></td>
43
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/mushroom/mushroom.html" target="_blank"><img src="examples/img/previews/mushroom/mushroom.png" alt="Mushroom map example" /></a></td>
44
+ </tr>
45
+ <tr>
46
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/sparklines/sparklines-grid-cartogram.html" target="_blank"><img src="examples/img/previews/sparklines/sparklines-grid-cartogram.png" alt="Sparklines map example" /></a></td>
47
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/bivariate/pop-unemploy-bivariate.html" target="_blank"><img src="examples/img/previews/bivariate/pop-unemploy-bivariate.png" alt="Bivariate map example" /></a></td>
48
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/trivariate/trivariate.html" target="_blank"><img src="examples/img/previews/trivariate/trivariate.png" alt="Trivariate map example" /></a></td>
49
+ <td><a href="https://eurostat.github.io/eurostat-map/examples/stripe/livestock_composition.html" target="_blank"><img src="examples/img/previews/stripe/livestock_composition.png" alt="Trivariate map example" /></a></td>
50
+ </tr>
51
+ </table>
52
+ </div>
53
+
54
+ ---
55
+
56
+ ## Resources
57
+
58
+ - [Quick Start](#quick-start)
59
+ - [Examples](https://eurostat.github.io/eurostat-map/examples/index.html)
60
+ - [Documentation](#documentation)
61
+ - [Made with eurostat-map](#made-with-eurostat-map)
62
+ - [About](#about)
63
+ - [Contribute](#contribute)
64
+ - [Copyright](#copyright)
65
+ - [Disclaimer](#disclaimer)
66
+
67
+ ---
68
+
69
+ ## Quick Start
70
+
71
+ ```bash
72
+ npm install eurostat-map
73
+ ```
74
+
75
+ ```javascript
76
+ import eurostatmap from 'eurostat-map'
77
+ ```
78
+
79
+ or
80
+
81
+ ```javascript
82
+ const eurostatmap = require('eurostat-map')
83
+ ```
84
+
85
+ or
86
+
87
+ ```html
88
+ <script src="https://unpkg.com/eurostat-map"></script>
89
+ ```
90
+
91
+ then
92
+
93
+ ```javascript
94
+ eurostatmap
95
+ .map('choropleth')
96
+ .title('Population density in Europe')
97
+ .stat({ eurostatDatasetCode: 'demo_r_d3dens', unitText: 'people/km²' })
98
+ .legend({ x: 500, y: 180, title: 'Density, people/km²' })
99
+ .build()
100
+ ```
101
+
102
+ Want a guided setup? Try the notebook:
103
+ https://observablehq.com/@joewdavies/eurostat-map-js
104
+
105
+ ## Documentation
106
+
107
+ For detailed documentation on what eurostat-map can do, see the **[documentation page](docs/reference.md)**.
108
+
109
+ For generated, signature-accurate API docs from TypeScript/JSDoc, see [the API docs](https://eurostat.github.io/eurostat-map/docs/api/index.html).
110
+
111
+ Anything unclear or missing? Feel free to [ask](https://github.com/eurostat/eurostat.js/issues/new)!
112
+
113
+ ## Made with eurostat-map
114
+
115
+ Here are some public projects and publications built with eurostat-map:
116
+
117
+ - [IMAGE](https://gisco-services.ec.europa.eu/image/) - Eurostat's interactive map generator.
118
+ - [Regions in Europe 2025](https://ec.europa.eu/eurostat/web/interactive-publications/regions-2025) - interactive publication.
119
+ - [Eurostat Regional Yearbook](https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Eurostat_regional_yearbook) - interactive publication.
120
+ - [Women make up 53% of science & technology ranks](https://ec.europa.eu/eurostat/web/products-eurostat-news/w/ddn-20260529-2)
121
+ - [Average work week nearly 36 hours in the EU in 2025](https://ec.europa.eu/eurostat/en/web/products-eurostat-news/w/ddn-20260527-1)
122
+ - [Tourism nights booked via platforms hit nearly 1 billion](https://ec.europa.eu/eurostat/en/web/products-eurostat-news/w/ddn-20260401-1)
123
+ - [EU rail passengers made 8.7 billion trips in 2024](https://ec.europa.eu/eurostat/web/products-eurostat-news/w/ddn-20260514-1)
124
+ - [EU life expectancy increases again and hits 81.5 years](https://ec.europa.eu/eurostat/web/products-eurostat-news/w/ddn-20260313-3)
125
+ - [Statistics Explained - Businesses in Manufacturing](https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Businesses_in_the_manufacturing_sector#Regional_data:_Manufacturing)
126
+
127
+ ## About
128
+
129
+ eurostat-map is an open-source JavaScript library for building interactive, publication-ready statistical maps focused on Europe. It combines D3-based SVG rendering with direct support for Eurostat datasets (JSON-stat), NUTS geographies from Nuts2json, and custom data workflows, and includes map types such as choropleth, proportional symbols, cartograms, flow maps, and composition charts. The project is designed for analysts, journalists, and institutions that need reproducible, configurable map visualizations for both exploratory analysis and official communication.
130
+
131
+ | | |
132
+ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
133
+ | _contributors_ | [<img src="https://github.com/jgaffuri.png" height="40" />](https://github.com/jgaffuri) [<img src="https://github.com/JoeWDavies.png" height="40" />](https://github.com/JoeWDavies) |
134
+ | _version_ | See [npm](https://www.npmjs.com/package/eurostat-map?activeTab=versions) |
135
+ | _status_ | Since 2018 |
136
+ | _license_ | [EUPL 1.2](https://github.com/eurostat/Nuts2json/blob/master/LICENSE) |
137
+
138
+ ## Contribute
139
+
140
+ Feel free to [ask for assistance](https://github.com/eurostat/eurostat.js/issues/new), fork the project or simply star it (it's always a pleasure).
141
+
142
+ ## Copyright
143
+
144
+ The [Eurostat NUTS dataset](http://ec.europa.eu/eurostat/web/nuts/overview) is copyrighted. There are [specific provisions](https://ec.europa.eu/eurostat/web/gisco/geodata/statistical-units) for the usage of this dataset which must be respected. The usage of these data is subject to their acceptance. See the [Eurostat-GISCO website](https://ec.europa.eu/eurostat/web/gisco/geodata/statistical-units) for more information.
145
+
146
+ ## Disclaimer
147
+
148
+ The designations employed and the presentation of material on these maps do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence. Palestine*: This designation shall not be construed as recognition of a State of Palestine and is without prejudice to the individual positions of the Member States on this issue.
@@ -1,3 +1,3 @@
1
- /*! /*! eurostat-map v4.4.3 | 2026 Eurostat | EUPL License. See https://github.com/eurostat/eurostat-map/blob/master/LICENSE * / */
1
+ /*! /*! eurostat-map v4.4.5 | 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,SAAAA,UAACC,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":""}