jackmiemie / GMEL

The code and documentation for geo-contextual multitask embedding learner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How is the adjacency matrix created?

bing-zhao opened this issue · comments

Thanks for sharing the code. I have tried to read the paper and the documentation, but still unable to figure out how the adjacency matrix ("adjacency_matrix_withweight.csv") is created. Would you please help to explain a bit?

Hi Bing,

Thanks for having attention on our paper. First, you need to have the census tracts represented by polygons. The nodes in geo-adj network are the centroids of these census tract polygons. Then, you can connect the nodes whose polygon boundaries are touching each other. Edge weights can be the trip distance between the two nodes.

As for tools, I recommend you geopandas and shapely for geometry computation of census tract polygons. QGIS can be helpful as well when you want to visualize the census tract data in shapefile format.

Thank you for your prompt reply and suggestions. It is now very clear to me, and I will close the issue.