equal
deleted
inserted
replaced
45 * Two ways are provided: |
45 * Two ways are provided: |
46 * `Fixture`: deprecated in Ember and have been move out. We know use `ember-data-fixture-adapter` which provides the same behavior. |
46 * `Fixture`: deprecated in Ember and have been move out. We know use `ember-data-fixture-adapter` which provides the same behavior. |
47 **However** it doesn't allow the use of `this.store.findRecord(...)` function. In our case it won't trigger the api request for the full document information (therefore doesn't get the sound urls). --> **Only use for testing** |
47 **However** it doesn't allow the use of `this.store.findRecord(...)` function. In our case it won't trigger the api request for the full document information (therefore doesn't get the sound urls). --> **Only use for testing** |
48 |
48 |
49 * `RESTAdapter`: The Common way of plugging in Ember with a Rest server. |
49 * `RESTAdapter`: The Common way of plugging in Ember with a Rest server. |
|
50 |
|
51 ## visualizations |
|
52 |
|
53 ### "Langues" |
|
54 |
|
55 It use D3js and the implementation by [Mike Bostock](http://bost.ocks.org/mike/treemap/) customized to fit our needs. |
|
56 The json used to build the treemap follows this example (can be find in `public/langues.json`): |
|
57 ```json |
|
58 { |
|
59 "name": "Global", |
|
60 "children": [ |
|
61 { |
|
62 "id": "id de langue (code Lexvo de la langues)", |
|
63 "name": "Français", |
|
64 "color": "lightblue", |
|
65 "value": 859 |
|
66 }, |
|
67 { |
|
68 "name": "Wallis et Futuna", |
|
69 "value": 43, |
|
70 "children": [ |
|
71 { |
|
72 "name": "LanEast Futuna (fud)", |
|
73 "value": 23 |
|
74 }, |
|
75 { |
|
76 "name": "Wallisian (wls)", |
|
77 "value": 20 |
|
78 } |
|
79 ] |
|
80 } |
|
81 ] |
|
82 } |
|
83 ``` |
|
84 A `color` attribute can be add to each node. |
|
85 |
|
86 ### "Carthographie" |
|
87 |
|
88 It use the [Ammap](https://www.amcharts.com/javascript-maps/) library. |
|
89 |
|
90 It also uses a JSON to describe the areas. It is possible to get the bounding box of the country clicked, however it is a rectangle and isn't as precise as the SVG path. |
|
91 |
|
92 It seems to use the `ISO 3166-1` country naming convention ("US", "FR", "BZ", etc.) |