getwilds / cancerprof

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

Selecting a state/territory abbreviation for area and areatype as 'state' pulls both DC and Puerto Rico information #116

Open cheryldietrich opened 2 months ago

cheryldietrich commented 2 months ago

When putting in a state/territory abbreviation code and selecting areatype='state' data from District of Columbia and Puerto Rico are returned.

Example: incidence_cancer(area="NC", areatype="state", cancer = "Melanoma of the Skin", race = "all races (includes hispanic)", sex = "females", age = "all ages", stage = "all stages", year = "latest 5 year average")

I would expect this to throw an error instead of returning DC and Puerto Rico information. Unless features are upgraded to allow filtering of USA list- i.e. area = c('WA', 'NC', 'PR'), it would be helpful to specify in documentation that when specifying a state/territory in area, that areatype must be 'hsa' or 'county'