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.2.tar.gz (15.2 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.2-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: limesurvpy-0.0.2.tar.gz
  • Upload date:
  • Size: 15.2 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.2.tar.gz
Algorithm Hash digest
SHA256 a92a399e4d6e87c298059a56dc61c3834870af6ecbd24dd07bf8f45fe130cb3a
MD5 d3f34d0a5728bb32164ed696522125da
BLAKE2b-256 0cf3ad08e2a7ee91a44edb09b135d67a58c5608d3be9ce40324de8aaa8b80f0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: limesurvpy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2986da393e0d14dc1ffe2c0bea7bd254d9eaead1b9650c026269e7ade0a9a3c7
MD5 7dd443086b82d23a6370edc078c46591
BLAKE2b-256 9db58cd1dc09989f2a736665fc3f08dd91d4455d706165e20252736836754c06

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