It will be tempting to watch the dashboard in the first day or two but after a couple of days of data collection, we can start to see a bigger picture of Cujo's movement patterns. Make sure to distinguish the data recorded from the setup and calibration as opposed to the data from when the sensor was all set up and you walked away.
And it worked! Look at that wonderful turtle data! What does it mean? A couple of days is neat and all but how about waiting a whole week? You can stop here but going further into this bonus section will unlock some great turtle mysteries. Slow and steady wins the race...
Bonus section: use Google Sheets to analyze a week of turtle data
Ok, it's been a week. Suppose we'd like to see more than just the times that Cujo moved? Let's inquire about:
- What times of the day did Cujo move the most?
- What days did Cujo move more than other days?
These questions may give us more insight into her movement patterns than the simple line chart.
We can export the data from Adafruit.io and import it into Google Sheets to do some analysis and answer these questions.
- Go to your feeds and select the "Motion sensor activated" feed we set up earlier.
- Click the "Download All Data" button
- Click "Download as CSV"
- Next hit "click to refresh"
- Now click "Link" to download the file.
- Go to https://drive.google.com/
- You may have to create a free Gmail account if you don't already have one.
- Create a new Google Sheets document and name it
- Go to File > Import
- Upload the CSV file we just downloaded from Adafruit.io
- Select the file
- Choose the option "Append to current sheet" for the import location.
- Hit import data.
- Watch as the turtle data floods your spreadsheet. Huzzah!
Separating the day and time into separate columns
You may notice the time stamp for each data point includes both day and time. To analyze the data in the way that we'd like, it will be helpful to have separate columns for the day and the time. The day column will come in handy when we want to analyze which days Cujo moved the most. We don't so much care for the times she moved in this data set. The same goes for when we want to analyze which times of the day Cujo moved the most (we don't care which day it was).
- Click on column d to highlight the entire date/time column.
- In the toolbar go to Data > Split text to columns
- Now the time/date data is split into 3 columns: date, time, and time zone. (Time zone is not important for this project)
For this data visualization, let's split the day up into 4 equal parts (in military time)
- 00:00 - 05:59
- 06:00 - 11:59
- 12:00 - 17:59
- 18:00 - 23:59
- In a new column called "time portion" manually fill out 4 rows with each of these time segments.
- The next column should be called "times moved"
- Now enter this formula into the cell next to
00:00 - 05:59
:=countifs(E2:E758,">= 0:00:00", E2:E758, "<= 05:59:59")/2
- This formula counts the times in column E that are between
00:00 - 05:59
then divides the resulting value by 2 (to remove the times that the sensor reset to the still state) - Replace
E758
with the location of the last cell in this column for you. - Now continue this process for the other three cells.
Pie time
Now that we know how many times Cujo moved during the 4 parts of the day, let's make a pie chart!
- Now highlight both columns we just created.
- In the toolbar, click insert > chart
- Select one of the pie chart options (I like the 3D one)
- The pie should fill with the selected data.
- Feel free to add a title and rename any labels.
- I decided to rename column G with each time frame's colloquial name for easier reference on the chart (morning, night etc.)
That's one pretty pie!
You can adjust the font and text settings in the graph editor.
Following the same method as above, we can create a bar graph to show the days that Cujo moved the most.
The formula used is slightly differnt this time:
=countifs(D2:D758,"2021-09-29") / 2
This spits out the number of times Cujo moved on the specified day
For each cell, replace 2021-09-29
with the day you'd like to collect data for.
Chart it up with a bar graph and badda bing!
Takeaways
What patterns did you notice?
- Cujo liked to dance at night and sleep in the day.
- She had a busy week to start, then got quite relaxed.
- After feeding her, she seemed to calm down quite a bit.
You can recreate this project for your own pet(s). Some ideas include:
- Birds
- Reptiles
- Hampsters and gerbils
- Guinea pigs
- Dogs: could put a sensor in the kennel or crate if they sleep in there.
Good luck uncovering something you didn't expect to discover about your pet with the power of WipperSnapper!
Text editor powered by tinymce.