Today's prompt for the #30DayMapChallenge is lines. This was a first for me creating connecting paths. I listed out a data set showing where I have lived in Sydney, got the coordinates from Google Maps (if the list was longer I would have got the coordinates using R but this was a nice and quick list. TBH I also needed to look at a map to remember some of these places street names to make the list in the first place!)
I wasn't sure how to handle creating the connecing lines so turned to the tutorial on the d3.js graph gallery. Use the code below to create the source/target linkked lines :)
const link = []
home_lines.forEach(function(row) {
source = [+row.lon1, +row.lat1]
target = [+row.lon2, +row.lat2]
topush = { type: "LineString", coordinates: [source, target] }
link.push(topush)
})
As ever code can be found here