tab = jsonlite::fromJSON("/home/robin/CatchDat/TravelAIR/travelAIData/convertedjson/0a913b60-fefa-4cce-8166-4b8db10cd7d6.json") head(tab$to_loc) tab$to_loc[[1]][[1]] tab$to_loc[[1]][[2]] tab$to_loc_lon = sapply(tab$to_loc, FUN = function(x) x[[1]]) tab$to_loc_lat = sapply(tab$to_loc, FUN = function(x) x[[2]]) tab$from_loc_lon = sapply(tab$from_loc, FUN = function(x) x[[1]]) tab$from_loc_lat = sapply(tab$from_loc, FUN = function(x) x[[2]]) tab = dplyr::select(tab, -from_loc, -to_loc) sapply(tab, length) write.csv(apply(tab, 2, strtrim, 3)[1:3,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.