Skip to content

Instantly share code, notes, and snippets.

View jamiebono's full-sized avatar
😀

Jamie Bono jamiebono

😀
View GitHub Profile
# Install the MicrosoftPowerBIMgmt module required for managing Power BI resources.
# This module is installed for the current user only, to avoid system-wide changes.
Install-Module -Name MicrosoftPowerBIMgmt -Scope CurrentUser
# Authenticate to the Power BI Service.
# This step is necessary to access and manage Power BI resources.
Login-PowerBIServiceAccount
# Function to retrieve all Power BI workspaces.
# It fetches data from the Power BI API and handles pagination to get all workspaces.
@jamiebono
jamiebono / cdis-data-client-bulk-dl.sh
Created August 1, 2018 19:53
Shell script for bulk downloading dicom files from Bionimbus
#!/bin/bash
cat $1 | while read line
do
f=`echo $line | tr -d '\r'`
uuid=$(echo $f | awk '{print $1}')
fname=$(echo $f | awk '{print $2}')
echo Downloading $fname with UUID $uuid
./cdis-data-client download --profile elkinp --uuid $uuid --file $2$fname
echo Download of $fname complete!
done
cleanup_ndc <- function(package_path, product_path){
require(dplyr)
require(stringr)
dpackage <- read_delim(package_path, delim = "\t")
dproduct <- read_delim(product_path, delim = "\t")
names(dproduct) <- tolower(names(dproduct))
names(dpackage) <- tolower(names(dpackage))
@jamiebono
jamiebono / plot_qi_charts_wales.R
Created April 27, 2017 16:31
A simple script to import a quality measurement data set, transform it, and plot qi charts by organization and measure
# Load Prerequisites ====
library(tidyverse)
library(lubridate)
library(qicharts)
# Read data frame from csv ----
df <- read.csv("walestest.csv", stringsAsFactors = FALSE)
# Test it once====
# Create one of Organisation dataframes ----