Python package for Factorial Survey Design
Project description
Factorial Survey Design
Python package for Factorial Survey Design
Free software: MIT license
Documentation: https://fsdesign.readthedocs.io.
Features
Vignettes factorial design generation
Installation
Using pip:
$ pip install fsdesign
Usage
As a command line tool
$ fsdesign [OPTIONS]
Options:
-t, --template PATH Path to template text file for vignettes -f, --factors PATH Path to factors csv file -s, --size INTEGER Number of resulting vignettes -o, --output PATH Output file path -d, --duplicates Flag for duplicated vignettes --help Show usage and options information.
Example:
$ fsdesign -t my_template.txt -f my_factors.csv -s 370 -o vignettes.csv -d
Template file example:
Peter is a {job_title}. During the last year he has been using {drug_type} {frequency}.
Factors csv example:
job_title |
drug_type |
frequency |
---|---|---|
college professor |
alcohol |
occasionally |
police officer |
tobacco |
often |
student |
cocaine |
daily |
salesman |
marijuana |
|
nightclub waiter |
amphetamines |
The output is a csv file containing:
Incremental unique ID
Vignette text
Assigned values for the factors within the vignette
Example:
ID |
Text |
job_title |
drug_type |
frequency |
---|---|---|---|---|
1 |
Peter is a student […] |
student |
alcohol |
daily |
2 |
Peter is a salesman […] |
salesman |
tobacco |
often |
3 |
Peter is a student […] |
student |
marijuana |
occasionally |
Important: It is recommended to use Google Spreadsheets for creating the factors csv (File->Export as CSV) as well as for importing the output csv to avoid problems with character encodings that other software applications might cause.
History
0.1.0 (2018-02-15)
First release on PyPI.
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
File details
Details for the file fsdesign-0.1.4.tar.gz
.
File metadata
- Download URL: fsdesign-0.1.4.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.9.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c066ee3334fdf53a443c4e829e40e7bde0d6c33a897bd3b99c4e5c3ef24a37 |
|
MD5 | ece4044297a7969f9f7b1f906cf8a4b5 |
|
BLAKE2b-256 | f561a8ca92aed1be52ecfa4cc13427b754acb7586e5d3c973853781276194c19 |