What this is
Collecting validated self-reports is the unglamorous half of an affective-computing pipeline. This package administers published psychometric instruments, scores them correctly, and records every response with the provenance needed to reproduce the score months later.
It is built around one idea: an instrument is data, not code. Items, response ranges, subscale membership and reverse keys are declared as values; a single vectorised scorer turns responses into scores without knowing which questionnaire it is holding. Adding an instrument adds no arithmetic.
Instruments
| Key | Instrument | Items | Scale | Scores |
|---|---|---|---|---|
bfi2 |
Big Five Inventory-2 | 60 | 1–5 | 5 domains, 15 facets |
bfi2-xs |
BFI-2 Extra-Short Form | 15 | 1–5 | 5 domains |
bfi10 |
Big Five Inventory-10 | 10 | 1–5 | 5 domains |
panas |
Positive and Negative Affect Schedule | 20 | 1–5 | Positive/Negative Affect |
vasf |
Visual Analogue Scale to Evaluate Fatigue Severity | 18 | 0–10 | Fatigue, Energy, composite |
BFI-2 and BFI-2-XS: Soto & John (2017). BFI-10: Rammstedt & John (2007). PANAS: Watson, Clark & Tellegen (1988). VAS-F: Lee, Hicks & Nino-Murcia (1991). See docs/instruments.md for full citations and licence notes.
Quickstart
Score responses you already have:
pip install personality_questionnaire
import personality_questionnaire as pq
result = pq.score(pq.get("bfi2"), answers) # answers: (n_participants, 60)
result.by_level("domain") # {"openness": array([...]), ...}
result.as_dict() # one participant, every subscale
Administer one at the terminal:
pq list # what is available
pq info bfi2 # items, subscales, citation
pq run bfi2 --participant P01 # ask the questions, score the answers
pq score bfi2 --input answers.csv # score a file
How it works
flowchart LR
I["instruments/<br/><i>pure data</i>"] --> R[registry]
R --> S["scoring<br/><i>one vectorised scorer</i>"]
S --> C[cli]
S --> D[db]
S --> U[ui]
| Module | Responsibility |
|---|---|
registry.py |
Item, Subscale, Questionnaire — what an instrument is, plus validation |
instruments/ |
One module per questionnaire. Data only, no arithmetic |
scoring.py |
The single scorer: reverse-keying, subscale means, normalisation, pre/post deltas |
io.py |
Reading and writing responses and scores |
provenance.py |
Package version, git SHA, instrument hash for each record |
cli/ |
pq list | info | run | score |
Design decisions
Instruments are Python literals, not data files. A literal is checked by the type
checker, validated at import, and present in the wheel by construction. A shipped CSV
is checked by nothing until a participant has already answered every item — and the
two scale files this repo used to carry were never read by any code path and
misspelled neuroticism, which is exactly how unread data drifts.
Reverse-keying belongs to the subscale, not the item. The VAS-F scores its five
energy items forward in Energy and reversed in Fatigue (composite), so a per-item
mask cannot express both. The reflection is folded into a signed weight matrix, which
also means every subscale at every level is computed by one matrix multiplication.
Both hierarchy levels are declared flat. The BFI-2's five domains and fifteen facets are siblings, each listing its own item numbers, rather than domains being composed from facets. The arithmetic is identical and the flat form scores both levels in a single pass.
Polarity is recorded as data. Every subscale carries a higher_is string, so no
consumer has to infer direction from a name — the inference that produced the bug
below.
Development
make dev # install everything
make fix # format and autofix
make check # lint, type-check, test, docs -- mirrors CI
make check-ci # the same, in a throwaway venv built like CI's
Tests are unittest under coverage, mirroring the package layout in tests/.
Related work
PersonalityLinMulT predicts perceived
Big Five traits from video. This package sits on the other side of that problem: it
collects self-reported ground truth, on the same [0, 1] scale and in the same
openness, conscientiousness, extraversion, agreeableness, neuroticism column order,
so an exported BFI-2 record drops into a self-report-versus-perception comparison.
The two are deliberately uncoupled in code — this package has no ML dependencies.
Citation
@software{fodor_personality_questionnaire,
author = {Fodor, Ádám},
title = {personality_questionnaire: administering and scoring validated psychometric instruments},
url = {https://github.com/fodorad/personality_questionnaire},
}
Contact
- Ádám Fodor (fodorad201@gmail.com) — adamfodor.com
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file personality_questionnaire-2.2.0.tar.gz.
File metadata
- Download URL: personality_questionnaire-2.2.0.tar.gz
- Upload date:
- Size: 38.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba94f26f45cf97ead0db2ce735a9031437ce0b628cb77692f4b08218a3d07cfd
|
|
| MD5 |
6ab8b50570d94cad5e99ebd77c31183a
|
|
| BLAKE2b-256 |
1cb75f6f9c6a8f8bec528ea4f967c89487d13412c142f9def7543e30b0938179
|
Provenance
The following attestation bundles were made for personality_questionnaire-2.2.0.tar.gz:
Publisher:
cd.yml on fodorad/personality_questionnaire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
personality_questionnaire-2.2.0.tar.gz -
Subject digest:
ba94f26f45cf97ead0db2ce735a9031437ce0b628cb77692f4b08218a3d07cfd - Sigstore transparency entry: 2766866133
- Sigstore integration time:
-
Permalink:
fodorad/personality_questionnaire@2b9cdcb88ff93817659e395b6ffdc5f46edcff20 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/fodorad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@2b9cdcb88ff93817659e395b6ffdc5f46edcff20 -
Trigger Event:
push
-
Statement type:
File details
Details for the file personality_questionnaire-2.2.0-py3-none-any.whl.
File metadata
- Download URL: personality_questionnaire-2.2.0-py3-none-any.whl
- Upload date:
- Size: 49.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc5febc9d29f93bfa661e6114d44a3647ed0156098f24b9d7a9ec0659f6f5a2b
|
|
| MD5 |
998cceab0a388c71b44556939ffb2f25
|
|
| BLAKE2b-256 |
f73421e6f81be52ad3dc1b620700884e8486eeb2c208643b35f3d040e8507693
|
Provenance
The following attestation bundles were made for personality_questionnaire-2.2.0-py3-none-any.whl:
Publisher:
cd.yml on fodorad/personality_questionnaire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
personality_questionnaire-2.2.0-py3-none-any.whl -
Subject digest:
bc5febc9d29f93bfa661e6114d44a3647ed0156098f24b9d7a9ec0659f6f5a2b - Sigstore transparency entry: 2766866164
- Sigstore integration time:
-
Permalink:
fodorad/personality_questionnaire@2b9cdcb88ff93817659e395b6ffdc5f46edcff20 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/fodorad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@2b9cdcb88ff93817659e395b6ffdc5f46edcff20 -
Trigger Event:
push
-
Statement type: