This code ingests all of the txt files in wx_data and places them in an SQLite database for further analysis.
Install requirements:
pip install -r requirements.txt
Running main.py runs the following steps:
- run concat_data.py. This concatenates all the .txt weather station data files.
- run data_model.py, which only needs to be run once if the weather_data.db does not already exist.
- run ingest_data.py, which takes the processed weather data and puts it in the weather_data table.
- run aggregate_station_data.py, which takes the data from the database and generates mean max/min, total precipitation, for each station and year.
The flask app setup instructions are located in the README here: code-challenge-template\src\sandbox
All table ORM is contained in data_model.py. Some constants are stored in constants.py for easy modification.