Skip to content

DRYify get_map_data() and get_forecast_data(). #70

@dylanhmorris

Description

@dylanhmorris

We should DRYify get_map_data() and get_forecast_data(). There is a lot of repeated code between the two. In fact, I believe the get_map_data() table may just be the get_forecast_data() table filtered to the Hub ensemble.

Proposal

Split table creation into

  1. a function to generate the table (as a tibble) for all or a subset of models. Call this function summarize_ref_date_forecasts().
  2. a light wrapper that generates a table using summarize_ref_date_forecasts() and then saves it to disk at a given path. Call this write_ref_date_summary().
  3. Two convenience functions named write_ref_date_summary_ensemble() and write_ref_date_summary_all() that replicate the current functionality of get_map_data() and get_forecast_data(), respectively

@O957 does this make sense to you?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions