{"id":34566266,"url":"https://github.com/posit-dev/instruqt-api-reporting","last_synced_at":"2025-12-24T09:06:31.377Z","repository":{"id":323557145,"uuid":"1093750640","full_name":"posit-dev/instruqt-api-reporting","owner":"posit-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-25T21:19:25.000Z","size":185,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-28T06:26:37.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/posit-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-10T19:41:06.000Z","updated_at":"2025-11-25T21:19:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/posit-dev/instruqt-api-reporting","commit_stats":null,"previous_names":["posit-dev/instruqt-api-reporting"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/posit-dev/instruqt-api-reporting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Finstruqt-api-reporting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Finstruqt-api-reporting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Finstruqt-api-reporting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Finstruqt-api-reporting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posit-dev","download_url":"https://codeload.github.com/posit-dev/instruqt-api-reporting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posit-dev%2Finstruqt-api-reporting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27995619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T09:05:59.563Z","updated_at":"2025-12-24T09:06:31.339Z","avatar_url":"https://github.com/posit-dev.png","language":"R","readme":"# Instruqt Hours Reporting\n\nA simple Shiny dashboard for tracking Instruqt infrastructure hours consumed.\n\n## Features\n\n- **Total Hours Display**: Large, clear display of total infrastructure hours consumed\n- **Hours Timeline**: Line chart showing hours consumed over time\n- **Daily Breakdown**: Bar chart showing daily hours consumption for the last 30 days\n- **Date Range Filter**: Easily adjust the date range to view specific periods\n\n## Setup\n\n### 1. Install R Packages\n\n```r\ninstall.packages(c(\n  \"shiny\",\n  \"shinydashboard\",\n  \"plotly\",\n  \"dplyr\",\n  \"lubridate\",\n  \"httr\",\n  \"jsonlite\"\n))\n```\n\n### 2. Set Environment Variables\n\nSet your Instruqt API key and team slug:\n\n```bash\nexport INSTRUQT_API_KEY=your_api_key_here\nexport INSTRUQT_TEAM_SLUG=posit\n```\n\nOr set them in R:\n\n```r\nSys.setenv(INSTRUQT_API_KEY = \"your_api_key_here\")\nSys.setenv(INSTRUQT_TEAM_SLUG = \"posit\")\n```\n\n**Note**: Find your team slug in your Instruqt dashboard URL: `https://play.instruqt.com/YOUR-TEAM-SLUG/...`\n\n## Running the App\n\n### Option 1: Using the launcher script\n```bash\nRscript run_app.R\n```\n\n### Option 2: Using the shell script\n```bash\n./run_app.sh\n```\n\n### Option 3: From RStudio\n1. Open `app.R`\n2. Set environment variables (see above)\n3. Click \"Run App\"\n\n### Option 4: From R console\n```r\nSys.setenv(INSTRUQT_TEAM_SLUG = \"posit\")\nlibrary(shiny)\nrunApp(\"app.R\")\n```\n\nThen visit http://localhost:3838 and click \"Refresh Data\" to load your data.\n\n## Files\n\n- `app.R` - Main Shiny dashboard application\n- `instruqt_api.R` - API client for fetching consumption data from Instruqt GraphQL API\n- `run_app.R` - R launcher script\n- `run_app.sh` - Bash launcher script\n- `README.md` - This file\n\n## Usage Tips\n\n1. Use the date range filter in the sidebar to select the time period you want to view\n2. Click \"Refresh Data\" to reload the data after changing the date range\n3. The dashboard shows infrastructure hours consumed (sandbox hours)\n4. Hover over charts for detailed daily values\n\n## Troubleshooting\n\n**API Key Not Found**\n- Ensure `INSTRUQT_API_KEY` is set as an environment variable\n- Restart your R session after setting variables\n\n**Data Not Loading**\n- Verify your API key is valid\n- Check your internet connection\n- Ensure `INSTRUQT_TEAM_SLUG` is set correctly\n\n**Slow Performance**\n- Reduce date range filter\n- The API returns all records at once; expect initial load time\n\n## Support\n\nFor Instruqt API issues, consult the [Instruqt API Documentation](https://api-docs.instruqt.com/)\n\n---\n\nDashboard powered by R Shiny and the Instruqt GraphQL API\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposit-dev%2Finstruqt-api-reporting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposit-dev%2Finstruqt-api-reporting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposit-dev%2Finstruqt-api-reporting/lists"}