Skip to content

Instantly share code, notes, and snippets.

View PBI-DataVizzle's full-sized avatar
💭
Shizzle my Vizzle 🤓

Imran Haq PBI-DataVizzle

💭
Shizzle my Vizzle 🤓
View GitHub Profile
@PBI-DataVizzle
PBI-DataVizzle / steam_graph_double_click.json
Created November 18, 2024 18:36
steam_graph_double_click
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 300,
"height": 200,
"data": {"url": "data/unemployment-across-industries.json"},
"mark": "area",
"params": [
{
"name": "industry",
"select": {"type": "point", "fields": ["series"]},
@PBI-DataVizzle
PBI-DataVizzle / steam_graph.json
Created November 18, 2024 18:31
steam_graph_vl
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 300,
"height": 200,
"data": {"url": "data/unemployment-across-industries.json"},
"transform": [
{"filter": "datum.series == 'Government' || datum.series == 'Finance'"}
],
"mark": "area",
"params": [
@PBI-DataVizzle
PBI-DataVizzle / vega_lite_stacked_area_highlighter_spec.json
Created November 9, 2024 08:10
vega_lite_stacked_area_highlighter
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"partido": "DEM", "ano": 1982, "quantidade": 0, "proporcao": 0},
{
"partido": "DEM",
"ano": 1986,
"quantidade": 8374709,
"proporcao": 0.177
@PBI-DataVizzle
PBI-DataVizzle / vega_lite_stacked_bar_nov24_spec.json
Created November 9, 2024 08:02
vega_lite_stacked_bar_nov24
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"partido": "DEM", "ano": 1982, "quantidade": 0, "proporcao": 0},
{
"partido": "DEM",
"ano": 1986,
"quantidade": 8374709,
"proporcao": 0.177
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"partido": "DEM", "ano": 1982, "quantidade": 0, "proporcao": 0},
{
"partido": "DEM",
"ano": 1986,
"quantidade": 8374709,
"proporcao": 0.177
@PBI-DataVizzle
PBI-DataVizzle / vega_lite_stacked_area_nov24.json
Created November 9, 2024 08:00
vega_lite_stacked_area_nov24
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"data": {
"values": [
{"partido": "DEM", "ano": 1982, "quantidade": 0, "proporcao": 0},
{
"partido": "DEM",
"ano": 1986,
"quantidade": 8374709,
"proporcao": 0.177
@PBI-DataVizzle
PBI-DataVizzle / vega_spec_scatterplot.json
Created November 9, 2024 07:54
vega_spec_scatterplot
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"width": 500,
"height": 300,
"title": {
"text": "Fuel efficiency generally decreases with engine size",
"subtitle": "Two seaters (sports cars) are an exception because of their light weight",
"anchor": "start"
@PBI-DataVizzle
PBI-DataVizzle / gist:6b575da16c970a441e40b211ecb685b4
Created October 26, 2024 19:45 — forked from bjulius/gist:ff2d3e50dd36b7bbe5cb5f757ee0d467
DAX SVG Measure to Generate IBCS-Style Bullet Charts
//Created by Brian Julius, 23 Oct 2024 using AI model o1-P
BulletChartSVG =
VAR __TotalSales = [Total Sales]
VAR __TargetSales = [Current Year Sales Target]
-- Normalize the bars by using the maximum target sales across all data
VAR __MaxTargetSales = [Max Sales Target]
-- Scale the bars based on the maximum target sales
@PBI-DataVizzle
PBI-DataVizzle / gist:9391809476ef82ead8bf08d79928b898
Created October 8, 2024 16:07 — forked from bjulius/gist:3aa8a47813582fd62f5949ce5dff7a0f
Batch file to extract BIM files from every PBIX file in a directory
REM Uses pbi-tools to extract the data model info and create the BIM file associated with each PBIX file in the directory
REM Batch file code written by Brian Julius, October 8, 2024
REM @echo off
SETLOCAL ENABLEDELAYEDEXPANSION
REM ============================================================
REM Batch Script to Extract BIM Files from PBIX Files
REM All PBIX files are in C:\test
REM All BIM files will be written to C:\test\bim_files
REM ============================================================
@PBI-DataVizzle
PBI-DataVizzle / radial_sunburst_v3.json
Created September 21, 2024 16:59
radial_sunburst_v3
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "An example of a space-fulling radial layout for hierarchical data.",
"width": 600,
"height": 600,
"padding": 5,
"autosize": "none",
"data": [
{
"name": "tree",