earthpy


Nameearthpy JSON
Version 0.9.4 PyPI version JSON
download
home_pagehttps://github.com/earthlab/earthpy
SummaryA set of helper functions to make working with spatial data in open source tools easier. This package is maintained by Earth Lab and was originally designed to support the earth analytics education program.
upload_time2021-10-01 22:51:07
maintainerLeah Wasser
docs_urlNone
author
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![DOI](https://joss.theoj.org/papers/10.21105/joss.01886/status.svg)](https://doi.org/10.21105/joss.01886)
[![pyOpenSci](https://tinyurl.com/y22nb8up)](https://github.com/pyOpenSci/software-review/issues/3)
[![Build Status](https://travis-ci.org/earthlab/earthpy.svg?branch=master)](https://travis-ci.org/earthlab/earthpy)
[![Build status](https://ci.appveyor.com/api/projects/status/xgf5g4ms8qhgtp21?svg=true)](https://ci.appveyor.com/project/earthlab/earthpy)
[![codecov](https://codecov.io/gh/earthlab/earthpy/branch/master/graph/badge.svg)](https://codecov.io/gh/earthlab/earthpy)
[![Docs build](https://readthedocs.org/projects/earthpy/badge/?version=latest)](https://earthpy.readthedocs.io/en/latest/?badge=latest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://img.shields.io/badge/code%20style-black-000000.svg)

# EarthPy

![PyPI](https://img.shields.io/pypi/v/earthpy.svg?color=purple&style=plastic)
![PyPI - Downloads](https://img.shields.io/pypi/dm/earthpy.svg?color=purple&label=pypi%20downloads&style=plastic)
![Conda](https://img.shields.io/conda/v/conda-forge/earthpy.svg?color=purple&style=plastic)
![Conda](https://img.shields.io/conda/dn/conda-forge/earthpy.svg?color=purple&label=conda-forge%20downloads&style=plastic)

EarthPy makes it easier to plot and manipulate spatial data in Python.

## Why EarthPy?

Python is a generic programming language designed to support many different applications. Because of this, many commonly
performed spatial tasks for science including plotting and working with spatial data take many steps of code. EarthPy
builds upon the functionality developed for raster data (rasterio) and vector data (geopandas) in Python and simplifies the
code needed to:

* [Stack and crop raster bands from data such as Landsat into an easy to use numpy array](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_raster_stack_crop.html)
* [Work with masks to set bad pixels such a those covered by clouds and cloud-shadows to NA (`mask_pixels()`)](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_stack_masks.html#sphx-glr-gallery-vignettes-plot-stack-masks-py)
* [Plot rgb (color), color infrared and other 3 band combination images (`plot_rgb()`)](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_rgb.html)
* [Plot bands of a raster quickly using `plot_bands()`](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_bands_functionality.html)
* [Plot histograms for a set of raster files.](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_hist_functionality.html)
* [Create discrete (categorical) legends](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_draw_legend_docs.html)
* [Calculate vegetation indices such as Normalized Difference Vegetation Index (`normalized_diff()`)](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_calculate_classify_ndvi.html)
* [Create hillshade from a DEM](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_dem_hillshade.html)

EarthPy also has an `io` module that allows users to

1. Quickly access pre-created data subsets used in the earth-analytics courses hosted
on [www.earthdatascience.org](https://www.earthdatascience.org)
2. Download other datasets that they may want to use in their workflows.

EarthPy's design was inspired by the `raster` and `sp` package functionality available to `R` users.

## View Example EarthPy Applications in Our Documentation Gallery  

Check out our [vignette gallery](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/index.html) for
applied examples of using EarthPy in common spatial workflows.

## Install

EarthPy can be installed using `pip`, but we **strongly** recommend that you install it using conda and the `conda-forge` channel.

### Install Using Conda / conda-forge Channel (Preferred)

If you are working within an Anaconda environment, we suggest that you install EarthPy using
`conda-forge`

```bash
$ conda install -c conda-forge earthpy
```

Note: if you want to set conda-forge as your default conda channel, you can use the following install workflow.
We recommmend this approach. Once you have run conda config, you can install earthpy without specifying a channel.

```bash
$ conda config --add channels conda-forge
$ conda install earthpy
```


### Install via Pip

We strongly suggest that you install EarthPy using conda-forge given pip can be more prone to 
spatial library dependency conflicts. However, you can install earthpy using pip.

To install EarthPy via `pip` use:

```bash
$ pip install --upgrade earthpy
```

Once you have successfully installed EarthPy, you can import it into Python.

```python
>>> import earthpy.plot as ep
```

Below is a quick example of plotting multiple bands in a numpy array format.

```python
>>> arr = np.random.randint(4, size=(3, 5, 5))
>>> ep.plot_bands(arr, titles=["Band 1", "Band 2", "Band 3"])
>>> plt.show()
```

## Active Maintainers

We welcome contributions to EarthPy. Below are the current active package maintainers. Please see our
[contributors file](https://earthpy.readthedocs.io/en/latest/contributors.html) for a complete list of all
of our contributors.

<a title="Leah Wasser" href="https://www.github.com/lwasser"><img width="60" height="60" alt="Leah Wasser" class="pull-left" src="https://avatars.githubusercontent.com/u/7649194?size=120" /></a>
<a title="Max Joseph" href="https://www.github.com/mbjoseph"><img width="60" height="60" alt="Max Joseph" class="pull-left" src="https://avatars.githubusercontent.com/u/2664564?size=120" /></a>
<a title="Joseph McGlinchy" href="https://www.github.com/joemcglinchy"><img width="60" height="60" alt="Joseph McGlinchy" class="pull-left" src="https://avatars.githubusercontent.com/u/4762214?size=120" /></a>
<a title="Jenny Palomino" href="https://www.github.com/jlpalomino"><img width="60" height="60" alt="Jenny Palomino" class="pull-left" src="https://avatars.githubusercontent.com/u/4017492?size=120" /></a>
<a title="Nathan Korinek" href="https://www.github.com/nkorinek"><img width="60" height="60" alt="Nathan Korinek" class="pull-left" src="https://avatars.githubusercontent.com/u/38253680?size=120" /></a>


## Contributors

We've welcome any and all contributions. Below are some of the
contributors to EarthPy. We are currently trying to update this list!!

<a title="Sean Gillies" href="https://www.github.com/sgillies"><img width="60" height="60" alt="Michelle Roby" class="pull-left" src="https://avatars.githubusercontent.com/u/33697?size=120" /></a>
<a title="Tim Head" href="https://www.github.com/betatim"><img width="60" height="60" alt="Tim Head" class="pull-left" src="https://avatars.githubusercontent.com/u/1448859?size=120" /></a>
<a title="Chris Holdgraf" href="https://www.github.com/choldgraf"><img width="60" height="60" alt="Michelle Roby" class="pull-left" src="https://avatars.githubusercontent.com/u/1839645?size=120" /></a>
<a title="Michelle Roby" href="https://www.github.com/mirob9363"><img width="60" height="60" alt="Michelle Roby" class="pull-left" src="https://avatars.githubusercontent.com/u/42818395?size=120" /></a>

## How to Contribute

We welcome contributions to EarthPy! Please be sure to check out our
[contributing guidelines](https://earthpy.readthedocs.io/en/latest/contributing.html)
for more information about submitting pull requests or changes to EarthPy.

## License & Citation

[BSD-3](https://github.com/earthlab/earthpy/blob/master/LICENSE)

### Citation Information

When citing EarthPy, please cite our [JOSS paper](https://doi.org/10.21105/joss.01886):

```
@article{Wasser2019EarthPy,
	journal = {Journal of Open Source Software},
	doi = {10.21105/joss.01886},
	issn = {2475-9066},
	number = {43},
	publisher = {The Open Journal},
	title = {EarthPy: A Python package that makes it easier to explore and plot raster and vector data using open source Python tools.},
	url = {https://doi.org/10.21105/joss.01886},
	volume = {4},
	author = {Wasser, Leah and Joseph, Maxwell and McGlinchy, Joe and Palomino, Jenny and Korinek, Nathan and Holdgraf, Chris and Head, Tim},
	pages = {1886},
	date = {2019-11-13},
	year = {2019},
	month = {11},
	day = {13},
}

```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/earthlab/earthpy",
    "name": "earthpy",
    "maintainer": "Leah Wasser",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "leah.wasser@colorado.edu",
    "keywords": "",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/21/a7/ce7c931ca9e1732bcd7c1f0d4001914fcb888228180d47e5480db1ae7161/earthpy-0.9.4.tar.gz",
    "platform": "",
    "description": "[![DOI](https://joss.theoj.org/papers/10.21105/joss.01886/status.svg)](https://doi.org/10.21105/joss.01886)\n[![pyOpenSci](https://tinyurl.com/y22nb8up)](https://github.com/pyOpenSci/software-review/issues/3)\n[![Build Status](https://travis-ci.org/earthlab/earthpy.svg?branch=master)](https://travis-ci.org/earthlab/earthpy)\n[![Build status](https://ci.appveyor.com/api/projects/status/xgf5g4ms8qhgtp21?svg=true)](https://ci.appveyor.com/project/earthlab/earthpy)\n[![codecov](https://codecov.io/gh/earthlab/earthpy/branch/master/graph/badge.svg)](https://codecov.io/gh/earthlab/earthpy)\n[![Docs build](https://readthedocs.org/projects/earthpy/badge/?version=latest)](https://earthpy.readthedocs.io/en/latest/?badge=latest)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://img.shields.io/badge/code%20style-black-000000.svg)\n\n# EarthPy\n\n![PyPI](https://img.shields.io/pypi/v/earthpy.svg?color=purple&style=plastic)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/earthpy.svg?color=purple&label=pypi%20downloads&style=plastic)\n![Conda](https://img.shields.io/conda/v/conda-forge/earthpy.svg?color=purple&style=plastic)\n![Conda](https://img.shields.io/conda/dn/conda-forge/earthpy.svg?color=purple&label=conda-forge%20downloads&style=plastic)\n\nEarthPy makes it easier to plot and manipulate spatial data in Python.\n\n## Why EarthPy?\n\nPython is a generic programming language designed to support many different applications. Because of this, many commonly\nperformed spatial tasks for science including plotting and working with spatial data take many steps of code. EarthPy\nbuilds upon the functionality developed for raster data (rasterio) and vector data (geopandas) in Python and simplifies the\ncode needed to:\n\n* [Stack and crop raster bands from data such as Landsat into an easy to use numpy array](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_raster_stack_crop.html)\n* [Work with masks to set bad pixels such a those covered by clouds and cloud-shadows to NA (`mask_pixels()`)](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_stack_masks.html#sphx-glr-gallery-vignettes-plot-stack-masks-py)\n* [Plot rgb (color), color infrared and other 3 band combination images (`plot_rgb()`)](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_rgb.html)\n* [Plot bands of a raster quickly using `plot_bands()`](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_bands_functionality.html)\n* [Plot histograms for a set of raster files.](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_hist_functionality.html)\n* [Create discrete (categorical) legends](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_draw_legend_docs.html)\n* [Calculate vegetation indices such as Normalized Difference Vegetation Index (`normalized_diff()`)](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_calculate_classify_ndvi.html)\n* [Create hillshade from a DEM](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/plot_dem_hillshade.html)\n\nEarthPy also has an `io` module that allows users to\n\n1. Quickly access pre-created data subsets used in the earth-analytics courses hosted\non [www.earthdatascience.org](https://www.earthdatascience.org)\n2. Download other datasets that they may want to use in their workflows.\n\nEarthPy's design was inspired by the `raster` and `sp` package functionality available to `R` users.\n\n## View Example EarthPy Applications in Our Documentation Gallery  \n\nCheck out our [vignette gallery](https://earthpy.readthedocs.io/en/latest/gallery_vignettes/index.html) for\napplied examples of using EarthPy in common spatial workflows.\n\n## Install\n\nEarthPy can be installed using `pip`, but we **strongly** recommend that you install it using conda and the `conda-forge` channel.\n\n### Install Using Conda / conda-forge Channel (Preferred)\n\nIf you are working within an Anaconda environment, we suggest that you install EarthPy using\n`conda-forge`\n\n```bash\n$ conda install -c conda-forge earthpy\n```\n\nNote: if you want to set conda-forge as your default conda channel, you can use the following install workflow.\nWe recommmend this approach. Once you have run conda config, you can install earthpy without specifying a channel.\n\n```bash\n$ conda config --add channels conda-forge\n$ conda install earthpy\n```\n\n\n### Install via Pip\n\nWe strongly suggest that you install EarthPy using conda-forge given pip can be more prone to \nspatial library dependency conflicts. However, you can install earthpy using pip.\n\nTo install EarthPy via `pip` use:\n\n```bash\n$ pip install --upgrade earthpy\n```\n\nOnce you have successfully installed EarthPy, you can import it into Python.\n\n```python\n>>> import earthpy.plot as ep\n```\n\nBelow is a quick example of plotting multiple bands in a numpy array format.\n\n```python\n>>> arr = np.random.randint(4, size=(3, 5, 5))\n>>> ep.plot_bands(arr, titles=[\"Band 1\", \"Band 2\", \"Band 3\"])\n>>> plt.show()\n```\n\n## Active Maintainers\n\nWe welcome contributions to EarthPy. Below are the current active package maintainers. Please see our\n[contributors file](https://earthpy.readthedocs.io/en/latest/contributors.html) for a complete list of all\nof our contributors.\n\n<a title=\"Leah Wasser\" href=\"https://www.github.com/lwasser\"><img width=\"60\" height=\"60\" alt=\"Leah Wasser\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/7649194?size=120\" /></a>\n<a title=\"Max Joseph\" href=\"https://www.github.com/mbjoseph\"><img width=\"60\" height=\"60\" alt=\"Max Joseph\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/2664564?size=120\" /></a>\n<a title=\"Joseph McGlinchy\" href=\"https://www.github.com/joemcglinchy\"><img width=\"60\" height=\"60\" alt=\"Joseph McGlinchy\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/4762214?size=120\" /></a>\n<a title=\"Jenny Palomino\" href=\"https://www.github.com/jlpalomino\"><img width=\"60\" height=\"60\" alt=\"Jenny Palomino\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/4017492?size=120\" /></a>\n<a title=\"Nathan Korinek\" href=\"https://www.github.com/nkorinek\"><img width=\"60\" height=\"60\" alt=\"Nathan Korinek\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/38253680?size=120\" /></a>\n\n\n## Contributors\n\nWe've welcome any and all contributions. Below are some of the\ncontributors to EarthPy. We are currently trying to update this list!!\n\n<a title=\"Sean Gillies\" href=\"https://www.github.com/sgillies\"><img width=\"60\" height=\"60\" alt=\"Michelle Roby\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/33697?size=120\" /></a>\n<a title=\"Tim Head\" href=\"https://www.github.com/betatim\"><img width=\"60\" height=\"60\" alt=\"Tim Head\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/1448859?size=120\" /></a>\n<a title=\"Chris Holdgraf\" href=\"https://www.github.com/choldgraf\"><img width=\"60\" height=\"60\" alt=\"Michelle Roby\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/1839645?size=120\" /></a>\n<a title=\"Michelle Roby\" href=\"https://www.github.com/mirob9363\"><img width=\"60\" height=\"60\" alt=\"Michelle Roby\" class=\"pull-left\" src=\"https://avatars.githubusercontent.com/u/42818395?size=120\" /></a>\n\n## How to Contribute\n\nWe welcome contributions to EarthPy! Please be sure to check out our\n[contributing guidelines](https://earthpy.readthedocs.io/en/latest/contributing.html)\nfor more information about submitting pull requests or changes to EarthPy.\n\n## License & Citation\n\n[BSD-3](https://github.com/earthlab/earthpy/blob/master/LICENSE)\n\n### Citation Information\n\nWhen citing EarthPy, please cite our [JOSS paper](https://doi.org/10.21105/joss.01886):\n\n```\n@article{Wasser2019EarthPy,\n\tjournal = {Journal of Open Source Software},\n\tdoi = {10.21105/joss.01886},\n\tissn = {2475-9066},\n\tnumber = {43},\n\tpublisher = {The Open Journal},\n\ttitle = {EarthPy: A Python package that makes it easier to explore and plot raster and vector data using open source Python tools.},\n\turl = {https://doi.org/10.21105/joss.01886},\n\tvolume = {4},\n\tauthor = {Wasser, Leah and Joseph, Maxwell and McGlinchy, Joe and Palomino, Jenny and Korinek, Nathan and Holdgraf, Chris and Head, Tim},\n\tpages = {1886},\n\tdate = {2019-11-13},\n\tyear = {2019},\n\tmonth = {11},\n\tday = {13},\n}\n\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A set of helper functions to make working with spatial data in open source tools easier. This package is maintained by Earth Lab and was originally designed to support the earth analytics education program.",
    "version": "0.9.4",
    "project_urls": {
        "Homepage": "https://github.com/earthlab/earthpy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a77298c78371de0ffd281d89f7da85bb2001aa6ce9820fabbfd2adfee99e1935",
                "md5": "cfd3cde8619fd630da3a9823df3f7560",
                "sha256": "1a8dfa81b97b42dd62ed5452e2b4b633fbe51d03bf12f975f9bf6e130876bb56"
            },
            "downloads": -1,
            "filename": "earthpy-0.9.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cfd3cde8619fd630da3a9823df3f7560",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1365473,
            "upload_time": "2021-10-01T22:51:04",
            "upload_time_iso_8601": "2021-10-01T22:51:04.224994Z",
            "url": "https://files.pythonhosted.org/packages/a7/72/98c78371de0ffd281d89f7da85bb2001aa6ce9820fabbfd2adfee99e1935/earthpy-0.9.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "21a7ce7c931ca9e1732bcd7c1f0d4001914fcb888228180d47e5480db1ae7161",
                "md5": "a985e74bc0b3825bbea01c8fbebb6720",
                "sha256": "16ec2831ec87ace9d70473ef23840b6bf3cd239e178b9ddb5767da86e5a34c1b"
            },
            "downloads": -1,
            "filename": "earthpy-0.9.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a985e74bc0b3825bbea01c8fbebb6720",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1366501,
            "upload_time": "2021-10-01T22:51:07",
            "upload_time_iso_8601": "2021-10-01T22:51:07.332978Z",
            "url": "https://files.pythonhosted.org/packages/21/a7/ce7c931ca9e1732bcd7c1f0d4001914fcb888228180d47e5480db1ae7161/earthpy-0.9.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-10-01 22:51:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "earthlab",
    "github_project": "earthpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "earthpy"
}
        
Elapsed time: 0.08079s