Coder Social home page Coder Social logo

eurostat-api-client's People

Contributors

ckauth avatar dependabot[bot] avatar derevirn avatar jotsif avatar opus-42 avatar stefanpetrovic avatar tgrandje avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

eurostat-api-client's Issues

Issue with other countries than Germany

Hello,

Thanks for this very useful function.

I tried to use it with the following specification. It works for Germany, but not for Italy or France. For the two latter countries, the data do not seem to be in the right order.

Thanks

client = EurostatAPIClient(VERSION, FORMAT, LANGUAGE)
params = {'unit':'I15','geo': 'FR','coicop':'CP00'}
hicp_d = client.get_dataset('prc_hicp_midx',params=params) 
hicp = hicp_d.to_dataframe() 
hicp.plot()

Migrating to the New Eurostat API

Hello @opus-42 ,

I recently visited the Eurostat website and saw the following warning message:

Screenshot (2)

Apparently, the current API will be deprecated by January 2023, as they are migrating to a new one. Thankfully, Eurostat posted a migration guide that includes all the differences between the two APIs, available here. I suggest updating the library code so it remains functional when the REST API is phased out, thank you.

Giannis Tolios

getting eurostat dicts using client (question)

Thanks a lot for this simple client!
I was wondering if there's a simple way to get a dict of f.ex nace_r2 codes, similar to f.ex using this client

import eurostat
eurostat.get_dic('nace_r2')

Best

unboundlocalerror: local variable 'updated' referenced before assignment eurostatapiclient

Hi Emmanuel,

I have been using this package for a while, and until now everything went well. Now I have got an error :

unboundlocalerror: local variable 'updated' referenced before assignment

In the dataset.py file, there is a create_json_function where the error comes from. If I add a new line "updated = datetime.now()" at the top of the function, it works, but it always gives back the datetime.now() so the problem can be here:
updated_raw = json.get("updated") date_regex = re.compile(r'\d{4}-\d{1,2}-\d{1,2}') if updated_raw and date_regex.match(updated_raw): updated = datetime.strptime( updated_raw, '%Y-%m-%d' ) else: datetime.now()
I think the Eurostat website has changed and this causes the problem. I am trying to figure it out what has changed, but it takes time because I'm not familiar with the Eurostat website.

Sort incoming values in the dataframe

Sorting keys that are strings yields in the following:
"1", "12", "2", "3", "4".

One need first to convert to integer and then sort to assure dataset values are stored in the correct order.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.