Merging the 30-second sampling rate epochs into 30 minutes sampling epochs in the Excel File - excel-formula

I am a PhD student in Sport Science. In my excel file, there were five columns (Date, Time, ExactTime (computed by me using excel function), Activity Level) as shown in the attached photo. As you can see, in the "ExactTime" column, each row indicates the activity level at the 30-second intervals. However, my PhD supervisor would like to have a excel file containing the average activity level at each 30-minute interval, rather than the default 30-second interval. For instance, the first row becomes 09-08-2021 12:12:00 (in the first column) and the average activity level from 09-08-2021 11:42:00 to 12:12:00. Grateful if I could have some step-by-step guidelines on how to do it! Many thanks! The link to my data file is attached.(https://drive.google.com/drive/folders/1roIDdcxGwsq9l630YR0gapQ_yM9hvf0g?usp=sharing)
enter image description here
To have a excel file containing the average activity level at each 30-minute interval, rather than the default 30-second interval.

Related

Split range of times into 5 mins intervals in Excel

I'm new to programming and data analysis in general, and need some help with a large dataset file (43 GB). It is a list of High Frequency trades fro a stock containing two columns I'm intrested in: Time (in UTC format including milliseconds, e.g. 2019-01-01T00:06:41.033529796Z) and price. I have managed to open the file using delimiter software and split it into 509 files which would fit in an excel sheet.
I now need to compare the price change during 5 minute intervals based on the prices in this file.
My first problem is that Excel doesnt the approriate time format for interpretation.
Secondly, I need to understand perhaps using the =FLOOR formula, to split the lsit of trade times into 5 mins intervals and find the difference in corespongin prices.
I have tried making excel recognise the UTC format with no success. Any help would be appreciated!

How to update parameter value from excel file on each simulation day in Anylogic

I am working on a model in which I have a parameter called supply. This parameter should change on a daily basis as I have a different supply amount of raw materials each day. I am using an excel file containing a column called supply and 10 rows (supply values for 10 days).
My question is how can I use this excel file as input and have the model read the first row on day one, 2nd row on day 2, etc? Updating the parameter on each simulation day.
I am using the Anylogic personal learning edition.
Loop across all dbase entries at the start of the model (using the database query wizard, choose option "iterate over returned rows and do something").
for each row, compute the duration from model start to what the row represents
for each row, create a Dynamic Event (on Main or wherever) using create_MyDynamicEvent(x, HOUR) where x is the duration from point 2 above, in hrs. Give it an argument quantity and provide the current row's value
in the Dynamic Event, you change your parameter with the value provided, i.e. set_myParam(value)
You can also use a schedule or a source to do this, but the approach would be quite different.

Use excel to calcluate average and stdev of time differences in a time series?

EDIT1: download file with 2 days of real data
My home automation controller collects data from several 4-in-1 motion sensors in different rooms of my house. The sensor prioritizes motion, sending motion reports every few seconds, but also independently reports temperature, humidity, and illuminance. I am trying to determine if the temp and humidity reports are sent frequently enough to automate control of heaters and exhaust fans.
Sensors independently report each category to the controller, which sends data to excel. Sample data below, but without motion reports that clutter up the real data.
A pivot table generated from the raw data:
Answering the question of frequency takes me several manual steps. Sorting/filtering the dataset for temp/humidity by room, then manually adding a time diff column
where time diff = (<current Date-Time cell> - <prev Date-Time cell>)*24*60. I then calculate the average and stdev of minutes between reports by manually selecting, in turn, each room/category subset in the time diff column; once for the average and once for the stdev.
After a few more manual steps, I end up with this desired result:
BUT I have to do it all over every time new data is added to the table. I'm certain excel can do this automatically, but I didn't find a solution through pivots, power pivots, slicing, or queries. I'm hoping one of you excel gurus can help. Thanks!

Statistical functions on non-numerical value

I am not looking for any code or formula but a rationale/logic.
Background: My data set comes in Date/Time format where a new timestamp is created for each new occurrence of an event.
My goal is to calculate number of occurrences within each hour for a given day. Unfortunately, system does not capture number if occurrences per period as integers. So I have count the number of time an hour value appears within the hour i.e number of times 4 o'clock hour appears. I am currently using Pivot Table in Excel to count the number of times each hour appears. Fields in Rows are hour and dates, and field in Values is count of hour.
Trouble is that I cannot use any summarize functions to get stuff like sum, min, max, percentile, and standard deviation. For example, changing count to sum will only add up all hours. So sum of 4 o'clock hour will return 12 instead of 3. So I am having to use array formulas on pivot table to give me max and min etc.
If I was to use this data in data viz tools like Tableau or Power BI. I won't be able to get very far. I am looking for a suggestions/workaround that can allow me to manipulate my data in a way so it can be used in Pivot Tables in Excel and in data viz tools.
I know my questions is not specific to one tool but I am looking to enhance me understanding of data and data manipulations techniques.
EDIT: Please see attached image
Build a data model, using PowerPivot. Join your fact table to a calendar dimension table. Create a row count measure - you can then summarise that measure to suit (sum, average, min, etc)

Chart or in Excel From List of Timestamps

I have a program that writes the currenct time to excel when a process is called, so I have an excel file with one column of over 5000 timestamps in HH(24):MM:SS format. I'm trying to visualize these over a 24 hour period in order to find a time where the process is least likely to occur. Can anyone get me started?
Thanks
Simply selecting the data in your column and Insert > Charts – Scatter, Scatter with only Markers might suit. The closer the markers to one another (or the shallower the slope) should indicate the process has been called often in a short time interval. ie the quieter periods are when the slope is steep.
If not a very helpful visualisation then maybe count the number of starts over intervals of fixed length (create ‘bins’) and plot a histogram. “a time where the process is least likely to occur” implies that not only start time but duration may be relevant. In which case an an interval of approximately the average duration may be useful.
If you give Excel a column of timestamps in a format it understands, it can map them to a fraction representing how far into the day that timestamp is. For example, if you paste in "12:00:00" and then format that cell as a number, you will get 0.5. Likewise 06:00:00 to 0.25, etc. These numbers can then be plotted on a histogram by following these steps.
Caveat: Only confirmed this works in Excel 2013.

Resources