View on GitHub

The Spacetime Project

Basic installation and usage instructions for Spacetime

Spacetime logo


spacetime: A user-friendly tool for working with spatiotemporal data.

About spacetime

The main objective of the spacetime python library is to make tasks like loading, rescaling, merging, and conducting mathmatical operations on spatiotemporal (or other D-dimensional data sets) easier for the user by providing a set of concise yet powerful functions. spacetime opperations utilize a cube-like structure for all data sets that makes storing and manipulating large D-dimensional datasets more efficient. For scientists working with spatiotemporal data (such as climate or weather data sets) spacetime is an ideal platform that allows the user to focus on the science rather than the coding.

Main Functionality

spacetime is in the beta stage (version number = 0.0.1) and additional functionality will be added on a regular basis. The current functionality of spacetime is below:

A Simple Example

In the following example, two .tif files with different spatial scales are passed to the cube smasher function, which rescales them to a common grid, and conducts the following mathmatical operation where a and b are the 3 dimensional data sets contained in the .tif files and c is a constant scaler value of 5:

a + b c = result

# paths to tif files with different spatial grid sizes
path1 = "/Users/pburnham/Documents/geospatialData/Carya_ovata/Carya_ovata_sim_disc_1km.tif"
path2 = "/Users/pburnham/Documents/geospatialData/Carya_ovata/Carya_ovata_sim_disc_10km.tif"

# mathmatical operations on two netCDF files of different scales
y, coords = cube_smasher(eq = "a + b ** c", a=path1, b=path2, c = 5, fromFiles = True)

The function returns the new cube data set as a numpy array as well as the latitude and longitude cordinates.

Documentation

The full documentation for this library may be found at https://biobarricuda.com/software/spacetime-documentation

Dependancies

Installation

The source code may be found on Github at (my github repo for spacetime)

The latest version of spacetime may be installed from the Python Package Index (PyPI).

pip install spacetime

Authors