Problem with forecasting time series data - time

I have time series data about the birds migration. The birds migrated to some area in specific months in a year e.g. SEP, NOV, DEC, JAN, FEB, MAR. I want to use 'SARIMAX' model for forecasting. The model create problem because the data for the month MAY, JUN, JUL, AUG are missing in each year as give below.
can anybody help me in solving this problem??
Thanks

Related

How to do a period over period comparison in Amazon QuickSight?

I want to compare data from the current period (e.g current month) with the previous period (e.g. last month).
Let's say I have the following dataset:
date
orders
2020-01-01
1
2020-01-02
2
2020-01-03
5
2020-02-01
4
2020-02-02
2
And I want to get:
Jan 2020 Orders
Feb 2020 Orders
Delta Orders
8
6
-25%
Period can be selected by user.
the way I reached your desired outcome is by creating a calculated filed "MoM Change":
percentDifference(sum({ orders}), [date ASC], -1, [])
Also, this tutorial might be helpful: https://learnquicksight.workshop.aws/en/business-level-up.html
I was hoping to upvote the example above as it helped me solve this problem. I'm not yet to a reputation of 15 (how embarrassing) so I can't yet do that. But thank you #chrigu for the help.
In researching this, I found that QuickSight has extended this with a few similar functions. I used this one, which works with less parameters:
periodOverPeriodPercentDifference(measure, date, period, offset))
https://docs.aws.amazon.com/quicksight/latest/user/periodOverPeriodPercentDifference-function.html
There are several other variants for periodTo___ and periodOver___ to check out as well.

Problems with .resample('M')

I am using pandas & I have a dataframe with Date, Item#, Qty and 12 months of sales data. I want to do a std dev calc to understand the monthly variability for each Item#.
The problem is for many Item#'s the sales are sporadic: I may only sell Item XYZ in Feb and Mar, and zero the rest of the months of the year.
I am using this code to do the heavy lifting:
df.groupby('Item#').resample('M').sum()
For some Item#'s it is forcing zeros into the empty months (GOOD!), but in many cases it is just showing, say, two months of data, instead of 12, which then makes the std dev calculation incorrect.
Can someone help me understand why this behaviour of the .resample method? How can I workaround this problem?
Many thanks in advance for your help!

Rest the month and I keep giving the same month with Carbon

Until yesterday it worked perfectly showed me February and January, the two previous months but now it is showing me March and January:
This is the date of my computer recently:
This is the code:
I do not understand what is happening if some information is missing or they need something else I can provide it
When subtracting a month from the 29th of March, you would expect to get the 29th of February, which does not exist. So, PHP compensates this by counting the extra days. This way, the date becomes the 1st of march.
To avoid this problem, use the carbon constructor and instruct it to get the last month:
$lastMonth = new Carbon('first day of last month');

Need to sample-testing a calendar application against invalid dates

I am testing a calendar application, which allows a user to select day, month and year, but the problem is the developers have not implemented any form of date validations, which means every month can have up to 31 days.
The year dropdown menu has a range from 1900 to 2016,
the month dropdown menu has Jan, Feb ... Dec,
the day dropdown menu always has 1~31, regardless of which month I choose.
The testing strategy I am thinking of is:
choose one non-leap year and test against 29th Feb; expected to fail
choose one non-leap year and test against 31st April; expected to fail
choose one leap year and test against 29th Feb; expected to succeed
choose one leap year and test against 31st April; expected to fail
Four scenarios above should provide a good coverage regarding leap years and invalid dates.
What are your opinions? Am I missing anything?

How to create a series of dates in Cocoa for a week

I am current writing an application and need to show the current days of the week.
So, for the coming week I need to generate the follow dates.
Monday, 5 January 2009
Tuesday, 6 January 2009
Wednesday, 7 January 2009
Thursday, 8 January 2009
Friday, 9 January 2009
I have already coded the application to generate five dates from the current date. The problem I have is finding a method to create Monday through to Friday on the current week.
I am running OS X 10.5 and am using the Cocoa environment.
Look at NSCalendar and NSDateComponents.
If you haven't, you should read Dates and Times Programming Topics for Cocoa for more info/help.

Resources