-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
192 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,47 @@ | ||
# Convention | ||
|
||
## Aggregation | ||
## Aggregations | ||
- Each aggregation should be named after a `model` it derived from | ||
- Each aggregation should expose it base | ||
- Each base aggregation should support initial criteria | ||
- All aggregations are runned against data seeds available in `test/fixtures` | ||
|
||
## Metric Fields | ||
- All extra metric fields should be added into `metric` object to avoid collision with other aggregation fields | ||
## Fields | ||
- All extra metric fields should be added into `metrics` object to avoid collision with other aggregation fields | ||
- All extra time fields should be in their singular form e.g `active` | ||
- All extra time fields should be suffixed with `Time` e.g `activeTime` | ||
|
||
## Structures | ||
|
||
### Party Analysis | ||
```js | ||
{ | ||
overview: { | ||
focal: Number, | ||
agency: Number, | ||
level: Number, | ||
area: Number, | ||
group: Number, | ||
role: Number, | ||
active: Number, | ||
inactive: Number | ||
}, | ||
overall: { | ||
levels: [{ | ||
level: { name: { en: String }, color: String, weight: Number }, | ||
agency: Number, | ||
focal: Number | ||
}], | ||
groups: [{ | ||
group: { name: { en: String }, color: String, weight: Number }, | ||
agency: Number, | ||
focal: Number | ||
}], | ||
roles: [{ | ||
role: { name: { en: String }, color: String, weight: Number }, | ||
agency: Number, | ||
focal: Number | ||
}] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters