Closed hamishgibbs closed 3 years ago
Changes:
Region
, Country
, country
, region
columns.
default_data_ref
function which returns defaults for data read with readInEpiNow2
. To do:
Should be working and ready to go soon.
Pointer now aligned. Pausing here - will be back to address tests and docs.
Fixed tests by eliminating most of the data structure checks. We can discuss what the best approach is but this makes the R code simpler and easier to maintain. Could lead to more uncaught JavaScript errors which are harder to debug in Rstudio (but you can checkout from a Rmd opened in Chrome). Hopefully the docs provide enough info on the anticipated data structure to troubleshoot odd widgets.
Updated docs. We still need some info on how to create custom map legends for different variables and add custom colors to the timeseries. This can be added in the future.
Fixed various spelling errors and did a general review of docs.
Integration of RtD3js React library with existing summaryWidget function.
I have removed some of the data checks as they were quite complex and it may be easier to write up the desired data format in the docs, instead of testing for possible data faults when instantiating the widget. If input data is incorrect, the widget will not render correctly. I think the best way to troubleshoot this would be the docs, not custom error messages.
Incorporates the new RtD3js library in the widget with new features (listed in the Readme).
Items still needing attention:
[x] Widget sizing. Should fit into a standard Rmd document (I think 900px width?) currently at an arbitrary 1000x1000 px.
[x] All tooltips have disappeared. This may be because they are absolutely positioned divs (which is a persistent problem for custom html widgets in Rmd documents). Resolving this may require a different approach, like an info panel - not a tooltip? We could drop tooltips temporarily to get up and running more quickly.
[x] Hover line on the timeseries is not correctly aligned with pointer. This should be resolved after fixing item 1 or may need more attention.
[x] issues with differences in
Region
region
country
,Country
column names. This should be addressed in RtD3js by converting all possibilities toregion
. This is why the region selection dropdown is currently empty. @seabbs - does this seem like a safe approach? What if data is passed with bothCountry
andregion
columns?[x] Some odd bootstrap spacing that should sort itself out (or will need sorting) when item 1 is handled.
[x] Add all default legend configurations to
default_map_legend_ref.R
(with actual colors for display).A potential issue: I have used Bootstrap 4 in RtD3js to make spacing and styling everything easy. Hopefully this will not conflict with other templates that are rendered on the main site but I am not positive how all the different styles will play on a page with a different style if there are conflicting classnames and if the Bootstrap styles are not scoped to the widget. We will see.