ecoscape-utilities 0.0.35__py3-none-any.whl → 0.0.36__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ecoscape-utilities might be problematic. Click here for more details.
- ecoscape_utilities/ebird_db.py +10 -2
- {ecoscape_utilities-0.0.35.dist-info → ecoscape_utilities-0.0.36.dist-info}/METADATA +1 -1
- ecoscape_utilities-0.0.36.dist-info/RECORD +8 -0
- {ecoscape_utilities-0.0.35.dist-info → ecoscape_utilities-0.0.36.dist-info}/WHEEL +1 -1
- ecoscape_utilities-0.0.35.dist-info/RECORD +0 -8
- {ecoscape_utilities-0.0.35.dist-info → ecoscape_utilities-0.0.36.dist-info}/licenses/LICENSE.md +0 -0
- {ecoscape_utilities-0.0.35.dist-info → ecoscape_utilities-0.0.36.dist-info}/top_level.txt +0 -0
ecoscape_utilities/ebird_db.py
CHANGED
|
@@ -73,7 +73,7 @@ class EbirdObservations(Connection):
|
|
|
73
73
|
|
|
74
74
|
def get_all_squares(self, state=None,
|
|
75
75
|
breeding=True, date_range=None,
|
|
76
|
-
lat_range=None, lng_range=None, max_dist=2,
|
|
76
|
+
lat_range=None, lng_range=None, max_dist=2, min_time=None,
|
|
77
77
|
verbose=False):
|
|
78
78
|
"""
|
|
79
79
|
Gets all squares with bird (any bird) observations, for a certain state,
|
|
@@ -85,12 +85,16 @@ class EbirdObservations(Connection):
|
|
|
85
85
|
:param lng_range: tuple of 2 floats for the lower and upper bounds for longitude
|
|
86
86
|
:param max_dist (int): max kilometers traveled for the checklist for any observation we consider
|
|
87
87
|
(any of further distance will be too noisy, and should be disreguarded)
|
|
88
|
+
:param min_time (int): minimum time in minutes for the checklist for any observation we consider
|
|
88
89
|
:returns: list of squares which fall within the query parameters
|
|
89
90
|
"""
|
|
90
91
|
query_string=['select DISTINCT SQUARE from checklist where "ALL SPECIES REPORTED" = 1']
|
|
91
92
|
query_string.append('and "PROTOCOL TYPE" != "Incidental"')
|
|
92
93
|
query_string.append('and "EFFORT DISTANCE KM" <= :dist')
|
|
93
94
|
d = {"dist": max_dist}
|
|
95
|
+
if min_time is not None:
|
|
96
|
+
query_string.append('and "DURATION MINUTES" >= :min_time')
|
|
97
|
+
d["min_time"] = min_time
|
|
94
98
|
if state is not None:
|
|
95
99
|
query_string.append('and "STATE CODE" = :state')
|
|
96
100
|
d['state'] = state
|
|
@@ -121,7 +125,7 @@ class EbirdObservations(Connection):
|
|
|
121
125
|
|
|
122
126
|
def get_square_observations(self, square, bird,
|
|
123
127
|
breeding=True, date_range=None,
|
|
124
|
-
lat_range=None, lng_range=None, max_dist=2,
|
|
128
|
+
lat_range=None, lng_range=None, max_dist=2, min_time=None,
|
|
125
129
|
verbose=False):
|
|
126
130
|
"""
|
|
127
131
|
Get the number of checklists, number of checklists with a bird,
|
|
@@ -134,6 +138,7 @@ class EbirdObservations(Connection):
|
|
|
134
138
|
:param lng_range: tuple of 2 floats for the lower and upper bounds for longitude
|
|
135
139
|
:param max_dist (int): max kilometers traveled for the checklist for any observation we consider
|
|
136
140
|
(any of further distance will be too noisy, and should be disreguarded)
|
|
141
|
+
:param min_time (int): minimum time in minutes for the checklist for any observation we consider
|
|
137
142
|
:returns: num_checklists, num_bird_checklists, num_birds for the given square.
|
|
138
143
|
"""
|
|
139
144
|
# Gets the number of checklists, the total time, the total distance, and the total number of birds.
|
|
@@ -144,6 +149,9 @@ class EbirdObservations(Connection):
|
|
|
144
149
|
query_string.append('and "PROTOCOL TYPE" != "Incidental"')
|
|
145
150
|
query_string.append('and "EFFORT DISTANCE KM" <= :dist')
|
|
146
151
|
d["dist"] = max_dist
|
|
152
|
+
if min_time is not None:
|
|
153
|
+
query_string.append('and "DURATION MINUTES" >= :min_time')
|
|
154
|
+
d["min_time"] = min_time
|
|
147
155
|
# Adds breeding portion
|
|
148
156
|
if breeding:
|
|
149
157
|
query_string.extend([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ecoscape-utilities
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.36
|
|
4
4
|
Summary: A collection of EcoScape utilities.
|
|
5
5
|
Author-email: Luca de Alfaro <luca@ucsc.edu>, Coen Adler <ctadler@ucsc.edu>, Artie Nazarov <anazarov@ucsc.edu>, Natalia Ocampo-Peñuela <nocampop@ucsc.edu>, Jasmine Tai <cjtai@ucsc.edu>, Natalie Valett <nvalett@ucsc.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/ecoscape-earth/ecoscape-utilities
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
ecoscape_utilities/__init__.py,sha256=LXt1rL9JVsjnCmsNZwZ2aoElphIK-koaEDdW6ffZsMQ,50
|
|
2
|
+
ecoscape_utilities/bird_runs.py,sha256=v43PfH_4ojpkTE-EFOJxr0oOW3M9suNm_1zMjZ9P-eI,5409
|
|
3
|
+
ecoscape_utilities/ebird_db.py,sha256=LLd6noS4LJQLOtQEquVuRo1rRKm0XrM4ygba-xV7O88,30656
|
|
4
|
+
ecoscape_utilities-0.0.36.dist-info/licenses/LICENSE.md,sha256=3vh2mpA_XIR3FJot6a5F9DqktAoq45sEGIRkYjvAEeU,1304
|
|
5
|
+
ecoscape_utilities-0.0.36.dist-info/METADATA,sha256=8Jom07zUfpyrfIG4P_h3MnN-IrTp0-4d4bdJnQmQR1E,1382
|
|
6
|
+
ecoscape_utilities-0.0.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
ecoscape_utilities-0.0.36.dist-info/top_level.txt,sha256=jLf7iMlySaJg0Vh8z4lbAaqOc5W5ruMgKFvp797CryQ,19
|
|
8
|
+
ecoscape_utilities-0.0.36.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
ecoscape_utilities/__init__.py,sha256=LXt1rL9JVsjnCmsNZwZ2aoElphIK-koaEDdW6ffZsMQ,50
|
|
2
|
-
ecoscape_utilities/bird_runs.py,sha256=v43PfH_4ojpkTE-EFOJxr0oOW3M9suNm_1zMjZ9P-eI,5409
|
|
3
|
-
ecoscape_utilities/ebird_db.py,sha256=KGtSXADu3VwnXHUDp_bGPDGJhRoLmVXbzduwYufRo1M,30134
|
|
4
|
-
ecoscape_utilities-0.0.35.dist-info/licenses/LICENSE.md,sha256=3vh2mpA_XIR3FJot6a5F9DqktAoq45sEGIRkYjvAEeU,1304
|
|
5
|
-
ecoscape_utilities-0.0.35.dist-info/METADATA,sha256=8J6OO_NUghRQzmLs2EwxdDIPwIuRlh6W_bxAOdyRKto,1382
|
|
6
|
-
ecoscape_utilities-0.0.35.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
7
|
-
ecoscape_utilities-0.0.35.dist-info/top_level.txt,sha256=jLf7iMlySaJg0Vh8z4lbAaqOc5W5ruMgKFvp797CryQ,19
|
|
8
|
-
ecoscape_utilities-0.0.35.dist-info/RECORD,,
|
{ecoscape_utilities-0.0.35.dist-info → ecoscape_utilities-0.0.36.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|
|
File without changes
|