Skip to main content

Python package for Factorial Survey Design

Project description

Factorial Survey Design Documentation Status

Python package for Factorial Survey Design


  • Vignettes factorial design generation


Using pip:

$ pip install fsdesign


As a command line tool

$ fsdesign [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.


$ 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


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.


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.

Files for fsdesign, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size fsdesign-0.1.4.tar.gz (13.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page