Map_Invalsi {SchoolDataIT} | R Documentation |
Display a map of Invalsi scores
Description
This function displays either a static or interactive map of the Invalsi scores, either at the municipality or province level. It supports two kinds of map:
Interactive map (default option), which allows the user to visualize all the data in scope through the interactive popup, and
Static map (ggplot), which can be easily exported in
.pdf
objects.
Usage
Map_Invalsi(
Year = 2023,
data = NULL,
subj_toplot = "ITA",
grade = 8,
level = "LAU",
main = "",
main_pos = "top",
region_code = c(1:20),
plot = "mapview",
pal = "Blues",
WLE = FALSE,
col_rev = FALSE,
popup_height = 200,
verbose = TRUE,
input_shp = NULL,
autoAbort = FALSE
)
Arguments
Year |
Numeric or character value. Reference school year for the data (last available is 2022/23).
Available in the formats: |
data |
Object of class |
subj_toplot |
Character. The school subject to display in the map,
The school subject to include, one among:
|
grade |
Numeric. The school grade to chose. Either |
level |
Character. The level of aggregation of Invalsi census data. Either |
main |
Character. A customary title to the map. If |
main_pos |
Character.Where the header should be placed if the |
region_code |
Numeric. The NUTS-2 codes of the units that must be displayed.
If the level is set to |
plot |
Character. The type of map to display; either |
pal |
Character. The palette to use if the |
WLE |
Logical. Whether the variable to chose should be the average WLE score rather that the percentage of sufficient tests, if both are available. |
col_rev |
Logical. Whether the scale of the colour palette should be reverted or not, if the |
popup_height |
Numeric. The height of the popup table in terms of pixels if the |
verbose |
Logical. If |
input_shp |
Object of class |
autoAbort |
Logical. In case any data must be retrieved, whether to automatically abort the operation and return NULL in case of missing internet connection or server response errors. |
Value
If plot == "mapview"
, an object of class mapview
. Otherwise, if plot == "ggplot"
, an object of class gg
and ggplot
.
Examples
Map_Invalsi(subj = "Italian", grade = 13, level = "NUTS-3", Year = 2023, WLE = FALSE,
data = example_Invalsi23_prov, input_shp = example_Prov22_shp, plot = "ggplot")
Map_Invalsi(subj = "Italian", grade = 5, level = "NUTS-3", Year = 2023, WLE = TRUE,
data = example_Invalsi23_prov, input_shp = example_Prov22_shp, plot = "ggplot")