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

Data freshness #856

Closed
IanHopkinson opened this issue Mar 5, 2024 · 2 comments
Closed

Data freshness #856

IanHopkinson opened this issue Mar 5, 2024 · 2 comments

Comments

@IanHopkinson
Copy link

Is there a way to establish whether there is new/changed data being delivered by the CLIMADA API?

I'm mainly interested in large changes, for example another year of historical data being added to an indicator or the basis year of something like LitPop being changed.

The context for this question is that I am looking for a trigger to refresh the data on HDX. In the absence of a simple trigger I'll probably just set a yearly schedule to update data.

I considered using versions of this repo as a guide but as I understand this simply reflects changes in the mechanism of data delivery rather than a change in the underlying data.

@emanuel-schmid
Copy link
Collaborator

emanuel-schmid commented Mar 5, 2024

Thanks for the question. There is the 'activation_date' that is an attribute of every dataset. Perhaps that could be helpful?
There is no "greater than" condition for it so you would have to fetch all datasets, e.g. into a data frame and query that:

from climada.util.api_client import Client
client = Client()

datasets = client.into_datasets_df(client.list_dataset_infos())
since_last_november = datasets[datasets.activation_date > "2023-11-01"]

@peanutfun
Copy link
Member

This question seems to have been answered appropriately. Feel free to reopen this issue if something remained unclear.

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