Skip to content

Produce helpful error message when requesting an unsupported or unavailable geo_type or time_type in Epidata$covidcast #640

Open
@brookslogan

Description

@brookslogan
Epidata$covidcast("nchs-mortality","deaths_allcause_incidence_num","epiweek","state",202101,"ca")

and

Epidata$covidcast("jhu-csse","confirmed_incidence_num","week","state",202101,"ca")

and

Epidata$covidcast("jhu-csse","confirmed_incidence_num","day","sstate",20210101,"ca")

all produce

$result
[1] -2

$message
[1] "no results"

The first query requested "epiweek" data rather than "week" data, the second requested "week" data when the source&signal does not have any available, and the third contained a typo in the geo_type.

It would be nice to have messages along the lines of:

  • "invalid time_type"
  • "requested signal does not support the requested time_type and geo_type"
  • "invalid geo_type"

Metadata

Metadata

Assignees

No one assigned

    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