Part 1: Data Wrangling/Visualization
Using historical data to suggest future outcomes based on repeating patterns
Data Requirements
Forecast Range
Skills Required
Acquire the data
Standardize and normalize the data
Handle outliers (Points beyond 3 std dev)
Visualize the data
Look for trends and seasonal variations
Develop the model
Put the model into use
Monitor and adjust
\[V_{(t+1)} = V_{(t)} + \alpha F_{(t+1)} + \epsilon\]
\[V_{(t+1)} = V_{(t)} + \Delta v_a + \Delta v_b + \Delta v_c+ \epsilon\]
\[ V_{(t+1)} = \left(\frac{V_{(t-1)} + V_{(t)}}{2}\right)\]
\[V_{(t+1)} = V_{(trend)} \times (seasonal\_factor)[t+1]\]
Data that tell as story
Shows effects
\[\tiny\matrix{&\rm\hbox{GDP per capita}\\ \rm\hbox{Year}&\rm\hbox{(In USD})\\ 2013 &7,202\\ 2014 &7,759\\ 2015 &8,103\\ 2016 & 8,258\\ 2017 &8,982\\ 2018 &10,091\\ 2019 &10,344\\ 2020 &10,628\\ 2021 &12,885\\ 2022 &12,983\\ 2023 &12,959\\ 2024 & 13,306\\ }\]
https://www.bangchak.co.th/en/oilprice/historical
Weekly listing of consumer petroleum prices
Download years: 2018-2025
Source : Air Transport Information Division, Airports of Thailand.
URL: https://investor-th.airportthai.co.th/transport.html
Downloaded: 2017-2025
An search function for optimized solutions
an optimization tool that searchs for the best possible solution to a problem
Works by adjusting values to reach a specific objective, subject to a set of constraints.
Useful for tasks like:
* Maximizing profit
* Minimizing costs
* Achieving a target value by changing the input values
* Modelling a trend by minimizing error in the model
Open a Google Sheets spreadsheet.
In the top menu bar, click on Extensions.
From the dropdown menu, select Add-ons, then click Get add-ons.
In the search bar of the Google Workspace Marketplace, type “Solver” and press enter.
Select the Solver add-on by Frontline Systems, Inc. and click on it.
Click the Install button and follow the prompts to grant the necessary permissions.
Once the installation is complete, you can access Solver by going to Extensions > Solver > Start.
Steps
Download the dataset from the Data.go.th
Edit and trim the file to a simple time sequence of monthly consumption figures
Cut and paste the time range of interest
Rearrange the date: rows by year; Months by column
Calculate the total consumption per year
Develop a linear model to predict the total consumption by year
Calculate the monthly fraction of consumption based on actual totals
Average the fractions by month
Multiply the average monthly fractions by the estimated annual consumption
Convert the monthly estimates into a time series
Plot the actual and estimated monthly consumption
MIS Special Lecture