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/childmindresearch/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.2a0.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

elbow-0.1.2a0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file elbow-0.1.2a0.tar.gz.

File metadata

  • Download URL: elbow-0.1.2a0.tar.gz
  • Upload date:
  • Size: 38.1 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.2a0.tar.gz
Algorithm Hash digest
SHA256 6348d2b4458cb615c24a92af2a0f6efbb7a39a074c8111120924a52c481e180a
MD5 27be8edf6fb6b3d2c68c5b35b6813bc0
BLAKE2b-256 fa70e364663891ebab0f24bb32ab5bee056ef76909759c4ca78cc73bda877d93

See more details on using hashes here.

File details

Details for the file elbow-0.1.2a0-py3-none-any.whl.

File metadata

  • Download URL: elbow-0.1.2a0-py3-none-any.whl
  • Upload date:
  • Size: 29.0 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.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 846861617d14bb9fd6f3f04cdeb10732eaf074d5711f317417c762e43f024c89
MD5 970d12154d634b65907a02878cec176b
BLAKE2b-256 71fff7158e9e19d8ae5e317f10ec5b0d08f2c3fbc4407c2fced4e21963a88802

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