public IActionResult About() { List <WeatherDataFromAPI> weatherForecast = APIController.GetWeatherForcast(); ViewBag.WeatherForecast = weatherForecast; return(View()); }
public static List <FutureAQIs> getFutureAQIs(double O3Average, double COAverage, double NO2Average) { List <WeatherDataFromAPI> weatherForecast = APIController.GetWeatherForcast(); List <FutureAQIs> futureAQIs = new List <FutureAQIs>(); for (int i = 1; i < 4; i++) { futureAQIs.Add(AQICalculations.AQIForecastEquation(weatherForecast, i, O3Average, COAverage, NO2Average)); } return(futureAQIs); }
public IActionResult Index() { List <string> pastDates = DateController.PastSevenDates(); List <AQIs> AQIList = APIController.GetHistoricAQIList(); int highestAQI = getHighestAQI(AQIList); int AQIIndex = getAQIIndexPosition(highestAQI); ViewBag.DateList = DateController.PastSevenDates(); ViewBag.highestAQI = highestAQI; ViewBag.AQIColor = returnHexColor(AQIIndex); ViewBag.AQIList = AQIList; return(View(pastDates)); }