<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abhik Chowdhury on Medium]]></title>
        <description><![CDATA[Stories by Abhik Chowdhury on Medium]]></description>
        <link>https://medium.com/@abhik.ch6?source=rss-2a751886159e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4UxX7oePsa1EYwl7vWJijw.jpeg</url>
            <title>Stories by Abhik Chowdhury on Medium</title>
            <link>https://medium.com/@abhik.ch6?source=rss-2a751886159e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:29:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhik.ch6/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Limits of Scientific Thinking Discussion Notes]]></title>
            <link>https://medium.com/@abhik.ch6/limits-of-scientific-thinking-discussion-notes-315787f018ef?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/315787f018ef</guid>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 05:09:34 GMT</pubDate>
            <atom:updated>2026-06-07T05:09:34.794Z</atom:updated>
            <content:encoded><![CDATA[<p>The first Saturday of every month, the local Humanist center has a fun group discussion. This month’s topic was the “limits of scientific thinking.” I had a grand ol’ time hearing everyone’s thoughts, and I wanted to write up some of my favorite aspects of the conversation while it’s on my mind.</p><p>One of the things we talked about was the limitations of what I think of as “greedy science”: only pursuing the current best model that fits the existing data collected. Heliocentrism is a classic example of the utility of pursuing an alternative theory, even if current data doesn’t favor it. Pursuing alternative theories can motivate the collection of data that could falsify existing models.</p><p>On the predictive capacity of science, one of my friends mentioned how chaotic systems are fundamentally challenging to predict over long enough time horizons. These systems need precise initial conditions to predict, and I wanted to add that I don’t believe the exact classical initial conditions required for indefinite prediction exist in the first place, because quantum indeterminacy seems to be a real aspect of the world. A similar problem that was mentioned was that, with our current understanding of physics, we’ll never be able to see what’s beyond the observable universe.</p><p>Now the parts that I’m opinionated about. A friend mentioned that there might be limitations to what the human brain as a system is capable of understanding. They were saying something factual and reasonable, but it hits me in the feels since there are too many brain science doomers I hear saying things like “how could the brain understand itself” as if that’s real logic founded on reasonable assumptions.</p><p>My thoughts today were based around two ways we use the word understand. On one hand, we understand nothing. When we ask why some physical phenomenon happens, if we ask why a few times we get to the point where we have to say “it’s just math that we made up to describe this process” without a deeper reason. On the other hand, though, we seem to be able to understand arbitrarily complex physical processes through abstraction. ”Understand” in this context means that we can model the behavior of a system as a whole and use that model for something. In the latter sense of the word understand, we can definitely understand the brain.</p><p>I thankfully also get to mark myself safe from having to hear about “the hard problem of consciousness.” Even better, the only mention of qualia was my friend mentioning that, when it comes to our subjective experience of things like color, we actually do have a lot of science around how that experience is physically constructed and manifests. I am interested in seeing when our physical understanding of the brain will make the “hard problem of consciousness” seem ridiculous by default in culture. I imagine we’ll hold on to our specialness for as long as we can.</p><p>A friend also said something I agree with, though I had a caveat I didn’t hear them mention. The classic is/ought problem is that we can describe what is, but from what is we cannot derive universal moral facts on what we ought to do. In that context, he mentioned that advancements in consciousness studies could help us understand how we as humans perceive moral situations. While I agree with this statement, to me consciousness studies doesn’t solve the moral grounding problem, and wouldn’t enable us to make statements like “their brain works like this, so they ought to do that.”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=315787f018ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Towards Having More Egalitarian Relationships]]></title>
            <link>https://medium.com/@abhik.ch6/towards-having-more-egalitarian-relationships-1ab941dbf2bd?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ab941dbf2bd</guid>
            <category><![CDATA[relationships]]></category>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Mon, 02 Feb 2026 23:01:18 GMT</pubDate>
            <atom:updated>2026-02-06T01:27:26.079Z</atom:updated>
            <content:encoded><![CDATA[<p>A few years ago I started being a lot more intentional about how I as an individual like to structure my romantic relationships. I like nerding out going to discussion groups where we all talk about our experiences and strategies to have our most fulfilling relationships. A concept I hear a good number of people value is Relationship Anarchy (RA), and as kinda a normie I’ve always had a tough time understanding what it was.</p><p>But while I’ve been getting to make food for Food Not Bombs, I read a little bit of The Anarchist Cookbook, by Keith McHenry with Chaz Bufe, and pages 1–5 are a great “what Anarchism is and what Anarchism isn’t” section. One sentence on some core anarchist values made some things click for me about RA.</p><p>“But most anarchists use the term “anarchism” in a much broader sense, defining it as the rejection of coercion and domination in all forms.” (p. 3)</p><p>With the lens of minimizing coercion and domination in relationships, I can better see how some of my relationship preferences line up with RA, and how it can help some of problems that can come up while having more than one relationship.</p><p>The first set of problems that came to mind were when a relationship is in a position to dominate another relationship.</p><p>American Culture has produced a fantastic tool to illustrate situations like this. I heard there was a reality TV show called “Couple to Throuple” that uses hierarchy of relationships as a source of the drama required by these kinds of shows. I personally don’t have the mental fortitude to watch reality TV, but a few of my friends had tanked the psychic damage and told me a bit about what happens in it.</p><p>The premise is that couples trial adding various “thirds” from a selection of people.</p><p>This setup places the relationships contained in the “couple” in a hierarchy that dominates the relationships involved with the “third.” A visceral example of this is that the couples have the choice if they would like to “stay with their third” or “switch thirds” and the third doesn’t really have autonomy in any of their relationships.</p><p>Adults can enter into whatever consenting relationships they would like, but for my relationships, to the extent that I am involved, I like the idea that to the greatest extent possible, each dyad (relationship between two people) gets the respect and independence it deserves, whether that relationship is platonic, romantic, or any other kind.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ab941dbf2bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning About Invertebrates and Food]]></title>
            <link>https://medium.com/@abhik.ch6/learning-about-invertebrates-and-food-b0c2000305ee?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0c2000305ee</guid>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[vegan]]></category>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[food]]></category>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Sat, 17 Jan 2026 20:39:22 GMT</pubDate>
            <atom:updated>2026-01-17T20:39:22.998Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been having a bunch of fun learning how to cook. As someone with a small stomach practice was hard to come by, but I’ve been bringing food to Food Not Bombs and it’s let me cook so much more and not have to worry about wasting it, what a good time. I’m not vegan (yet), but it’s for sure more morally aligned with my worldview. Food Not Bombs is a vegan org though and it’s been even more lit practicing the recipes with the ingredients that I’ll be using when I’m better at the whole food thing. (not just eating canned soup, and bag salad XD)</p><p>Getting more into vegan culture I found out that honey isn’t vegan, this made me feel things.</p><ol><li>Awesome, although there isn’t any regulations for the treatment of invertebrates in academic research, I think it’s important to care about invertebrates.</li><li>Culturally amongst people who eat non-human animal meat there are genuine moral distinctions about which animals are ok to eat, based on factors I disagree with. I was upset since it seemed to fit a narrative that “Bees are ecologically useful and cute (which they are) so their lives matter more than other invertebrates.”</li></ol><p>I went to look for evidence of this hypocrisy, and was pleasantly surprised that invertebrate products of all kinds are generally seen as nonvegan. Another thing I was pleasantly surprised by was that there were only 2 common food products made from invertebrates that I didn’t know about.</p><p>Carmine (also listed as cochineal extract, natural red 4, crimson lake, E120, Carminic Acid, etc.)</p><ul><li>I had never heard of this one but apparently it is the red food coloring in a bunch of products like Nerds, fruit juices, energy drinks, and the sort.</li><li>It’s made by grinding up some cute little bugs that live on cacti, and has been used in the Americas as early as 700 BC.</li></ul><p>Shellac (also listed as confectioners glaze)</p><ul><li>Common in older furniture finishes, I did not know that it is sprayed on citrus, and used in candies like junior mints, jelly beans, candy corn and whoppers.</li><li>Lac bugs secrete resin to make their house, they are taken off the tree, ground up, and the resin is extracted. Most comes from India where it’s been made for 3000 years.</li></ul><p>I still don’t fully grasp a lot of vegan culture, I’m having trouble understanding about the moral distinction made between a direct artificial hive product like honey, and the products only possible to be produced with the use artificial hives like almonds. Also using worms to generate compost seems kinda messed up to me. There is definitely more fun philosophy to get in on with the topic!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0c2000305ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting a 500x reduction in video file size for my in-home activity recognition]]></title>
            <link>https://medium.com/@abhik.ch6/getting-a-500x-reduction-in-video-file-size-for-my-in-home-activity-recognition-4ff897840236?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ff897840236</guid>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 19:26:56 GMT</pubDate>
            <atom:updated>2024-12-11T19:27:55.896Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes, when I’m analyzing some of my data streams, like heart rate or sleep data, I see something weird, and I’m like, “What was I even doing then?”. So, the latest data stream I’ve added is cameras around the house, so I could see into the past. I’ve tried this before, but it produced so much data I couldn’t justify the regular hard drive purchases it would take to keep running. This time around, I made some simplifications and used a few tricks to reduce the amount of hard drive space by more than 500x. We’ll go over some of the software stuff in later blogs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsFFpvQJhXPZn3HTua_03g.jpeg" /><figcaption>My old cameras ❤ (ignore any documents in the bacground XD)</figcaption></figure><p>Here’s a summary of the changes from the baseline 24/7 30fps @ 1080p video capture from 10 cameras</p><ul><li>10 fps when there is someone — 3x frame reduction</li><li>.07 fps when there isn’t anyone — 450x frame reduction</li><li>all at 480p — 6.75x pixel reduction</li><li>adding cameras with intention — 5x fewer cameras</li><li>keeping fields of view mutually exclusive — (1 + (n-1)*449/450)x frame reduction, n is the number of cameras</li></ul><h3>Choosing the recording speed</h3><p>Every 15 seconds, the camera will look for a person, and if it sees someone, it will make sure that the 15 seconds before and after the person was seen is saved at 10 fps. I wanted the minimum FPS possible for basic behavior analysis and thought if needed, I could upscale the video.</p><p>Although some papers like <a href="https://arxiv.org/abs/2203.15427">this one</a> do frame interpolation with framerates as low as 8 fps, but 100ms per capture is a nicer rounder number than 125ms. I think it will help me capture blinks as well, which supposedly aren’t normally faster than 100ms.</p><p>Also, playing back at 30fps is a 3x speed-up, which is more engaging to watch. Also also, slowing the frame capture to every 100ms made the software and data analysis easier, but I’ll cover that in a later blog. If I ever deploy to really struggling hardware, maybe I’ll lower the frame rate to 8fps.</p><h3>Choosing the timelapse speed</h3><p>Even when no one is seen in the frame, I wanted to keep a timelapse between me sightings so that, in case the person recognition model misses me, there’ll still be some record. Plus, it makes the overall video nicer to watch with no jumps, and a 4-frame-per-minute timelapse is pretty fun for looking at shadows move. It could also be used to visually track changes caused by home automation. The additional timelapse frames don’t produce much data; even if I’m not home all day, it would just be a bit over 3 minutes of additional video.</p><h3>480p vs 1080p</h3><p>Honestly, this is the frame size opencv and the Yolo model I’m using defaulted to, and it looks good visually. If I ever do optical tracker based localization, maybe I’ll increase it.</p><h3>Adding cameras with intention</h3><p>In my old setup, I did a lot of work to put up 10 cameras all over my house, which were looking at places I barely ever was. Now, I’m balancing the effort of putting a camera somewhere with the usefulness of the camera to my immediate next step of analysis.</p><p>I settled on two cameras covering two locations for now. one in my bedroom, where I spend most of my time, and one in my bathroom, with many easy and useful activities to track. Also, both of these spots are controlled spaces where I don’t need to worry about other people in the frame, making the software a lot easier. I also have easy sliding lens covers when people are over.</p><p>The next camera I add will be a portable one to record myself in various controlled spaces like in the car, a better view over my bed, or at my desk in the lab.</p><p>After that, I’ll tackle semi-controlled space with useful activities like the kitchen, but I’ll want to update the software to do individual recognition and autodelete frames with people who aren’t me.</p><h3>Keeping fields of view exclusive</h3><p>Before, I also went down a rabbit hole to capture the best angles for every little activity. I am also currently actively resisting the urge to do full 3D pose estimation and global localization. Since my next goal is to prototype some data structures for person-centered actions, I only need to be able to visually observe some high-level actions so overlapping cameras can wait.</p><h3>Moving forward</h3><p>Now that I can store a year’s worth of video data in a space smaller than what used to be one day, it opens up a bunch of possibilities, like upping the number of cameras and resolution for different applications, uploading for cloud-based GPU processing, and even sharing data over the internet with other people.</p><p>In the next blog, I’ll talk about the code I wrote to get this video!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ff897840236" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Parsing Fitbit HR from Google Takeout]]></title>
            <link>https://medium.com/@abhik.ch6/parsing-fitbit-hr-from-google-takeout-9d9e98ce6aee?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d9e98ce6aee</guid>
            <category><![CDATA[wearables]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Wed, 25 Sep 2024 15:02:07 GMT</pubDate>
            <atom:updated>2024-09-25T15:02:07.446Z</atom:updated>
            <content:encoded><![CDATA[<h4>Exporting the data from Fitbit (Google)</h4><p>To export your data go into the Fitbit app, click on your profile picture in the top left corner, and click the “ your Fitbit data option”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrRMfSGL_cp3pjyzdz1Sjg.png" /></figure><p>That will take you to the Google takeout page, just a Fitbit export will be preselected, and so will doing just one export to your email. After requesting the export it took 5 hours for the link to be sent to me, but this time varies.</p><h4>Parsing The Data</h4><pre>exportFilePath = &quot;fitbit/17-9-24/takeout-20240917T195619Z-001/Takeout/Fitbit/Global Export Data/&quot;<br>dir_list = os.listdir(exportFilePath)<br><br># the file names are like heart_rate-2021-08-10.json<br>hrFilenames = [x for x in dir_list if x.split(&quot;-&quot;)[0] == &quot;heart_rate&quot;]</pre><p>After clicking on the download link you’ll get a zip file in the format “takeout-&lt;timestamp&gt;”, To find your heart rate files, unzip it and go to Takeout &gt;&gt; Fitbit &gt;&gt; Global Export Data. In that folder there’ll be JSON files for all kinds of sensors, but we want the ones that start with “heart_rate” in the format “heart_rate-&lt;YYYY&gt;-&lt;MM&gt;-&lt;DD&gt;.json”</p><pre>[{<br>  &quot;dateTime&quot; : &quot;03/29/21 07:00:01&quot;,<br>  &quot;value&quot; : {<br>    &quot;bpm&quot; : 76,<br>    &quot;confidence&quot; : 3<br>  }<br>}, ...]</pre><p>The files are a list of objects that look like the one above. I believe the datetimes are in UTC, and it looks like the files are saved based on the local day so mine starts at 7am as I am in the -7 timezone. The range of the confidence values is 0–3, it would be interesting to see how those numbers relate to the values agreement to other more accurate sensors like the Polar H10.</p><pre>import json<br>import pytz<br>from datetime import datetime<br>#converts from the datetime format stored in fitbit to iso<br>def to_iso(s):<br>    return &#39;20&#39; + s[6:8] + &#39;-&#39; + s[0:2] + &#39;-&#39; + s[3:5] + s[8:]<br><br>samplesCount = 0<br>samplesList = []<br>for fn in hrFilenames:<br>    data = json.load(open(exportFilePath + fn))<br>    for row in data:<br>        sampleDT = datetime.fromisoformat(to_iso(row[&quot;dateTime&quot;]))<br>        samplesList.append([sampleDT, <br>                            row[&quot;value&quot;][&quot;confidence&quot;], <br>                            row[&quot;value&quot;][&quot;bpm&quot;]])<br>        samplesCount += 1<br>        if samplesCount % 1_000_000 == 0:<br>            print(f&quot;added {samplesCount} samples so far&quot;)<br>print(f&quot;added {samplesCount} samples&quot;)</pre><p>This function goes through every entry in every file and makes a list to lists of the samples datetime, confidence, and value. Fun fact I got at 50x speedup in parsing the files by using the datetime.fromisoformat() function instead of the pd.to_datetime() function. It took my 16 million samples from 40 minutes to process, to under a minute.</p><h4>Making The Table</h4><pre>import pandas as pd<br><br>columnNames = [&quot;sampleDT&quot;, &quot;confidence&quot;, &quot;value&quot;]<br>samplesList = sorted(samplesList, key=lambda x: x[0]) #sort by timestamp<br><br>fitbitHRdf = pd.DataFrame(data=samplesList, columns=columnNames)<br>fitbitHRdf = fitbitHRdf.set_index(&quot;sampleDT&quot;)<br>fitbitHRdf.index = fitbitHRdf.index.tz_localize(&#39;UTC&#39;)<br><br>fitbitHRdf.index = fitbitHRdf.index.tz_convert(&quot;US/Arizona&quot;)<br><br>fitbitHRdf[&quot;confidence&quot;] = fitbitHRdf[&quot;confidence&quot;].astype(&#39;uint8&#39;)<br>fitbitHRdf[&quot;value&quot;] = fitbitHRdf[&quot;value&quot;].astype(&#39;uint8&#39;)</pre><p>When I made my dataframe I sorted the list to make sure everything was in order (only takes like 2 seconds). Then I made my DataFrame, set the sampleDT as the index, and then did my timezone localizations since it’s a lot faster than localizing each one while parsing.</p><p>Now you have all your Fitbit heart rate data parsed and in a DataFrame! I save mine in to multiple parquet files, so I don’t have to put new big 80+ MB files in my version history every time I update my data. Each one is 5MB and I put them together when I load them into other notebooks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d9e98ce6aee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Heart Rate Data from my Apple Watch]]></title>
            <link>https://medium.com/@abhik.ch6/exploring-heart-rate-data-from-my-apple-watch-59a6ad52a78f?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/59a6ad52a78f</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[health]]></category>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 15:51:01 GMT</pubDate>
            <atom:updated>2024-07-19T15:51:01.945Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last post, we looked at how to download your Apple Health Data and we formatted it into a table for analysis. In this blog, We’ll do a bit of exploration</p><h3>Exploring the data</h3><p>Yep, that’s heart rate all right. Here is a distribution of all of the heart rate values in the dataset. This isn’t that interesting since we don’t know how long each one was for because the heart rate measurements are reported dynamically. the thick tail is probably due to workouts I have been doing recently during which the heart rate sampling is much higher.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*syGxjFauf2EPfyJ0fz_qhw.png" /></figure><p>Looking at the Intervals between readings</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*xlQ2ZU2EkG4_dN7sZEhQSg.png" /></figure><p>It looks like there were a few times when I didn’t wear my Apple watch for a week or two and a little bump around 40,000 seconds which is about 12 hours, maybe when I forget to charge it. Let’s see if we can eyeball a cutoff for pretty nominal refresh rates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*YC93RKecdypTPiBg6Szs8w.png" /></figure><p>If we just show the intervals less than 11 minutes long we see a steep drop off around 10 minutes. Let’s make an arbitrary cutoff there for now and later analyze how long the continuous sets it creates are.</p><p>Removing the log scale reveals how many more samples are in the fast interval section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*FDJcPCTrt89lPQurhd8ejQ.png" /></figure><p>It looks like there is a large drop off in the number of samples with more than 9 seconds between them so let’s separate these low interval samples that are between 1–9 seconds with a large peak at 5 seconds and another at 9 seconds</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*wOUyDM2__JEi20s9EN8b4Q.png" /></figure><p>The medium interval range then is 11–600 Seconds giving us this graph of intervals with a peak at 1 minute and a peak at 5 minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*sRhRiqpW-egKpnLr_Snkmw.png" /></figure><h3>Heart Rate in Those Intervals</h3><p>The mean of the heart rate distributions in both categories looks different, with the low interval data points being skewed towards higher heart rates, maybe because of those being during workouts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*-xEy-WPSPNenqo17q9fvtw.png" /></figure><p>For numbers people here are the descriptions of the two datasets:</p><p>The Description of the Medium Interval Points</p><ul><li>count 227624.000000</li><li>mean 70.504512</li><li>std 13.705998</li><li>min 40.000000</li><li>25% 60.000000</li><li>50% 69.000000</li><li>75% 78.000000</li><li>max 191.000000</li></ul><p>The Description of the Low Interval Points</p><ul><li>count 109027.000000</li><li>mean 101.174488</li><li>std 25.113690</li><li>min 42.000000</li><li>25% 85.000000</li><li>50% 95.000000</li><li>75% 108.000000</li><li>max 198.000000</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59a6ad52a78f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Parsing Heart Rate from Apple Health Kit]]></title>
            <link>https://medium.com/@abhik.ch6/parsing-heart-rate-from-apple-health-kit-d54754c75b77?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d54754c75b77</guid>
            <category><![CDATA[health]]></category>
            <category><![CDATA[wearables]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Thu, 18 Jul 2024 21:32:25 GMT</pubDate>
            <atom:updated>2024-07-18T21:32:25.070Z</atom:updated>
            <content:encoded><![CDATA[<h3>Exporting the data from Apple</h3><p>It was really easy and quick to get the data realiteve to other platforms like fitbit and especially WHOOP. I went into the health app on my iPhone, clicked on my profile icon, scrolled to the bottom, clicked on export my data, and emailed it to myself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CoPCR5L1NK2orj2W31_6kw.png" /></figure><p>After unzipping the file you will find one file named export with one file name apple_health_export in it. For now, let’s just look at the export.xml file.</p><figure><img alt="An Image of the extracted export files in a file explorer" src="https://cdn-images-1.medium.com/max/436/1*6Eb6fdHSElL6OnOW-zje1Q.png" /></figure><p>There are a bunch of types of records in there but for heart rate we’ll be looking for ones with type=”HKQuantityTypeIdentifierHeartRate”</p><h3>Building the Table</h3><p>Each of the records has a lot of fields so we’ll go through and only take the ones we want for now.</p><pre>{&#39;type&#39;: &#39;HKQuantityTypeIdentifierHeartRate&#39;, <br> &#39;sourceName&#39;: &#39;Abhik’s Apple\\xa0Watch&#39;, <br> &#39;sourceVersion&#39;: &#39;7.6&#39;, <br> &#39;device&#39;: &#39;&lt;&lt;HKDevice: 0x999999999&gt;, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch6,1, software:7.6&gt;&#39;, <br> &#39;unit&#39;: &#39;count/min&#39;, <br> &#39;creationDate&#39;: &#39;2021-07-19 19:55:07 -0700&#39;, <br> &#39;startDate&#39;: &#39;2021-07-19 19:55:06 -0700&#39;, <br> &#39;endDate&#39;: &#39;2021-07-19 19:55:06 -0700&#39;, <br> &#39;value&#39;: &#39;78&#39;}</pre><ul><li>startDate and endDate seem to be the same so I’ll just call them sampleDT. (A note on dates, my favorite way to store date times is with local timezone offsets so they don’t have to be dynamically added in)</li><li>There is a separate creationDate argument that I don’t know how it’s generated and would like to investigate so let’s keep that.</li><li>For the timeframe of this analysis my Apple watch 6 has gone from software versions 7.6 to 10.4, I think it would be interesting to see if there are differences between software versions so I’ll keep that column too.</li><li>Also the column called hardware that describes the model of Apple Watch.</li><li>And of course we’ll add the value of the heart rate</li></ul><p>For the final table, we’ll have sampleDT, hardware, software, creationDate, value</p><p>Now let’s write some code to convert from the export.xml to a file called AppleWatchHR.csv. (and a bonus line on reading from the csv)</p><pre>import pandas as pd<br>import xml.etree.ElementTree as ET <br><br>xmlFileName = &quot;export.xml&quot;<br>tree = ET.parse(xmlFileName)<br>root = tree.getroot() <br>numRecords = 0<br>listRecords = []<br><br>def getAppleWatchInfo(record):<br>    # check if the type of record is right<br>    if (record[&quot;type&quot;] == &quot;HKQuantityTypeIdentifierHeartRate&quot;):<br><br>        # parse the device to a dictonary to make sure we have it right<br>        # raw text of record[&quot;device&quot;] should look like this <br>        # &#39;&lt;&lt;HKDevice: 0x999999999&gt;, name:Apple Watch, manufacturer:&#39; +<br>        # &#39;Apple Inc., model:Watch, hardware:Watch6,1, software:7.6&gt;&#39;<br>        device = {x.split(&quot;:&quot;)[0].strip() : x.split(&quot;:&quot;)[1] <br>                  for x in record[&quot;device&quot;].split(&quot;,&quot;)<br>                  if len(x.split(&quot;:&quot;)) == 2}<br><br>        if(device[&quot;manufacturer&quot;] == &quot;Apple Inc.&quot; and<br>           device[&quot;model&quot;] == &quot;Watch&quot;):<br>           return device<br>    <br>    return None<br><br><br># for every element tagged Record<br>for r in root.findall(&quot;./Record&quot;):<br>    # the data is in the attributes <br>    record = r.attrib<br>    device = getAppleWatchInfo(record)<br>    if device is not None:<br>        numRecords += 1<br>        if numRecords % 100_000 == 0: print(numRecords)<br>        <br>        row = [pd.to_datetime(record[&quot;startDate&quot;]),<br>               device[&quot;hardware&quot;], <br>               device[&quot;software&quot;][:-1], # removes a hanging &#39;&gt;&#39;<br>               pd.to_datetime(record[&quot;creationDate&quot;]), <br>               float(record[&quot;value&quot;])]<br><br>        listRecords.append(row)<br><br><br>ColumnNames = [&quot;sampleDT&quot;, &quot;hardware&quot;, &quot;software&quot;, &quot;creationDate&quot;, &quot;value&quot;]<br><br>AppleWatchHRDf = pd.DataFrame(columns=ColumnNames, data=listRecords)<br><br>AppleWatchHRDf = AppleWatchHRDf.set_index(&quot;sampleDT&quot;)<br><br>AppleWatchHRDf.to_csv(&quot;AppleWatchHR.csv&quot;)<br><br>AppleWatchHRDf = pd.read_csv(csvFileName, <br>                             index_col=&quot;sampleDT&quot;, <br>                             parse_dates=[&quot;sampleDT&quot;, &quot;creationDate&quot;])</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d54754c75b77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On the realness of simulated minds]]></title>
            <link>https://medium.com/@abhik.ch6/on-the-realness-of-simulated-minds-90b71a0631cb?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/90b71a0631cb</guid>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Sun, 11 Feb 2024 05:35:09 GMT</pubDate>
            <atom:updated>2024-02-11T05:35:09.264Z</atom:updated>
            <content:encoded><![CDATA[<p>After ASSC 25 there was a workshop on AI consciousness and after one of the talks someone asked “when we simulate a black hole, we know that we aren’t making a real black hole, so why is it that when we say we’ll simulate a mind, why do we believe it will be a real mind” and it seems to come up a lot.</p><p>To me the answer is that the simulated black hole *is* real to other entities in the simulation, and a simulated mind would be real to themselves and would have real experiences about other things in the simulation.</p><p>Kind of like how we are pretty sure we are having an experience and are definitely worthy of moral consideration, even though we can’t be sure we’re not in a simulation ourselves.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90b71a0631cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hi!]]></title>
            <link>https://medium.com/@abhik.ch6/hi-2cced5ab9f7f?source=rss-2a751886159e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cced5ab9f7f</guid>
            <dc:creator><![CDATA[Abhik Chowdhury]]></dc:creator>
            <pubDate>Sun, 11 Feb 2024 05:26:44 GMT</pubDate>
            <atom:updated>2024-02-11T05:26:44.965Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ll be posting half finished thoughts that should be relatively tame here. Nothing very well researched, presented, or against popular taste, at least initially.</p><p>Some initial topics would probably cover ethics regarding the wellbeing of artificially constructed agents and surrounding topics. There might also be some technology and research topics that come up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cced5ab9f7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>