I have a data.frame with a column called geo. In this column, there are lists with coordinates that represent a bounding box. I would like to grab the coordinates that are inside each list and calculate the centroid for each bbox (new column with centroid as a point).
dput:
structure(list(full_name = c("Karlsruhe, Deutschland", "Volksparkstadion",
"Hamburg, Deutschland"), country_code = c("DE", "DE", "DE"),
place_type = c("city", "poi", "city"), name = c("Karlsruhe",
"Volksparkstadion", "Hamburg"), country = c("Deutschland",
"Deutschland", "Deutschland"), id = c("5b146bf0b819f1af",
"0fc3a3fa5494c000", "5bcd72da50f0ee77"), geo = list(bbox = list(
8.2773, 48.9405, 8.5418, 49.0914), bbox = list(9.8986,
53.5871, 9.8986, 53.5871), bbox = list(8.4202, 53.3951,
10.3252, 53.9647))), row.names = c(2L, 5L, 8L), class = "data.frame")