Query weather observatory database via SQLAlchemy in Python. Using the query results, we analyze weather data over for a time period in the past.
A Flask app is also provided to query the database.
- SQLALchemy is used to query the SQLite database of observations.
- Plots are constructed with
matplotlib. - A Flask app is provided to query the database. We utilize the fuzzy date parsing option of the
dateutil.parser.parsefunction. This allows us to avoid checking input dates for valid entries.
- The Jupyter notebook
hawaii.ipynbcontains the results of querying the database. View the notebook via nbviewer - The Jupyter notebook
dateparsing.ipynbgives examples of using thedateutil.parser.parsefunction to produce ISO 8601 dates YYYY-MM-DD. View the notebook via nbviewer. stations.ipynbexplores the range of available dates in the database for the various stations and the effect of querying for dates with different formats (datetimeobjects versus dates as strings). View the notebook via nbviewerapp.pyis the code for the Flask app to query the database. We have incorporated thedateutil.parser.parsefunction to allow for flexible entry of dates. Queries using dates outside the range of the datebase do not produce errors at this time. If a queried date falls outside of the datebase range, the query returnsnullif appropriate.