Learn R Programming

SchoolDataIT (version 0.2.4)

Get_School2mun: Associate a Municipality (LAU) code to each school

Description

This function associates the relevant municipality codes to all the schools listed in the two main registries provided by the Italian Ministry of Education, University and Research, namely:

  • The registry of school buildings, here referred to as Registry_from_buildings (Get_DB_MIUR)

  • The official schools registry, here referred to as Registry_from_registry (see Get_Registry)

Usage

Get_School2mun(
  Year = 2023,
  show_col_types = FALSE,
  verbose = TRUE,
  input_AdmUnNames = NULL,
  input_Registry = NULL,
  autoAbort = FALSE
)

Value

An object of class list, including 4 elements:

  • $Registry_from_buildings: Object of class tbl_df, tbl and data.frame: the schools listed in the buildings registry

  • $Registry_from_registry: Object of class tbl_df, tbl and data.frame: the schools listed in the schools registry

  • $Any: Object of class tbl_df, tbl and data.frame: schools listed anywhere

  • $Both: Object of class tbl_df, tbl and data.frame: schools listed in both the sections

Arguments

Year

Numeric or character value (last available is 2023). Available in the formats: 2023, "2022/2023", 202223, 20222023. 2023 by default.

show_col_types

Logical. If TRUE, if the verbose argument is also TRUE, the columns of the raw dataset are shown during the download. FALSE by default.

verbose

Logical. If TRUE, the user keeps track of the main underlying operations. TRUE by default.

input_AdmUnNames

Object of class tbl_df, tbl and data.frame, obtained as output of the function Get_AdmUnNames The ISTAT file including all the administrative units codes for the year in scope. If NULL, it will be downloaded automatically, but not saved in the global environment. NULL by default.

input_Registry

Object of class tbl_df, tbl and data.frame, obtained as output of the function Get_Registry The school registry corresonding to the year in scope. If NULL, it will be downloaded automatically, but not saved in the global environment. NULL by default

autoAbort

Logical. Whether to automatically abort the operation and return NULL in case of missing internet connection or server response errors. FALSE by default.

Examples

Run this code

# \donttest{
Get_School2mun(Year = 2023, autoAbort = TRUE)
# }


Run the code above in your browser using DataLab