asiripanich / emdash

An e-mission deployer's dashboard. See https://github.com/e-mission/e-mission-docs.
https://emdash.amarin.dev
Other
6 stars 3 forks source link

Loading data from the minipilot database fails #68

Open shankari opened 3 years ago

shankari commented 3 years ago
$ docker run -d -p 1234:80 -v $PWD:/src --name emdash amarins/emdash
4941cac11b45fd02e8fae24313402f427ad97f56d91134645bafe911de300875

$ docker logs -f emdash
R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

> options('shiny.port'=80,shiny.host='0.0.0.0');emdash::run_app(mongo_url = 'mongodb://host.docker.internal:27017', anon_locations=FALSE)
No config file given, the default config file will be used.
Loading required package: shiny

Listening on http://0.0.0.0:80
First trip: 2020-09-22
Last trip:  2021-08-01
Warning: 'esquisserUI' is deprecated.
Use 'esquisse_ui' instead.
See help("Deprecated") and help("esquisse-deprecated").
Warning: 'filterDF_UI / filterDF' is deprecated.
Use 'datamods::filter_data_ui / datamods::filter_data_server' instead.
See help("Deprecated") and help("esquisse-deprecated").
Running: mod_load_data_server
Running: mod_load_trips_server
Warning: 'esquisserServer' is deprecated.
Use 'esquisse_server' instead.
See help("Deprecated") and help("esquisse-deprecated").
About to load participants
merging trip summaries with participants
merging server call summaries with participants
Finished merging server calls
Finished loading participants
Participants size is: 17.2 kB kb
About to load Bike Check in
Finished loading Bike Check in
About to load Polar Bear
Finished loading Polar Bear
The dates reactive values are: 2021-07-26 to 2021-08-02
Window_width is 7 days
get_n_trips_in_query: The time stamps for that date range are:
1627257600, 1627862400
There are 17 trips and 905 locations in the date range
Load_trips observed
About to load trips
Finished query, about to clean trips
Finished cleaning trips
Finished loading trips
Trips size is: 54 kB
Warning in grSoftVersion() :
  unable to load shared object '/usr/local/lib/R/modules//R_X11.so':
  libXt.so.6: cannot open shared object file: No such file or directory
Warning: Removed 1 rows containing non-finite values (stat_count).
Mapping without trajectories
Warning: Error in st_geometry.sf: attr(obj, "sf_column") does not point to a geometry column.
Did you rename it, without setting st_geometry(obj) <- "newname"?
  54: stop
  53: st_geometry.sf
  51: [.sf
  49: dropListColumns
  48: create_filters
  47: <observer>
   4: runApp
   3: print.shiny.appobj
   1: emdash::run_app
disconnecting from the emission collections..
shankari commented 3 years ago

Fortunately, we got the bright idea of trying with the docker image on @allenmichael099's laptop, and we have now narrowed this down to a data issue.

I'm going to try to dump my database so we can see if we can reproduce this on Michael's laptop and figure out the data issue.

shankari commented 3 years ago

@allenmichael099 I can confirm that on my laptop, if I restore the "not working" database and try to connect to it, I get the same error. 100% reproducible, but unfortunately, because of the data sharing issues, @asiripanich can't work on it. It's all down to @allenmichael099 now!

shankari commented 3 years ago

I'm going to start deploying this version of the dashboard (with the workaround in which we launch the container from the image but then build locally) on the real dashboards, so we can see if the problem occurs on other versions as well.

allenmichael099 commented 3 years ago

@shankari @asiripanich I looked further into the minipilot data not working. The structure of the trips data in minipilot seems to be the same as for the Stage_July_30 data. I tried removing the rows from the minipilot that have NAs for all of mode, purpose, and replaced mode, but that did not change the resulting error.