Materials to be used at the MQAT course
- R scripts to prepare the databases
- R scripts for "hand-on" R programming classes
- Database on IMOB trips AML 2018 (refer to INE 2018)
- Database of AML administrative boundaries and areas at freguesia level (DICOFRE), from CAOP 2022 (refer to DGTerritório/CAOP)
- Database of socio-demographic statistics from Census 2021 for the AML at BGRI level (refer to INE Census 2021 for other downloads), including these variables
Instructions for installing R and RStudio. Note that it is very important to install first R and then RStudio.
- R script for R_Basics.R
- Database of IMOB trips at municipal level: TRIPSmode_mun.Rds
- R script for Exploratory Data Analysis
- Database of IMOB trips at a district level (Freguesias): IMOBmodel.Rds
- R script for Multiple Linear Regression
- Database of IMOB trips at a district level: IMOBmodel.Rds
Variables included in IMOBmodel database:
Origin_dicofre16
- Code of Freguesias as set by INE after 2016 (Distrito + Concelho + Freguesia)Total
- number of trips with origin inOrigin_dicofre16
Walk
- number of walking trips with origin inOrigin_dicofre16
Bike
- number of bike trips with origin inOrigin_dicofre16
Car
- number of car trips with origin inOrigin_dicofre16
. Includes taxi and motorcycle.PTransit
- number of Public Transit trips with origin inOrigin_dicofre16
Other
- number of other trips (truck, van, tractor, aviation) with origin inOrigin_dicofre16
Distance
- average trip distance (km) with origin inOrigin_dicofre16
Duration
- average trip duration (minutes) with origin inOrigin_dicofre16
Car_perc
- percentage of car trips with origin inOrigin_dicofre16
N_INDIVIDUOS
- number of residents inOrigin_dicofre16
(Censos 2021)Male_perc
- percentage of male residents inOrigin_dicofre16
(Censos 2021)IncomeHH
- average household income inOrigin_dicofre16
Nvehicles
- average number of car/motorcycle vehicles in the household inOrigin_dicofre16
DrivingLic
- percentage of car driving licence holders inOrigin_dicofre16
CarParkFree_Work
- percentage of respondents with free car parking at the work location, inOrigin_dicofre16
PTpass
- percentage of public transit monthly pass holders inOrigin_dicofre16
internal
- binary variable (factor). "Yes": internal trips in that freguesia (Origin_dicofre16
), "No": external trips from that freguesiaLisboa
- binary variable (factor). "Yes": the freguesia is part of Lisbon municipality, "No": otherwiseArea_km2
- area of inOrigin_dicofre16
, in km2
- R script for Exploratory Factor Analysis
- Database of Residential location satisfaction in the Lisbon metropolitan are: example_fact.sav.
- R script for Cluster Analysis
- Database of international airports: Data_Aeroports_Clustersv1
-
Work with data, Tidy your data, Report reproducibility (tutorials)
-
CheatSheet of Data transformation with
dplyr
: pay attention to filter(), select(), distinct(), arrange(), mutate(), group_by() & summarize(), left_join() -
CheatSheet of Data transformation with
tidyr
: pay attention to pivot_longer(), pivot_wider()