afrimapr / afrihealthsites

access to geographic locations of african health sites from different sources
https://wellcomeopenresearch.org/articles/5-157
GNU General Public License v3.0
31 stars 4 forks source link

[Feature] Use iso3c for country specification #6

Closed anelda closed 3 years ago

anelda commented 4 years ago

Is your feature request related to a problem? Please describe. At the moment the query to access country-specific data looks like this:

afrihealthsites("south africa", datasource = "healthsites", plot = FALSE)

The way that we have to specify the country i.e. lower case full name is not very intuitive.

Describe the solution you'd like Maybe rather specify that one should use the iso3c or another standardised way to extract a country to make it as straight-forward as possible for users?

andysouth commented 4 years ago

This is my favourite kind of request .. something that I've done already ;-)

Good to see we are on same wavelength @anelda ! Does indicate that we need to improve the documentation at some point !

Using iso3c or capitals should work already.

dfzaf <- afrihealthsites("south africa", datasource='who', plot=FALSE, returnclass='dataframe')
dfzaf <- afrihealthsites("ZAF", datasource='who', plot=FALSE, returnclass='dataframe')
dfzaf <- afrihealthsites("South Africa", datasource='who', plot=FALSE, returnclass='dataframe')
anelda commented 4 years ago

Excellent. I added this to the readme so that we remember to include it in future documentation. We can probably close this one then.