eurostat-map 3.6.132 → 3.6.133
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +49 -41
- package/build/eurostatmap.min.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
# eurostat-map.js
|
1
|
+
# [eurostat-map.js](https://github.com/eurostat/eurostat-map.js)
|
2
2
|
|
3
|
-
![npm bundle size](https://img.shields.io/bundlephobia/min/eurostat-map)
|
3
|
+
![npm bundle size](https://img.shields.io/bundlephobia/min/eurostat-map)
|
4
4
|
![npm](https://img.shields.io/npm/v/eurostat-map)
|
5
|
-
[![Build Status](https://travis-ci.org/eurostat/eurostat-map.js.svg?branch=master)](https://travis-ci.org/eurostat/eurostat-map.js)
|
6
5
|
![license](https://img.shields.io/badge/license-EUPL-success)
|
7
6
|
|
8
|
-
|
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.
|
9
8
|
|
10
9
|
<div>
|
11
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>
|
@@ -22,66 +21,75 @@ Quickly create and customise thematic web maps based on [NUTS regions](https://e
|
|
22
21
|
|
23
22
|
## Examples
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
|
24
|
+
You can build an interactive web map based on a few lines of code:
|
25
|
+
|
26
|
+
```javascript
|
27
|
+
eurostatmap
|
28
|
+
.map('ch')
|
29
|
+
.title('Population density in Europe')
|
30
|
+
.stat({ eurostatDatasetCode: 'demo_r_d3dens', unitText: 'people/km²' })
|
31
|
+
.legend({ x: 500, y: 180, title: 'Density, people/km²' })
|
32
|
+
.build()
|
33
|
+
```
|
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))
|
40
49
|
|
41
50
|
## Installation
|
42
51
|
|
43
|
-
-
|
44
|
-
-
|
45
|
-
|
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).
|
46
54
|
|
47
55
|
## Documentation
|
48
56
|
|
49
|
-
|
50
|
-
-
|
51
|
-
- For a [proportional symbol map](docs/reference.md#proportional-symbol-map),
|
52
|
-
- For a [proportional pie chart map](docs/reference.md#proportional-pie-chart-map),
|
53
|
-
- For a [categorical map](docs/reference.md#categorical-map).
|
54
|
-
- For a [bivariate choropleth map](docs/reference.md#bivariate-choropleth-map).
|
55
|
-
- For a [stripe composition map](docs/reference.md#stripe-composition-map).
|
56
|
-
- For a [sparkline map](docs/reference.md#sparkline-map).
|
57
|
+
For a quick tutorial check out this notebook:
|
58
|
+
https://observablehq.com/@joewdavies/eurostat-map-js
|
57
59
|
|
58
|
-
|
60
|
+
Or see the **[API reference](docs/reference.md)**:
|
59
61
|
|
62
|
+
- For a [choropleth map](docs/reference.md#choropleth-map),
|
63
|
+
- For a [proportional symbol map](docs/reference.md#proportional-symbol-map),
|
64
|
+
- For a [proportional pie chart map](docs/reference.md#proportional-pie-chart-map),
|
65
|
+
- For a [categorical map](docs/reference.md#categorical-map).
|
66
|
+
- For a [bivariate choropleth map](docs/reference.md#bivariate-choropleth-map).
|
67
|
+
- For a [stripe composition map](docs/reference.md#stripe-composition-map).
|
68
|
+
- For a [sparkline map](docs/reference.md#sparkline-map).
|
69
|
+
|
70
|
+
Anything unclear or missing? Feel free to [ask](https://github.com/eurostat/eurostat.js/issues/new) !
|
60
71
|
|
61
72
|
## Technical details
|
62
73
|
|
63
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/).
|
64
75
|
|
65
|
-
|
66
76
|
## About
|
67
77
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
78
|
+
| | |
|
79
|
+
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
80
|
+
| _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) |
|
81
|
+
| _version_ | See [npm](https://www.npmjs.com/package/eurostat-map?activeTab=versions) |
|
82
|
+
| _status_ | Since 2018 |
|
83
|
+
| _license_ | [EUPL 1.2](https://github.com/eurostat/Nuts2json/blob/master/LICENSE) |
|
75
84
|
|
76
85
|
## Support and contribution
|
77
86
|
|
78
87
|
Feel free to [ask support](https://github.com/eurostat/eurostat.js/issues/new), fork the project or simply star it (it's always a pleasure).
|
79
88
|
|
80
|
-
|
81
89
|
## Copyright
|
82
90
|
|
83
91
|
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/reference-data/administrative-units-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](http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts) for more information.
|
84
92
|
|
85
|
-
|
86
93
|
## Disclaimer
|
94
|
+
|
87
95
|
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.
|