outbreak-info / R-outbreak-info

R package to access the genomics and epidemiology data and Research Library metadata compiled and standardized on outbreak.info.
https://outbreak-info.github.io/R-outbreak-info/
MIT License
20 stars 10 forks source link

genomics locations: can't get to a particular location #78

Open flaneuse opened 2 years ago

flaneuse commented 2 years ago

b117_nyc = getPrevalence(pangolin_lineage = "B.1.1.7", location="New York")

... if you know you want to look at the county New York, there's no way to access this info without going through the dialogue box to say Y/N.

b117_nyc = getPrevalence(pangolin_lineage = "B.1.1.7", location="New York City")

ideally, should be able to supply a location_id rather than just a name, and within the geo lookup function, to filter by admin level (e.g. look for name: New York + admin_level == 1

kevinmcdermott062 commented 1 year ago

Similar issue as above. All my other queries for other locations work fine, but query for New York requires a reply to a console prompt and this doesn't work when I want to knit and render the document as html output using Rmarkdown.

XBB.1.5_NY <- getPrevalence(pangolin_lineage = "XBB.1.5", location="New York")

XBB.1.5_NY <- getPrevalence(pangolin_lineage = "XBB.1.5", location="New York") New York, United States (state/province) Is this a location of interest? (Y/N): y

flaneuse commented 1 year ago

@kevinmcdermott062 thanks for the comment. We agree it would be useful to be able to select a location based on an ISO code rather than a name. We plan on adding this feature but haven't had the bandwidth to refactor it yet.