Learn R Programming

SchoolDataIT (version 0.2.6)

Get_DB_MIUR: Download the database of Italian public schools buildings

Description

This function downloads the School Buildings Open Database provided by the Italian Ministry of Education, University and Research.

It is one of the main sources of information regarding the infrastructure system of public schools in Italy. For a given year, all available data are downloaded (except for the structural units section, which has a different level of detail) and gathered into a unique dataframe.

Usage

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

Value

An object of class tbl_df, tbl and data.frame.

Arguments

Year

Numeric or character value. Reference school year (last available is 2023). Available in the formats: 2023, "2022/2023", 202223, 20222023. 2022 by default (other databases are not currently available for 2023).

verbose

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

input_Registry

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

input_AdmUnNames

Object of class tbl_df, tbl and data.frame. The ISTAT file including all the codes and all the names of the administrative units for the year in scope, obtained as output of the function Get_AdmUnNames. Only necessary for school years 2015/16, 2017/18 and 2018/19. If NULL and required, it will be downloaded automatically but not saved in the global environment. NULL 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.

certifications

Logical. From year 2021/22 onwards, whether to include some safety certifications in the database. Given the particular level of definition of this file, it requires extra computational time (other than the downloading time). FALSE 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.

Details

This function downloads the raw data; missing observations are not edited; all variables are characters. Since certifications are defined at the level of structural units of the single buildings, here the fields read as the percentage of structural units in a building having a given certificate. To edit the output of this function and convert the relevant variables to numeric or Boolean, please Util_DB_MIUR_num. Schools different from primary, middle or high schools are classified as "NR". In the example, the data for school year 2022/23 are retrieved.

Examples

Run this code

# \donttest{
  input_DB23_MIUR <- Get_DB_MIUR(2023, autoAbort = TRUE)

  input_DB23_MIUR[-c(1,4,6,9)]

# }


Run the code above in your browser using DataLab