This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Leemos el archivo de Peatones 2019 | |
var csvReadOptions2019 = CSVReadingOptions(hasHeaderRow: true, delimiter: ";") | |
// Tratamiento para las fechas | |
// El formato es 16/08/2022 | |
csvReadOptions2019.addDateParseStrategy( | |
Date.ParseStrategy(format: "\(day: .twoDigits)/\(month: .twoDigits)/\(year: .defaultDigits)", | |
locale: Locale(identifier: "es_ES"), | |
timeZone: TimeZone.current) | |
) | |
let columnTypes2019 = [ | |
"FECHA" : CSVType.date, | |
"HORA" : CSVType.string, | |
"PEATONES" : CSVType.string, | |
"DISTRITO" : CSVType.string, | |
"NOMBRE_VIAL" : CSVType.string, | |
"NÚMERO" : CSVType.integer, | |
"CÓDIGO_POSTAL" : CSVType.string, | |
"LATITUD" : CSVType.string, | |
"LONGITUD" : CSVType.string | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment