getPR: Download PR points from the MAP database

View source: R/getPR.R

getPRR Documentation

Download PR points from the MAP database

Description

getPR downloads all publicly available PR points for a specified country (or countries) and returns this as a dataframe.

Usage

getPR(
  country = NULL,
  ISO = NULL,
  continent = NULL,
  species = NULL,
  extent = NULL,
  start_date = NULL,
  end_date = NULL,
  version = NULL
)

Arguments

country

string containing name of desired country, e.g. c("Country1", "Country2", ...) OR = "ALL". (Use one of country OR ISO OR continent, not combined)

ISO

string containing ISO3 code for desired country, e.g. c("XXX", "YYY", ...) OR = "ALL". (Use one of country OR ISO OR continent, not combined)

continent

string containing continent (one of "Africa", "Americas", "Asia", "Oceania") for desired data, e.g. c("continent1", "continent2", ...). (Use one of country OR ISO OR continent, not combined)

species

string specifying the Plasmodium species for which to find PR points, options include: "Pf" OR "Pv" OR "BOTH"

extent

an object specifying spatial extent within which PR data is desired, as returned by sf::st_bbox() - the first column has the minimum, the second the maximum values; rows 1 & 2 represent the x & y dimensions respectively (matrix(c("xmin", "ymin","xmax", "ymax"), nrow = 2, ncol = 2, dimnames = list(c("x", "y"), c("min", "max"))))

start_date

string object representing the lower date to filter the PR data by (inclusive) e.g. '2020-01-01'

end_date

string object representing the upper date to filter the PR data by (exclusive) e.g. '2020-01-01'

version

(optional) The PR dataset version to return. If not provided, will just use the most recent version of PR data. (To see available version options, use listPRPointVersions)

Details

country and ISO refer to countries and a lower-level administrative regions such as Mayotte and French Guiana. While we cannot direectly distribute DHS coordinates, we can distribute the number of examined and positive. If the coordinates are needed they can be downloaded from www.measuredhs.com, via the rdhs package or using malariaAtlas:fillDHSCoordinates().

Value

getPR returns a dataframe containing the below columns, in which each row represents a distinct data point/ study site.

  1. dhs_id The dhs survey id if appropriate.

  2. site_id Unique site identifier

  3. site_name Name of site.

See Also

autoplot method for quick mapping of PR point locations (autoplot.pr.points).

Examples

#Download PfPR data for Nigeria and Cameroon and map the locations of these points using autoplot
## Not run: 
NGA_CMR_PR <- getPR(country = c("Nigeria", "Cameroon"), species = "Pf")
autoplot(NGA_CMR_PR)

#Download PfPR data for Madagascar and map the locations of these points using autoplot
Madagascar_pr <- getPR(ISO = "MDG", species = "Pv")
autoplot(Madagascar_pr)

getPR(country = "ALL", species = "BOTH")

## End(Not run)



malariaAtlas documentation built on Oct. 27, 2023, 9:07 a.m.