# How to make smooth function from data [closed]

After some awesome tips from @qwerty I still have some doubts

As I said, I´d Like to make a smooth function with some other colors, I plot the graph, there is a lot of data. The situation is this: I have a Geiger counter, and the data file rate is made minute by minute. So I have 30505 minutes in total. And the smooth have to be by 60 minutes and 1440 minutes. In the end, the same plot should have the data minute by minute, 60 by 60 and 1440 by 1440. I could be able to do just minute by minute using this

 SetDirectory["D:\\Documents and Settings\\Física\\Desktop\\Pesquisa\\Dados_Chuva"];
data = Import["geiger_2015_06_30_ita.txt", "Table"];
ListLinePlot[data]
values = data[[;; , 2]];
ticks = data /. {x_, _} :>
StringInsert[StringTake[#, {7, 10}] &@ToString[x], ":", 3]
f = Interpolation[values];
n = Length[data];
Plot[f[x], {x, 1, n}, AxesOrigin -> {0, 0},
Ticks -> {Transpose[{Range[n], Rotate[#, -45 Degree] & /@ ticks}],
Automatic}, ImageSize -> 500]


I got that pic

I had an idea. Plot the data jumping 59 datas, so I would plot 1, 60, 120, 180,... for example, This is possible?

## closed as off-topic by m_goldberg, user9660, Jason B., bbgodfrey, rhermansJan 21 '16 at 14:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – m_goldberg, Community, Jason B., bbgodfrey, rhermans
If this question can be reworded to fit the rules in the help center, please edit the question.

• It´s data from a Geiger measure – dcvilela Jan 20 '16 at 1:43
• 150630102506 17.142857 150630102606 17.142857 150630102706 19.047619 150630102806 20.00 150630102906 15.238095 150630103006 27.619048 150630103106 20.00 150630103206 16.190476 150630103306 14.285714 150630103406 18.095238 150630103506 12.380952 150630103606 19.047619 150630103706 16.190476 150630103806 24.761905 150630103906 21.904762 150630104006 21.904762 150630104106 14.285714 150630104206 18.095238 150630104306 22.857143 150630104406 9.52381 – dcvilela Jan 20 '16 at 1:44
• Some data from file – dcvilela Jan 20 '16 at 1:46
• If you want to clarify your question, and I think it's a good idea, do it by editing your post, not by making comments. – m_goldberg Jan 20 '16 at 5:46
• Also, I have this question for you to address in an edit: what kind of smooth curve do you think is hidden it such ragged data? – m_goldberg Jan 20 '16 at 5:47

data={{150630102506,17.1429},
{150630102606,17.1429},
{150630102706,19.0476},
{150630102806,20.},
{150630102906,15.2381},
{150630103006,27.619},
{150630103106,20.},
{150630103206,16.1905},
{150630103306,14.2857},
{150630103406,18.0952},
{150630103506,12.381},
{150630103606,19.0476},
{150630103706,16.1905},
{150630103806,24.7619},
{150630103906,21.9048},
{150630104006,21.9048},
{150630104106,14.2857},
{150630104206,18.0952},
{150630104306,22.8571},
{150630104406,9.52381}}

values = data[[;; , 2]];
ticks = data /. {x_,_} :>
StringInsert[StringTake[#, {7,10}]&@ToString[x], ":",3]
f = Interpolation[values];
n = Length[data];
Plot[f[x], {x, 1, n}, AxesOrigin -> {0,0},
Ticks -> {Transpose[{Range[n], Rotate[#, -45 Degree]&/@ ticks}],Automatic}, ImageSize -> 500]


cf.

 data2 = data /. {x_,y_} :> {DateList[{StringInsert[ToString[x], "/",
1 + 2 Range[5]], {"YearShort", "Month", "Day", "Hour", "Minute", "Second"}}], y};

DateListPlot[data2]