ConsultancyProject_2_ETL/createLostPropertyList.py
mmaurostoffel c7d58c2b23 ETL update
Untersuchungen:
- Welche Properties gibt es, die nicht mehr gefunden werden
- Wie genau sind die Daten 3 Tage, 1 Woche, 1 Monat und 2 Monate im voraus

Alle Relevanten Resultate liegen im results Ordner
2024-10-19 20:25:30 +02:00

20 lines
503 B
Python

import Data_Analysis as DA
import csv
propIds = DA.getuniquePropIdFromDB()
lostProperties = []
for propId in propIds:
print(propId)
scrapeDates, calendarData = DA.getDataFromDB(propId)
if DA.checkForLostProprty(calendarData):
lostProperties.append(propId)
print(f"{len(lostProperties)} of {len(propIds)} properties are lost")
with open('results/allLostProperties', 'w') as f:
write = csv.writer(f)
write.writerow(lostProperties)
#Output: 221 of 1552 properties are lost