geocif 0.1.42__tar.gz → 0.1.44__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.
Files changed (55) hide show
  1. {geocif-0.1.42/geocif.egg-info → geocif-0.1.44}/PKG-INFO +1 -1
  2. {geocif-0.1.42 → geocif-0.1.44}/geocif/cei/indices.py +4 -6
  3. {geocif-0.1.42 → geocif-0.1.44}/geocif/geocif.py +1 -1
  4. {geocif-0.1.42 → geocif-0.1.44}/geocif/indices_runner_v2.py +3 -3
  5. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/correlations.py +1 -1
  6. {geocif-0.1.42 → geocif-0.1.44/geocif.egg-info}/PKG-INFO +1 -1
  7. {geocif-0.1.42 → geocif-0.1.44}/setup.py +1 -1
  8. {geocif-0.1.42 → geocif-0.1.44}/LICENSE +0 -0
  9. {geocif-0.1.42 → geocif-0.1.44}/MANIFEST.in +0 -0
  10. {geocif-0.1.42 → geocif-0.1.44}/README.md +0 -0
  11. {geocif-0.1.42 → geocif-0.1.44}/geocif/__init__.py +0 -0
  12. {geocif-0.1.42 → geocif-0.1.44}/geocif/agmet/__init__.py +0 -0
  13. {geocif-0.1.42 → geocif-0.1.44}/geocif/agmet/geoagmet.py +0 -0
  14. {geocif-0.1.42 → geocif-0.1.44}/geocif/agmet/plot.py +0 -0
  15. {geocif-0.1.42 → geocif-0.1.44}/geocif/agmet/utils.py +0 -0
  16. {geocif-0.1.42 → geocif-0.1.44}/geocif/analysis.py +0 -0
  17. {geocif-0.1.42 → geocif-0.1.44}/geocif/backup/__init__.py +0 -0
  18. {geocif-0.1.42 → geocif-0.1.44}/geocif/backup/constants.py +0 -0
  19. {geocif-0.1.42 → geocif-0.1.44}/geocif/backup/features.py +0 -0
  20. {geocif-0.1.42 → geocif-0.1.44}/geocif/backup/geo.py +0 -0
  21. {geocif-0.1.42 → geocif-0.1.44}/geocif/backup/geocif.py +0 -0
  22. {geocif-0.1.42 → geocif-0.1.44}/geocif/backup/metadata.py +0 -0
  23. {geocif-0.1.42 → geocif-0.1.44}/geocif/backup/models.py +0 -0
  24. {geocif-0.1.42 → geocif-0.1.44}/geocif/cei/__init__.py +0 -0
  25. {geocif-0.1.42 → geocif-0.1.44}/geocif/cei/definitions.py +0 -0
  26. {geocif-0.1.42 → geocif-0.1.44}/geocif/experiments.py +0 -0
  27. {geocif-0.1.42 → geocif-0.1.44}/geocif/indices_runner.py +0 -0
  28. {geocif-0.1.42 → geocif-0.1.44}/geocif/logger.py +0 -0
  29. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/__init__.py +0 -0
  30. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/correlations_backup.py +0 -0
  31. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/embedding.py +0 -0
  32. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/feature_engineering.py +0 -0
  33. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/feature_selection.py +0 -0
  34. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/outliers.py +0 -0
  35. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/outlook.py +0 -0
  36. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/output.py +0 -0
  37. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/spatial_autocorrelation.py +0 -0
  38. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/stages.py +0 -0
  39. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/stats.py +0 -0
  40. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/trainers.py +0 -0
  41. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/trend.py +0 -0
  42. {geocif-0.1.42 → geocif-0.1.44}/geocif/ml/xai.py +0 -0
  43. {geocif-0.1.42 → geocif-0.1.44}/geocif/playground/__init__.py +0 -0
  44. {geocif-0.1.42 → geocif-0.1.44}/geocif/playground/automl.py +0 -0
  45. {geocif-0.1.42 → geocif-0.1.44}/geocif/playground/misc.py +0 -0
  46. {geocif-0.1.42 → geocif-0.1.44}/geocif/utils.py +0 -0
  47. {geocif-0.1.42 → geocif-0.1.44}/geocif/viz/__init__.py +0 -0
  48. {geocif-0.1.42 → geocif-0.1.44}/geocif/viz/plot.py +0 -0
  49. {geocif-0.1.42 → geocif-0.1.44}/geocif.egg-info/SOURCES.txt +0 -0
  50. {geocif-0.1.42 → geocif-0.1.44}/geocif.egg-info/dependency_links.txt +0 -0
  51. {geocif-0.1.42 → geocif-0.1.44}/geocif.egg-info/not-zip-safe +0 -0
  52. {geocif-0.1.42 → geocif-0.1.44}/geocif.egg-info/top_level.txt +0 -0
  53. {geocif-0.1.42 → geocif-0.1.44}/requirements.txt +0 -0
  54. {geocif-0.1.42 → geocif-0.1.44}/setup.cfg +0 -0
  55. {geocif-0.1.42 → geocif-0.1.44}/tests/test_geocif.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geocif
3
- Version: 0.1.42
3
+ Version: 0.1.44
4
4
  Summary: Models to visualize and forecast crop conditions and yields
5
5
  Home-page: https://ritviksahajpal.github.io/yield_forecasting/
6
6
  Author: Ritvik Sahajpal
@@ -193,7 +193,7 @@ class CEIs:
193
193
  df = self.df_harvest_year
194
194
 
195
195
  if not df.empty:
196
- self.country = df[col].unique()[0]
196
+ self.country = df[col].unique()[0].lower().replace(" ", "_")
197
197
  else:
198
198
  raise ValueError("Dataframe is empty")
199
199
 
@@ -418,8 +418,6 @@ class CEIs:
418
418
  if not self.redo:
419
419
  mask_year = self.harvest_year < current_year - 1
420
420
 
421
- if os.path.isfile(intermediate_file) and mask_year:
422
- return None
423
421
  if os.path.isfile(cei_file) and mask_year:
424
422
  return None
425
423
 
@@ -607,8 +605,8 @@ class CEIs:
607
605
 
608
606
  """
609
607
  # If stage is not a list then convert it to a list
610
- if not isinstance(stage, list):
611
- stage = [stage]
608
+ # if not isinstance(stage, list):
609
+ # stage = [stage]
612
610
 
613
611
  columns = [
614
612
  "Description",
@@ -777,7 +775,7 @@ class CEIs:
777
775
  ds = compute_indices(df_time_period, df_base_period, index_name)
778
776
 
779
777
  # If method is False then set stage to None
780
- istage = None if self.method == "full_season" else stage
778
+ istage = None if self.method == "full_season" else "_".join(map(str, stage))
781
779
 
782
780
  if ds:
783
781
  # convert xarray dataset to dataframe and add additional information
@@ -745,7 +745,7 @@ class Geocif:
745
745
 
746
746
  if self.median_area_as_feature:
747
747
  df = fe.compute_median_statistics(
748
- df, self.all_seasons_with_area, self.number_median_years, "Area (ha)"
748
+ df, self.all_seasons_with_yield, self.number_median_years, "Area (ha)"
749
749
  )
750
750
 
751
751
  if self.lag_yield_as_feature:
@@ -47,7 +47,7 @@ class cei_runner(base.BaseGeo):
47
47
 
48
48
  self.dir_input = Path(self.parser.get("PATHS", "dir_input"))
49
49
  self.base_dir = Path(
50
- r"/gpfs/data1/cmongp1/GEOGLAM/Output/countries/malawi"
50
+ r"D:\Users\ritvik\projects\GEOGLAM\Output\countries\afghanistan"
51
51
  ) # Path(self.parser.get("PATHS", "dir_crop_inputs"))
52
52
  self.do_parallel = self.parser.getboolean("DEFAULT", "do_parallel")
53
53
 
@@ -164,7 +164,7 @@ class cei_runner(base.BaseGeo):
164
164
  # Only keep those entries in combinations where the third elemt is
165
165
  # mozambique, south_africa, angola or dem_people's_rep_of_korea
166
166
  # This is done to test the code for these countries
167
- combinations = [i for i in combinations if "malawi_maize_s1" in i[3]]
167
+ combinations = [i for i in combinations if "afghanistan_maize_s1" in i[3]]
168
168
 
169
169
  if True:
170
170
  num_cpu = int(cpu_count() * 0.5)
@@ -195,7 +195,7 @@ def run(path_config_files=[]):
195
195
  indices.validate_index_definitions()
196
196
 
197
197
  for method in [
198
- "biweekly_r", # "dekad_r" # "dekad_r"
198
+ "monthly_r", # "dekad_r" # "dekad_r"
199
199
  ]: # , "full_season", "phenological_stages", "fraction_season"]:
200
200
  obj = cei_runner(path_config_files)
201
201
  obj.main(method)
@@ -253,7 +253,7 @@ def all_correlated_feature_by_time(df, **kwargs):
253
253
 
254
254
  dict_selected_features = {}
255
255
  dict_best_cei = {}
256
-
256
+ breakpoint()
257
257
  if not national_correlation:
258
258
  groups = df.groupby(group_by)
259
259
  for region_id, group in tqdm(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geocif
3
- Version: 0.1.42
3
+ Version: 0.1.44
4
4
  Summary: Models to visualize and forecast crop conditions and yields
5
5
  Home-page: https://ritviksahajpal.github.io/yield_forecasting/
6
6
  Author: Ritvik Sahajpal
@@ -50,6 +50,6 @@ setup(
50
50
  test_suite="tests",
51
51
  tests_require=test_requirements,
52
52
  url="https://ritviksahajpal.github.io/yield_forecasting/",
53
- version="0.1.42",
53
+ version="0.1.44",
54
54
  zip_safe=False,
55
55
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes