eurostat-map 3.6.133 → 4.0.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 CHANGED
@@ -1,56 +1,74 @@
1
- # [eurostat-map.js](https://github.com/eurostat/eurostat-map.js)
1
+ # [eurostat-map](https://github.com/eurostat/eurostat-map)
2
2
 
3
3
  ![npm bundle size](https://img.shields.io/bundlephobia/min/eurostat-map)
4
4
  ![npm](https://img.shields.io/npm/v/eurostat-map)
5
5
  ![license](https://img.shields.io/badge/license-EUPL-success)
6
6
 
7
- Eurostatmap allows developers to quickly create and customise thematic web maps based on [NUTS regions](https://ec.europa.eu/eurostat/web/nuts/background), showing [Eurostat](https://ec.europa.eu/eurostat) data directly retrieved from the [Eurostat database](https://ec.europa.eu/eurostat/data/database), or custom data added manually.
7
+ Eurostat-map.js allows developers to quickly create and customise thematic web maps based on [NUTS regions](https://ec.europa.eu/eurostat/web/nuts/background), showing [Eurostat](https://ec.europa.eu/eurostat) data directly retrieved from the [Eurostat database](https://ec.europa.eu/eurostat/data/database), or custom data added manually.
8
8
 
9
9
  <div>
10
- <a href="https://eurostat.github.io/eurostat-map.js/examples/population-density.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/ch.png" alt="choropleth" width="400"/> </a>
11
- <a href="https://eurostat.github.io/eurostat-map.js/examples/prop-circles.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/prop.png" alt="proportional circles" width="400"/></a>
12
- <a href="https://eurostat.github.io/eurostat-map.js/examples/prop-symbols.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/euro.png" alt="proportional symbols" width="400"/></a>
13
- <a href="https://eurostat.github.io/eurostat-map.js/examples/prop-piecharts.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/pie.png" alt="pie charts" width="400"/></a>
14
- <a href="https://eurostat.github.io/eurostat-map.js/examples/livestock_composition.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/stripe.png" alt="stripes" width="400"/></a>
15
- <a href="https://eurostat.github.io/eurostat-map.js/examples/pop-unemploy-bivariate.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/bivar.png" alt="bivariate choropleth" width="400"/></a>
16
- <a href="https://eurostat.github.io/eurostat-map.js/examples/categorical.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/cat.png" alt="categorical" width="400"/></a>
17
- <a href="https://eurostat.github.io/eurostat-map.js/examples/population-dot-density.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/dot.png" alt="dot density" width="400"/></a>
18
- <a href="https://eurostat.github.io/eurostat-map.js/examples/world.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/world.png" alt="dot density" width="400" height="70px"/></a>
19
- <a href="https://eurostat.github.io/eurostat-map.js/examples/sparklines.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/docs/img/previews/sparkline.png" alt="dot density" width="400" height="70px"/></a>
10
+ <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/previews/ch.png" alt="choropleth" width="400"/> </a>
11
+ <a href="https://eurostat.github.io/eurostat-map/examples/prop-circles.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/prop.png" alt="proportional circles" width="400"/></a>
12
+ <a href="https://eurostat.github.io/eurostat-map/examples/prop-symbols.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/euro.png" alt="proportional symbols" width="400"/></a>
13
+ <a href="https://eurostat.github.io/eurostat-map/examples/prop-piecharts.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/pie.png" alt="pie charts" width="400"/></a>
14
+ <a href="https://eurostat.github.io/eurostat-map/examples/livestock_composition.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/stripe.png" alt="stripes" width="400"/></a>
15
+ <a href="https://eurostat.github.io/eurostat-map/examples/pop-unemploy-bivariate.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/bivar.png" alt="bivariate choropleth" width="400"/></a>
16
+ <a href="https://eurostat.github.io/eurostat-map/examples/categorical.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/cat.png" alt="categorical" width="400"/></a>
17
+ <a href="https://eurostat.github.io/eurostat-map/examples/population-dot-density.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/dot.png" alt="dot density" width="400"/></a>
18
+ <a href="https://eurostat.github.io/eurostat-map/examples/world.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/world.png" alt="dot density" width="400" height="70px"/></a>
19
+ <a href="https://eurostat.github.io/eurostat-map/examples/sparklines.html" target="_blank"> <img src="https://raw.githubusercontent.com/eurostat/eurostat-map/master/docs/img/previews/sparkline.png" alt="dot density" width="400" height="70px"/></a>
20
20
  </div>
21
21
 
22
22
  ## Examples
23
23
 
24
- You can build an interactive web map based on a few lines of code:
24
+ You can build an interactive statistical map with just a few lines of code:
25
25
 
26
26
  ```javascript
27
27
  eurostatmap
28
- .map('ch')
28
+ .map('choropleth')
29
29
  .title('Population density in Europe')
30
30
  .stat({ eurostatDatasetCode: 'demo_r_d3dens', unitText: 'people/km²' })
31
31
  .legend({ x: 500, y: 180, title: 'Density, people/km²' })
32
32
  .build()
33
33
  ```
34
34
 
35
- - [Population density](https://eurostat.github.io/eurostat-map.js/examples/population-density.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/population-density.html))
36
- - [Population density map with dot pattern](https://eurostat.github.io/eurostat-map.js/examples/population-dot-density.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/population-dot-density.html))
37
- - [Population map with proportional circles](https://eurostat.github.io/eurostat-map.js/examples/prop-circles.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/prop-circles.html))
38
- - [GDP map with custom proportional symbols](https://eurostat.github.io/eurostat-map.js/examples/prop-symbols.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/prop-symbols.html))
39
- - [Causes of death with proportional pie charts](https://eurostat.github.io/eurostat-map.js/examples/prop-piecharts.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/prop-piecharts.html))
40
- - [Population change ](https://eurostat.github.io/eurostat-map.js/examples/population-change.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/population-change.html))
41
- - [NUTS typology as a categorical map](https://eurostat.github.io/eurostat-map.js/examples/categorical.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/categorical.html))
42
- - [Focus on Spain](https://eurostat.github.io/eurostat-map.js/examples/spain.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/spain.html))
43
- - [20 years of GDP change in Europe](https://eurostat.github.io/eurostat-map.js/examples/small_multiple.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/small_multiple.html))
44
- - [Unemployment/population relation](https://eurostat.github.io/eurostat-map.js/examples/pop-unemploy-bivariate.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/pop-unemploy-bivariate.html))
45
- - [Farm sizes composition](https://eurostat.github.io/eurostat-map.js/examples/farm_size.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/farm_size.html))
46
- - [Livestock composition](https://eurostat.github.io/eurostat-map.js/examples/livestock_composition.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/livestock_composition.html))
47
- - [Sparklines: Population in Europe since 2012](https://eurostat.github.io/eurostat-map.js/examples/sparklines.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/sparklines.html))
48
- - [World map](https://eurostat.github.io/eurostat-map.js/examples/world.html) (see [the code](https://github.com/eurostat/eurostat-map.js/blob/master/examples/world.html))
35
+ - [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))
36
+ - [Population density map with dot pattern](https://eurostat.github.io/eurostat-map/examples/population-dot-density.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/population-dot-density.html))
37
+ - [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))
38
+ - [GDP map with custom proportional symbols](https://eurostat.github.io/eurostat-map/examples/prop-symbols.html) (see [the code](https://github.com/eurostat/eurostat-map/blob/master/examples/prop-symbols.html))
39
+ - [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))
40
+ - [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))
41
+ - [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))
42
+ - [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))
43
+ - [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))
44
+ - [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))
45
+ - [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))
46
+ - [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))
47
+ - [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))
48
+ - [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))
49
49
 
50
50
  ## Installation
51
51
 
52
- - **Node.js**: With `npm install eurostatmap` and then `eurostatmap = require("eurostatmap")`.
53
- - **Standalone**: For the latest version, use `<script src="https://unpkg.com/eurostat-map"></script>` as shown in [the examples](#examples). For a fixed version, use `<script src="https://unpkg.com/eurostat-map@X.Y.Z"></script>`, where _X.Y.Z_ is a version number among [these ones](https://www.npmjs.com/package/eurostat-map?activeTab=versions).
52
+ ### Node.js
53
+
54
+ `npm install eurostatmap`
55
+
56
+ then
57
+
58
+ ```javascript
59
+ import eurostatmap from 'eurostatmap'
60
+ ```
61
+
62
+ or
63
+
64
+ ```javascript
65
+ eurostatmap = require('eurostatmap')
66
+ ```
67
+
68
+ ### Standalone
69
+
70
+ - For the latest version, use `<script src="https://unpkg.com/eurostat-map"></script>` as shown in [the examples](#examples).
71
+ - For a fixed version, use `<script src="https://unpkg.com/eurostat-map@X.Y.Z"></script>`, where _X.Y.Z_ is a [version number](https://www.npmjs.com/package/eurostat-map?activeTab=versions).
54
72
 
55
73
  ## Documentation
56
74
 
@@ -71,7 +89,7 @@ Anything unclear or missing? Feel free to [ask](https://github.com/eurostat/euro
71
89
 
72
90
  ## Technical details
73
91
 
74
- 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 REST webservice](http://ec.europa.eu/eurostat/web/json-and-unicode-web-services/getting-started/rest-request) for [JSON-stat](https://json-stat.org/) data. The data are decoded and queried using [JSON-stat library](https://json-stat.com/). Maps are rendered as SVG maps using [D3.js library](https://d3js.org/).
92
+ 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/). Maps are rendered as SVG maps using [D3.js library](https://d3js.org/).
75
93
 
76
94
  ## About
77
95