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

update reading eurostat data to recent years #533

Closed
martavp opened this issue Dec 30, 2020 · 3 comments
Closed

update reading eurostat data to recent years #533

martavp opened this issue Dec 30, 2020 · 3 comments

Comments

@martavp
Copy link
Member

martavp commented Dec 30, 2020

The function build_eurostat() in script build_energy_totals() needs to be updated for recent years

Until 2017, one excel file per year is provided (with one sheet per country)
From 2018, one excel file per country is (with one year per country)

@martavp martavp changed the title update reding eurostat data to recent years update reading eurostat data to recent years Jan 14, 2021
@fneum
Copy link
Member

fneum commented Jul 25, 2022

This is tackled in branch multiyear to eurostat June 2021

@fneum fneum transferred this issue from PyPSA/pypsa-eur-sec Mar 6, 2023
@LRydin
Copy link

LRydin commented Mar 29, 2024

Has this issue been solved after the merge of pypsa-eur-sec into pypsa-eur? I am running a system analysis with data from 2020 and I've bumped into

Traceback (most recent call last):
  File "/home/leo/pypsa/pypsa-eur/.snakemake/scripts/tmp88m6vsad.build_energy_totals.py", line 763, in <module>
    eurostat = build_eurostat(input_eurostat, countries, report_year, data_year)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/leo/pypsa/pypsa-eur/.snakemake/scripts/tmp88m6vsad.build_energy_totals.py", line 133, in build_eurostat
    dfs = pd.read_excel(
          ^^^^^^^^^^^^^^
  File "/home/leo/anaconda3/envs/pypsa-eur/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 495, in read_excel
    io = ExcelFile(
         ^^^^^^^^^^
  File "/home/leo/anaconda3/envs/pypsa-eur/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 1550, in __init__
    ext = inspect_excel_format(
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/leo/anaconda3/envs/pypsa-eur/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 1402, in inspect_excel_format
    with get_handle(
         ^^^^^^^^^^^
  File "/home/leo/anaconda3/envs/pypsa-eur/lib/python3.11/site-packages/pandas/io/common.py", line 882, in get_handle
    handle = open(handle, ioargs.mode)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'data/bundle-sector/eurostat-energy_balances-june_2016_edition/2020-Energy-Balances-June2016edition.xlsx'

Not sure this is exactly the same issue, but could be adjacent?

Cheers!

@fneum
Copy link
Member

fneum commented May 12, 2024

This is done via #936 #947

@fneum fneum closed this as completed May 12, 2024
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

No branches or pull requests

3 participants