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 +49 -31
- package/build/eurostatmap.min.js +1 -1
- package/package.json +19 -7
package/README.md
CHANGED
|
@@ -1,56 +1,74 @@
|
|
|
1
|
-
# [eurostat-map
|
|
1
|
+
# [eurostat-map](https://github.com/eurostat/eurostat-map)
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
|
|
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
|
|
11
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
12
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
13
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
14
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
15
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
16
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
17
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
18
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
19
|
-
<a href="https://eurostat.github.io/eurostat-map
|
|
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
|
|
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('
|
|
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
|
|
36
|
-
- [Population density map with dot pattern](https://eurostat.github.io/eurostat-map
|
|
37
|
-
- [Population map with proportional circles](https://eurostat.github.io/eurostat-map
|
|
38
|
-
- [GDP map with custom proportional symbols](https://eurostat.github.io/eurostat-map
|
|
39
|
-
- [Causes of death with proportional pie charts](https://eurostat.github.io/eurostat-map
|
|
40
|
-
- [Population change ](https://eurostat.github.io/eurostat-map
|
|
41
|
-
- [NUTS typology as a categorical map](https://eurostat.github.io/eurostat-map
|
|
42
|
-
- [Focus on Spain](https://eurostat.github.io/eurostat-map
|
|
43
|
-
- [20 years of GDP change in Europe](https://eurostat.github.io/eurostat-map
|
|
44
|
-
- [Unemployment/population relation](https://eurostat.github.io/eurostat-map
|
|
45
|
-
- [Farm sizes composition](https://eurostat.github.io/eurostat-map
|
|
46
|
-
- [Livestock composition](https://eurostat.github.io/eurostat-map
|
|
47
|
-
- [Sparklines: Population in Europe since 2012](https://eurostat.github.io/eurostat-map
|
|
48
|
-
- [World map](https://eurostat.github.io/eurostat-map
|
|
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
|
-
|
|
53
|
-
|
|
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
|
|
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
|
|