I have this file: a.csv
For example on a.csv, for store 1000 and store 1001, there are values for all 7 days of the week for 3rdparty, dinein, drivethru, digital, and takeout:
store | day of week | 3rdparty | dinein | drivethru | digital | takeout |
---|---|---|---|---|---|---|
1000 | Sunday | 1 | 3 | 5 | 7 | 9 |
1000 | Monday | 2 | 4 | 6 | 8 | 10 |
1000 | Tuesday | 3 | 5 | 7 | 9 | 11 |
1000 | Wednesday | 4 | 6 | 8 | 10 | 12 |
1000 | Thursday | 5 | 7 | 9 | 11 | 13 |
1000 | Friday | 6 | 8 | 10 | 12 | 14 |
1000 | Saturday | 7 | 9 | 11 | 13 | 15 |
1001 | Sunday | 8 | 10 | 12 | 14 | 16 |
1001 | Monday | 9 | 11 | 13 | 15 | 17 |
1001 | Tuesday | 10 | 12 | 14 | 16 | 18 |
1001 | Wednesday | 11 | 13 | 15 | 17 | 19 |
1001 | Thursday | 12 | 14 | 16 | 18 | 20 |
1001 | Friday | 13 | 15 | 17 | 19 | 21 |
1001 | Saturday | 14 | 16 | 18 | 20 | 22 |
How do you project/forecast these weekly values from 2/21/2021 - 12/25/2021? How can you make this table on R? These values will be repeated weekly and shown for each store:
store | date | 3rdparty | dinein | drivethru | digital | takeout |
---|---|---|---|---|---|---|
1000 | 2/21/2021 | 1 | 3 | 5 | 7 | 9 |
1000 | 2/22/2021 | 2 | 4 | 6 | 8 | 10 |
1000 | 2/23/2021 | 3 | 5 | 7 | 9 | 11 |
1000 | 2/24/2021 | 4 | 6 | 8 | 10 | 12 |
1000 | 2/25/2021 | 5 | 7 | 9 | 11 | 13 |
1000 | 2/26/2021 | 6 | 8 | 10 | 12 | 14 |
1000 | 2/27/2021 | 7 | 9 | 11 | 13 | 15 |
1000 | 2/28/2021 | 1 | 3 | 5 | 7 | 9 |
1000 | 3/1/2021 | 2 | 4 | 6 | 8 | 10 |
1000 | 3/2/2021 | 3 | 5 | 7 | 9 | 11 |
1000 | 3/3/2021 | 4 | 6 | 8 | 10 | 12 |
1000 | 3/4/2021 | 5 | 7 | 9 | 11 | 13 |
1000 | 3/5/2021 | 6 | 8 | 10 | 12 | 14 |
1000 | 3/6/2021 | 7 | 9 | 11 | 13 | 15 |
Any help will be greatly appreciated, thanks in advance!
https://stackoverflow.com/questions/66863672/forecasting-based-on-previous-data-values-and-repeating-that-each-week-in-r March 30, 2021 at 09:31AM
没有评论:
发表评论