eurostat-map 4.4.1 → 4.4.3

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 CHANGED
@@ -1,221 +1,147 @@
1
- <div align="center">
2
- <img src="https://img.shields.io/bundlephobia/min/eurostat-map" alt="npm bundle size">
3
- <img src="https://img.shields.io/npm/v/eurostat-map" alt="npm">
4
- <img src="https://img.shields.io/badge/license-EUPL-success" alt="license">
5
- <a href="http://www.awesomeofficialstatistics.org"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Official Statistics"></a>
6
- </div>
7
-
8
- # eurostat-map: JavaScript & TypeScript Mapping Library for Eurostat Data
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
- <strong>D3-based mapping library for Eurostat and custom data, with built-in map types for analytical storytelling.</strong>
20
- </div>
21
-
22
- <div align="center">
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>
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>
36
- <br>
37
- <div align="center">
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>
39
- </div>
40
-
41
- ---
42
-
43
- ## Resources
44
-
45
- - [Quick Start](#quick-start)
46
- - [What You Can Build](#what-you-can-build)
47
- - [Examples by Use Case](#examples-by-use-case)
48
- - [Installation](#installation)
49
- - [Documentation](#documentation)
50
- - [Developer Path](#developer-path)
51
- - [Technical details](#technical-details)
52
- - [About](#about)
53
- - [Contribute](#contribute)
54
- - [Copyright](#copyright)
55
- - [Disclaimer](#disclaimer)
56
-
57
- ---
58
-
59
- ## Quick Start
60
-
61
- ```bash
62
- npm install eurostat-map
63
- ```
64
-
65
- ```javascript
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()
74
- ```
75
-
76
- Want a guided setup? Try the notebook:
77
- https://observablehq.com/@joewdavies/eurostat-map-js
78
-
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))
122
-
123
- ## Installation
124
-
125
- ### Node.js
126
-
127
- ```npm
128
- npm install eurostat-map
129
- ```
130
-
131
- then
132
-
133
- ```javascript
134
- import eurostatmap from 'eurostat-map'
135
- ```
136
-
137
- or
138
-
139
- ```javascript
140
- const eurostatmap = require('eurostat-map')
141
- ```
142
-
143
- ### Standalone
144
-
145
- For the latest version, use:
146
-
147
- ```html
148
- <script src="https://unpkg.com/eurostat-map"></script>
149
- ```
150
-
151
- For a fixed version, use:
152
-
153
- ```html
154
- <script src="https://unpkg.com/eurostat-map@X.Y.Z"></script>
155
- ```
156
-
157
- where X.Y.Z is a [version number](https://www.npmjs.com/package/eurostat-map?activeTab=versions).
158
-
159
- ## Documentation
160
-
161
- For detailed documentation see the **[API reference page](docs/reference.md)**.
162
-
163
- You can jump directly to map-type sections from the table of contents in [docs/reference.md](docs/reference.md).
164
-
165
- Anything unclear or missing? Feel free to [ask](https://github.com/eurostat/eurostat.js/issues/new)!
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
-
198
- ## Technical details
199
-
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/).
201
-
202
- ## About
203
-
204
- | | |
205
- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
206
- | _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) |
207
- | _version_ | See [npm](https://www.npmjs.com/package/eurostat-map?activeTab=versions) |
208
- | _status_ | Since 2018 |
209
- | _license_ | [EUPL 1.2](https://github.com/eurostat/Nuts2json/blob/master/LICENSE) |
210
-
211
- ## Contribute
212
-
213
- 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).
214
-
215
- ## Copyright
216
-
217
- 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.
218
-
219
- ## Disclaimer
220
-
221
- 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/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,3 +1,3 @@
1
- /*! /*! eurostat-map v4.4.1 | 2026 Eurostat | EUPL License. See https://github.com/eurostat/eurostat-map/blob/master/LICENSE * / */
1
+ /*! /*! eurostat-map v4.4.3 | 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,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":""}
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":""}