Skip to main content

py-surveydata

The surveydata Python package offers flexible access to survey data and support for multiple local and cloud storage options.

Installation

Installing the latest version with pip:

pip install surveydata

Overview

To use the surveydata package, you access data from specific survey platforms via an appropriate SurveyPlatform object:

All survey data must be stored somewhere, and storage is handled via an appropriate StorageSystem object:

  • FileStorage provides support for local file storage

  • S3Storage provides support for AWS S3 storage

  • DynamoDBStorage provides support for AWS DynamoDB storage

  • GoogleCloudStorage provides support for Google Cloud Storage

  • AzureBlobStorage provides support for Azure Blob Storage

  • SurveyCTOExportStorage provides support for local data exported with SurveyCTO Desktop (in wide format)

  • ODKExportStorage provides support for local data downloaded and unzipped from an ODK Central All data and Attachments export

In general, the workflow goes like this:

  1. Initialize the survey platform

  2. Initialize one or more storage systems

  3. Synchronize data between the survey platform and the storage system(s) to ensure that data in storage is fully up-to-date (except for static export storage, via SurveyCTOExportStorage or ODKExportStorage, which doesn’t require synchronization)

  4. Load data and/or attachments via the survey platform and storage API’s

  5. Optionally: Save processed data and then, later, load it back again, for cases where ingestion and processing tasks are separated from actual analysis or use

Examples

See these notebooks for detailed usage examples:

Documentation

See the full reference documentation here:

https://surveydata.readthedocs.io/

Development

To develop locally:

  1. git clone https://github.com/orangechairlabs/py-surveydata.git

  2. cd py-surveydata

  3. python -m venv venv

  4. source venv/bin/activate

  5. pip install -r requirements.txt

For convenience, the repo includes .idea project files for PyCharm.

To rebuild the documentation:

  1. Update version number in /docs/source/conf.py

  2. Update layout or options as needed in /docs/source/index.rst

  3. In a terminal window, from the project directory:
    1. cd docs

    2. SPHINX_APIDOC_OPTIONS=members,show-inheritance sphinx-apidoc -o source ../src/surveydata --separate --force

    3. make clean html

To rebuild the distribution packages:

  1. For the PyPI package:
    1. Update version number (and any build options) in /setup.py

    2. Confirm credentials and settings in ~/.pypirc

    3. Run /setup.py for the bdist_wheel and sdist build types (Tools… Run setup.py task… in PyCharm)

    4. Delete old builds from /dist

    5. In a terminal window:
      1. twine upload dist/* --verbose

  2. For GitHub:
    1. Commit everything to GitHub and merge to main branch

    2. Add new release, linking to new tag like v#.#.# in main branch

  3. For readthedocs.io:
    1. Go to https://readthedocs.org/projects/surveydata/, log in, and click to rebuild from GitHub (only if it doesn’t automatically trigger)

Metadata

Release files for surveydata 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for surveydata 0.1.13
File Size Uploaded
surveydata-0.1.13.tar.gz 34.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for surveydata 0.1.13
File Interpreter ABI Platform
surveydata-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 82.2 kB

Release files / surveydata-0.1.13.tar.gz

Download URL surveydata-0.1.13.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e293d702fb866c364cb73e9d54b8a3f30b7ec406ab9ccbc4cb5abfe1690a7c81
BLAKE2b-256 checksum
How to use checksums
88d22392feb70b08148c124ab95c54d74b586dee2298ac9c56d11cf70cda4a64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / surveydata-0.1.13-py3-none-any.whl

Download URL surveydata-0.1.13-py3-none-any.whl
Size 48.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c5826e502c46ae0d1ffb80d5be90873f1d1db6cf7bf11cd26652af0f8fe648d
BLAKE2b-256 checksum
How to use checksums
84900d7e1dc2141dc3602ef7df3664a1c6164b921f5ee52d88934fe2d8e203d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page