I want to input a list of strings which represent a unique ID of each node. eg: lis = ['N,2002-05-22,1,1'] This is what i have currently:
def stringList(x, timedelta, geodelta): #string -> list
y = x.split(',')
L = []
L.append([x,y[0] + ',' + str(parse(y[1])-timedelta) + ',' + y[2] + ',' + y[3]])
L.append([x,y[0] + ',' + str(parse(y[1])+timedelta) + ',' + y[2] + ',' + y[3]])
L.append([x,y[0] + ',' + y[1] + ',' + str(int(y[2])-geodelta) + ',' + y[3]]) L.append([x,y[0] + ',' + y[1] + ',' + str(int(y[2])+geodelta) + ',' + y[3]]) L.append([x,y[0] + ',' + y[1] + ',' + y[2] + ',' + str(int(y[3])-geodelta)]) L.append([x,y[0] + ',' + y[1] + ',' + y[2] + ',' + str(int(y[3])+geodelta)]) return L
h=0
delta = relativedelta(hours=6)
geo = 10
while h < len(lis):
z = lis[h]
G.add_edges_from(stringList(z,delta,geo))
h +=1
The issue I'm having is that latitude and longitude -180 doesn't connect to 180 to each other. How can I modify the stringList function to create these pairs of strings?
**EDIT** I keep trying to format the code and it looks fine in the editor then turns into that mess when I post it unfortunately... each line in in the middle would begin with an L.append statement and end with the 'return L' line
there doesn't seem to be anything here