Skip to content

Commit

Permalink
minor changes, remove scale in test config
Browse files Browse the repository at this point in the history
  • Loading branch information
virio-andreyana committed Jun 24, 2024
1 parent 5f2b039 commit 29a1cbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 7 additions & 7 deletions scripts/build_demand_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def build_demand_profiles(
admin_shapes,
countries,
scale,
subtitute_country_load,
substitute_country_load,
start_date,
end_date,
out_path,
Expand Down Expand Up @@ -182,9 +182,9 @@ def build_demand_profiles(
gegis_load = gegis_load.loc[gegis_load.region_code.isin(countries)]

# If Gegis data is unavailable for a specific country, it is advisable to use Gegis data from another region as an alternative. Later, it can be scaled
if subtitute_country_load:
for country_a, country_b in subtitute_country_load.items():
logger.info(f"subtitute load data of {country_a} using {country_b}.")
if substitute_country_load:
for country_a, country_b in substitute_country_load.items():
logger.info(f"substitute load data of {country_a} using {country_b}.")

if country_a in gegis_load.region_code.unique():
logger.info(f"dropping original load data of {country_a}.")
Expand Down Expand Up @@ -275,8 +275,8 @@ def upsample(cntry, group):
countries = snakemake.params.countries
admin_shapes = snakemake.input.gadm_shapes
scale = snakemake.params.load_options.get("scale", 1.0)
subtitute_country_load = snakemake.params.load_options.get(
"subtitute_country_load", False
substitute_country_load = snakemake.params.load_options.get(
"substitute_country_load", False
)
start_date = snakemake.params.snapshots["start"]
end_date = snakemake.params.snapshots["end"]
Expand All @@ -289,7 +289,7 @@ def upsample(cntry, group):
admin_shapes,
countries,
scale,
subtitute_country_load,
substitute_country_load,
start_date,
end_date,
out_path,
Expand Down
4 changes: 1 addition & 3 deletions test/config.custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ enable:
retrieve_cost_data: false

load_options:
scale:
Lagos-Porto-Novo: 0.5
subtitute_country_load:
substitute_country_load:
Lagos-Porto-Novo: "NG"

augmented_line_connection:
Expand Down

0 comments on commit 29a1cbb

Please sign in to comment.