Welcome to Air Quality’s documentation!

Air Quality is a python framework that allows for users to make predictions about air quality for multiple locations, utilizing machine learning and other advanced models.

AIRPrediction.arima(pollutant, state, county, city, date)

A function that uses the arima_prediction from ARIMA_model.py to avoid using multiple import statements.

Parameters
  • pollutant – The specified pollutant to predict (NO2, O3, SO2, CO).

  • state – The location parameter indicating the state in the United States of America to predict for.

  • county – The location parameter indicating the county in the state to predict for.

  • city – The location parameter indicating the city in the county to predict for.

  • date – The calendar date to prediction for.

Returns

The prediction made by the ARIMA model given the above parameters and the units that prediction is in.

AIRPrediction.compare_models(pollutant, state, county, city, date)

The driver file that is to be imported to utilize the AIRPrediction Framework. Includes a function for input validation, prophet predictions, ARIMA predictions, and comparison of the two models. Module Authors: Derek Pena <derek.pena@ufl.edu>, Colin Naehr <cnaehr@ufl.edu>, Daniel Casto <danielcasto@ufl.edu>, Haotian Wang <haotianwang@ufl.edu>

compare_models is a function that times both prediction models in order to compare their speed and their output.

Parameters
  • pollutant – The specified pollutant to predict (NO2, O3, SO2, CO).

  • state – The location parameter indicating the state in the United States of America to predict for.

  • county – The location parameter indicating the county in the state to predict for.

  • city – The location parameter indicating the city in the county to predict for.

  • date – The calendar date to prediction for.

Returns

A list that contains the outputs for each prediction model as well as the time taken to run them.

AIRPrediction.prophet(pollutant, state, county, city, date)

A function that uses the prophet_prediction from prophet_model.py to avoid using multiple import statements.

Parameters
  • pollutant – The specified pollutant to predict (NO2, O3, SO2, CO).

  • state – The location parameter indicating the state in the United States of America to predict for.

  • county – The location parameter indicating the county in the state to predict for.

  • city – The location parameter indicating the city in the county to predict for.

  • date – The calendar date to prediction for.

Returns

The prediction made by the prophet model given the above parameters and the units that prediction is in.

AIRPrediction.validate_input(pollutant, state, county, city, date)

Validates the input provided by a user. To be used before any predictions are made.

Parameters
  • pollutant – The specified pollutant to predict (NO2, O3, SO2, CO).

  • state – The location parameter indicating the state in the United States of America to predict for.

  • county – The location parameter indicating the county in the state to predict for.

  • city – The location parameter indicating the city in the county to predict for.

  • date – The calendar date to prediction for.

Returns

A boolean that determines where validation was successful, a string that contains any error messages and a string that rewrites the data parameter in YYYY/MM/DD format.

class sampleapp.MainWindow

Class that holds all of the UI elements of the sample app and their functionality. Parent class: QWidget

sampleapp.main()

The sample app that demonstrates the functionality of the AIRPrediction framework. Creates a UI that accepts user input and calls the functions in the AIRPrediction to utilize the Time Series Models to produce predictions. main () generates the window the application is hosted on.

Module Authors: Colin Naehr <cnaehr@ufl.edu>, Daniel Casto <danielcasto@ufl.edu>, Derek Pena <derek.pena@ufl.edu>, Haotian Wang <haotianwang@ufl.edu>

Returns

None

ARIMA_model.arima_prediction(pollutant, state, county, city, date)

Opens and prepares the dataset (pollution_us_2000_2016.csv) to be used by the prophet model to predict the specified pollutant given the location and date parameters. NOTE: Part of Time_Series_Models Module Author: Haotian Wang <haotianwang@ufl.edu>

Parameters
  • pollutant – The specified pollutant to predict (NO2, O3, SO2, CO).

  • state – The location parameter indicating the state in the United States of America to predict for.

  • county – The location parameter indicating the county in the state to predict for.

  • city – The location parameter indicating the city in the county to predict for.

  • date – The calendar date to prediction for.

Returns

The value predicted by the ARIMA model as well as the units of the prediction (ppb).

prophet_model.prophet_prediction(pollutant, state, county, city, date)

Opens and prepares the dataset (pollution_us_2000_2016.csv) to be used by the prophet model to predict the specified pollutant given the location and date parameters. NOTE: Part of Time_Series_Models Module Author: Haotian Wang <haotianwang@ufl.edu>

Parameters
  • pollutant – The specified pollutant to predict (NO2, O3, SO2, CO).

  • state – The location parameter indicating the state in the United States of America to predict for.

  • county – The location parameter indicating the county in the state to predict for.

  • city – The location parameter indicating the city in the county to predict for.

  • date – The calendar date to prediction for.

Returns

The value predicted by the prophet model as well as the units of the prediction (ppb).

Indices and tables