AmyMikhail / Geomapcoder

Multilingual shiny app to find and geocode postal addresses on a map
GNU General Public License v3.0
3 stars 2 forks source link

App not treating interactive table like a data.frame #3

Closed AmyMikhail closed 4 months ago

AmyMikhail commented 1 year ago

Problem statement:

After the interactive table is populated with coordinates and a shapefile is selected, in order to get the intersect for the shapefile regions and selected coordinates and add the regions to the table, the table first has to be converted to an sf object. This is failing with the following error:

Warning: Error in UseMethod: no applicable method for 'st_as_sf' applied to an object of class "c('reactiveVal', 'reactive', 'function')"
  1: runApp

Proposed solution:

Need to work out how to convert the interactive table to a data.frame before this step, then convert it back to an interactive table?

AmyMikhail commented 1 year ago

Update:

After edits, the following is now improved:

But: column names are missing because the app quits before allowing selection of the columns from the shapefile that hold the region names and codes:

Warning: Error in evalAll: attempt to apply non-function
  1: runApp
although coordinates are longitude/latitude, st_contains assumes that they are
planar
Warning: Error in mutate: ℹ In argument: `Region = get_region(...)`.
ℹ In row 1.
Caused by error in `all_of()`:
! Can't subset columns.
✖ Subscript can't contain the empty string.
✖ It has an empty string at location 1.
  1: runApp
AmyMikhail commented 4 months ago

This issue is resolved in the AI-generated version.