0

I would like to draw a map of NYC where the distances between neighborhoods are scaled by transit time. I computed a distance matrix using the Google Maps Distance Matrix API for public transit.

To visualize it, I tried embedding using sklearn.manifold.MDS (metric MDS) and then making a scatter plot. This works kind of ok. Unfortunately, the axes are rescaled as part of this process, and I would like to provide a scale that reflects the raw transit time. In addition, the orientation of the points does not influence the fit, but for drawing a map, it would be nice if I could specify the orientation.

Does anyone have other methods that would be a better fit for my problem? I thought about fixing some reference points and using them to triangulate the remaining points on a map, but I don't know of an off-the-shelf way to do this. enter image description here

sardine
  • 13
  • 5
  • [What did you search for and find already](/help/how-to-ask)? Also, it sounds like you're asking how to plot without axis scaling, so... show the code you use for plotting, and then focus on that. The "why" would basically be an irrelevant detail for that question (and you might be told to first read up on the plotting framework you're using and looking up what options its plotting functions take yourself, first). – Mike 'Pomax' Kamermans Jan 11 '23 at 20:09
  • @Mike'Pomax'Kamermans Thanks for your thoughts here. I am asking a stats / math question about methods for transforming a distance matrix into a 2-dimensional embedding. The question is agnostic to any choice of plotting library or programming language. I updated my question and the tags to clarify – sardine Jan 16 '23 at 21:36

0 Answers0