Skip to main content

medaprep #########

medaprep is used to prepare xarray Datasets for downstream tasks.

Usage

medaprep.skim.features

.. code-block:: python

>>> import numpy as np
>>> import pandas as pd
>>> import xarray as xr
>>> from medaprep import skim
>>> temp = 15 + 8 * np.random.randn(2, 2, 3)
>>> precip = 10 * np.random.rand(2, 2, 3)
>>> lon = [[-99.83, -99.32], [-99.79, -99.23]]
>>> lat = [[42.25, 42.21], [42.63, 42.59]]
>>> ds = xr.Dataset(
  {
      "temperature": (["x", "y", "time"], temp),
      "precipitation": (["x", "y", "time"], precip),
      },
  coords={
      "lon": (["x", "y"], lon),
      "lat": (["x", "y"], lat),
      "time": pd.date_range("2014-09-06", periods=3),
      "reference_time": pd.Timestamp("2014-09-05"),
      },
                 )
 >>> df = skim.features(ds)
 >>> df
     variables       data_types  NaNs    mean    std     maximums    minimums
 0   temperature     float64     False   14.3177 9.08339 30.3361     -7.76803
 1   precipitation   float64     False   4.62568 3.03081 9.89768     0.147005

For more details see Documentation_ and Example Notebooks_.

Installation ############

Using pip

.. code-block:: bash

pip install medaprep

Using Conda

.. code-block:: bash

conda install -c conda-forge medaprep

Developing ##########

pre-commit setup

This project uses pre-commit, isort, black, and flake8 to help enforce best practices. These libraries are all included in requirements-dev.txt and can be installed with pip by running:

.. code-block:: bash

pip install -r requirements-dev.txt

Once pre-commit is installed, install the hooks specified by the config file into .git:

.. code-block:: bash

pre-commit install

You can then test pre-commit by running:

.. code-block:: bash

pre-commit

.. _Documentation: https://medaprep.readthedocs.io/

.. _Example Notebooks: https://medaprep.readthedocs.io/en/latest/examples.html

Metadata

Release files for medaprep 0.1.1

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

Source distribution (sdist)

Source distribution for medaprep 0.1.1
File Size Uploaded
medaprep-0.1.1.tar.gz 7.3 kB Details

Built distribution (wheel)

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

Total release size: 15.8 kB

Release files / medaprep-0.1.1.tar.gz

Download URL medaprep-0.1.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7a85c68fe2d98191290546a4793b842c93423f5330b915ec4719afb0097178eb
BLAKE2b-256 checksum
How to use checksums
f630cfc5aa374ed3f0ad40d2c5a08c7bf1eebda418f043f62c28b4d7dc933867
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / medaprep-0.1.1-py3-none-any.whl

Download URL medaprep-0.1.1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b87e1d371d5b50e745e9f94d6a9be3782259f29a93ee7cf9631433246da267b2
BLAKE2b-256 checksum
How to use checksums
5b20f0c0b399f391f6240c41f8562b6c26c5edb4c471e5c01df375619fe0c177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

3 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