All Projects → froocpu → poweRbi

froocpu / poweRbi

Licence: other
An R-based, httr-style interface for the Power BI REST API.

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to poweRbi

pbiworkshops
Training workshops for Power BI.
Stars: ✭ 238 (+1300%)
Mutual labels:  powerbi
bank-statement-analysis
Flask application generating interactive visualisations from bank statements PDF documents
Stars: ✭ 31 (+82.35%)
Mutual labels:  powerbi
Data-Visualisation-libraries
A Repository consisting of various visualisation libraries and tools
Stars: ✭ 61 (+258.82%)
Mutual labels:  powerbi
ModelAutoBuild
A framework for dynamically creating a tabular model based on an Excel template.
Stars: ✭ 43 (+152.94%)
Mutual labels:  powerbi
Azure-DevOps
Data extraction and Power BI report that generate management informations about your Azure DevOps organization. Using Azure DevOps CLI and Azure DevOps REST API, PowerShell scripts extract data from Azure DevOps, store this information in an Azure SQL Database and shows them in a Power BI report.
Stars: ✭ 581 (+3317.65%)
Mutual labels:  powerbi
PowerBI
This repository hosts well-written DAX formulas and tested Power BI PBIX samples with data sources.
Stars: ✭ 38 (+123.53%)
Mutual labels:  powerbi
FlowViz
A Power BI template that provides easy to understand, actionable flow metrics and predictive analytics for your agile teams using Azure DevOps, Azure DevOps Server and/or TFS.
Stars: ✭ 150 (+782.35%)
Mutual labels:  powerbi
PBIConnectors
The Microsoft Power BI custom connector support-project
Stars: ✭ 60 (+252.94%)
Mutual labels:  powerbi
Power-Query-Excel-Formats
A collection of M code to get various formats from Excel sheets in Power Query
Stars: ✭ 43 (+152.94%)
Mutual labels:  powerbi
powerbi-embed-v2
Power BI Embedded with Custom Controls PoC
Stars: ✭ 34 (+100%)
Mutual labels:  powerbi
PowerBI-visuals-ForceGraph
Repo for Power BI Force Graph custom visual
Stars: ✭ 46 (+170.59%)
Mutual labels:  powerbi
power-bi-embedded
Use Power BI Embedded to embed dashboards, reports, report visuals, Q&A, and tiles in your WordPress website.
Stars: ✭ 37 (+117.65%)
Mutual labels:  powerbi
mvp-monitor
📊 Microsoft MVPs Monitor
Stars: ✭ 30 (+76.47%)
Mutual labels:  powerbi
curlconverter
➰ ➡️ ➖ Translate cURL command lines into parameters for use with httr or actual httr calls (R)
Stars: ✭ 86 (+405.88%)
Mutual labels:  httr
SSIS-DB-Dashboard
PowerBI SSIS Catalog DB Dashboard
Stars: ✭ 55 (+223.53%)
Mutual labels:  powerbi
datapackage-m
Power Query M functions for working with Tabular Data Packages (Frictionless Data) in Power BI and Excel
Stars: ✭ 26 (+52.94%)
Mutual labels:  powerbi
pbila
Power BI Logs Analytics Starter Kit
Stars: ✭ 27 (+58.82%)
Mutual labels:  powerbi
powerbi-visuals-chartxkcd
Power BI custom visual, providing an interface to chart.xkcd
Stars: ✭ 37 (+117.65%)
Mutual labels:  powerbi
PowerQueryNet
Run M Language (Power Query Formula Language) from anywhere.
Stars: ✭ 146 (+758.82%)
Mutual labels:  powerbi
powerbi-vcs
WIP (properly) version control and collaborate on your *.pbi{tx} files
Stars: ✭ 78 (+358.82%)
Mutual labels:  powerbi

poweRbi

An R-based, httr-style interface for the Power BI REST API. Inspired by the work of libraries like twitteR and httr in R, this library aims to provide a useful set of tools for navigating the (fairly limited) Power BI REST API for their web services.

You will need to register an app before you can use this library: https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-overview-of-power-bi-rest-api/

Overview

The package satisfies five main functions:

  • Handles OAuth 2.0 authentication between R sessions and Power BI applications.
  • Pulls metadata about datasets, dashboards and tiles, reports, import files and user groups.
  • Creates datasets, imports data frames as tables and streams data to Power BI tables.
  • Managing existing datasets with update, truncation and delete functions.
  • Provides utilities to infer data types and generate list/JSON objects from data frames.

Some use cases :

  • Streaming data from an external source to a Streaming or PushStreaming Power BI dataset.
  • Creating datasets and tables on the fly and storing the results of R scripts on a Power BI web service.
  • Maintaining datasets, reports and dashboards.
  • Using URLs from report metadata to embed reports as iframes inside your own application.

Before installing:

This is still in development and fairly experimental. Much of the functionality is ready to use, so if there are any significant improvements that can be made during this process then feel free to make changes and contribute as you please.

install.packages("devtools") # If required.
devtools::install_github("olfrost/poweRbi")

Examples

See the demo directory for the full code examples for the following:

library(poweRbi)

All functions are prefixed with "pbi" to enable faster lookup.

Authenticate your session.

pbiAuthenticate(appName, clientId, clientSecret) # This will take you to a sign-in page, or you can cache your authentication details as a .httr-oauth file.

Get metadata about objects in your workspace

# Datasets
pbiListAllDatasets(toDf = FALSE) # Be flexible on whether your data is returned as a list or as a data frame.

# Dashboards
pbiListAllDashboards(toDf = TRUE)

# Imported files
pbiListAllImportedFiles(toDf = TRUE)

# Reports
pbiListAllReports(toDf = TRUE)

# Tables
pbiListAllTables(allDatasets = TRUE)
pbiListAllTables(id = "cfcf6cde-45b7-459d-a8a3-a09644f5cbbe") # A single guid, multiple guids or all.

# Tiles
pbiListAllTiles(allDashboards = TRUE)
pbiListAllTiles(id = "cfbd4b32-3160-437b-8076-94e6cab9aa4a")

# Data sources
pbiListAllDataSources()

# User groups
pbiListAllUserGroups()

Create datasets from data frames

pbiCreateDatasetFromDataFrame(
  name = "Iris Dataset",
  df = iris,
  tableName = "Iris Data Frame",
  FIFO = "basicFIFO" # Enable basic first-in-first-out for streaming.
)

Manage existing datasets

# Use populated (or empty) data frames to update tables in Power BI.
pbiUpdateTableSchema(
  iris3, # Overwrite table schemas.
  guid = "abcdefg",
  tableName = "Iris Data Frame"
)

# Truncate tables.
pbiTruncateDataset(
  guid = "cfcf6cde-45b7-459d-a8a3-a09644f5cbbe",
  tableName = "Triangle"
)

# Delete entire datasets.
pbiDeleteDataset(guid = "cfcf6cde-45b7-459d-a8a3-a09644f5cbbe")

# Create new rows.
pbiAddRowsToTable(
  df = cats, # Use this function to stream data into an appropriate dataset.
  guid = "abcdef",
  tableName = "Iris Data Frame"
)

Utilities

# What data types does Power BI implement?
pbiDataTypes(simple = TRUE, verbose = FALSE)
pbiDatasetTypes()

# Infer data types from a data frame.
sapply(MASS::cats, ._pbiGetDataType)

# Generate JSON objects or lists from data frames to be passed to Power BI.
pbiGenerateTableSchema(
  MASS::cats,
  tableName = "Many Cats"
)

pbiGenerateTableSchema(
  MASS::cats,
  debug = TRUE,
  tableName = "Meowsers in my Trousers"
)

# Automatic token refreshing.
._pbiRefresh() # All handled automatically by pbi functions.
._pbiTokenExpiresIn()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].