0

Disclaimer : My data is time series. The all data roll I use is about 15 days. gathered once every 10 minutes. But my date format of data is something that I can't use in this project. Then I use the ID that was auto-created in my database as the x-axie and the value for the y-axie from my database to plot graph.

I tried make_interp_spline() and linspace() and it didn't work. Now I'm trying to use Gaussian but I have a problem with array-numpy(Some post advised to use numpy instead of dataframe).I think I can deal with it. However, after that, I don't know what to do next or how to use it. 

Example

id date time data
111261 1/1/2022 0:00:22 70.60
111262 1/1/2022 0:10:00 70.55
111263 1/1/2022 0:20:00 null
... ... ... ...
112847 1/15/2022 23:20:00 75.250
112848 1/15/2022 23:40:04 74.175
112849 1/15/2022 23:50:00 74.175

How I extract peak coordinate from my data after I smoothed with some method and plot out like this Graph Image after some smooth method and Peak coordinate that I want. I want to return that coordinate value for visualization data in my web.

How do I start from here?

Ask as a guideline in advance. If I can return coordinate value like (112847,75.250) . Wouldn't it be easier for me to store these data in a table for plot graph?(csv or new database table) like this

id data
111261 70.60
112847 75.250

after that when I plot my graph in my web then I plot these point(peak table) in that graph?

sorry about my grammar if it seem weird because some sentense I translate by google.

Deltaflag
  • 3
  • 1
  • 1
    the old classic question: what have you tried so far? – Lei Yang Mar 03 '22 at 06:01
  • I just try signal.argrelmax but it out in 1d array like array([ 4, 12, 21, 23, 26, 29, 31, 38, 41, 51, 62, 65, 69, 71, 74, 79, 84, 92, 104, 116, 121, 127, 141] and find_peaks but i don't know much about it . it can plot but i don't know how to return that value – Deltaflag Mar 03 '22 at 06:15
  • 1. what ploting library are you using 2.is there any built in interactive live mouse coordinate shown in the plotting? 3. what will you do with the peek coordinate? – Lei Yang Mar 03 '22 at 06:20
  • In this step I used matplotlib.pyplot But in the end it just needs python code that can find peaks from my data(csv) and extract those values(id and data) to plot peak dot on graph in php web. no interactive live mouse. – Deltaflag Mar 03 '22 at 06:32
  • if you just want find the peek of **data**, then python's built in `max` funciton is enough. if you mean some coordinate on the image, it surely is dependent of ploting library you use. – Lei Yang Mar 03 '22 at 06:38
  • Thanks. I'll try to find out more about this. If I find any problems, I will come back and comment. – Deltaflag Mar 03 '22 at 06:43

0 Answers0