Flexible access to survey data
Project description
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:
SurveyCTOPlatform provides support for SurveyCTO data, including methods to process text audits and submit submission updates via the review and correction workflow
Support for more survey platforms is coming! Reach out if you have a particular need or are willing to contribute.
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 AWS DynamoDB storage
SurveyCTOExportStorage provides support for local exports from SurveyCTO Desktop
Support for more storage systems is coming! Reach out if you have a particular need or are willing to contribute.
In general, the workflow goes like this:
Initialize the survey platform
Initialize one or more storage systems
Synchronize data between the survey platform and the storage system(s) to ensure that data in storage is fully up-to-date
Load data and/or attachments via the survey platform and storage API’s
(When using a static data export for storage, via a class like SurveyCTOExportStorage, the synchronize step is skipped, but otherwise everything is the same.)
Examples
See this example notebook for a series of usage examples.
Documentation
See the full reference documentation here:
Development
To develop locally:
git clone https://github.com/orangechairlabs/py-surveydata.git
cd py-surveydata
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
For convenience, the repo includes .idea project files for PyCharm.
To rebuild the documentation:
- For the first time:
pip install sphinx sphinx-rtd-theme
Update version number in /docs/source/conf.py
Update layout or options as needed in /docs/source/index.rst
- In a terminal window, from the project directory:
cd docs
SPHINX_APIDOC_OPTIONS=members,show-inheritance sphinx-apidoc -o source ../src/surveydata --separate --force
make clean html
To rebuild the distribution packages:
- For the first time:
pip install setuptools twine
- For the PyPI package:
Update version number (and any build options) in /setup.py
Confirm credentials and settings in ~/.pypirc
Run /setup.py for bdist_wheel and/or sdist build types (Tools… Run setup.py task… in PyCharm)
Delete old builds from /dist
- In a terminal window:
twine upload dist/* --verbose
- For GitHub:
Commit everything to GitHub and merge to main branch
Add new release, linking to new tag like v#.#.# in main branch
- For readthedocs.io:
Go to https://readthedocs.org/projects/surveydata/, log in, and click to rebuild from GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file surveydata-0.1.8.tar.gz
.
File metadata
- Download URL: surveydata-0.1.8.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26f79e1ba640adf3ca6fad1190afab5c9ab70d2733aae1ce547b6373c6b2baa2 |
|
MD5 | b16ad26c3298fcf6292a16ea600a3969 |
|
BLAKE2b-256 | f61e3eda28a65bf78a0e603052c9cd1898bb2a4fde9218c57ed6b40528ed26bc |
File details
Details for the file surveydata-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: surveydata-0.1.8-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a33c4fefb867d2651017e0d3c29d7cfa301f3e51e43dbea9ad254b77bc07e165 |
|
MD5 | 6653723b2663ad3a0f9dbf9833db580c |
|
BLAKE2b-256 | 29ca5db311599de89e246ff8422535059cd9566e7c7d908ae8adcdac7e576446 |