shinyapp.io deployment
https://myrobot2020.shinyapps.io/argusindex/
This application is designed to calculate commodities indices based on user-provided deal data. It allows users to import a dataset, calculate the index price for each day included in the raw data, and display the results as a table and chart within the application. Additionally, users can download the output table as a CSV file.
To get started, follow these steps:
- Install pacman package
- Clone or download the repository to your local machine.
- Ensure you have R and RStudio installed on your machine.
- Open the
app.R
file in RStudio. - Run the application by clicking the 'Run App' button in RStudio.
- Click the 'Upload Data.csv' button to select and upload your data file. The data file must be in CSV format and contain the following columns: ID, DEAL DATE, COMMODITY, COMMODITY SOURCE LOCATION, DELIVERY LOCATION, DELIVERY MONTH, DELIVERY YEAR, VOLUME, and PRICE.
- After uploading the data, select the desired index (COAL2 or COAL4) from the dropdown menu.
- Once the data is uploaded and the index is selected, the application will display a table and chart showing the calculated index prices over time.
- The table will contain the index prices for each day included in the raw data.
- The chart will visualize the index prices over time, with a trendline representing the linear regression of the data.
- To download the results table as a CSV file, click the 'Download' button located below the table.
The application includes automated tests to ensure the integrity of the data processing and visualization. The tests validate the following:
- The uploaded data contains at least 9 columns.
- The calculated index prices are accurate.
To run the tests, ensure that the testthat
package is installed and run the following command: