Fetch dream reports.
Project description
krank
Fetch curated dream reports.
See the online documentation for details.
Installation
pip install --upgrade --force-reinstall krank
Usage
import krank
# View a list of available corpora.
krank.list_corpora()
# ['zhang2019']
# Print metadata about a single corpus.
>>> krank.info("zhang2019")
# Corpus: zhang2019
# Title: Zhang & Wamsley 2019 Dream Reports
# Description: Dream reports collected from an laboratory polysomnography study
# Load a corpus.
corpus = krank.load("zhang2019")
corpus
# Corpus('zhang2019')
# Return metadata as a dictionary.
for k, v in corpus.metadata.items():
print(f"{k+':':>15}", v)
# title: Zhang & Wamsley 2019 Dream Reports
# description: Dream reports collected from an laboratory polysomnography study
# column_map: {'report': 'Text of Report', 'author': 'Subject ID', 'age': 'Subject age', 'sex': 'Subject sex', 'time': 'Time of awakening', 'stage_intended': 'Intended last sleep stage', 'stage_actual': 'Actual last sleep stage', 'experience': 'Experience'}
# author_fields: ['age', 'sex']
# version: 1
# download_url: https://zenodo.org/records/18050635/files/zhang2019.csv?download=1
# hash: md5:a61a3c56f4ee8c14e4a6466044df88f8
# Return dream reports and their associated metadata in a tidy dataframe.
corpus.reports.head()
# author time stage_intended stage_actual experience report
# 0 10 07:17:27 REM Morning True I umm I was with my parents and we're having a...
# 1 10 02:07:02 N2 NREM True Ummm... trying to put um everything together [...
# 2 10 03:50:48 REM REM True Yes I'm ummm... I'm in an argument with a...wi...
# 3 10 00:16:08 N1 SO False What? I don't have a dream. What was your ques...
# 4 10 00:54:12 N2 SO True Uhuh. Umm let's see.. Running around...(silence).
# Return unique authors and their associated metadata in a tidy dataframe.
corpus.authors.head()
# author age sex
# 0 10 23 Male
# 1 26 18 Male
# 2 30 19 Female
# 3 42 20 Male
# 4 83 20 Male
Project details
Release history Release notifications | RSS feed
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 krank-0.1.0.dev2.tar.gz.
File metadata
- Download URL: krank-0.1.0.dev2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76609b886aeb58b5974c906a036008e53e6058c5295c20907f0664c3dc278378
|
|
| MD5 |
e690c374e7e25d040a94c8d4eab1dbe5
|
|
| BLAKE2b-256 |
8cd25dea0ba406e9f44bd75880fffc1ea76564f36bbe95924c171b4dca3f3524
|
Provenance
The following attestation bundles were made for krank-0.1.0.dev2.tar.gz:
Publisher:
release.yaml on remrama/krank
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krank-0.1.0.dev2.tar.gz -
Subject digest:
76609b886aeb58b5974c906a036008e53e6058c5295c20907f0664c3dc278378 - Sigstore transparency entry: 779931652
- Sigstore integration time:
-
Permalink:
remrama/krank@e3440851bfb212c2d7bb485db3b53398fd2e7801 -
Branch / Tag:
refs/tags/v0.1.0.dev2 - Owner: https://github.com/remrama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e3440851bfb212c2d7bb485db3b53398fd2e7801 -
Trigger Event:
push
-
Statement type:
File details
Details for the file krank-0.1.0.dev2-py3-none-any.whl.
File metadata
- Download URL: krank-0.1.0.dev2-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04ac3a0d5f1fb98e419f8ae770a7be0aa5ccadc6641ab19fcfce44fc029f30e3
|
|
| MD5 |
d5a8be6a7277d387117840e9d5baeab1
|
|
| BLAKE2b-256 |
cf4bc284f4aa23e7c8cacea3fe926bbf9015c36f2ba98b55507140c2da518587
|
Provenance
The following attestation bundles were made for krank-0.1.0.dev2-py3-none-any.whl:
Publisher:
release.yaml on remrama/krank
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krank-0.1.0.dev2-py3-none-any.whl -
Subject digest:
04ac3a0d5f1fb98e419f8ae770a7be0aa5ccadc6641ab19fcfce44fc029f30e3 - Sigstore transparency entry: 779931654
- Sigstore integration time:
-
Permalink:
remrama/krank@e3440851bfb212c2d7bb485db3b53398fd2e7801 -
Branch / Tag:
refs/tags/v0.1.0.dev2 - Owner: https://github.com/remrama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e3440851bfb212c2d7bb485db3b53398fd2e7801 -
Trigger Event:
push
-
Statement type: