ecoscape-utilities 0.0.38__py3-none-any.whl → 0.0.39__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 +18 -6
- {ecoscape_utilities-0.0.38.dist-info → ecoscape_utilities-0.0.39.dist-info}/METADATA +1 -1
- ecoscape_utilities-0.0.39.dist-info/RECORD +8 -0
- ecoscape_utilities-0.0.38.dist-info/RECORD +0 -8
- {ecoscape_utilities-0.0.38.dist-info → ecoscape_utilities-0.0.39.dist-info}/WHEEL +0 -0
- {ecoscape_utilities-0.0.38.dist-info → ecoscape_utilities-0.0.39.dist-info}/licenses/LICENSE.md +0 -0
- {ecoscape_utilities-0.0.38.dist-info → ecoscape_utilities-0.0.39.dist-info}/top_level.txt +0 -0
ecoscape_utilities/ebird_db.py
CHANGED
|
@@ -226,10 +226,13 @@ class EbirdObservations(Connection):
|
|
|
226
226
|
# Adds breeding portion
|
|
227
227
|
if breeding is not None:
|
|
228
228
|
query_string.extend([
|
|
229
|
-
'and substr("OBSERVATION DATE", 6, 2) >= ":br1"',
|
|
230
|
-
'and substr("OBSERVATION DATE", 6, 2) <= ":br2"',
|
|
229
|
+
'and substr(checklist."OBSERVATION DATE", 6, 2) >= ":br1"',
|
|
230
|
+
'and substr(checklist."OBSERVATION DATE", 6, 2) <= ":br2"',
|
|
231
231
|
])
|
|
232
232
|
d['br1'], d['br2'] = breeding
|
|
233
|
+
if min_time is not None:
|
|
234
|
+
query_string.append('and "checklist.DURATION MINUTES" >= :min_time')
|
|
235
|
+
d["min_time"] = min_time
|
|
233
236
|
if date_range is not None:
|
|
234
237
|
query_string.append('and checklist."OBSERVATION DATE" >= :min_date')
|
|
235
238
|
query_string.append('and checklist."OBSERVATION DATE" <= :max_date')
|
|
@@ -267,7 +270,7 @@ class EbirdObservations(Connection):
|
|
|
267
270
|
)
|
|
268
271
|
|
|
269
272
|
def get_square_individual_checklists(self, square, bird,
|
|
270
|
-
breeding=None, date_range=None,
|
|
273
|
+
breeding=None, date_range=None, min_time=None,
|
|
271
274
|
lat_range=None, lng_range=None, max_dist=2,
|
|
272
275
|
verbose=False):
|
|
273
276
|
"""
|
|
@@ -300,6 +303,9 @@ class EbirdObservations(Connection):
|
|
|
300
303
|
'and substr("OBSERVATION DATE", 6, 2) <= ":br2"',
|
|
301
304
|
])
|
|
302
305
|
d['br1'], d['br2'] = breeding
|
|
306
|
+
if min_time is not None:
|
|
307
|
+
query_string.append('and "DURATION MINUTES" >= :min_time')
|
|
308
|
+
d["min_time"] = min_time
|
|
303
309
|
if date_range is not None:
|
|
304
310
|
query_string.append('and "OBSERVATION DATE" >= :min_date')
|
|
305
311
|
query_string.append('and "OBSERVATION DATE" <= :max_date')
|
|
@@ -331,14 +337,17 @@ class EbirdObservations(Connection):
|
|
|
331
337
|
# Adds breeding portion
|
|
332
338
|
if breeding is not None:
|
|
333
339
|
query_string.extend([
|
|
334
|
-
'and substr("OBSERVATION DATE", 6, 2) >= ":br1"',
|
|
335
|
-
'and substr("OBSERVATION DATE", 6, 2) <= ":br2"',
|
|
340
|
+
'and substr(checklist."OBSERVATION DATE", 6, 2) >= ":br1"',
|
|
341
|
+
'and substr(checklist."OBSERVATION DATE", 6, 2) <= ":br2"',
|
|
336
342
|
])
|
|
337
343
|
d['br1'], d['br2'] = breeding
|
|
338
344
|
if date_range is not None:
|
|
339
345
|
query_string.append('and checklist."OBSERVATION DATE" >= :min_date')
|
|
340
346
|
query_string.append('and checklist."OBSERVATION DATE" <= :max_date')
|
|
341
347
|
d["min_date"], d["max_date"] = date_range
|
|
348
|
+
if min_time is not None:
|
|
349
|
+
query_string.append('and checklist."DURATION MINUTES" >= :min_time')
|
|
350
|
+
d["min_time"] = min_time
|
|
342
351
|
if lat_range is not None:
|
|
343
352
|
query_string.append('and checklist."LATITUDE" >= :min_lat')
|
|
344
353
|
query_string.append('and checklist."LATITUDE" <= :max_lat')
|
|
@@ -362,7 +371,7 @@ class EbirdObservations(Connection):
|
|
|
362
371
|
checklists_df["Count"] = checklists_df.apply(lambda row : counts[row["SAMPLING EVENT IDENTIFIER"]], axis=1)
|
|
363
372
|
return checklists_df
|
|
364
373
|
|
|
365
|
-
def get_squares_with_bird(self, bird, max_dist=1, breeding=None,
|
|
374
|
+
def get_squares_with_bird(self, bird, max_dist=1, breeding=None, min_time=None,
|
|
366
375
|
date_range=None, lat_range=None, lng_range=None,
|
|
367
376
|
state=None, verbose=False):
|
|
368
377
|
"""Gets all the squares where a bird has been sighted. This is used
|
|
@@ -395,6 +404,9 @@ class EbirdObservations(Connection):
|
|
|
395
404
|
'and substr("OBSERVATION DATE", 6, 2) <= ":br2"',
|
|
396
405
|
])
|
|
397
406
|
d['br1'], d['br2'] = breeding
|
|
407
|
+
if min_time is not None:
|
|
408
|
+
query_string.append('and "DURATION MINUTES" >= :min_time')
|
|
409
|
+
d["min_time"] = min_time
|
|
398
410
|
if date_range is not None:
|
|
399
411
|
query_string.append('and checklist."OBSERVATION DATE" >= :min_date')
|
|
400
412
|
query_string.append('and checklist."OBSERVATION DATE" <= :max_date')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ecoscape-utilities
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.39
|
|
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=-bMfpBPIPFu7x4jEIQ746DYqXudtUSH8pnCaBqD05gk,28721
|
|
4
|
+
ecoscape_utilities-0.0.39.dist-info/licenses/LICENSE.md,sha256=3vh2mpA_XIR3FJot6a5F9DqktAoq45sEGIRkYjvAEeU,1304
|
|
5
|
+
ecoscape_utilities-0.0.39.dist-info/METADATA,sha256=Xqa6xZIPtHg1PmF3QCUwiKG-ofz5JsNYEGJrLG-0n6w,1382
|
|
6
|
+
ecoscape_utilities-0.0.39.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
ecoscape_utilities-0.0.39.dist-info/top_level.txt,sha256=jLf7iMlySaJg0Vh8z4lbAaqOc5W5ruMgKFvp797CryQ,19
|
|
8
|
+
ecoscape_utilities-0.0.39.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=vMezw5AFIrd4RVITWbLpsZlDGBxig5CoVQMzT7XDeNk,28067
|
|
4
|
-
ecoscape_utilities-0.0.38.dist-info/licenses/LICENSE.md,sha256=3vh2mpA_XIR3FJot6a5F9DqktAoq45sEGIRkYjvAEeU,1304
|
|
5
|
-
ecoscape_utilities-0.0.38.dist-info/METADATA,sha256=E9tCnd-2Ipwy9tzDGz30uICoVmJ2mzuxrGUcuuZFGSs,1382
|
|
6
|
-
ecoscape_utilities-0.0.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
ecoscape_utilities-0.0.38.dist-info/top_level.txt,sha256=jLf7iMlySaJg0Vh8z4lbAaqOc5W5ruMgKFvp797CryQ,19
|
|
8
|
-
ecoscape_utilities-0.0.38.dist-info/RECORD,,
|
|
File without changes
|
{ecoscape_utilities-0.0.38.dist-info → ecoscape_utilities-0.0.39.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|
|
File without changes
|