# twitter/algebird

Abstract Algebra for Scala

Repository: https://github.com/twitter/algebird
Canonical: https://ross.abutalabs.com/products/algebird
Homepage: https://twitter.github.io/algebird
Language: Scala
License: Apache-2.0
License Family: permissive
Last push: 2025-11-21T04:01:23+00:00

## Health v2 (maintenance only)
Score: 47/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 53, release rhythm 8, longevity 100
- inputs: {"age_days": 5144, "days_push": 285, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2295, forks 345 (observed 2026-08-28T04:06:35.098536+00:00)

## What it is
Algebird is a Scala library providing abstract algebra typeclasses (Monoids, Groups, Rings) for building composable aggregation systems. It includes monoid implementations for probabilistic data structures like HyperLogLog, CountMinSketch, and Bloom filters, originally built for Twitter's Scalding and Summingbird frameworks.

## Use cases
- combine approximate statistics like HLL sketches in a MapReduce job
- implement composable aggregations over maps and tuples in Scala
- estimate cardinality of large datasets with low memory
- count approximate item frequencies with CountMinSketch
- define custom monoids for distributed reductions
- merge probabilistic data structures in streaming systems

## When to choose
- you are building aggregation systems on JVM big-data frameworks like Scalding, Storm, or Summingbird
- you need composable, mergeable approximate statistics (HLL, CountMinSketch, Bloom filters)
- you want typeclass-based algebraic abstractions for reductions in Scala

## When to avoid
- you need a general-purpose math or linear algebra library rather than algebraic typeclasses for aggregation
- your project is not on the JVM/Scala
- you need actively developed probabilistic structures with the latest research features

## Facets
- artifact type: library
- maturity: stable
- function: serialization, data-science, developer-tools
- domain: big-data, data-science, developer-tools
- platform: jvm
- tags: abstract-algebra, monoids, typeclasses, probabilistic-data-structures, hyperloglog, count-min-sketch, bloom-filter, aggregation, scala, algorithms

## Member repositories
- twitter/algebird (main) score 47

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:35.098536+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:40:23.943107+00:00, confidence not recorded.
  - readme: https://github.com/twitter/algebird (fetched 2026-08-28T04:06:35.098536+00:00, sha 4dc086b75b97)
  - homepage: https://twitter.github.io/algebird (fetched 2026-08-29T10:20:41.389805+00:00, sha b6829ba688ee)
- Data as of 2026-08-30T08:39:29.467469+00:00.
