getwilds / cancerprof

API Client for State Cancer Profiles
http://getwilds.org/cancerprof/
Other
2 stars 3 forks source link

Selecting 'county' as the area type for calculating cancer incidence will always produce an error #126

Open vsriram24 opened 1 week ago

vsriram24 commented 1 week ago

Regardless of the area selected (United States or an individual state), selecting 'county' as the area type will always generate an error.

Example code:

cancerprof::incidence_cancer(
  area = "United States",
  areatype = "county",
  cancer = "all cancer sites",
  race = "All Races (includes Hispanic)",
  sex = "both sexes",
  age = "all ages",
  stage = "all stages",
  year = "latest 5 year average"
)

Example output:

Error in 'mutate()':
! Can't transform a data frame with 'NA' or '""' names.
Backtrace:
 1. cancerprof::incidence_cancer(...)
 4. dplyr:::mutate.data.frame(...)
vsriram24 commented 1 week ago

This is definitely a bug in the {cancerprof} package and not the State Cancer Profiles API because entering the above parameters in the State Cancer Profiles website will generate a corresponding map.