surveydata Python Package Documentation

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:

Indices and tables