Skip to main content

Berlin Numeracy Test for Hemlock projects

Project description

Hemlock-Berlin

Hemlock-Berlin is a hemlock extension which allows you to add a Berlin numeracy test to hemlock projects.

Installation

With the hemlock-CLI (recommended):

$ hlk install hemlock-berlin

With pip:

$ pip install hemlock-berlin

Quickstart

This example shows how to add an adaptive Berlin numeracy test to your hemlock survey and display the participant's score to him/her.

In survey.py:

from flask_login import current_user
from hemlock import Branch, Page, Label, route
from hemlock_berlin import berlin

@route('/survey')
def start():
    return Branch(
        berlin(),
        Page(
            Label(compile=display_score), 
            terminal=True
        )
    )

def display_score(label):
    label.label = '<p>Berlin score: {}</p>'.format(
        current_user.g['BerlinScore']
    )

app.py is standard from the hemlock template.

Run the app with the hemlock command line interface:

hlk serve

or with python:

python app.py

Citation

@software{bowen2020hemlock-berlin,
  author = {Dillon Bowen},
  title = {Hemlock-Berlin},
  url = {https://dsbowen.github.io/hemlock-berlin/},
  date = {2020-10-05},
}

@article{cokely2012measuring,
  title={Measuring risk literacy: The Berlin numeracy test.},
  author={Cokely, Edward T and Galesic, Mirta and Schulz, Eric and Ghazal, Saima and Garcia-Retamero, Rocio},
  journal={Judgment and Decision making},
  year={2012},
  publisher={Society for Judgment and Decision Making}
}

License

Users must cite this package in any publications which use it.

It is licensed with the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hemlock-berlin-0.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hemlock_berlin-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file hemlock-berlin-0.0.2.tar.gz.

File metadata

  • Download URL: hemlock-berlin-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for hemlock-berlin-0.0.2.tar.gz
Algorithm Hash digest
SHA256 93e6bcceb2190ee9c72815e28a4fd72622fdab74749651b3096d5f10d1e45e63
MD5 79ed27104f05978f977005b87c98b3bd
BLAKE2b-256 8299ec52f0625a166beccf1ad82c10299cefd12183f672c4af636999113aec70

See more details on using hashes here.

File details

Details for the file hemlock_berlin-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: hemlock_berlin-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for hemlock_berlin-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1eec299a1826eedf3270ef0998fa2666ba9ae586db57641f1036d2c9817628c8
MD5 6ea4393d4ef8077b0bf8bf3ad665b2ac
BLAKE2b-256 356f8b8d985bffbc5f29ed7fa4a128fd7b6563b0bcc77a539c6065efaaeae2d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page