Step by step tutorials

Example 1. How to calculate specific transport poverty index for a selected year

  1. Define the year (eg. 2019) and the energy poverty index (eg. LIHC) in calc_tp
file <- calc_tp(year = 2019,        # Select the year
                index = "LIHC")     # Select the index or a vector: c("LIHC", "VTU")
  1. Define the directory to save the outputs
setwd(path)   # Indicate the path to save the outputs
  1. Save the output dataframe in excel
write.xlsx(file,                         # Indicate the dataframe created in step 1
           "File_name.xlsx",             # Indicate the file name of the excel to be saved
           sheetName = "sheet_name",     # Indicate the sheet name
           ...)

Example 2. How to calculate all transport poverty indices for a time series

  1. Define the time series
time_series <- seq(2006,2021,1)
  1. Calculate transport poverty indices for the defined time series
file <- calc_tp(year = time_series,      # Select the vector with the selected years
                index = "all")           # Select all indices (by default)
  1. Define the directory to save the outputs
setwd(path)   # Indicate the path to save the outputs
  1. Save the output dataframe in excel
write.xlsx(file,                         # File name or full file path
           "File_name.xlsx",             # Indicate the file name of the excel to be saved
           sheetName = "sheet_name",     # Indicate the sheet name
           ...)