-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downscaling does not work if all values are zero #254
Labels
bug
Something isn't working
Milestone
Comments
Do you have the exact code which was called? |
import pandas as pd
import primap2 as pm2
df = pd.read_csv("sample.csv")
data_if = pm2.pm2io.convert_wide_dataframe_if(
df,
coords_cols={
"category": "category",
"entity": "entity",
"unit": "unit",
},
coords_defaults={
"source": "KNA-GHG-Inventory",
"provenance": "measured",
"area": "KNA",
"scenario": "BUR1",
},
coords_terminologies={
"area": "ISO3",
"category": "IPCC2006_PRIMAP",
"scenario": "PRIMAP",
},
coords_value_mapping=None,
filter_remove=None,
meta_data={
"references": "https://unfccc.int/documents/633382",
"rights": "", # unknown
"contact": "[email protected]",
"title": "Saint Kitts and Nevis. Biennial update report (BUR). BUR1",
"comment": "Read fom pdf by Daniel Busch",
"institution": "UNFCCC",
},
convert_str=True,
time_format="%Y",
)
data_pm2 = pm2.pm2io.from_interchange_format(data_if)
data_pm2 = data_pm2.pr.downscale_gas_timeseries(
basket="KYOTOGHG (AR5GWP100)",
basket_contents=[
"CO2",
"CH4",
"N2O",
],
skipna=True,
skipna_evaluation_dims=None,
)
data_pm2_downscale_if = data_pm2.pr.to_interchange_format() Values are filled with sample_2 but not with sample_1. |
Maybe also merge the downscaling function with a newer one developed outside primap2 which also supports external shares. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If all values of the basket contents are zero, the
downscale_timeseries
function does not work.Expected behavior
The function should fill all empty values with zeros.
Screenshots
System (please complete the following information):
The text was updated successfully, but these errors were encountered: