Current State
The app.R file currently contains:
- Inline CSS styles embedded in the R code
- The dichotomous key decision tree hardcoded as an R list structure
Proposed Changes
Extract CSS to external stylesheet
- Move CSS from inline styles in app.R to a dedicated
www/styles.css file
- Benefits:
- Cleaner separation of concerns
- Easier to maintain and modify styles
- Better syntax highlighting and linting for CSS
- Follows standard Shiny app structure
Extract dichotomous key to external data file
- Move the decision tree structure from app.R into a separate file (e.g.,
dichotra_decision_tree.json or similar)
- Benefits:
- Easier to update the decision tree logic without touching R code
- Could potentially make it user-editable or configurable
- Cleaner app.R structure
- Makes the decision tree more visible and maintainable
Files Affected
/app/app.R - remove inline CSS and decision tree
/app/www/styles.css - new file for styles
/app/dichotra_decision_tree.json (or .yaml/.R) - new file for decision tree logic
Priority
Low - nice-to-have refactoring for maintainability
Current State
The app.R file currently contains:
Proposed Changes
Extract CSS to external stylesheet
www/styles.cssfileExtract dichotomous key to external data file
dichotra_decision_tree.jsonor similar)Files Affected
/app/app.R- remove inline CSS and decision tree/app/www/styles.css- new file for styles/app/dichotra_decision_tree.json(or .yaml/.R) - new file for decision tree logicPriority
Low - nice-to-have refactoring for maintainability