Publication:
Análisis y creación de modelos del tráfico en la ciudad de Madrid (2019 - 2021) con R y Python

Loading...
Thumbnail Image
Official URL
Full text at PDC
Publication Date
2022-06
Advisors (or tutors)
Editors
Journal Title
Journal ISSN
Volume Title
Publisher
Citations
Google Scholar
Research Projects
Organizational Units
Journal Issue
Abstract
El presente Trabajo de Fin de Grado abarca un estudio del tráfico de la ciudad de Madrid en los años 2019, 2020 y 2021, así como la creación de modelos predictivos de la carga de sus carreteras. El estudio ha sido realizado empleando los lenguajes R y Python a través del entorno de RStudio. Para ello, nos hemos valido de conjuntos de datos extraídos del Portal de datos abiertos del Ayuntamiento de Madrid tales como: intensidad de tráfico, puntos de medida de tráfico, y distritos de la ciudad de Madrid. Primero, se ha realizado una limpieza básica de datos anómalos que corrompían nuestro estudio, tales como valores negativos, NA y otros códigos de error. Seguidamente, se ha realizado una limpieza exhaustiva basándonos en incongruencias en los datos y eliminando variables que carecían de valor para nuestro estudio. Durante todo este proceso hemos estado en contacto con los responsables del portal de datos del Ayuntamiento de Madrid, los cuales nos han resuelto ciertas dudas que les planteamos. Tras finalizar la limpieza de los datos hemos realizado un análisis descriptivo de las variables, en el que se ha tratado de reflejar visualmente mediante gráficos y mapas el impacto que ha tenido la pandemia en el tráfico de la ciudad de Madrid, haciendo una comparativa de resultados proporcionados por los tres años. Por último, antes del modelado, hemos tratado todos los datos para darles el formato adecuado para emplear los algoritmos de forma eficaz. En lo que al modelo respecta, se han empleado dos técnicas como son la regresión lineal simple y la regresión logística multi-clase. Para cada una de las técnicas empleadas se han realizado varias iteraciones variando diversos parámetros hasta encontrar la combinación óptima de predictores y variables para nuestros modelos. Finalmente hemos realizado un breve análisis de los resultados obtenidos y sus implicaciones.
This Final Degree Project covers a study of the traffic of the city of Madrid in the years 2019, 2020 and 2021, as well as the creation of predictive models of the load of its roads. The study has been carried out using the R and Python languages through the RStudio environment. For this purpose, we have used datasets extracted from the open data Portal of the Madrid City Council[1] such as: traffic intensity, traffic measurement points, and districts of the city of Madrid. First, a basic cleaning of anomalous data that corrupted our study, such as negative values, NA and other error codes, was performed. Next, an exhaustive cleaning was carried out based on inconsistencies in the data and eliminating variables that had no value for our study. Throughout this process we have been in contact with the responsible for the data portal of the Madrid City Council, who have resolved certain doubts that we raised. After finishing the data cleaning, we have carried out a descriptive analysis of the variables, in which we have tried to visually reflect through graphs and maps the impact that the pandemic has had on the traffic in the city of Madrid, making a comparison of the results provided by the three years. Finally, before modeling, we have treated all the data to give them the appropriate format to use the algorithms effectively. As far as the model is concerned, we have used two techniques such as simple linear regression and multi-class logistic regression. For each of the techniques used, several iterations have been carried out, varying various parameters until the optimal combination of predictors and variables for our models was found. Finally, we have made a brief analysis of the results obtained and their implications.
Description
Trabajo de Fin de Grado en Ingeniería Informática, Facultad de Informática UCM, Departamento de Sistemas Informáticos y Computación, Curso 2021/2022.
Unesco subjects
Keywords
Citation