A simple Shiny dashboard for tracking Instruqt infrastructure hours consumed.
- Total Hours Display: Large, clear display of total infrastructure hours consumed
- Hours Timeline: Line chart showing hours consumed over time
- Daily Breakdown: Bar chart showing daily hours consumption for the last 30 days
- Date Range Filter: Easily adjust the date range to view specific periods
install.packages(c(
"shiny",
"shinydashboard",
"plotly",
"dplyr",
"lubridate",
"httr",
"jsonlite"
))Set your Instruqt API key and team slug:
export INSTRUQT_API_KEY=your_api_key_here
export INSTRUQT_TEAM_SLUG=positOr set them in R:
Sys.setenv(INSTRUQT_API_KEY = "your_api_key_here")
Sys.setenv(INSTRUQT_TEAM_SLUG = "posit")Note: Find your team slug in your Instruqt dashboard URL: https://play.instruqt.com/YOUR-TEAM-SLUG/...
Rscript run_app.R./run_app.sh- Open
app.R - Set environment variables (see above)
- Click "Run App"
Sys.setenv(INSTRUQT_TEAM_SLUG = "posit")
library(shiny)
runApp("app.R")Then visit http://localhost:3838 and click "Refresh Data" to load your data.
app.R- Main Shiny dashboard applicationinstruqt_api.R- API client for fetching consumption data from Instruqt GraphQL APIrun_app.R- R launcher scriptrun_app.sh- Bash launcher scriptREADME.md- This file
- Use the date range filter in the sidebar to select the time period you want to view
- Click "Refresh Data" to reload the data after changing the date range
- The dashboard shows infrastructure hours consumed (sandbox hours)
- Hover over charts for detailed daily values
API Key Not Found
- Ensure
INSTRUQT_API_KEYis set as an environment variable - Restart your R session after setting variables
Data Not Loading
- Verify your API key is valid
- Check your internet connection
- Ensure
INSTRUQT_TEAM_SLUGis set correctly
Slow Performance
- Reduce date range filter
- The API returns all records at once; expect initial load time
For Instruqt API issues, consult the Instruqt API Documentation
Dashboard powered by R Shiny and the Instruqt GraphQL API