I'm pretty new to Mathematica so excuse me for obvious questions. I have a dataset, second column contains invoice amount and the first column contains days passed between each invoice date starting at 0 (time data but not uniform spaced).
I'm trying to fit a polynomial function that best represents this data, apply a Fourier transform, and then plot the Fourier transform. I'm mainly aiming to catch weird invoice frequencies using the Fourier transform.
How would one go about this?
Any help would be appreciated.
Here is the full data: Full Data
I used this code from one of the users here to fit a simple sin curve
len = Subtract @@ data[[{-1, 1}, 1]];
funcfunc = Fit[data, Table[Sin[(π n)/len x], {n, 1, 50}], x];
Show[
ListPlot[data],
Plot[funcfunc, {x, 0, len}, PlotStyle -> {{Thick, Red}}]]`
Would an $n$th degree polynomial fit be better?
Assuming I go ahead with this code and the sin series fit how would I plot the Fourier transform of the fit?