Python package that helps you analyze ordinal data.
Ordinal scale data is common. Companies and governments can quickly perform large-scale research with surveys. Usually, a survey output is placed on the Likert scale, where answers are ordered to describe a person's feelings about the survey's topic. A typical example of a survey is when a person is asked to agree with a statement with answers on a five-level scale:
Should the law protect your personal data?
1. Strongly disagree.
2. Rather disagree.
3. I don't know.
4. Rather agree.
5. Strongly agree.
The order between categories makes analysis complex, and the fact that answers are polarized between opposing states. Moreover, a border between categories is subjective and depends on the person's experiences, feelings, and knowledge about a surveying topic.
Classical measurements of central tendency do not fit well with ordinal data [ADD BIBLIOGRAPHY]. We encourage you to use the surveypie package to analyze survey responses.
With surveypie, you can:
- visualize differences between surveyed groups,
- measure polarization within a group,
- measure polarization between groups,
- measure ...
Critical:
- First - CREATE YOUR OWN FORK OF THE REPOSITORY.
- Second - PULL REQUESTS ARE ALWAYS PUSHED INTO
devBRANCH OF THE MAIN REPOSITORY. But don't worry, even if you push it directly tomainbranch then repository admin will switch branches.
- Install poetry in your system: https://python-poetry.org/docs/
- Type
poetry installin the package repository. You should see the new environment where you can work on your scripts. Or you can create virtualenv using pip or conda BEFORE runnig commandpoetry install, activate your environment and then runpoetry install. - Install optional (
dev) dependenciespoetry install --extras dev
- Use
blackandflake8to format and lint code, followPEP 8, and write docstrings. Remember about type annotations. - Line length in our repository is set to 120 characters (PEP8 has 79 characters, but in our opinion it makes docstrings messy).
- First, format and lint the code (in the
srcdirectory):poetry run black src,poetry run flake8 src. - When you create new functions and classes always write and run unit tests in
testsdirectory, even if your code does not face users. - When you debug functions, or enhance codebase always run tests when your work is done
poetry run pytest. - All tests are passing? Great, it's time for Pull (Merge) Request.
- Push changes into your fork.
- From your fork push changes into the
devbranch. Wait till all tests are done, and then for the review. At this step some linting/code formatting/unit tests might go wrong. In this case, review doesn't start until all tests and code checks are valid, so you need to work a little bit longer with your code, and do commit with the new changes. - Reviewers may ask you to work on something, probably docstrings to user-facing functions or unit tests.
@software{surveypie_2024,
author = {Moliński, Szymon and Jonatowska, Marta and Grabowski, Filip},
license = {MIT},
month = apr,
title = {{surveypie}},
url = {https://github.com/hs3city/surveypie},
version = {0.0.1},
year = {2024}
}