Add support to group by year of date properties
For some content, the most pertinent grouping would be by a date property.
Here we implement a bare-bones version of it, with a new template parameter
triggering a grouping by year: the date is then converted using YEAR.
Ideally, we would be able to specify another granularity than year (eg decade/century).
This is not as straightforward (as far as I know, no handy SPARQL primitive like YEAR)
so let's kick that use case down the road.
- Add GroupingType Enum
- Add grouping_type class attribute to PropertyStatistics
- Add BIND dance to:
- Change accordingly the formatting of groupings in make_stats_for_one_grouping
- Add unit tests