dr-leo / pandaSDMX

Python interface to SDMX
Apache License 2.0
129 stars 60 forks source link

10-line usage example with Eurostat currently broken #237

Closed mephinet closed 1 year ago

mephinet commented 1 year ago

Following https://pandasdmx.readthedocs.io/en/latest/example.html does not work any more:

import pandasdmx as sdmx
estat = sdmx.Request('ESTAT')
metadata = estat.datastructure('DSD_une_rt_a')

results in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gortan/.local/lib/python3.10/site-packages/pandasdmx/api.py", line 473, in get
    response.raise_for_status()
  File "/home/gortan/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error:  for url: https://ec.europa.eu/eurostat/SDMX/diss-web/rest/datastructure/ESTAT/DSD_une_rt_a/latest?references=all

pandasdmx 1.9.0 python 3.10.9

Can you please elaborate whether this is something to be reported to ESTAT-SUPPORT-SDMX@ec.europa.eu or if there was an announced change in the eurostat webservice that needs to be followed up in the pandaSDMX implementation?

dr-leo commented 1 year ago

Thanks. This is due to a change of the Eurostat API. It should urgently be reflected I hope to do a new release in the coming days.Am 01.02.2023 um 17:54 schrieb Philipp Gortan @.***>: Following https://pandasdmx.readthedocs.io/en/latest/example.html does not work any more: import pandasdmx as sdmx estat = sdmx.Request('ESTAT') metadata = estat.datastructure('DSD_une_rt_a') results in: Traceback (most recent call last): File "", line 1, in File "/home/gortan/.local/lib/python3.10/site-packages/pandasdmx/api.py", line 473, in get response.raise_for_status() File "/home/gortan/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: for url: https://ec.europa.eu/eurostat/SDMX/diss-web/rest/datastructure/ESTAT/DSD_une_rt_a/latest?references=all

pandasdmx 1.9.0 python 3.10.9 Can you please elaborate whether this is something to be reported to @.*** or if there was an announced change in the eurostat webservice that needs to be followed up in the pandaSDMX implementation?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

mephinet commented 1 year ago

Awesome, thanks for the clarification!

hyperfra commented 1 year ago

Hi

this is the reply by Eurostat

The location of our REST API dissemination endpoint recently changed. The new location is below: https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/

As an SDMX-compliant REST API, the syntax and functioning has remained pretty much unchanged. We support a few more previously unsupported standard SDMX parameters and objects. For the query below, the equivalent query with the new endpoint is https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/dataflow/ESTAT/

dr-leo commented 1 year ago

Hi Francesco,

thanks. I hope to release this in a few days. I have also added new data providers EC_DG_COMP, EMPL and GROW. The end-point for COMP as shown in ESTAT docs is

https://webgate.ec.europa.eu/comp/redisstat/api/dissemination/sdmx/2.1

But a dataflow query returns an empty message rather than the catalogue of available dataflows.

Is this because DG COMP and friends have yet to provide data, or am I mising something?

On 22/02/2023, Francesco Franco @.***> wrote:

Hi

this is the reply by Eurostat

The location of our REST API dissemination endpoint recently changed. The new location is below: https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/

As an SDMX-compliant REST API, the syntax and functioning has remained pretty much unchanged. We support a few more previously unsupported standard SDMX parameters and objects. For the query below, the equivalent query with the new endpoint is https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/dataflow/ESTAT/

-- Reply to this email directly or view it on GitHub: https://github.com/dr-leo/pandaSDMX/issues/237#issuecomment-1440008743 You are receiving this because you commented.

Message ID: @.***>

dr-leo commented 1 year ago

I’ve found the issue myself. Thanks anyway. Leo

Am 23.02.2023 um 22:36 schrieb Leo @.***>:

Hi Francesco,

thanks. I hope to release this in a few days. I have also added new data providers EC_DG_COMP, EMPL and GROW. The end-point for COMP as shown in ESTAT docs is

https://webgate.ec.europa.eu/comp/redisstat/api/dissemination/sdmx/2.1

But a dataflow query returns an empty message rather than the catalogue of available dataflows.

Is this because DG COMP and friends have yet to provide data, or am I mising something?

On 22/02/2023, Francesco Franco @.***> wrote:

Hi

this is the reply by Eurostat

The location of our REST API dissemination endpoint recently changed. The new location is below: https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/

As an SDMX-compliant REST API, the syntax and functioning has remained pretty much unchanged. We support a few more previously unsupported standard SDMX parameters and objects. For the query below, the equivalent query with the new endpoint is https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/dataflow/ESTAT/

-- Reply to this email directly or view it on GitHub: https://github.com/dr-leo/pandaSDMX/issues/237#issuecomment-1440008743 You are receiving this because you commented.

Message ID: @.***>

dr-leo commented 1 year ago

Fixed in v1.10.0 to be released shortly.

hyperfra commented 1 year ago

Thanks!!

Sent from my iPhone

On 25 Feb 2023, at 13:27, dr-leo @.***> wrote:



Fixed in v1.10.0 to be released shortly.

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdr-leo%2FpandaSDMX%2Fissues%2F237%23issuecomment-1445120632&data=05%7C01%7C%7C026054a5096f4ff8f56008db173414bf%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638129284675396734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KM0gEhCoMQKjuIL3BUQyOEweFZOXem09GkLZiBMOwEs%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJKIEHUIKOBKZ6NJA7M74BTWZICFDANCNFSM6AAAAAAUN657NU&data=05%7C01%7C%7C026054a5096f4ff8f56008db173414bf%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638129284675396734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ovqVz%2BlHLmxaMjg0MgrMgEDwkXIC0Zbj7a8P41%2BzeoY%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>