Conversation
| 5: 30, | ||
| 6: 50, | ||
| 7: 75, | ||
| } |
There was a problem hiding this comment.
This table is unneeded, already appears and used in stages.py
There was a problem hiding this comment.
addressed in latest commit
|
|
||
|
|
||
| def gadm_carbon_flux(tasks, bbox: Optional[Polygon] = None): | ||
| return compute_carbon_flux(tasks, bbox) |
There was a problem hiding this comment.
gadm_carbon_flux() and compute_carbon_flux() are identical, not sure why you need both. Just remove lines 24-27, so you only have gadm_carbon_flux().
pipelines/carbon_flux/stages.py
Outdated
| } | ||
| coord_dict["value"] = values | ||
|
|
||
| df = pd.DataFrame(coord_dict) |
There was a problem hiding this comment.
Please replace lines 154-167 with a call common_stages.py:create_result_dataframe() (as it was before). No need to duplicate code. This will do all these lines, and also the country processing that you had to add at the end of carbon.py:compute_carbon_flux().
There was a problem hiding this comment.
switched back to common_stages.py:create_result_dataframe()
| # Convert tcd thresholds to percentages (already done in stages.py) | ||
| # Convert country codes to alpha3 | ||
| result_df["country"] = result_df["country"].map(numeric_to_alpha3) | ||
| result_df.dropna(subset=["country"], inplace=True) |
There was a problem hiding this comment.
Just remove lines 62-65, assuming you call common_stages.py:create_result_dataframe() in stages.py, as I suggest.
There was a problem hiding this comment.
addressed in latest commit
| result_uri = "s3://lcl-analytics/zonal-statistics/admin-carbon.parquet" | ||
| funcname = "sum" | ||
| @flow(name="Carbon Flux") | ||
| def gadm_carbon_flux_flow( |
There was a problem hiding this comment.
Since you changed the name of this function, you need to update the call at line 64 in run_updates.py.
There was a problem hiding this comment.
I just switched it back to the old name and corrected it accordingly
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information