This Shiny application is designed to calculate index prices for coal based on deals data provided in a CSV file. The application processes the data to compute index prices for two types of coal indices - COAL2 and COAL4 - and displays the results in a table and a bar plot.
- CSV File Upload: Users can upload a CSV file containing deals data.
- Index Price Calculation: The application calculates index prices for COAL2 and COAL4 based on the uploaded data.
- Data Visualization: Index prices are displayed in a table and visualized in a bar plot.
- Sample Data Download: Users can download a sample CSV file to understand the required format.
- Notes Section: Provides additional information about the indices.
app.R
: The main file for the Shiny application.argus_media_interview_arun.Rproj
: The R project file.server.R
: Contains the server logic for the Shiny application.ui.R
: Contains the UI layout for the Shiny application.utils.R
: Contains utility functions used in the application.renv/
: Directory for the renv environment.www/
: Directory containing additional resources like images and CSS files.renv.lock
: The lock file for renv environment..Rprofile
: Configuration file for the R environment.
shiny
ggplot2
reshape2
dplyr
data.table
shinyalert
lubridate
- Open the project in RStudio: ```sh open argus_media_interview_arun.Rproj ```
- Restore the renv environment: ```R renv::restore() ```
- Run the Shiny application: ```R shiny::runApp() ```
- Upload CSV File: Click on "Choose CSV File" and upload your deals data.
- Process Data: Click on the "Process" button to calculate the index prices.
- View Results: The calculated index prices will be displayed in a table and a bar plot.
- Download Sample Data: Click on "Download Sample" to download a sample CSV file.
The CSV file should have the following columns:
ID
DEAL DATE
COMMODITY
COMMODITY SOURCE LOCATION
DELIVERY LOCATION
DELIVERY MONTH
DELIVERY YEAR
VOLUME
PRICE
- COAL2 index prices are for coal delivered into Northwest Europe (delivery locations: ARA, AMS, ROT, ANT).
- COAL4 index prices are for coal delivered from South Africa.
For any queries, please contact [email protected].