ankane/groupdate — 3.9k★ on GitHub (Ruby). The simplest way to group temporal data
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Takes a String, which is passed to strftime, or a Symbol, which is looked up by I18n.localize in i18n scope 'time.formats', or a Proc. You can pass a locale with the locale option.
Series
The entire series is returned by default. To exclude points without data, use:
If you use Postgres and have a default scope that uses order, you may get a column must appear in the GROUP BY clause error (just like with Active Record’s group method). Remove the order scope with:
User.unscope(:order).group_by_day(:count).count
Arrays and Hashes
users.group_by_day { |u| u.created_at } # or group_by_day(&:created_at)
Yes — ankane/groupdate ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/ankane/groupdate.
What is ankane/groupdate?
ankane/groupdate (ankane/groupdate) is a Ruby project on GitHub. From the project's own README: The simplest way to group temporal data
Where do I read more about ankane/groupdate?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/ankane/groupdate is the definitive source.
Read full README in the tab above.
Want a second opinion on groupdate?
Ask an AI that can read this page — one click and you get its take on groupdate.