This tutorial shows how to use the
malariaAtlas package to download, visualise and manipulate global malaria data hosted by the Malaria Atlas Project. These data can be explored and downladed interactively at data explorer.
malariaAtlas package enables users to download three types of data:
malariaAtlas package can be installed from CRAN and loaded as follows:
malariaAtlas package provides users with a convenient API to interact with the publicly available malaria data hosted by the Malaria Atlas Project. The
listData() function helps retrieve a list of all the available data which can be downloaded, and is a wrapper for
listShp(). We can find all countries that have PR survey points data with
listData(datatype = "pr points"), and all countries with vector occurrence data with
listData(datatype = "vector points"). We can also see raster data available with
listData(datatype = "raster"), and shapefiles available with
listData(datatype = "shape").
isAvailable_pr() function can be used to check whether a specified country or location has PR survey points. Similarly,
isAvailable_vec() checks whether a specified country or location has vector occurrence data. For example, we can check whether Zimbabwe has PR survey points and India has vector occurrence data as follows:
isAvailable_pr(country = "Zimbabwe") isAvailable_vec(country = "India")
getPR() function downloads all the publicly available PR points for a country (or countries) and returns it as a dataframe. The
species argument is a string specifying the Plasmodium species and can be
ZM_PR_data <- getPR(country = "Zimbabwe", species = "BOTH")
autoplot() can be used to quickly and easily visualise the downloaded PR survey points.
## OGR data source with driver: ESRI Shapefile ## Source: "C:\Users\dilin\AppData\Local\Temp\Rtmpkhoagp\shp\shp4134302e7d84\mapadmin_0_2018.shp", layer: "mapadmin_0_2018" ## with 1 features ## It has 8 fields
getVecOcc() function downloads all publicly available vector points for a country (or countries) and returns it as a dataframe. The
species argument is a string specifying the Anopheles species for finding the vector occurrences points, the options are
IN_VEC_data <- getVecOcc(country = "India", species = "ALL")