{"id":27502240,"url":"https://polis-community.github.io/red-dwarf/","last_synced_at":"2025-04-17T14:02:27.811Z","repository":{"id":273007422,"uuid":"918450653","full_name":"polis-community/red-dwarf","owner":"polis-community","description":"A DIMensional REDuction library for stellarpunk democracy into the long haul. (Inspired by Pol.is)","archived":false,"fork":false,"pushed_at":"2025-04-01T04:02:25.000Z","size":1479,"stargazers_count":8,"open_issues_count":23,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T13:37:52.225Z","etag":null,"topics":["civic-tech","collective-intelligence","data-science","deliberative-democracy","democracy","dimensionality-reduction","participatory-democracy","polis"],"latest_commit_sha":null,"homepage":"https://polis-community.github.io/red-dwarf/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polis-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"patcon"}},"created_at":"2025-01-18T00:59:30.000Z","updated_at":"2025-04-02T16:41:02.000Z","dependencies_parsed_at":"2025-01-18T02:18:11.218Z","dependency_job_id":"06ae2c73-9a8d-49ba-b9c7-a24044e654cc","html_url":"https://github.com/polis-community/red-dwarf","commit_stats":null,"previous_names":["patcon/red-dwarf","polis-community/red-dwarf","polis-community/red-dwarf-democracy"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polis-community%2Fred-dwarf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polis-community%2Fred-dwarf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polis-community%2Fred-dwarf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polis-community%2Fred-dwarf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polis-community","download_url":"https://codeload.github.com/polis-community/red-dwarf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249347123,"owners_count":21255137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["civic-tech","collective-intelligence","data-science","deliberative-democracy","democracy","dimensionality-reduction","participatory-democracy","polis"],"created_at":"2025-04-17T14:01:12.426Z","updated_at":"2025-04-17T14:02:27.803Z","avatar_url":"https://github.com/polis-community.png","language":"Python","funding_links":["https://patreon.com/patcon"],"categories":["Forks"],"sub_categories":[],"readme":"# Red Dwarf\n\n[![PyPI - Version](https://img.shields.io/pypi/v/red-dwarf)][pypi]\n[![Run Tests](https://github.com/polis-community/red-dwarf-democracy/actions/workflows/test.yml/badge.svg)](https://github.com/polis-community/red-dwarf-democracy/actions/workflows/test.yml)\n\nA \u003cem\u003eDIM\u003c/em\u003eensional \u003cem\u003eRED\u003c/em\u003euction library for [stellarpunk][] democracy into the long haul.\n\n\u003e Stars are fires that burn for thousands of years. Some of them burn slow and\n\u003e long, like red dwarfs. Others-blue giants-burn their fuel so fast they shine\n\u003e across great distances, and are easy to see. As they start to run out of\n\u003e fuel, they burn helium, grow even hotter, and explode in a supernova.\n\u003e Supernovas, they're brighter than the brightest galaxies. They die, and\n\u003e everyone watches them go. -- Jodi Picoult, My Sister's Keeper\n\n\u003e If advanced alien civilizations really are out there, the planets of red\n\u003e dwarf stars could be ideal places to find them. -- [How the Universe Works\n\u003e (S5E8)](https://youtu.be/3Lq-mI6lgmA?t=375), Discovery\n\nInspiration: https://chatgpt.com/share/677f7690-7188-800b-85e5-816aaa7cc8f9\n\n## Roadmap\n\nFor now, see [this related issue](https://github.com/patcon/red-dwarf/issues/4)\n\n## Goals\n\nCode that aspires to embody and support democratic values should be...\n\n- **Legible.** It should be explorable and auditable not just to researchers, but to as many curious citizens as possible.\n- **Re-usable.** It should be easily used in contexts in which its original creators did not anticipate, nor perhaps even desire.\n- **Collectively stewarded.** It should grow and govern itself democratically and in a plural fashion.\n\n## Sponsors\n\n\u003cp\u003e\n  \u003ca href=\"https://agoracitizen.network\" rel=\"noopener sponsored\" target=\"_blank\"\u003e\u003cimg width=\"167\" src=\"https://agoracitizen.network/images/big_logo_agora.png\" alt=\"Agora Citizen Network\" title=\"Where citizens converge to exchange and debate ideas\" loading=\"lazy\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nRed Dwarf is generously sponsored by [ZKorum SAS](https://zkorum.com), creators of the [Agora Citizen Network](https://agoracitizen.network).\n\nAre 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](#get-involved) and supporting our continued work!** (ping @patcon)\n\n## Usage\n\nSee [`docs/notebooks/example-usage.ipynb`][notebook] or [`docs/notebooks/`][notebooks] for other examples.\n\n[![screen of the sample jupyter notebook](docs/notebook-screenshot.png)][notebook]\n\n### Loading Data\n\nLet's say that you have a conversation for which you know the conversation url, and you may or may not know the report url. This conversation may also have an archived CSV export saved somewhere online.\n\n- conversation url: https://pol.is/4yy3sh84js\n   - `conversation_id`: `4yy3sh84js`\n- report url: https://pol.is/report/r5jsvucnwuuhw7dzjvaim\n   - `report_id`: `r5jsvucnwuuhw7dzjvaim`\n- archived CSV export: https://github.com/compdemocracy/openData/tree/master/scoop-hivemind.ubi\n\n```py\nfrom reddwarf.polis import PolisClient\n\n# If you only know the conversation ID, you can fetch the live data from the Polis APIs.\n# Note that this may be fresher than a static export hosted elsewhere.\nclient = PolisClient()\nclient.load_data(polis_id=\"4yy3sh84js\")\n# If you happen to know the report ID, that can be used instead:\n#\n#     client.load_data(polis_id=\"r5jsvucnwuuhw7dzjvaim\")\n\n# All of these are equivalent to the above-mentioned:\nclient.load_data(conversation_id=\"4yy3sh84js\")\nclient.load_data(conversation_id=\"4yy3sh84js\", data_source=\"api\")\nclient.load_data(report_id=\"r5jsvucnwuuhw7dzjvaim\")\nclient.load_data(report_id=\"r5jsvucnwuuhw7dzjvaim\", data_source=\"api\")\n\n# If you know the report ID, you can also download from the newer and more official CSV export API endpoint:\n# Example: https://pol.is/api/v3/reportExport/r5jsvucnwuuhw7dzjvaim/participant-votes.csv\nclient = PolisClient()\nclient.load_data(polis_id=\"r5jsvucnwuuhw7dzjvaim\", data_source=\"csv_export\")\n\n# All of these are equivalent:\nclient.load_data(polis_id=\"r5jsvucnwuuhw7dzjvaim\", data_source=\"csv_export\")\nclient.load_data(directory_url=\"https://pol.is/api/v3/reportExport/r5jsvucnwuuhw7dzjvaim/\")\n\n\n# If you know a remote directory-like path that contains all the raw export files, you can use that.\n# EXAMPLE\n# Web: https://github.com/compdemocracy/openData/tree/master/scoop-hivemind.ubi\n# Raw: https://raw.githubusercontent.com/compdemocracy/openData/refs/heads/master/scoop-hivemind.ubi/\n#\n# Note: you must tell the loader whether \"strict moderation\" is being used,\n# as this can't be detected from the export data.\n# The loader will look for files with these names:\n#     - comments.csv\n#     - votes.csv\nclient = PolisClient(is_strict_moderation=True)\nclient.load_data(directory_url=\"https://raw.githubusercontent.com/compdemocracy/openData/refs/heads/master/scoop-hivemind.ubi/\")\n\n# If you have local CSV files, you can also load them individually.\n# Again, you must hint the moderation type.\n# Filenames must match `*comments.csv` or `*votes.csv`\nclient = PolisClient(is_strict_moderation=True)\nclient.load_data(filepaths=[\n   \"your-data/comments.csv\",\n   \"your-data/votes.csv\",\n])\n```\n\n## Get Involved\n\n- [Join][pug-discord] the _Polis User Group (PUG)_ **Discord** server.\n- Open a **GitHub issue**.\n- Submit a **GitHub pull request**.\n- Review the [**_Awesome Polis_ directory**][awesome-polis] to learn about related projects, academic papers, and other resources.\n   - Use the _\"People\"_ section to find other individuals and groups working in the field.\n\n\n## Changelog\n\nSee [`CHANGELOG.md`][changelog].\n\n## License\n\n[MPL 2.0: Mozilla Public License 2.0][mplv2] (See [`LICENSE`][license])\n\n\u003c!-- Links --\u003e\n   [pypi]: https://pypi.org/project/red-dwarf/\n   [stellarpunk]: https://www.youtube.com/watch?v=opnkQVZrhAw\n   [notebook]: https://github.com/polis-community/red-dwarf/blob/main/docs/notebooks/example-usage.ipynb\n   [notebooks]: https://github.com/polis-community/red-dwarf/tree/main/docs/notebooks/\n   [ZKorum]: https://github.com/zkorum\n   [agora]: https://agoracitizen.network/\n   [ngi-funding]: https://trustchain.ngi.eu/zkorum/\n   [MPLv2]: https://choosealicense.com/licenses/mpl-2.0/\n   [license]: https://github.com/polis-community/red-dwarf/blob/main/LICENSE\n   [pug-discord]: https://discord.com/invite/wFWB8kzQpP\n   [awesome-polis]: http://patcon.github.io/awesome-polis/\n   [changelog]: CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/polis-community.github.io%2Fred-dwarf%2F","html_url":"https://awesome.ecosyste.ms/projects/polis-community.github.io%2Fred-dwarf%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/polis-community.github.io%2Fred-dwarf%2F/lists"}