Skip to content
Advertisement

Tag: network-analysis

Creating undirected unweighted graph from dictionary containing neighborhood relationship

I have a Python dictionary that looks like this: {‘Aitkin’: [‘Carlton’, ‘Cass’, ‘Crow Wing’, ‘Itasca’, ‘Kanabec’, ‘Mille Lacs’, ‘Pine’, ‘St. Louis’], ‘Anoka’: [‘Chisago’, ‘Hennepin’, ‘Isanti’, ‘Ramsey’, ‘Sherburne’, ‘Washington’], ‘Becker’: [‘Clay’, ‘Clearwater’, ‘Hubbard’, ‘Mahnomen’, ‘Norman’, ‘Otter Tail’, ‘Wadena’], ‘Beltrami’: [‘Cass’, ‘Clearwater’, ‘Hubbard’, ‘Itasca’, ‘Koochiching’, ‘Lake of the Woods’, ‘Marshall’, ‘Pennington’, ‘Roseau’], ‘Benton’: [‘Mille Lacs’, ‘Morrison’, ‘Sherburne’, ‘Stearns’], ‘Big Stone’: [‘Lac qui

Advertisement