ecoscape-utilities 0.0.33__tar.gz → 0.0.34__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecoscape-utilities
3
- Version: 0.0.33
3
+ Version: 0.0.34
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
@@ -607,13 +607,14 @@ class Validation(object):
607
607
  :param hab_tif: habitat geotiff used to compute repop
608
608
  :param tile_scale: size of the tile around square
609
609
  """
610
- df = self.observations.copy()
610
+ df = pd.read_csv(self.obs_fn)
611
611
  def f(row):
612
612
  square = row["Square"]
613
613
  if (isinstance(square, str)):
614
614
  coords = format_coords(square)
615
615
  else:
616
616
  coords = square
617
+ lat, lng = coords
617
618
  repop_pix_coords = transform_coords(repop_tif, coords)
618
619
  hab_pix_coords = transform_coords(hab_tif, coords)
619
620
  repop_tile = repop_tif.get_tile_from_coord(repop_pix_coords, tile_scale=tile_scale)
@@ -627,7 +628,7 @@ class Validation(object):
627
628
  if div_by_255:
628
629
  avg_repop /= 255.
629
630
  max_repop /= 255.
630
- return avg_repop, avg_hab, max_repop, max_hab
631
- df["avg_repop"], df["avg_hab"], df["max_repop"], df["max_hab"] = zip(*df.apply(f, axis=1))
631
+ return avg_repop, avg_hab, max_repop, max_hab, lat, lng
632
+ df["avg_repop"], df["avg_hab"], df["max_repop"], df["max_hab"], df["lat"], df["lng"] = zip(*df.apply(f, axis=1))
632
633
  return df
633
634
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecoscape-utilities
3
- Version: 0.0.33
3
+ Version: 0.0.34
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ecoscape-utilities"
7
- version = "0.0.33"
7
+ version = "0.0.34"
8
8
  authors = [
9
9
  {name="Luca de Alfaro", email="luca@ucsc.edu"},
10
10
  {name="Coen Adler", email="ctadler@ucsc.edu"},