getPR | R Documentation |
getPR
downloads all publicly available PR points for a specified country (or countries) and returns this as a dataframe.
getPR(
country = NULL,
ISO = NULL,
continent = NULL,
species = NULL,
extent = NULL,
start_date = NULL,
end_date = NULL,
version = NULL
)
country |
string containing name of desired country, e.g. |
ISO |
string containing ISO3 code for desired country, e.g. |
continent |
string containing continent (one of "Africa", "Americas", "Asia", "Oceania") for desired data, e.g. |
species |
string specifying the Plasmodium species for which to find PR points, options include: |
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) |
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().
getPR
returns a dataframe containing the below columns, in which each row represents a distinct data point/ study site.
dhs_id
The dhs survey id if appropriate.
site_id
Unique site identifier
site_name
Name of site.
autoplot
method for quick mapping of PR point locations (autoplot.pr.points
).
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.