Perform exploratory data analysis on REDCap data
Project description
REDCap-EDA
๐ Overview
REDCap-EDA is a command-line tool for performing Exploratory Data Analysis (EDA) on REDCap datasets. It automates data inspection, schema enforcement, statistical analysis, and visualization.
๐ Features
- โ Automatic Data Type Enforcement (casts columns based on a predefined or user-defined schema)
- ๐ Summary Statistics (mean, median, std dev, outliers, categorical distributions)
- ๐ Visualizations (histograms, box plots, categorical distributions, time trends)
- ๐ Multiprocessing for Faster Execution
- ๐ Progress Bars with
tqdm - ๐ Exports Reports (JSON, CSV, and saved visualizations)
- ๐ Interactive Schema Creation for custom datasets
๐ฆ Installation
# Clone the repository
git clone https://github.com/robertp/REDCap-EDA.git
cd REDCap-EDA
# Install dependencies using Poetry
poetry install
๐ ๏ธ Usage
๐น Example Using the Sample Dataset and Interactive Schema Creation
poetry run redcap-eda analyze --sample
๐น Example Using the Sample Dataset with a Predefined Schema
poetry run redcap-eda analyze --sample --schema schemas/schema_sample_dataset.json
๐น Running EDA on a Custom Dataset with Interactive Schema Creation
poetry run redcap-eda analyze --csv path/to/your_data.csv
๐น Running EDA on a Custom Dataset with a Predefined Schema
poetry run redcap-eda analyze --csv path/to/your_data.csv --schema path/to/schema.json
๐น Running in Debug Mode
poetry run redcap-eda --debug analyze --sample
๐น Listing Available Test Cases
poetry run redcap-eda list-cases
๐น Interactive Testing with Makefile
# Explore a text-based column
make test-text
# Analyze numerical data
make test-numeric
# Inspect categorical variables
make test-categorical
# Run full exploratory analysis interactively
make test-eda
๐ Project Structure
.
โโโ Makefile # Helper commands
โโโ README.md # Project documentation
โโโ mypy.ini # Type checking configuration
โโโ poetry.lock # Poetry dependency lock file
โโโ pyproject.toml # Poetry project configuration
โโโ schemas # Saved schema files
โ โโโ schema_sample_dataset.json
โโโ src
โ โโโ logs
โ โ โโโ redcap_eda.log # Log files
โ โโโ redcap_eda
โ โโโ __init__.py
โ โโโ analysis # EDA analysis modules
โ โ โโโ __init__.py
โ โ โโโ categorical
โ โ โ โโโ __init__.py
โ โ โ โโโ mixins.py
โ โ โโโ datetime
โ โ โ โโโ __init__.py
โ โ โ โโโ mixins.py
โ โ โโโ eda.py # Main EDA module
โ โ โโโ numerical
โ โ โ โโโ __init__.py
โ โ โ โโโ mixins.py
โ โ โโโ text
โ โ โโโ __init__.py
โ โ โโโ mixins.py
โ โโโ cast_schema.py # Schema enforcement
โ โโโ cli.py # Command-line interface
โ โโโ load_case_data.py # Dataset loader
โ โโโ logger.py # Logging utilities
โโโ tests # Unit tests
โโโ __init__.py
โโโ fixtures
โโโ toy_data.csv # Sample test data
๐ Contributing
- Fork the repository and create a feature branch.
- Run tests to ensure code integrity:
poetry run pytest tests/
- Submit a pull request with a detailed description.
๐ License
This project is licensed under the MIT License.
๐ค Acknowledgments
- REDCap for enabling structured data collection.
- The Open Source Community for inspiration & contributions!
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
redcap_eda-0.1.0.tar.gz
(17.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redcap_eda-0.1.0.tar.gz.
File metadata
- Download URL: redcap_eda-0.1.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Linux/6.12.4-zen1-1-zen
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b5505a29171212f4cbd69d018d98e602019b4cf2e95de770b692ef00a7644b
|
|
| MD5 |
6d0fba3b3825709cda4d250b21a5914b
|
|
| BLAKE2b-256 |
6e4f3aa92209761aa0895f53c27eb875dd3ba470f4af6eaaa61a87279577a784
|
File details
Details for the file redcap_eda-0.1.0-py3-none-any.whl.
File metadata
- Download URL: redcap_eda-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Linux/6.12.4-zen1-1-zen
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5756224108a22c1aa36755d2351664ba80bd3ee700127bd599bf1307d0e4423
|
|
| MD5 |
dfacc09c850378aea7a09e2c534940e4
|
|
| BLAKE2b-256 |
4a018016c050c0a4e46d6196678332cb80c25ada716b328cbd27dd3bbbb0d067
|