def getAccidentsBySeverity(analyzer, initialDate): try: initialDate = datetime.datetime.strptime(initialDate, '%Y-%m-%d') if om.contains(analyzer['dateIndex'], initialDate.date()) == False: return "fecha" else: severity1 = int(model.getAccidentsBySeverity(analyzer, initialDate.date(), '1')) severity2 = int(model.getAccidentsBySeverity(analyzer, initialDate.date(), '2')) severity3 = int(model.getAccidentsBySeverity(analyzer, initialDate.date(), '3')) severity4 = int(model.getAccidentsBySeverity(analyzer, initialDate.date(), '4')) total = severity1 + severity2 + severity3 +severity4 return (total, severity1, severity2, severity3, severity4) except: return "formato"
def getAccidentsBySeverity(analyzer, Date, Severity): """ Retorna el total de crimenes de un tipo especifico en una fecha determinada """ Date = datetime.datetime.strptime(Date, '%Y-%m-%d') return model.getAccidentsBySeverity(analyzer, Date.date(), Severity)
def getAccidentsBySeverity(analyzer, initialDate, severity): initialDate = datetime.datetime.strptime(initialDate, '%Y-%m-%d') return model.getAccidentsBySeverity(analyzer, initialDate.date(), severity)
def getAccidentsBySeverity(analyzer, date): return model.getAccidentsBySeverity(analyzer, date)
def getAccidentsBySeverity (analyzer, Date): #REQUERIMIENTO 1 Date= datetime.datetime.strptime(Date, '%Y-%m-%d') return model.getAccidentsBySeverity(analyzer, Date.date())
def getAccidentsBySeverity(SeverityMap, SeverityIndex): return model.getAccidentsBySeverity(SeverityMap,SeverityIndex)
def getAccidentsBySeverity(analyzer, date): date = datetime.datetime.strptime(date, '%Y-%m-%d') return model.getAccidentsBySeverity(analyzer, date)