Skip to content
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

drop duplicates in prepare_hotmaps_database #726

Merged
merged 3 commits into from
Aug 22, 2023
Merged

Conversation

lisazeyen
Copy link
Contributor

@lisazeyen lisazeyen commented Aug 21, 2023

Closes # (if applicable).

Changes proposed in this Pull Request

The script build_industrial_distribution_keys breaks for some spatial resolution since there can appear duplicates in the hotmaps database because of a .sjoin function with the regions. In this PR the duplicated rows should be checked against the country in the original dataframe and all the duplicated sites which are set to the wrong country should be dropped.

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in all of config.default.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv.
  • A release note doc/release_notes.rst is added.

@lisazeyen lisazeyen requested a review from fneum August 21, 2023 14:17
Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Just exchanged pycountry with country_converter as we should strive to use only one country conversion package.

@fneum fneum enabled auto-merge August 22, 2023 12:24
@fneum fneum disabled auto-merge August 22, 2023 12:26
@fneum fneum merged commit 59d422a into master Aug 22, 2023
@fneum fneum deleted the industrial_key_duplicates branch August 22, 2023 12:26
fneum added a commit that referenced this pull request Aug 22, 2023
LukasFrankenQ pushed a commit to LukasFrankenQ/pypsa-eur that referenced this pull request Sep 27, 2023
fix in add_heating_capacities_installed_before_baseyear to account for case when there is no rural heating demand for some nodes in network

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

simplify if-else expression

fix in co2_emissions_year function and correspondigly in plot_summary and snakemake rule. Also changes to historical_emissions in plot_summary since some countries are not in eea dataset.

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Update scripts/plot_summary.py

Co-authored-by: Fabian Hofmann <hofmann@fias.uni-frankfurt.de>

build_carbon_budget: parse input_co2

apply protected() to zenodo downloads; only retrieve monthly fuel/CO2 prices when necessary

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

added basic egs potential script

pre-testrun version added to prepare_sector_network

added new params to default config, and fixes

cleanup and renaming

changed default config to pessimism on egs

added minor cleanup correcting local adjustment

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

changed config name to egs_performant, added saturation check

cleanup of saturation check

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

added source for FOM

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

changed overlap indexing, general cleanup

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

added release notes

Fix bug preventing inclusion of custom_powerplants (PyPSA#732)

Fix a typo in the execution call

[pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.7.0 → 23.9.1](psf/black@23.7.0...23.9.1)

Move all rule to main Snakefile

Move all rule down to other rules

added dialogue to ensure desired purge

reverted to original pypsa-eur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants