https://github.com/polis-community/red-dwarf

A DIMensional REDuction library for reproducing and experimenting with Polis-like data pipelines.

https://github.com/polis-community/red-dwarf

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

civic-tech collective-intelligence data-science deliberative-democracy democracy dimensionality-reduction participatory-democracy plurality polis
Last synced: 6 months ago · JSON representation

Repository

A DIMensional REDuction library for reproducing and experimenting with Polis-like data pipelines.

Basic Info
Statistics
  • Stars: 12
  • Watchers: 1
  • Forks: 5
  • Open Issues: 53
  • Releases: 4
Topics
civic-tech collective-intelligence data-science deliberative-democracy democracy dimensionality-reduction participatory-democracy plurality polis
Created about 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License

README.md

Red Dwarf: A Pol.is-like library

   ⚫⋆✦⋆⭑⋆⋆⋆⋆⋆          PyPI - Version Run Tests

Deploy Docs

A DIMensional REDuction library for reproducing and experimenting with Polis-like data pipelines.

Red dwarf stars are dim red stars. They are hard to see, but are the most common type -- the quiet 70% majority. They burn slow, using fuel efficiently, making them the longest-living stars in the universe. They'll be around until the last light, even supporting habitable planets for billions of years. If there's persistant life out there, it's likely in a long slow dance with a red dwarf.

Features

  • Loads data from any Polis conversation on any Polis server, using only the conversation URL.
  • Reproduces Polis calculation pipeline from only raw vote data.
    • "Classic" Polis pipeline = PCA dimensional reduction, KMeans clustering, and comment statistics.
  • Alternative algorithms, aspiring for sensible defaults:
  • Helpful visualizations via matplotlib

Goals

Code that aspires to embody and support democratic values should be...

  • Legible. It should be explorable and auditable not just to researchers, but to as many curious citizens as possible.
  • Re-usable. It should be easily used in contexts in which its original creators did not anticipate, nor perhaps even desire.
  • Collectively stewarded. It should grow and govern itself democratically and in a plural fashion.

Roadmap

For now, see this related issue

Sponsors

Agora Citizen Network

Red Dwarf is generously sponsored by ZKorum SAS, creators of the Agora Citizen Network.

Are you or your organization eager to see more platforms and community built around democracy-supporting algorithms like these? Please consider getting in touch on Discord and supporting our continued work! (ping @patcon)

Usage

```

OFFICIAL RELEASES

For core, the classic polis pipeline: PCA + K-means

(~60MB beyond scikit-learn disk space)

pip install red-dwarf

For additional algorithms beyond classic polis: PaCMAP, LocalMAP, HDBSCAN, etc.

pip install red-dwarf[alt-algos]

For additional packages for visualizing plots

pip install red-dwarf[plots]

For everything (~60MB beyond core packages)

pip install red-dwarf[all]

pip install red-dwarf[alt-algos,plots]

```

See docs/notebooks/polis-implementation-demo.ipynb or docs/notebooks/ for other examples.

| screenshot of library-generated notebook | screenshot of Polis-generated report | |---|---| | screen of the sample jupyter notebook | screenshot of the polis report |

Architecture

This is the generalized pipeline of Polis-like processes that we're aiming to accomodate. (See issue #53 for details.)

Get Involved

Running it for local development

  • Install python (preferrably virtual environment)
  • Install uv (python package manager) (e.g. pip install uv)
  • Install dependencies with make install-dev
  • Run make command alone to see other helpful make subcommands
  • Alternatively, run one of the ipynb notebooks; possibly replacing the install command at the top with %pip install -e ../../ to use the local source instead.

Contributing

  • Join the Polis User Group (PUG) Discord server.
  • Open a GitHub issue.
  • Submit a GitHub pull request.
  • Review the Awesome Polis directory to learn about related projects, academic papers, and other resources.
    • Use the "People" section to find other individuals and groups working in the field.

Changelog

See CHANGELOG.md.

License

MPL 2.0: Mozilla Public License 2.0 (See LICENSE)

Owner

  • Name: polis-community
  • Login: polis-community
  • Kind: organization

Community-driven set of libraries based on Polis: building customizable, modular tools for participatory democracy.

GitHub Events

Total
  • Fork event: 3
  • Create event: 31
  • Commit comment event: 1
  • Release event: 3
  • Issues event: 50
  • Watch event: 9
  • Delete event: 27
  • Issue comment event: 99
  • Push event: 181
  • Pull request review event: 28
  • Pull request review comment event: 28
  • Gollum event: 3
  • Pull request event: 63
Last Year
  • Fork event: 3
  • Create event: 31
  • Commit comment event: 1
  • Release event: 3
  • Issues event: 50
  • Watch event: 9
  • Delete event: 27
  • Issue comment event: 99
  • Push event: 181
  • Pull request review event: 28
  • Pull request review comment event: 28
  • Gollum event: 3
  • Pull request event: 63

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 40
  • Total pull requests: 58
  • Average time to close issues: 5 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.64
  • Merged pull requests: 48
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 40
  • Pull requests: 58
  • Average time to close issues: 5 days
  • Average time to close pull requests: 1 day
  • Issue authors: 3
  • Pull request authors: 4
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.64
  • Merged pull requests: 48
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • patcon (35)
  • nicobao (4)
  • bestian (1)
Pull Request Authors
  • patcon (55)
  • takeruhukushima (1)
  • nicobao (1)
  • Dashhhhhhhh (1)
Top Labels
Issue Labels
bug (4) enhancement (1) priority:★☆☆ (1) good first issue (1)
Pull Request Labels
bug (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 14 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: red-dwarf

A dimensional reduction library for stellarpunk democracy into the long haul

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 14 Last month
Rankings
Dependent packages count: 9.4%
Stargazers count: 21.4%
Forks count: 24.4%
Average: 27.1%
Dependent repos count: 53.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

pyproject.toml pypi
  • fake-useragent >=2.0.3
  • matplotlib >=3.10.0
  • pandas >=2.2.3
  • polars >=1.19.0
  • requests >=2.32.3
  • requests-cache >=1.2.1
  • requests-ratelimiter >=0.7.0
  • scikit-learn >=1.6.0