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.4.tar.gz (17.0 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.4-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: limesurvpy-0.0.4.tar.gz
  • Upload date:
  • Size: 17.0 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.4.tar.gz
Algorithm Hash digest
SHA256 0555a09f65f1682995032b000d02379ec9445f4ae6d8926839fa5e12f1262563
MD5 3c3463071f24366898078ff6e34b8614
BLAKE2b-256 a5cdfb5f0bb68505f5d97d462c222f9d2e09ad7f95230a672fa3f082f590d244

See more details on using hashes here.

File details

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

File metadata

  • Download URL: limesurvpy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 18.9 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a4b8d8a051a9fd1f7a7945ad3bc30c1ef061c7f3818fdb0c23f88446ff4c858b
MD5 1e8aeebc6de04f1485f33ff8533d26f3
BLAKE2b-256 8ce860e0e5b9b3849345f24e7f279aed952fc4ac4876034ca4bee203408bf140

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