ojs_define doesn't work very well for R spatial dataframes. In practice, it is necessary to convert it to geojson (with geojsonsf package) and then pass it as a string. Then, we have to use JSON.parse ([see](https://neocarto.github.io/Quarto/r_ojs.html)). Why not allow directly to pass a spatial dataframe in well formated geojson? Same thing for dataframes. We have to use transpose systematically. Why not convert directly into an array of objects (and not into an object containing arrays) ? 

cscheid
2022-05-19T12:05:27Z
neocarto
enhancement ojs-engine
closed
ojs_define for spatial dataframe (sf)
https://github.com/quarto-dev/quarto-cli/issues/935