ECOv002-calval-tables 1.0.1__tar.gz → 1.1.0__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.
- ecov002_calval_tables-1.1.0/ECOv002_calval_tables/ECOv002_calval_tables.py +75 -0
- ecov002_calval_tables-1.1.0/ECOv002_calval_tables/version.py +3 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables.egg-info/PKG-INFO +4 -2
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables.egg-info/SOURCES.txt +6 -1
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/PKG-INFO +4 -2
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/README.md +3 -1
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/pyproject.toml +1 -1
- ecov002_calval_tables-1.1.0/tests/test_import_ECOv002_calval_tables.py +2 -0
- ecov002_calval_tables-1.1.0/tests/test_import_dependencies.py +12 -0
- ecov002_calval_tables-1.1.0/tests/test_load_calval_table.py +14 -0
- ecov002_calval_tables-1.1.0/tests/test_load_metadata_ebc_filt.py +15 -0
- ecov002_calval_tables-1.0.1/ECOv002_calval_tables/ECOv002_calval_tables.py +0 -22
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables/__init__.py +0 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables/combined_eco_flux_EC_filtered.csv +0 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables/metadata_ebc_filt.csv +0 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables.egg-info/dependency_links.txt +0 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables.egg-info/requires.txt +0 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables.egg-info/top_level.txt +0 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/LICENSE +0 -0
- {ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/setup.cfg +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
|
|
2
|
+
import pandas as pd
|
|
3
|
+
import os
|
|
4
|
+
import geopandas as gpd
|
|
5
|
+
from shapely.geometry import Point
|
|
6
|
+
|
|
7
|
+
def load_combined_eco_flux_ec_filtered() -> pd.DataFrame:
|
|
8
|
+
"""
|
|
9
|
+
Load the filtered eddy covariance (EC) flux dataset used for ECOSTRESS Collection 2 ET product validation.
|
|
10
|
+
This dataset contains site-level, quality-controlled flux measurements that serve as ground truth for evaluating ECOSTRESS evapotranspiration estimates.
|
|
11
|
+
Returns:
|
|
12
|
+
pd.DataFrame: DataFrame of filtered EC flux data for validation analysis.
|
|
13
|
+
"""
|
|
14
|
+
return pd.read_csv(os.path.join(os.path.dirname(__file__), 'combined_eco_flux_EC_filtered.csv'))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def load_metadata_ebc_filt() -> gpd.GeoDataFrame:
|
|
18
|
+
"""
|
|
19
|
+
Load the metadata for the filtered eddy covariance (EC) flux sites used in the ECOSTRESS Collection 2 validation study.
|
|
20
|
+
This table provides site information (location, climate, land cover, etc.) for interpreting and grouping the flux data in the validation analysis.
|
|
21
|
+
Returns:
|
|
22
|
+
pd.DataFrame: DataFrame of site metadata for the filtered EC flux dataset.
|
|
23
|
+
"""
|
|
24
|
+
df = pd.read_csv(os.path.join(os.path.dirname(__file__), 'metadata_ebc_filt.csv'))
|
|
25
|
+
|
|
26
|
+
if 'Lat' not in df.columns or 'Long' not in df.columns:
|
|
27
|
+
raise ValueError("metadata_ebc_filt.csv must contain 'Lat' and 'Long' columns.")
|
|
28
|
+
|
|
29
|
+
geometry = [Point(xy) for xy in zip(df['Long'], df['Lat'])]
|
|
30
|
+
gdf = gpd.GeoDataFrame(df, geometry=geometry, crs="EPSG:4326")
|
|
31
|
+
|
|
32
|
+
return gdf
|
|
33
|
+
|
|
34
|
+
def load_calval_table() -> gpd.GeoDataFrame:
|
|
35
|
+
"""
|
|
36
|
+
Load the combined ECOSTRESS Collection 2 validation table, which includes both the filtered eddy covariance flux data
|
|
37
|
+
and the associated site metadata.
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
gpd.GeoDataFrame: Combined GeoDataFrame of EC flux data and site metadata for validation analysis.
|
|
41
|
+
"""
|
|
42
|
+
tower_locations_gdf = load_metadata_ebc_filt()
|
|
43
|
+
tower_IDs = list(tower_locations_gdf["Site ID"])
|
|
44
|
+
tower_names = list(tower_locations_gdf.Name)
|
|
45
|
+
tower_geometries = tower_locations_gdf.geometry
|
|
46
|
+
tower_data_df = load_combined_eco_flux_ec_filtered()
|
|
47
|
+
|
|
48
|
+
tower_static_data_gdf = gpd.GeoDataFrame({
|
|
49
|
+
"ID": tower_IDs,
|
|
50
|
+
"name": tower_names,
|
|
51
|
+
"geometry": tower_geometries
|
|
52
|
+
}, crs="EPSG:4326")
|
|
53
|
+
|
|
54
|
+
observation_tower_IDs = list(tower_data_df.ID)
|
|
55
|
+
observation_tower_times_UTC = tower_data_df.eco_time_utc
|
|
56
|
+
|
|
57
|
+
model_inputs_df = pd.DataFrame({
|
|
58
|
+
"ID": observation_tower_IDs,
|
|
59
|
+
"time_UTC": observation_tower_times_UTC
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
merged_df = pd.merge(
|
|
63
|
+
left=model_inputs_df,
|
|
64
|
+
right=tower_static_data_gdf,
|
|
65
|
+
left_on="ID",
|
|
66
|
+
right_on="ID",
|
|
67
|
+
how="left"
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# Convert merged DataFrame to GeoDataFrame
|
|
71
|
+
gdf = gpd.GeoDataFrame(merged_df, geometry=merged_df["geometry"], crs="EPSG:4326")
|
|
72
|
+
# Optionally, drop rows with missing geometry if needed:
|
|
73
|
+
# gdf = gdf[gdf.geometry.notnull()]
|
|
74
|
+
return gdf
|
|
75
|
+
return gdf
|
{ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ECOv002-calval-tables
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Priestley-Taylor Jet Propulsion Laboratory Soil Moisutre Evapotranspiration Model
|
|
5
5
|
Author-email: Gregory Halverson <gregory.h.halverson@jpl.nasa.gov>, Zoe Pierrat <zoe.a.pierrat@jpl.nasa.gov>
|
|
6
6
|
Project-URL: Homepage, https://github.com/gregory-halverson/ECOv002-calval-tables
|
|
@@ -21,10 +21,12 @@ Requires-Dist: twine; extra == "dev"
|
|
|
21
21
|
Dynamic: license-file
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
# ECOSTRESS Collection 2 Calibration/Validation Data Tables
|
|
24
|
+
# ECOSTRESS Collection 2 Calibration/Validation Data Tables
|
|
25
25
|
|
|
26
26
|
This Python package provides calibration and validation data tables used in the evaluation of the ECOSTRESS Collection 2 Evapotranspiration (ET) data products. The included datasets and loader functions support reproducible research and validation workflows for ET modeling and remote sensing studies.
|
|
27
27
|
|
|
28
|
+
The CSV files used in this repository were sourced from the [@zoepierrat/ECOSTRESS_C2_L3_ET_Validation](https://github.com/zoepierrat/ECOSTRESS_C2_L3_ET_Validation) repository.
|
|
29
|
+
|
|
28
30
|
## Authors
|
|
29
31
|
|
|
30
32
|
Zoe Pierrat (she/her)
|
|
@@ -5,8 +5,13 @@ ECOv002_calval_tables/ECOv002_calval_tables.py
|
|
|
5
5
|
ECOv002_calval_tables/__init__.py
|
|
6
6
|
ECOv002_calval_tables/combined_eco_flux_EC_filtered.csv
|
|
7
7
|
ECOv002_calval_tables/metadata_ebc_filt.csv
|
|
8
|
+
ECOv002_calval_tables/version.py
|
|
8
9
|
ECOv002_calval_tables.egg-info/PKG-INFO
|
|
9
10
|
ECOv002_calval_tables.egg-info/SOURCES.txt
|
|
10
11
|
ECOv002_calval_tables.egg-info/dependency_links.txt
|
|
11
12
|
ECOv002_calval_tables.egg-info/requires.txt
|
|
12
|
-
ECOv002_calval_tables.egg-info/top_level.txt
|
|
13
|
+
ECOv002_calval_tables.egg-info/top_level.txt
|
|
14
|
+
tests/test_import_ECOv002_calval_tables.py
|
|
15
|
+
tests/test_import_dependencies.py
|
|
16
|
+
tests/test_load_calval_table.py
|
|
17
|
+
tests/test_load_metadata_ebc_filt.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ECOv002-calval-tables
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Priestley-Taylor Jet Propulsion Laboratory Soil Moisutre Evapotranspiration Model
|
|
5
5
|
Author-email: Gregory Halverson <gregory.h.halverson@jpl.nasa.gov>, Zoe Pierrat <zoe.a.pierrat@jpl.nasa.gov>
|
|
6
6
|
Project-URL: Homepage, https://github.com/gregory-halverson/ECOv002-calval-tables
|
|
@@ -21,10 +21,12 @@ Requires-Dist: twine; extra == "dev"
|
|
|
21
21
|
Dynamic: license-file
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
# ECOSTRESS Collection 2 Calibration/Validation Data Tables
|
|
24
|
+
# ECOSTRESS Collection 2 Calibration/Validation Data Tables
|
|
25
25
|
|
|
26
26
|
This Python package provides calibration and validation data tables used in the evaluation of the ECOSTRESS Collection 2 Evapotranspiration (ET) data products. The included datasets and loader functions support reproducible research and validation workflows for ET modeling and remote sensing studies.
|
|
27
27
|
|
|
28
|
+
The CSV files used in this repository were sourced from the [@zoepierrat/ECOSTRESS_C2_L3_ET_Validation](https://github.com/zoepierrat/ECOSTRESS_C2_L3_ET_Validation) repository.
|
|
29
|
+
|
|
28
30
|
## Authors
|
|
29
31
|
|
|
30
32
|
Zoe Pierrat (she/her)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
# ECOSTRESS Collection 2 Calibration/Validation Data Tables
|
|
2
|
+
# ECOSTRESS Collection 2 Calibration/Validation Data Tables
|
|
3
3
|
|
|
4
4
|
This Python package provides calibration and validation data tables used in the evaluation of the ECOSTRESS Collection 2 Evapotranspiration (ET) data products. The included datasets and loader functions support reproducible research and validation workflows for ET modeling and remote sensing studies.
|
|
5
5
|
|
|
6
|
+
The CSV files used in this repository were sourced from the [@zoepierrat/ECOSTRESS_C2_L3_ET_Validation](https://github.com/zoepierrat/ECOSTRESS_C2_L3_ET_Validation) repository.
|
|
7
|
+
|
|
6
8
|
## Authors
|
|
7
9
|
|
|
8
10
|
Zoe Pierrat (she/her)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
# List of dependencies
|
|
4
|
+
dependencies = [
|
|
5
|
+
"pandas",
|
|
6
|
+
"geopandas"
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
# Generate individual test functions for each dependency
|
|
10
|
+
@pytest.mark.parametrize("dependency", dependencies)
|
|
11
|
+
def test_dependency_import(dependency):
|
|
12
|
+
__import__(dependency)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
import geopandas as gpd
|
|
3
|
+
from ECOv002_calval_tables import load_calval_table
|
|
4
|
+
|
|
5
|
+
class TestLoadCalvalTable(unittest.TestCase):
|
|
6
|
+
def test_returns_geodataframe_with_valid_geometry(self):
|
|
7
|
+
gdf = load_calval_table()
|
|
8
|
+
self.assertIsInstance(gdf, gpd.GeoDataFrame)
|
|
9
|
+
self.assertIn('geometry', gdf.columns)
|
|
10
|
+
self.assertTrue(all(gdf.geometry.geom_type == 'Point'))
|
|
11
|
+
self.assertTrue(gdf.geometry.is_valid.all())
|
|
12
|
+
|
|
13
|
+
if __name__ == "__main__":
|
|
14
|
+
unittest.main()
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
import geopandas as gpd
|
|
3
|
+
from ECOv002_calval_tables import load_metadata_ebc_filt
|
|
4
|
+
|
|
5
|
+
class TestLoadMetadataEbcFilt(unittest.TestCase):
|
|
6
|
+
def test_returns_geodataframe_with_valid_geometry(self):
|
|
7
|
+
gdf = load_metadata_ebc_filt()
|
|
8
|
+
self.assertIsInstance(gdf, gpd.GeoDataFrame)
|
|
9
|
+
self.assertIn('geometry', gdf.columns)
|
|
10
|
+
# Check all geometries are valid Points
|
|
11
|
+
self.assertTrue(all(gdf.geometry.geom_type == 'Point'))
|
|
12
|
+
self.assertTrue(gdf.geometry.is_valid.all())
|
|
13
|
+
|
|
14
|
+
if __name__ == "__main__":
|
|
15
|
+
unittest.main()
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import pandas as pd
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
def load_combined_eco_flux_ec_filtered() -> pd.DataFrame:
|
|
6
|
-
"""
|
|
7
|
-
Load the filtered eddy covariance (EC) flux dataset used for ECOSTRESS Collection 2 ET product validation.
|
|
8
|
-
This dataset contains site-level, quality-controlled flux measurements that serve as ground truth for evaluating ECOSTRESS evapotranspiration estimates.
|
|
9
|
-
Returns:
|
|
10
|
-
pd.DataFrame: DataFrame of filtered EC flux data for validation analysis.
|
|
11
|
-
"""
|
|
12
|
-
return pd.read_csv(os.path.join(os.path.dirname(__file__), 'combined_eco_flux_EC_filtered.csv'))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def load_metadata_ebc_filt() -> pd.DataFrame:
|
|
16
|
-
"""
|
|
17
|
-
Load the metadata for the filtered eddy covariance (EC) flux sites used in the ECOSTRESS Collection 2 validation study.
|
|
18
|
-
This table provides site information (location, climate, land cover, etc.) for interpreting and grouping the flux data in the validation analysis.
|
|
19
|
-
Returns:
|
|
20
|
-
pd.DataFrame: DataFrame of site metadata for the filtered EC flux dataset.
|
|
21
|
-
"""
|
|
22
|
-
return pd.read_csv(os.path.join(os.path.dirname(__file__), 'metadata_ebc_filt.csv'))
|
{ecov002_calval_tables-1.0.1 → ecov002_calval_tables-1.1.0}/ECOv002_calval_tables/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|