An interactive Shiny application that allows users to create and customize various types of plots using their own data.
- Upload CSV data files
- Create different types of plots:
- Scatter plots
- Bar plots
- Box plots
- Customize plot appearance:
- Point size and shape (for scatter plots)
- Colors
- Titles and labels
- Dynamic interface that updates based on plot type
- Error handling and user feedback
- Make sure you have R installed on your system
- Install the required R packages:
install.packages(c("shiny", "ggplot2", "tidyverse"))
- Clone this repository
- Open R or RStudio
- Set your working directory to the project folder
- Run the following command:
shiny::runApp()
- Upload your CSV file using the file input in the sidebar
- Select the type of plot you want to create
- Choose the variables for your plot axes
- Customize the appearance using the available options
- The plot will update automatically as you make changes
Your CSV file should be properly formatted with headers. The app can handle both numeric and categorical data, but make sure to use appropriate variables for different plot types:
- Scatter plots: Typically use numeric variables for both axes
- Bar plots: Can use categorical variables for x-axis and optional numeric variables for y-axis
- Box plots: Use categorical variables for groups and numeric variables for values
The application is structured as follows:
app.R
: Main application fileui.R
: User interface definitionserver.R
: Server logicwww/
: Static files (CSS, JavaScript)data/
: Sample data files
- Create an account on shinyapps.io
- Get your account credentials (Account Name, Token, and Secret)
- Add these credentials to your GitHub repository secrets:
SHINYAPPS_USER
: Your shinyapps.io account nameSHINYAPPS_TOKEN
: Your shinyapps.io tokenSHINYAPPS_SECRET
: Your shinyapps.io secret
The app will automatically deploy to shinyapps.io when changes are pushed to the main branch.
To run the app using Docker:
- Build the Docker image:
docker build -t interactive-plot .
- Run the container:
docker run -p 3838:3838 interactive-plot
- Access the app at
http://localhost:3838
This project is licensed under the terms of the included LICENSE file.