[![PyPI version](https://badge.fury.io/py/pylipd.svg)](https://badge.fury.io/py/pylipd)
[![PyPI](https://img.shields.io/badge/python-3.11-yellow.svg)]()
[![license](https://img.shields.io/github/license/linkedearth/pylipd.svg)]()
[![DOI](https://zenodo.org/badge/428434519.svg)](https://doi.org/10.5281/zenodo.7951200)
[![Documentation Status](https://app.readthedocs.org/projects/pylipd/badge/?version=latest)](https://pylipd.readthedocs.io/en/latest/)
 

[![PyPI Downloads](https://static.pepy.tech/badge/pylipd)](https://pepy.tech/projects/pylipd)
[![PyPI Downloads](https://static.pepy.tech/badge/pylipd/month)](https://pepy.tech/projects/pylipd)
[![PyPI Downloads](https://static.pepy.tech/badge/pylipd/week)](https://pepy.tech/projects/pylipd)

# PyLiPD: A Python Package to interact with Paleoclimate Data. 

[Paleoclimate records](https://en.wikipedia.org/wiki/Paleoclimatology) are often generated by small teams of researchers, and typically require years of work to understand how climate phenomena are recorded and embedded in the natural archive they are studying. These records are fundamental to our understanding of past climate change; however, to understand large-scale patterns of how and why climate changes, researchers must study changes across large spatial regions. However, because of the nuance and individualized nature of these datasets, analyzing large collections of these data is a challenge. This recognition has launched many international synthesis efforts (through the creation of working groups aimed at answering a particular question in paleoclimatology) over the past decade, bringing diverse groups of experts and data together and integrating them into a [common framework to support future analysis](https://lipdverse.org/project/). These compilation efforts, and the unified syntheses they have generated, have served as the foundation of many of the major studies in large-scale paleoclimate over the past decade, including global mean temperature evolution.

These synthesis studies have also been the main thrust towards the development of software to analyze paleoclimate datasets and standards to describe them. PyLiPD allows interacting with the Linked Paleo Data ([LiPD](https://lipd.net)) format, which underpins many of the compilation effort described previously .

## Versions

See our [releases page](https://github.com/LinkedEarth/pylipd/releases) for details on what's included in each version.

## Documentation

Online documentation is available through [readthedocs](https://pylipd.readthedocs.io/en/latest/).


## Installation 
The latest stable release is available through Pypi. We recommend using Anaconda or Miniconda with a dedicated environment.   

    pip install pylipd


## Usage

### Loading local LiPD files
    from pylipd.lipd import LiPD
    lipd = LiPD()
    lipd.load(["MD98_2181.Stott.2007.lpd", "Ant-WAIS-Divide.Severinghaus.2012.lpd", "Asi-TDAXJP.PAGES2k.2013.lpd"])

### Loading LiPD data from GraphDB server
    from pylipd.lipd import LiPD
    lipd = LiPD()
    lipd.set_endpoint("https://linkedearth.graphdb.mint.isi.edu/repositories/LiPDVerse2")
    lipd.load_remote_datasets(["MD98_2181.Stott.2007", "Ant-WAIS-Divide.Severinghaus.2012", "Asi-TDAXJP.PAGES2k.2013"])

## Citation

If you use our code in any way, please cite this code according to the `citation.cff` file for the appropriate version. You can use the Cite this Repository feature on GitHub to get the citation in APA or BibTeX format. 

## Development

`PyLiPD` development takes place on [GitHub](https://github.com/LinkedEarth/pylipd/tree/main). 

Please submit any reproducible bugs you encounter to the [issue tracker](https://github.com/LinkedEarth/pylipd/issues). For usage questions, please use [Discourse](https://discourse.linked.earth).

## License

`PyLiPD` is released under an [Apache 2.0 license](https://github.com/LinkedEarth/pylipd/blob/main/LICENSE). 

## Disclaimer

This material is based upon work supported by the National Science Foundation under Grant Number RISE-2126510. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the investigators and do not necessarily reflect the views of the National Science Foundation.

