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

Use definition_id instead of station_id #121

Closed
5 tasks done
lilyclements opened this issue Jun 4, 2024 · 4 comments · Fixed by #122
Closed
5 tasks done

Use definition_id instead of station_id #121

lilyclements opened this issue Jun 4, 2024 · 4 comments · Fixed by #122

Comments

@lilyclements
Copy link
Collaborator

lilyclements commented Jun 4, 2024

We want to use a definition_id instead of a station_id. This requires a few changes:

  • Amend the station metadata to include a definition_id option.
  • Amend the definition json files to now call in definition_id not station_id
  • Amend the epicsawrap functions (annual_rainfall, etc) where we call station_id to automatically call definition_id from the station metadata
  • Amend the R-Instat function to update the definition file to definition_id instead of station_id.
  • Amend the R-Instat dialog to update the station metadata to include the new definition_id
@lilyclements
Copy link
Collaborator Author

lilyclements commented Jun 4, 2024

@jkmusyoka I am working on this here so that we call definition_id instead of station_id. This will mean some changes required on the R-Instat dialog (which I will outline to Vitalis once I have sorted the R-code).

This will mean that the user will have to define a definition_id as well as station_id:

  • That definition_id will be the name of the outgoing definition data. E.g., it will now be "<definition_id>..json" instead of "<station_id>..json"
  • The station_id will still be used to name any exported station summaries.
  • definition_id will update in the station metadata to reflect the new definition_id for that station_id. This is achieved through update_metadata_definition_id in PR Adding definitions_id option instead of station_id in definitions #122. It is also now called in our export_r_instat_to_bucket function automatically (PR 122). So while this is reflected in the R Code, it is not yet in R-Instat. This does mean we need to give the definition_id as a new input in R-Instat when PR 122 is merged.

This means that all data sets we use for testing and otherwise need to be defined in the metadata.rds file (for now, I have coded in that if they are not in the metadata, to set definition_id as station_id, so you shouldn't get any bugs from these changes).

Can you outline which data sets we are using for testing so I can add them into the metadata? For now, we can set their definition_id to be their station_id I think, until we update the R-Instat function.

@jkmusyoka
Copy link

@lilyclements

At the moment, zambia_eastern_4 is the test data from Zambia. It has 5 stations. And now there is a malawi_test folder which has a test dataset for 2 stations.

There is one more test data from Kenya which I will add this week. I will let you know when it is ready

@jkmusyoka
Copy link

@lilyclements while you are on this issue, could you also add more "countries" into the epicsa r system namely "ml_test" for malawi test data and "ke_test "for Kenya test data.

Thanks

@lilyclements
Copy link
Collaborator Author

@jkmusyoka thanks for this. I have done this now in PR 47

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 a pull request may close this issue.

2 participants