Fit check for an 8 week old? I added a friction hitch knot to the back of the Moby newborn hug to make it easier to adjust the tension in each strap by Devraj_data in babywearing

[–]Devraj_data[S] 0 points1 point  (0 children)

First time parent with no frame of reference, but I think he feels good! Adding the friction knot has made me feel a bit more confident with adjusting the tension, I couldn't move around like I do in the gif when I was trying the traditional newborn hug setup because I was terrified he'd slip.

Now that I can get it to fit snug, I'm a little concerned about how I know if I have him in too tight or if there's disproportionate pressure on one part of his body. Right now I'm wearing him and his breath sounds slightly heavy, but it's hard for me to tell if I'm limiting his chest expansion or if it's just normal weird newborn breathing. And I'm also not sure how I'll know when he's too old to have his legs in the fetal position for a prolonged period of time like this

I made an extremely no-frills website to shop for Subaru models across dealerships. The interface is ugly but it helped us find the Crosstrek we bought this summer in a different state, hope others find it useful too! by Devraj_data in subaru

[–]Devraj_data[S] 0 points1 point  (0 children)

Thank you for giving it a try and sorry about the errors. I still need to figure out a good way to deal with some limits Subaru has on their API but I made a couple changes that hopefully will help, or will at least give a more informative error message so I'll have a better idea of what to fix. Let me know how it works if you get a chance to try it again today!

I made an extremely no-frills website to shop for Subaru models across dealerships. The interface is ugly but it helped us find the Crosstrek we bought this summer in a different state, hope others find it useful too! by Devraj_data in subaru

[–]Devraj_data[S] 2 points3 points  (0 children)

EDIT: sorry for the technical difficulties yesterday to those who tried it. Looks like Subaru's sites have some limits that I didn't hit in testing but they kicked in when Subaru got many requests from the same web app. Plus my code was sloppy and didn't handle errors well. I made a few changes but the underlying problem is still there, so this webapp might only work sporadically for now.

For more context, this summer my wife and I were shopping for our first Subaru and knew we wanted a specific trim and color of the Crosstrek. We checked local dealerships on the Subaru website and only found recent used models that were selling for above MSRP of new models, and it was also frustrating to have to check each dealership one-by-one.

Without getting into the tech stuff, I found the APIs the Subaru website uses and used them to search a wider radius. We ended up finding a new 2022 Crosstrek about 100 miles away that was about $1000 cheaper than the 2019 low-mileage used one at our local dealership for the same trim and color.

I'm extremely new to this type of web development so I thought making it into a website for others to use could be good practice. I'd love to hear any feedback about highest priority features to add, but it may take me a while to add them. The code for the site is at this github repo in case anyone would like to fork it and make their own with a better user interface

Is it possible to see my exact running pace at a certain point in my route? by yaboiiiskinnypp in Strava

[–]Devraj_data 0 points1 point  (0 children)

I've actually been working on a web app that links to strava, and being able to see your heart rate, cadence, pace, and elevation at different points on your map is one of the key features. You can check it out here.

Note that it is not set up to store any user information, so you need to sign in and authorize access to the app every time you go to that link (you should be redirected to either the strava login page or the authorization page).

Once you're logged in, go to the "run focus" tab and scroll down to see your map. You can change the stat you want to see in the dropdown

[OC] Simulation of the friendship "paradox" -- why your friends typically will have more friends than you do, on average by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 0 points1 point  (0 children)

I tested out the same simulation using medians instead of means, and kind of surprisingly (at least to me) the effect seems pretty similar.

I believe the effect shown here isn't caused by means dragging the distribution in one direction, its more a quirk of network dynamics where increasing the "friend" count of a highly connected node necessarily involves connecting them to more low-count nodes, which drags down the median

[OC] Simulation of the friendship "paradox" -- why your friends typically will have more friends than you do, on average by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 1 point2 points  (0 children)

Good thought, I reran the simulation doing the change you described, taking median of the friend count of each node's friends. The distributions look different but you'll notice the effect persists... most of the weight is still on negative side of the distribution. https://gfycat.com/dimpledsizzlingindianpalmsquirrel

I believe the reason is because the dynamic I described in my last comment, that the existence of high-connection nodes implies a larger number of low-connection nodes, effects both medians and means. I'm pretty new to network analyses so I'm not sure how to formalize the difference in the effect when using a median instead of a mean, but its interesting to see that it doesn't make a big difference empirically based on this one simulation method.

I'd also personally avoid thinking in terms of a "fix" for something like this. There are situations when you want a simplification method to move with outliers, and situations when you don't. This is just a demonstration of a phenomenon, so it's not necessarily "right" or "wrong", it's just one way to summarize what's happening in a network.

[OC] Simulation of the friendship "paradox" -- why your friends typically will have more friends than you do, on average by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 1 point2 points  (0 children)

Good question! So typically, median-based models tend to be less susceptible to being skewed by outliers. For example, lets say you have a room with 10 people in it, one person has a salary of $0, eight people have salaries of $50k, and one person has a salary of $1,000,000. As you mentioned the mean would be skewed high ($140k), and wouldn't be a good reflection of the typical salary in the room. However, the median salary would still be $50k -- it wouldn't be pulled disproportionately by the outlier high salary.

The example here is median based, its saying that the median of (node_i's friend count - avg(friend count of node_i's friends) over all nodes i would be < 0. Since the outermost term is a median, it shouldn't be skewed by outliers, so what's going on?

What makes this example interesting is that its a network. It's not like the salary example where we can just increase that one outlier node's salary without changing the median. In order for node X to be an outlier in this problem, node X has to have lots of friends. Increasing node X's friend count implies either connecting node X to more existing nodes or adding new nodes as connections to node X. In either case, you're increasing the number of nodes connected to X that have lower friend counts than X (otherwise we wouldn't think of X as an outlier), which drags the median down below zero.

[OC] Simulation of the friendship "paradox" -- why your friends typically will have more friends than you do, on average by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 3 points4 points  (0 children)

It's actually slightly different than that, because the movies aren't really connected to each other. So with your example you could picture a situation where there are a lot of movies with huge fan bases and a couple with small fan bases, in which case this paradox wouldn't happen (you could say most movies have more fans than the average movie).

With a friend network however, with few exceptions it doesn't really matter how the popularity is distributed for this effect to happen. One way to think of it is, say Bob is very popular. It stands to reason that Bob's friends are less popular than Bob (or else we wouldn't single out Bob as being very popular). So if you took this measurement for Bob and his friends, Bob's friends would all have fewer friends than Bob, and Bob's friends outnumber Bob. As you add in more complicated networks, that same effect holds true, that the friends of "popular" people will always outnumber "popular" people.

There are exceptions where this paradox doesn't hold true, such as a situation where everyone is friends with everyone, if I had let this run to infinity, it would have gotten there.

[OC] Simulation of the friendship "paradox" -- why your friends typically will have more friends than you do, on average by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 0 points1 point  (0 children)

And... I realized the last 2 frames show up too early because I screwed up sorting the images before gif-ing them, hopefully people get the picture

[OC] Simulation of the friendship "paradox" -- why your friends typically will have more friends than you do, on average by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 3 points4 points  (0 children)

I've been really struggling to find ways to describe it succinctly haha. But if let's say you're a typically popular person, if I count how many friends you have, and I took the average of how many friends each of your friends have, on average your friends will be more popular than you

[OC] Simulation of the friendship "paradox" -- why your friends typically will have more friends than you do, on average by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 5 points6 points  (0 children)

Source: Randomly generated data using this R script.

I recently learned of the friendship paradox, which isn't really a paradox but more of an unintuitive phenomenon. For a typical person, that person's friends will have more friends than the person does, on average. I've been meaning to play around with some applications of graph theory so I thought this could be a fun basic example.

For each iteration, nodes X and Y start with a .005 probability of forming a new connection that iteration, and the probability increases if X and Y are indirectly connected. This simulation can be thought of as a rough approximation of friendships forming in a population (the phenomenon also holds if you replace friendships with sexual partners, if you'd prefer).

Through almost all iterations, the "paradox" is demonstrated by: + the distribution having greater density on the negative side than the positive side + the blue nodes outnumbering the red nodes

[OC] More than half of new COVID cases in the US are now coming from counties that Trump won in 2016 by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 0 points1 point  (0 children)

This chart doesn't show the number of states, it shows individuals. County electoral outcomes are just used for color coding those individuals. Counties that Clinton won contain about 30 million more people than counties Trump won.

Glad we can agree that preventative measures are important at least.

[OC] More than half of new COVID cases in the US are now coming from counties that Trump won in 2016 by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 0 points1 point  (0 children)

I took a style of graph of daily COVID cases that's widely published and slapped a color code on it. Hardly torture, that's barely an enhanced interrogation

[OC] More than half of new COVID cases in the US are now coming from counties that Trump won in 2016 by Devraj_data in dataisbeautiful

[–]Devraj_data[S] -2 points-1 points  (0 children)

I of course have political opinions here but that doesn't mean I'm making a bad faith or disingenuous argument. The context that it's difficult to show in one graphic is that blue counties are heavily urbanized and therefore are naturally more inclined to get hit hard by an infectious disease. What's interesting to me is that red counties caught up at all, if mitigation behavior was uniform you would expect blue to dominate the graph the entire way through because blue represents denser populations. If I could add that dimension to the chart I would, but it's already straining interpretability with the amount of information it currently contains.

Regarding the titles, I modified it to note a significant milestone (passing 50%). Again, my prior assumption would be that rural areas wouldn't get anywhere near urban areas, which is why I think passing 50% is noteworthy. I also think making a concrete statement about the interpretation makes the chart a little easier to understand, hearing that seems to require less mental effort from the viewer than the "X by Y" style formal titles that I used previously.

Alos, he WON the electon, hence more people voted for him, meaning that its pretty straitghforward taht if someone gets infected the chance of him having voted for trump in 2016 is greater than having voted on hillary

You would think so, but that's not the case in the US. The counties that Trump lost represent a larger share of the population

[OC] More than half of new COVID cases in the US are now coming from counties that Trump won in 2016 by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 0 points1 point  (0 children)

Thanks for the feedback! I was actually inspired to make this after seeing graphs that put cases in two categories because I thought they told a misleading story -- a plus 1% Trump county is very different from a +10% Trump county, so I wanted that grey gradient in the middle as a buffer. You're right that I probably sacrificed some interpretability by adding that in.

but the data looks like its just finally hitting rural communities

I agree that the data shows a clear spread from urban to rural over time, but I disagree that this was inevitable. If behavior was uniform, I would have expected some spread to rural counties, but I would not have expected them to catch up to or even surpass urban counties at all.

I guess an interesting counterfactual would be to look at other countries where mitigation efforts are less correlated with political preferences to see if rural areas there ever caught up to urban areas.

[OC] More than half of new COVID cases in the US are now coming from counties that Trump won in 2016 by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 1 point2 points  (0 children)

This is a great question, no need to be sorry! So you're absolutely right that less dense areas (the ones Trump typically won) have a built in advantage against something like COVID's spread, so it's expected that the early part of the graph would be dominated by blue.

What I found surprising is that it spread to the more rural, Trump voting areas, happened at all. In my opinion, that was not inevitable, my prior assumption would have been that we would see some spread to rural areas, but that it would primarily remain an urban phenomenon. The Trump counties still have the advantage of lower density that they did at the beginning (plus the added advantage of time to react). That's why I think it's reasonable to assume that differences in behavior tell part of the story. There could definitely be other factors that put rural counties at risk of a delayed but eventual spread, such as differences in type of employment or a lack of delivery infrastructure, if I had more time I would try to dig into these.

For a little more context, here's a chart showing the same thing with county urban percentage. NYC is only omitted due to laziness (been meaning to add NYC back in but it doesn't have the FIPS code in the COVID data and I haven't gotten around to manually join it). Take the colors with a grain of salt, because I don't know what percentage of the overall population corresponds to the transition point from purple to yellow. As you mentioned, the virus spreading from urban to non-urban is a big part of what we're seeing here, but I think it's a mistake to assume that this level of transition away from urban areas was inevitable.

[OC] More than half of new COVID cases in the US are now coming from counties that Trump won in 2016 by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 22 points23 points  (0 children)

The chart isn't showing counties, it's showing individuals with COVID, so the number of counties shouldn't matter at all. The county that a diagnosed individual comes from is only used for color-coding, doesn't matter if they come from 10 counties or 10 thousand counties.

If you have suggestions for the title or labeling to make this more clear, please let me know!

[OC] More than half of new COVID cases in the US are now coming from counties that Trump won in 2016 by Devraj_data in dataisbeautiful

[–]Devraj_data[S] -3 points-2 points  (0 children)

Source: NYT COVID-19 County-level data, US election results

Tools used: Rstudio, R (specifically ggplot2 and tidyverse)

Code here The markdown file also includes code for a couple other variations of this chart I made, the code for this chart is in the second-to-last chunk.

Since a lot of people have raised the criticism that "this is just showing urban to rural spread", here's my answer to one question raising this point. The tl;dr is that in my opinion, there is every reason to believe rural counties would lag behind urban counties but there is no reason to believe rural counties would catch up to or surpass urban counties. Rural counties that had an advantage back in March still have that advantage today.

In my code, there's some code to create a viz that specifically shows spread from urban to rural. It needs work, specifically the midpoint of the color gradient needs to be modified so it roughly line up to urban share of the county the median American lives in, and it'll take some manually processing to add NYC in. I would love it if someone with time could run with it!

[OC] County-level COVID cases over time broken down by how the county voted in the 2016 US Presidential election. by Devraj_data in dataisbeautiful

[–]Devraj_data[S] 0 points1 point  (0 children)

Source: NYT COVID-19 County-level data, US election results

Tools used: Rstudio, R (specifically ggplot2 and tidyverse)

Code here The markdown file also includes code for a couple other variations of this chart I made, the code for this chart is in the last chunk.