This function checks for which schools listed in the two registries (the buildings registry and the properly said schools registry)
the count of students is available. The first registry is referred to as as Registry_from_buildings
and the second one as Registry_from_registry
.
Util_Check_nstud_availability(
data,
Year,
cutout = c("IC", "IS", "NR"),
verbose = TRUE,
ggplot = TRUE,
toplot_registry = "Any",
InnerAreas = TRUE,
ord_InnerAreas = FALSE,
input_Registry = NULL,
input_InnerAreas = NULL,
input_Prov_shp = NULL,
input_AdmUnNames = NULL,
input_School2mun = NULL,
autoAbort = FALSE
)
An object of class list
including two elements:
$Municipality_data
$Province_data
Both the elements are objects of class list
including four elements:
$Registry_from_buildings
: object of class of class tbl_df
, tbl
and data.frame
: the availability of the number of students in the schools listed in the buildings section.
$Registry_from_registry
: object of class of class tbl_df
, tbl
and data.frame
: the availability of the number of students in the schools listed in the registry section.
$Any
: object of class of class tbl_df
, tbl
and data.frame
: the availability of the number of students in the schools listed anywhere.
$Both
: object of class of class tbl_df
, tbl
and data.frame
: the availability of the number of students in the schools listed in both sections.
Object of class tbl_df
, tbl
and data.frame
, obtained as output of the Util_nstud_wide
function
Numeric or character value. Reference school year.
Available in the formats: 2023
, "2022/2023"
, 202223
, 20222023
.
Character. The types of schools not to be taken into account (because not relevant or because they are out of scope in the students number section). By default c("IC", "IS", "NR")
, i.e. the check does not regard comprehensive institutes, superior institutes, and all the schools that cannot be classified either as primary, middle or high schools.
Logical. If TRUE
, the user keeps track of the main underlying operations. TRUE
by default.
Logical. If TRUE
, the function displays a static map of the availability of the students number by province (but it does not save the ggplot object into the global environment). TRUE
by default.
Character. If the ggplot
option is chosen, the students number availability of which registry must be plotted; either "Registry_from_buildings"
, "Registry_from_registry"
, "Any"
or "Both"
. "Any"
by default.
Logical. Whether it must be checked if municipalities belong to inner areas or not. TRUE
by default.
Logical. Whether the inner areas classification should be treated as an ordinal variable rather than as a categorical one (see Get_InnerAreas
for the classification).
FALSE
by default.
Object of class tbl_df
, tbl
and data.frame
, obtained as output of the function Get_Registry
The school registry from the registry section.
If NULL
, it will be downloaded automatically, but not saved in the global environment.
NULL
by default
Object of class tbl_df
, tbl
and data.frame
.
The classification of peripheral municipalities, obtained as output of the Get_InnerAreas
function.
Needed only if the InnerAreas
option is chosen.
If NULL
, it will be downloaded automatically, but not saved in the global environment.
NULL
by default
Object of class sf
, tbl_df
, tbl
, data.frame
. The relevant shapefile of Italian municipalities, if the ggplot
option is chosen.
If NULL
it is downloaded automatically but not saved in the global environment. NULL
by default.
Object of class tbl_df
, tbl
and data.frame
, obtained as output of the function Get_AdmUnNames
The ISTAT file including all the codes and the names of the administrative units for the year in scope.
Only needed if the argument input_School2mun is NULL
and has to be computed.
If NULL
, it will be downloaded automatically, but not saved in the global environment. NULL
by default.
Object of class list
with elements of class tbl_df
, tbl
and data.frame
, obtained as output of the function Get_School2mun
.
The mapping from school codes to municipality (and province) codes. If NULL
, it will be downloaded automatically, but not saved in the global environment. NULL
by default.
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. FALSE
by default.
nstud23 <- Util_nstud_wide(example_input_nstud23, verbose = FALSE)
Util_Check_nstud_availability(nstud23, Year = 2023,
input_Registry = example_input_Registry23, InnerAreas = FALSE,
input_School2mun = example_School2mun23, input_Prov_shp = example_Prov22_shp)
Run the code above in your browser using DataLab