The code in this repository provides an API to query, filter and visualize MASC data.
The folder tutorials
provides code examples to explore the capabilities of the MASCDB API.
The tutorials are conceived for line-by-line execution for example using the spyder GUI. They cannot be run as scripts.
They provide example usage for:
- Downloading MASCDB [
00_download_mascdb.py
] - Data manipulation and other MASCDB API functionalities [
01_data_manipulation.py
] - Exploratory data analysis (EDA) [
02_eda.py
] - Image display and processing [
03_image_processing.py
]
The folder examples
provides a link to some jupyter notebooks with a minimal selection of functionalities, the same as the ones used in the online documentation
The folder experiments
currently provides examples for:
- Latent Space Exploration with UMAP / PCA
- Snowflake clustering with Self-Organizing Maps
For a local installation, follow the below instructions.
-
Clone this repository.
git clone https://github.com/ltelab/pymascdb.git cd pymascdb
-
Install the dependencies using conda:
conda env create -f environment.yml
-
Activate the mascdb conda environment
conda activate mascdb
-
With mascdb environment activated, install the package:
python setup.py install
In this way, mascdb can simply be loaded, from any directory, as:
import mascdb.api
from mascdb.api import MASC_DB
ATTENTION: The code has been currently tested only under Linux-Unix systems.
Documentation is available at https://pymascdb.readthedocs.io/en/latest/index.html
The data should be downloaded from Zenodo at: https://doi.org/10.5281/zenodo.5578920
The content of this repository is released under the terms of the MIT license.