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

DCAS: Data Model #298

Open
5 of 16 tasks
danangmassandy opened this issue Dec 12, 2024 · 0 comments · Fixed by #330 or #319 · May be fixed by #334
Open
5 of 16 tasks

DCAS: Data Model #298

danangmassandy opened this issue Dec 12, 2024 · 0 comments · Fixed by #330 or #319 · May be fixed by #334
Assignees

Comments

@danangmassandy
Copy link
Collaborator

danangmassandy commented Dec 12, 2024

This is for #248.

For implementing DCAS, we will need below models:

  • Farm Registry: we have Farm model, but we need a new model to store the crop_id, growth type, and planting date. 1 farm can have multiple crops at the same time
  • Farm Registry Group: represents a group of Farm Registry when ingested into GAP. Should have: date_time, is_latest.
  • Crop Growth Stage: farm_id, crop_id, growth_stage_id, date .
  • DCAS Config: name, description, is_default.
  • DCAS Config Country: config_id, country_id.
  • Growing Degree Days (GDD) Config: this is to store the base and cap value of each crop. Use reference to DCAS Config table
  • Growing Degree Days (GDD) Matrix: this is to store the matrix of crop and its growth stage. Use reference to DCAS Config table
  • DCAS Request: indicates a request to generate DCAS, should have requested_at and country to generate, start_time, end_time
  • DCAS Weather Parameter: name, description, unit
  • DCAS Message: this is for analytics, store the message codes generated by decision tree for each farm and crop. Also to prevent same message code to be sent in two weeks in a row
  • DCAS Weather Parameter Value: 6 Weather Parameters, I think it's good idea to store by grid cells rather than each farm, so the table would like: request_id, grid_id, parameter_id, value
  • DCAS Output: to track the delivery of file output to SFTP
  • DCAS Error Log: store farm that cannot be processed

Decision tree data models:

  • Decision Tree config
  • Decision Tree models
  • DCAS Data Source: mapping between the dataset and attribute to be used, fields: config_id, attribute_id, dataset_id.

TBC:

  • Does GDD matrix depend on the country?
  • Should gap save a copy of the file output that is being sent to the SFTP?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment