Skip to content

Commit

Permalink
Fix schools data extract
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesdring committed Oct 20, 2023
1 parent 7f46501 commit 72c4575
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/metrics/schools/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
logger.info('Set up logging')

import lib.sources.airtable as airtable
from config import SCHOOLS_DATA
from config import RAW_SCHOOLS_DATA


def fetch_data():
Expand Down Expand Up @@ -44,13 +44,14 @@ def fetch_data():
'Ward (from School)',
'Number of booked participants',
])
print(school_events)
return school_events


if __name__ == '__main__':
try:
data = fetch_data()
data.to_csv(SCHOOLS_DATA, index=False)
data.to_csv(RAW_SCHOOLS_DATA, index=False)
except Exception as e:
logger.error(repr(e))
raise RuntimeError('Cannot extract schools data')

0 comments on commit 72c4575

Please sign in to comment.