Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A general purpose AIS I/O library using the GPSd AIVDM schema.

Project Description

Figure out which files to touch when working with spatiotemporal data.

Overview

We have a lot of data that needs to be chunked by primary key, datetime, and space but we don’t want to sort through all of it whenever we just want to look at a small piece. The solution is a sidecar metadata file and a file structure organized as a spatial quadtree that is interacted with via a simple and lightweight NoSQL engine that is aware of these components.

Data is grouped in directories matching quadtree nodes in files that are grouped time and primary key. Managing the actual files is up to the user. This library only knows how to interact with the sidecar files.

We want to have both an API:

import melvil
import datetime

# The base directory, match expression, etc. are all defined in a configfile

# Only process data from the past 30 days that appears in the lower left
# quadrant of the world, as specified by WGS84
max_ts = datetime.datetime.now()q
min_ts = max_ts - datetime.timedelta(days=30)
bbox = (-180, -90 0, 0)

for fp in melvil.search(min_ts=min_ts, max_ts=max_ts, bbox=bbox):
    with open(fp) as f:
        # Do something

And a CLI:

$ melvil search --min-ts 2014-01-01 --max-ts 2015-01-01 --bbox -180 -90 0 0
/path/to/output/file/1
/path/to/output/file/2
/path/to/output/file/3
...

Under the hood melvil is looking for

Developing

$ git clone https://github.com/SkyTruth/Dewey
$ cd Dewey
$ virtualenv venv
$ pip install -e .[test]
$ py.test tests --cov melvil --term-missing melvil

License

See LICENSE.txt.

Release History

Release History

This version
History Node

0.1

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting