Learn R Programming

SchoolDataIT (version 0.2.12)

Get_nteachers_prov: Download the number of teachers in Italian schools by province

Description

This functions downloads the number of teachers by province from the open website of the Italian Ministry of Education, University and Research.

Usage

Get_nteachers_prov(
  Year = 2023,
  verbose = TRUE,
  show_col_types = FALSE,
  filename = c("DOCTIT", "DOCSUP"),
  t_out = 3,
  autoAbort = FALSE,
  forceAbort = FALSE
)

Value

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

Arguments

Year

Numeric or character value. Reference school year for the school registry data (last available is 2023). Available in the formats: 2022, "2021/2022", 202122, 20212022. 2023 by default

verbose

Logical. If TRUE, the user keeps track of the main underlying operations. TRUE 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.

filename

Character. Which data to retrieve among the province counts of teachers/school personnel. By default it is c("DOCTIT", "DOCSUP"), which are the file names used so far for the number of tenured and temporary teachers respectively. Other file names are the following:

"ATATIT" for the number of tenured non-teaching personnel

"ATASUP" for the number of temporary non-teaching personnel

t_out

Numeric. !! EXPERIMENTAL !! session timeout for scraping and download, in seconds. 3 seconds 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.

forceAbort

Logic. Whether to force a limited number of attempts to scrape the provider webpage. Not recommended to be switched to TRUE. Only insert to speedup function failure when there is certainty that the provider website is out. FALSE by default. Experimental, may be implemented in other Get_ functions.

Details

Please notice that by default, the function returns the count of the number of tenured and temporary teachers. If either the count of non-teaching personnel or the count of a single category of teaching personnel is needed, please adapt the filename argument accordingly.

Examples

Run this code


nteachers23 <- Get_nteachers_prov(Year=2023, filename="DOCTIT",
               autoAbort=TRUE, forceAbort = TRUE)
nteachers23[, c(3,4,5)]


Run the code above in your browser using DataLab