This project provides a web-based R programming environment specifically designed for teaching conservation biology to college students. It leverages WebR to run R code directly in the browser, making it accessible without requiring local R installation or complex setup procedures.
The primary goal is to create an accessible platform for biology students to learn R programming in the context of conservation ecology. This MVP (Minimum Viable Product) is designed to:
- Remove technical barriers to learning R by eliminating local installation requirements
- Provide a consistent environment for all students
- Enable instructors to share datasets and examples easily
- Allow students to save and track their work progress
- Facilitate the teaching of data analysis in conservation biology
- Browser-based R environment using WebR
- Interactive REPL (Read-Eval-Print Loop) interface
- Support for basic R operations and data analysis
- File upload and management system
- User authentication and session management
- Plot generation capabilities (currently under development)
- Command history preservation
- Secure authentication system using Supabase
- Individual user workspaces
- Persistent storage of user files and command history
- Session state management
- CSV file upload functionality
- File storage using Supabase
- Ability to load data directly into R environment
- Shared access to course datasets
- Pure JavaScript/HTML/CSS implementation
- Custom Web Components for modularity
- Responsive design for various screen sizes
- Authentication
- File storage
- Database for user data and session management
- Real-time updates capability
- Custom WebR service wrapper (
webr-service.js) - Handles R environment initialization
- Manages package loading and updates
- Provides plot generation capabilities
- Custom REPL component
- File management interface
- Authentication forms
- Plot display area
- Command history tracking
- Session state management
- File storage and retrieval
- User preferences storage
- User authentication and session management
- Full R code execution environment
- File upload and management
- Command history with navigation
- Session state persistence
- Advanced plotting capabilities
- Statistical analysis tools
- Plot sharing functionality
-
Data Import and Analysis
- CSV file upload
- Automatic data frame creation
- Basic statistical analysis
- Data visualization
-
Visualization
- Base R plotting
- ggplot2 graphics
- Statistical annotations with ggpubr
- Plot sharing and export
-
Session Management
- Command history
- Environment persistence
- File management
- User authentication
- Full ggplot2 integration with plot generation
- Statistical analysis support through ggpubr
- CSV file upload and automatic loading into R environment
- Plot sharing capabilities
- Enhanced error handling
- Data visualization with both base R and ggplot2
- ggplot2: Full support for complex visualizations
- ggpubr: Statistical annotations and publication-ready plots
- Base R graphics: All standard plotting functions
- Some R functions may not work as expected in the WebR environment
- Clone the repository
- Configure Supabase credentials in
supabaseClient.js - Ensure CORS headers are properly set in
netlify.toml - Run a local server to test the application
- Modern web browser with WebAssembly support
- Internet connection for WebR and Supabase services
- Supabase project with proper configuration
- Implement functional ggplot2 support
- Add more conservation biology-specific packages
- Improve error handling and user feedback
- Develop guided tutorials and exercises
- Add collaborative features for group work
- Implement export functionality for work and results
- User authentication is handled through Supabase
- File access is restricted to authenticated users
- Cross-Origin policies are enforced
- Data is stored securely in Supabase
The platform supports both base R plotting and advanced ggplot2 visualizations:
# Base R plotting
plot(cars)
# Simple ggplot2 visualization
library(ggplot2)
ggplot(cars, aes(x=speed, y=dist)) +
geom_point() +
theme_minimal()
# Advanced statistical visualization with ggpubr
library(ggplot2)
library(ggpubr)
ggplot(cars, aes(x=speed, y=dist)) +
geom_point() +
geom_smooth(method='lm', formula = y ~ x) +
theme_minimal() +
labs(title='Speed vs. Distance',
x='Speed (mph)',
y='Stopping Distance (ft)') +
stat_regline_equation(label.y = 100)CSV files can be uploaded through the UI and automatically loaded into R:
- Use the file upload button to select a CSV file
- The file will be automatically uploaded and stored
- Click "Load in R" to create a data frame named after your file
- Access your data using standard R commands
All generated plots can be:
- Displayed directly in the web interface
- Shared via unique URLs
- Downloaded for use in other contexts
This project is currently in MVP phase for testing with college biology students. Feedback and contributions will be incorporated based on testing results.
[License information to be added]
[Contact information to be added]
Note: This README represents the current state of the MVP. The application is actively under development, and features may change based on user feedback and testing results.