Skip to main content

A Python package for analyzing and visualizing LimeSurvey data.

Project description

limesurvpy

A Python package to support evaluating LimeSurvey questionnaires. The package provides support for various types of questions (e.g., lists, multiple choice questions, rankings, matrix questions, text questions, etc.). For supported question types, the tool compiles dataframes of responses, and generates a number of pre-defined plots to support interpretation. For multi-lingual surveys, the tool supports presenting information in a specific locale.

Features

  • Import LimeSurvey structure files (.lss format)
  • Import response data from CSV files
  • Describe responses using appropriate visualizations
  • Multi-language support to show responses in any locale included in the questionnaire
  • Export of processed data to Excel and CSV formats
  • Automatic translation of text to user-defined language

Installation

pip install limesurvpy

Quick Start

1. Import and Create Survey Object

from limesurvpy import Survey

# Create survey from LimeSurvey structure file
my_survey = Survey.from_lss(structure_filename='path/to/survey.lss')

# Get basic information about the survey
my_survey.summary()
my_survey.list_questions()

2. Import responses

# Import responses from CSV file
# Note: Export responses from Limesurvey with question codes and response codes (not labels)
my_survey.import_responses('path/to/responses.csv', sep=',')

3. Analyze Questions

# Get question details
my_survey.print_details(question_code='Q001', include_attributes=True)

# Compile responses and automatically plot results for convenience
responses = my_survey.describe(question_code='Q001')

4. Export Results

# Export single question responses
Survey.export(responses, target='xlsx', excel_filename='results.xlsx')

# batch-export: If questions is None, export all
my_survey.export_questions(questions=None, target='xlsx', path=export_path, index=False)

Multi-language Support

Compiled dataframes and plots will include labels for responses for the specified language. Text items are translated into the specified language using deep-translator.

# Specify language for labels and responses
responses = my_survey.describe(question_code='Q001', lang='vi')  

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

limesurvpy-0.0.3.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

limesurvpy-0.0.3-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file limesurvpy-0.0.3.tar.gz.

File metadata

  • Download URL: limesurvpy-0.0.3.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for limesurvpy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c60f10931a3b5a37bf1715b5b18b979b87311d5deb0e0539b3407d1c1d387d47
MD5 c71f0bbcdc63b17724f275b2054571bf
BLAKE2b-256 215dc6333cd756b23d50141ee37bee2bfcc51183aae620891f35d2256017c826

See more details on using hashes here.

File details

Details for the file limesurvpy-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: limesurvpy-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for limesurvpy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2685667fd5677facc6a48abc9c9ed5c882cef8e898396e985829c4e2dc94131f
MD5 18fd9d9df8981c290ff577faa353939e
BLAKE2b-256 83fe314b5f2c0d0330432a8f712ccf01679fed156ecefb0a24d352bd3d399dc6

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