Skip to main content

Lift special-purpose data into common tabular formats for analytics 💪

Project description

💪 Elbow

Build codecov Code style: black MIT License

Elbow is a lightweight and scalable library for getting diverse data out of specialized formats and into common tabular data formats for downstream analytics.

Example

Extract image metadata and pixel values from all JPEG image files under the current directory and save as a Parquet dataset.

import numpy as np
import pandas as pd
from PIL import Image

from elbow.builders import build_parquet

def extract_image(path: str):
    img = Image.open(path)
    width, height = img.size
    pixel_values = np.asarray(img)
    return {
        "path": path,
        "width": width,
        "height": height,
        "pixel_values": pixel_values,
    }

build_parquet(
    source="**/*.jpg",
    extract=extract_image,
    output="images.pqds/",
    workers=8,
)

df = pd.read_parquet("images.pqds")

For a complete example, see here.

Installation

pip install elbow

The current development version can be installed with

pip install git+https://github.com/cmi-dair/elbow.git

Related projects

There are many other high quality projects for extracting, loading, and transforming data. Some alternative projects focused on somewhat different use cases are:

Contributing

We welcome contributions of any kind! If you'd like to contribute, please feel free to start a conversation in our issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elbow-0.1.1.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

elbow-0.1.1-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file elbow-0.1.1.tar.gz.

File metadata

  • Download URL: elbow-0.1.1.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for elbow-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a720257498895d07915bf63c7ccf11f596d8990fb47da3530079ded9a88f5116
MD5 27e0343fc335b5bd42c251dd8da393b6
BLAKE2b-256 a295343d201e685056a62299bf4006a4290e6e218b57cbea4ed513606aa441fd

See more details on using hashes here.

File details

Details for the file elbow-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: elbow-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for elbow-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c37c19e3d7f5af5a069c7fffd3714c09148317480fc0d457cca0c8b683ec3878
MD5 c6685cb3bb2ff47f2a3fe6d45dca3e53
BLAKE2b-256 3adfbf08bb8bcd5b445e29e478483b174873d12d4ae553382d5f9eeae739ed6a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page