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
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.4%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Basic Info
Statistics
  • Stars: 28
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 1
Created about 6 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

catfact

Categorical wrangling for Python. Supports both Polars and Pandas. Enables categorical and ordinal scales in plotting tools like Plotnine.

catfact addresses some common challenges when working categorical data. Categorical data is useful when you want to display your data in a specific way, like alphabetical, most frequent first, or along a scale. It is a port of the popular R package forcats.

Installation

bash pip install catfact

Basic example

``` python import polars as pl import catfact as fct from catfact.polars.data import starwars

( starwars .groupby("eyecolor") .agg(pl.len()) .sort("len", descending=True) ) ```

shape: (15, 2) | eye_color | len | |-----------------|-----| | str | u32 | | "brown" | 21 | | "blue" | 19 | | "yellow" | 11 | | "black" | 10 | | "orange" | 8 | | … | … | | "white" | 1 | | "pink" | 1 | | "blue-gray" | 1 | | "green, yellow" | 1 | | "dark" | 1 |

``` python from plotnine import ggplot, aes, geombar, coordflip

( ggplot(starwars, aes("eyecolor")) + geombar() + coord_flip() ) ```

python ( starwars .with_columns( fct.infreq(pl.col("eye_color")) ) >> ggplot(aes("eye_color")) + geom_bar() + coord_flip() )

Owner

  • Name: Michael Chow
  • Login: machow
  • Kind: user
  • Company: @rstudio

Learning, Memory, Computation

GitHub Events

Total
  • Release event: 3
  • Watch event: 16
  • Push event: 32
  • Pull request event: 6
  • Create event: 5
Last Year
  • Release event: 3
  • Watch event: 16
  • Push event: 32
  • Pull request event: 6
  • Create event: 5

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 6
  • Total Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michael Chow m****b@f****m 6
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 1
  • Total pull requests: 2
  • Average time to close issues: 3 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 4.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 6 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • machow (1)
Pull Request Authors
  • machow (5)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • actions/checkout v2 composite
  • actions/setup-python v5 composite
  • astral-sh/setup-uv v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
  • databackend >=0.0.3
  • ddispatch >=0.0.1
uv.lock pypi
  • annotated-types 0.7.0
  • appnope 0.1.4
  • asttokens 3.0.0
  • attrs 25.3.0
  • beartype 0.20.2
  • black 25.1.0
  • catfact 0.1.dev18+g31c36a9
  • certifi 2025.4.26
  • cffi 1.17.1
  • cfgv 3.4.0
  • charset-normalizer 3.4.1
  • click 8.1.8
  • colorama 0.4.6
  • comm 0.2.2
  • contourpy 1.3.0
  • cycler 0.12.1
  • databackend 0.0.3
  • ddispatch 0.0.1
  • debugpy 1.8.14
  • decorator 5.2.1
  • distlib 0.3.9
  • exceptiongroup 1.2.2
  • executing 2.2.0
  • filelock 3.18.0
  • fonttools 4.57.0
  • griffe 1.7.3
  • identify 2.6.10
  • idna 3.10
  • importlib-metadata 8.6.1
  • importlib-resources 6.5.2
  • iniconfig 2.1.0
  • ipykernel 6.29.5
  • ipython 8.18.1
  • jedi 0.19.2
  • jsonschema 4.23.0
  • jsonschema-specifications 2025.4.1
  • jupyter-client 8.6.3
  • jupyter-core 5.7.2
  • kiwisolver 1.4.7
  • markdown-it-py 3.0.0
  • matplotlib 3.9.4
  • matplotlib-inline 0.1.7
  • mdurl 0.1.2
  • mizani 0.11.4
  • mypy-extensions 1.1.0
  • nest-asyncio 1.6.0
  • nodeenv 1.9.1
  • numpy 2.0.2
  • packaging 25.0
  • pandas 2.2.3
  • parso 0.8.4
  • pathspec 0.12.1
  • patsy 1.0.1
  • pexpect 4.9.0
  • pillow 11.2.1
  • platformdirs 4.3.7
  • plotnine 0.13.6
  • pluggy 1.5.0
  • plum-dispatch 2.5.7
  • polars 1.27.1
  • pre-commit 4.2.0
  • prompt-toolkit 3.0.51
  • psutil 7.0.0
  • ptyprocess 0.7.0
  • pure-eval 0.2.3
  • pycparser 2.22
  • pydantic 2.11.4
  • pydantic-core 2.33.2
  • pygments 2.19.1
  • pyparsing 3.2.3
  • pytest 8.3.5
  • python-dateutil 2.9.0.post0
  • pytz 2025.2
  • pywin32 310
  • pyyaml 6.0.2
  • pyzmq 26.4.0
  • quartodoc 0.9.1
  • referencing 0.36.2
  • requests 2.32.3
  • rich 14.0.0
  • rpds-py 0.24.0
  • ruff 0.11.8
  • scipy 1.13.1
  • six 1.17.0
  • sphobjinv 2.3.1.2
  • stack-data 0.6.3
  • statsmodels 0.14.4
  • tabulate 0.9.0
  • tomli 2.2.1
  • tornado 6.4.2
  • traitlets 5.14.3
  • typing-extensions 4.13.2
  • typing-inspection 0.4.0
  • tzdata 2025.2
  • urllib3 2.4.0
  • virtualenv 20.30.0
  • watchdog 6.0.0
  • wcwidth 0.2.13
  • zipp 3.21.0