Skip to content

Commit 17690fc

Browse files
authored
add citations guidelines and reformat (#382)
* add citations guidelines * edit refs up to and including pathfinding * add rest of xrsptial modules citations * add Citations styles and cite us in readme
1 parent fcb822d commit 17690fc

File tree

15 files changed

+62
-46
lines changed

15 files changed

+62
-46
lines changed

Citation-styles.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Citations Formats:
2+
3+
- For scientific literature in the form of books or articles in peer-reviewed journals:
4+
APA7 guidelines
5+
- For Websites or resources available by following a link to an html, pdf, or other formatted style output:
6+
Author, Organization, Title, url, "Accesssed" date accessed [Mon. dd, yyyy]
7+
- For YouTube:
8+
Poster username, Channel, date posted [Mon. dd, yyyy] "YouTube", , url, "Accessed" date accessed [Mon. dd, yyyy]
9+
- For software packages:
10+
Platform username, package name, version, link
11+
- For source code:
12+
- On GitHub:
13+
username/repo, link, access date [Mon. dd, yyyy]

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,7 @@ With the introduction of projects like Numba, Python gained new ways to provide
215215
- @SAN154
216216
- @SapirLastimoza-Dooley
217217
- @lex-c
218+
219+
Cite our code:
220+
221+
`makepath/xarray-spatial, https://github.com/makepath/xarray-spatial, ©2020.`

xrspatial/aspect.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,8 @@ def aspect(agg: xr.DataArray,
179179
Notes:
180180
----------
181181
Algorithm References:
182-
- http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/how-aspect-works.htm#ESRI_SECTION1_4198691F8852475A9F4BC71246579FAA # noqa
183-
- Burrough, P. A., and McDonell, R. A., 1998. Principles of Geographical
184-
Information Systems (Oxford University Press, New York), pp 406
182+
- esri, How Aspect Works, http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/how-aspect-works.htm#ESRI_SECTION1_4198691F8852475A9F4BC71246579FAA, Accessed Apr. 21, 2021. # noqa
183+
- Burrough, P. A., McDonnell, R., McDonnell, R. A., & Lloyd, C. D. (2015). Principles of geographical information systems. Oxford university press. pp 406. # noqa
185184
186185
Examples:
187186
----------
@@ -217,7 +216,7 @@ def aspect(agg: xr.DataArray,
217216
* lat (lat) float64 0.0 1.0 2.0 3.0 4.0
218217
219218
Terrain Example:
220-
- https://makepath.github.io/xarray-spatial/assets/examples/user-guide.html
219+
- makepath, User Guide, https://makepath.github.io/xarray-spatial/assets/examples/user-guide.html, Accessed Apr. 21, 2021 # noqa
221220
"""
222221

223222
# numpy case

xrspatial/bump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def bump(width: int, height: int, count: Optional[int] = None,
5656
Notes:
5757
----------
5858
Algorithm References:
59-
- http://www.mountaincartography.org/mt_hood/pdfs/nighbert_bump1.pdf
59+
- Nighbert, JS, Bureau of Land Management, Portland, OR, Using “Materials and Textures” in Cartographic Presentations A.K.A. “Bump Mapping”, http://www.mountaincartography.org/mt_hood/pdfs/nighbert_bump1.pdf, Accessed Apr. 21, 2021. # noqa
6060
6161
Examples:
6262
----------
@@ -118,7 +118,7 @@ def bump(width: int, height: int, count: Optional[int] = None,
118118
res: 1
119119
120120
Terrrain Example:
121-
- https://makepath.github.io/xarray-spatial/assets/examples/user-guide.html # noqa
121+
- makepath, User Guide, https://makepath.github.io/xarray-spatial/assets/examples/user-guide.html, Accessed Apr. 21, 2021. # noqa
122122
"""
123123

124124
linx = range(width)

xrspatial/classify.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def reclassify(agg: xr.DataArray,
216216
217217
Notes:
218218
----------
219-
Adapted from PySal:
220-
- https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html
219+
Adapted from PySAL:
220+
- PySAL, Source code for mapclassify.classifiers, https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html, Accessed Apr. 21, 2021. # noqa
221221
222222
Examples:
223223
----------
@@ -367,7 +367,7 @@ def quantile(agg: xr.DataArray,
367367
Notes:
368368
----------
369369
Adapted from PySAL:
370-
- https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html#Quantiles # noqa
370+
- PySAL, Source code for mapclassify.classifiers, https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html#Quantiles, Accessed Apr. 21, 2021. # noqa
371371
372372
Note that dask's percentile algorithm is approximate,
373373
while numpy's is exact. This may cause some differences
@@ -717,9 +717,9 @@ def natural_breaks(agg: xr.DataArray,
717717
Algorithm References:
718718
----------
719719
Map Classify:
720-
- https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html#NaturalBreaks # noqa
720+
- PySAL, Source code for mapclassify.classifiers, https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html#NaturalBreaks, Accessed Apr. 21, 2021. # noqa
721721
perrygeo:
722-
- https://github.com/perrygeo/jenks/blob/master/jenks.pyx
722+
- perrygeo/jenks, https://github.com/perrygeo/jenks/blob/master/jenks.pyx, Apr. 21, 2021. # noqa
723723
724724
Examples:
725725
----------
@@ -858,9 +858,9 @@ def equal_interval(agg: xr.DataArray,
858858
Algorithm References:
859859
----------
860860
PySal:
861-
- https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html#EqualInterval # noqa
861+
- PySAL, Source code for mapclassify.classifiers, https://pysal.org/mapclassify/_modules/mapclassify/classifiers.html#EqualInterval, Accessed Apr. 21, 2021. # noqa
862862
SciKit:
863-
- https://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html#sphx-glr-auto-examples-classification-plot-classifier-comparison-py # noqa
863+
- scikit-learn, Classifier comparison, https://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html#sphx-glr-auto-examples-classification-plot-classifier-comparison-py, Accessed Apr. 21, 2021. # noqa
864864
865865
Examples:
866866
----------

xrspatial/curvature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def curvature(agg: xr.DataArray,
127127
Notes:
128128
----------
129129
Algorithm References:
130-
- https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/how-curvature-works.htm # noqa
130+
- esri, How Curvature works, https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/how-curvature-works.htm, Accessed Apr. 21, 2021. # noqa
131131
132132
Examples:
133133
----------

xrspatial/hillshade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def hillshade(agg: xr.DataArray,
135135
Notes:
136136
----------
137137
Algorithm References:
138-
- http://geoexamples.blogspot.com/2014/03/shaded-relief-images-using-gdal-python.html # noqa
138+
- GeoExamples, Shaded relief images using GDAL python, http://geoexamples.blogspot.com/2014/03/shaded-relief-images-using-gdal-python.html, Accessed Apr. 21, 2021. # noqa
139139
140140
Examples:
141141
----------

xrspatial/multispectral.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def arvi(nir_agg: DataArray, red_agg: DataArray, blue_agg: DataArray,
100100
Notes:
101101
----------
102102
Algorithm References:
103-
https://modis.gsfc.nasa.gov/sci_team/pubs/abstract_new.php?id=03667
103+
- Kaufman, Y. J., & Tanre, D. (1992). Atmospherically resistant vegetation index (ARVI) for EOS-MODIS. IEEE transactions on Geoscience and Remote Sensing, 30(2), 261-270. # noqa
104104
105105
Examples:
106106
----------
@@ -280,7 +280,7 @@ def evi(nir_agg: DataArray, red_agg: DataArray, blue_agg: DataArray,
280280
Notes:
281281
----------
282282
Algorithm References:
283-
https://en.wikipedia.org/wiki/Enhanced_vegetation_index
283+
- Wikipedia, Enhanced Vegetation Index, https://en.wikipedia.org/wiki/Enhanced_vegetation_index, Accessed Apr. 21, 2021. # noqa
284284
285285
Examples:
286286
----------
@@ -459,7 +459,7 @@ def gci(nir_agg: DataArray, green_agg: DataArray, name='gci'):
459459
Notes:
460460
----------
461461
Algorithm References:
462-
https://en.wikipedia.org/wiki/Enhanced_vegetation_index
462+
- Wikipedia, Enhanced Vegetation Index, https://en.wikipedia.org/wiki/Enhanced_vegetation_index, Accessed Apr. 21, 2021. # noqa
463463
464464
Examples:
465465
----------
@@ -566,7 +566,7 @@ def nbr(nir_agg: DataArray, swir2_agg: DataArray, name='nbr'):
566566
Notes:
567567
----------
568568
Algorithm References:
569-
https://www.usgs.gov/land-resources/nli/landsat/landsat-normalized-burn-ratio
569+
- USGS, Landsat Normalized Burn Ratio, https://www.usgs.gov/land-resources/nli/landsat/landsat-normalized-burn-ratio, Accessed Apr. 21, 2021. # noqa
570570
571571
Examples:
572572
----------
@@ -646,7 +646,7 @@ def nbr2(swir1_agg: DataArray, swir2_agg: DataArray, name='nbr2'):
646646
"NBR2 modifies the Normalized Burn Ratio (NBR)
647647
to highlight water sensitivity in vegetation and
648648
may be useful in post-fire recovery studies."
649-
https://www.usgs.gov/land-resources/nli/landsat/landsat-normalized-burn-ratio-2
649+
650650
Parameters
651651
----------
652652
swir1_agg : DataArray
@@ -670,7 +670,7 @@ def nbr2(swir1_agg: DataArray, swir2_agg: DataArray, name='nbr2'):
670670
Notes:
671671
----------
672672
Algorithm References:
673-
https://www.usgs.gov/land-resources/nli/landsat/landsat-normalized-burn-ratio-2
673+
- USGS, Landsat Normalized Burn Ratio 2, https://www.usgs.gov/land-resources/nli/landsat/landsat-normalized-burn-ratio-2, Accessed Apr. 21, 2021. # noqa
674674
675675
Examples:
676676
----------
@@ -771,9 +771,9 @@ def ndvi(nir_agg: DataArray, red_agg: DataArray, name='ndvi'):
771771
Notes:
772772
----------
773773
Algorithm References:
774-
http://ceholden.github.io/open-geo-tutorial/python/chapter_2_indices.html
774+
- Holden, C, Chapter 2: Your first remote sensing vegetation index, http://ceholden.github.io/open-geo-tutorial/python/chapter_2_indices.html, Accessed Apr. 21, 2021. # noqa
775775
776-
Examples:
776+
Examples:
777777
----------
778778
Imports
779779
>>> import numpy as np
@@ -876,7 +876,7 @@ def ndmi(nir_agg: DataArray, swir1_agg: DataArray, name='ndmi'):
876876
Notes:
877877
----------
878878
Algorithm References:
879-
https://www.usgs.gov/land-resources/nli/landsat/normalized-difference-moisture-index
879+
- USGS, Normalized Difference Moisture Index, https://www.usgs.gov/land-resources/nli/landsat/normalized-difference-moisture-index, Accessed Apr. 21, 2021. # noqa
880880
881881
Examples:
882882
----------
@@ -1085,7 +1085,7 @@ def savi(nir_agg: DataArray, red_agg: DataArray,
10851085
Notes:
10861086
----------
10871087
Algorithm References:
1088-
- https://www.sciencedirect.com/science/article/abs/pii/003442578890106X
1088+
- Huete, A. R. (1988). A soil-adjusted vegetation index (SAVI). Remote sensing of environment, 25(3), 295-309. # noqa
10891089
10901090
Examples
10911091
----------
@@ -1241,7 +1241,7 @@ def sipi(nir_agg: DataArray, red_agg: DataArray, blue_agg: DataArray,
12411241
Notes:
12421242
----------
12431243
Algorithm References:
1244-
https://en.wikipedia.org/wiki/Enhanced_vegetation_index
1244+
- Wikipedia, Enhanced Vegetation Index, https://en.wikipedia.org/wiki/Enhanced_vegetation_index, Accessed Apr. 21, 2021. # noqa
12451245
12461246
Examples:
12471247
----------
@@ -1413,7 +1413,7 @@ def ebbi(red_agg: DataArray, swir_agg: DataArray, tir_agg: DataArray,
14131413
Notes:
14141414
----------
14151415
Algorithm References:
1416-
https://rdrr.io/cran/LSRS/man/EBBI.html
1416+
- RDRR.io, EBBI: Enhanced Built-Up and Bareness Index, https://rdrr.io/cran/LSRS/man/EBBI.html, Accessed Apr. 21, 2021. # noqa
14171417
14181418
Examples:
14191419
----------

xrspatial/pathfinding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ def a_star_search(surface: xr.DataArray,
280280
Notes:
281281
----------
282282
Algorithm References:
283-
- https://www.redblobgames.com/pathfinding/a-star/implementation.html
284-
- https://medium.com/@nicholas.w.swift/easy-a-star-pathfinding-7e6689c7f7b2
283+
- Patel, A, Red Blob Games, Implementation of A*, https://www.redblobgames.com/pathfinding/a-star/implementation.html, Accessed Apr. 21, 2021. # noqa
284+
- Swift, N, Medium, Easy A* (star) Pathfinding, https://medium.com/@nicholas.w.swift/easy-a-star-pathfinding-7e6689c7f7b2, Accessed Apr. 21, 2021. # noqa
285285
286286
Examples:
287287
----------

xrspatial/perlin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def perlin(width: int,
3434
Notes:
3535
----------
3636
Algorithm References:
37-
numba-ized from Paul Panzer example available here:
38-
https://stackoverflow.com/questions/42147776/producing-2d-perlin-noise-with-numpy
39-
http://www.mountaincartography.org/mt_hood/pdfs/nighbert_bump1.pdf
37+
- numba-ized from Paul Panzer example available here: #noqa
38+
- tgirod, Panzer, Paul, StackOverflow, https://stackoverflow.com/questions/42147776/producing-2d-perlin-noise-with-numpy, Accessed Apr. 21, 2021. # noqa
39+
- Nighbert, JS, Bureau of Land Management, Portland, OR, Using “Materials and Textures” in Cartographic Presentations A.K.A. “Bump Mapping”, http://www.mountaincartography.org/mt_hood/pdfs/nighbert_bump1.pdf, Accessed Apr. 21, 2021. # noqa
4040
4141
Examples:
4242
----------

0 commit comments

Comments
 (0)