Package: earthpy
EarthPyEarthPy 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 arrayWork with masks to set bad pixels such a those covered by clouds and cloud-shadows to NA (mask_pixels())Plot rgb (color), color infrared and other 3 band combination images (plot_rgb())Plot bands of a raster quickly usingplot_bands()Plot histograms for a set of raster files.Create discrete (categorical) legendsCalculate vegetation indices such as Normalized Difference Vegetation Index (normalized_diff())Create hillshade from a DEMEarthPy also has aniomodule that allows users toQuickly access pre-created data subsets used in the earth-analytics courses hosted
onwww.earthdatascience.orgDownload other datasets that they may want to use in their workflows.EarthPy's design was inspired by therasterandsppackage functionality available toRusers.View Example EarthPy Applications in Our Documentation GalleryCheck out ourvignette galleryfor
applied examples of using EarthPy in common spatial workflows.InstallEarthPy can be installed usingpip, but westronglyrecommend that you install it using conda and theconda-forgechannel.Install Using Conda / conda-forge Channel (Preferred)If you are working within an Anaconda environment, we suggest that you install EarthPy usingconda-forge$condainstall-cconda-forgeearthpyNote: 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.$condaconfig--addchannelsconda-forge
$condainstallearthpyInstall via PipWe 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 viapipuse:$pipinstall--upgradeearthpyOnce you have successfully installed EarthPy, you can import it into Python.>>>importearthpy.plotasepBelow is a quick example of plotting multiple bands in a numpy array format.>>>arr=np.random.randint(4,size=(3,5,5))>>>ep.plot_bands(arr,titles=["Band 1","Band 2","Band 3"])>>>plt.show()Active MaintainersWe welcome contributions to EarthPy. Below are the current active package maintainers. Please see ourcontributors filefor a complete list of all
of our contributors.ContributorsWe've welcome any and all contributions. Below are some of the
contributors to EarthPy. We are currently trying to update this list!!How to ContributeWe welcome contributions to EarthPy! Please be sure to check out ourcontributing guidelinesfor more information about submitting pull requests or changes to EarthPy.License & CitationBSD-3Citation InformationWhen citing EarthPy, please cite ourJOSS paper:@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},
}