This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"data": {"url": "data/cars.json"}, | |
"transform": [ | |
{ | |
"joinaggregate": [{"op": "count", "as": "Count"}], | |
"groupby": ["Cylinders", "Origin"] | |
}, | |
{ | |
"joinaggregate": [{"op": "sum", "field": "Count", "as": "OriginCount"}], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "A diverging stacked dot plot showing the gender and award year of Nobel Prize laureates. If you prefer using squares instead of circles, set the point-mark `shape` to `square` and add `bandPosition: 0.5` to the `y` channel to align the squares with the rule mark. The `size` of the point mark (`sizeSq` param) is calculated as the area of a square, s^2, for consistency with the square shape if used.", | |
"usermeta": {"author": "Shad Frigui"}, | |
"title": "Nobel Prize Laureates", | |
"width": 850, | |
"height": 150, | |
"data": { | |
"url": "https://api.nobelprize.org/2.1/laureates?limit=992", | |
"format": {"property": "laureates"} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A cumulative line chart with highlighted area above the maximum cumulative value on a monthly axis.", | |
"data": { | |
"values": [ | |
{"Date": "2023-01-01", "value": 10}, | |
{"Date": "2023-02-01", "value": 20}, | |
{"Date": "2023-03-01", "value": 30}, | |
{"Date": "2023-04-01", "value": 25}, | |
{"Date": "2023-05-01", "value": 40}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A line chart with highlighted area above the maximum value.", | |
"data": { | |
"values": [ | |
{"x": 2015, "y": 33}, | |
{"x": 2016, "y": 45}, | |
{"x": 2017, "y": 35}, | |
{"x": 2018, "y": 34.5}, | |
{"x": 2019, "y": 34}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A line chart with highlighted area above the maximum value.", | |
"data": { | |
"values": [ | |
{"x": 2015, "y": 33}, | |
{"x": 2016, "y": 45}, | |
{"x": 2017, "y": 35}, | |
{"x": 2018, "y": 34.5}, | |
{"x": 2019, "y": 34}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A faceted chart showing movie ratings across different franchises.", | |
"transform": [{"calculate": "1", "as": "max"}], | |
"data": { | |
"values": [ | |
{"name": "Star Wars", "Film": 1, "Rating": 0.9}, | |
{"name": "Star Wars", "Film": 2, "Rating": 1}, | |
{"name": "Star Wars", "Film": 3, "Rating": 0.8}, | |
{"name": "Indiana Jones", "Film": 1, "Rating": 1}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"name": "trellis_barley", | |
"description": "Trellis", | |
"title": { | |
"text": "Ingressi giornalieri in Terapia Intensiva (TI) a confronto con ricoveri totali in TI", | |
"color": "#168CC7", | |
"fontSize": 18, | |
"anchor": "start", | |
"font": "Montserrat", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System.IO" | |
#r "Microsoft.Office.Interop.Excel" | |
using System.IO; | |
using Excel = Microsoft.Office.Interop.Excel; | |
string filePath = @"C:\Desktop\Descriptions"; // Update this to be the desired location of the Descriptions file | |
string excelFilePath = filePath + ".xlsx"; | |
string textFilePath = filePath + ".txt"; | |
string excelTabName = "ModelDescriptions"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System.Net.Http" | |
using System.Net.Http; | |
using System.Text; | |
using Newtonsoft.Json.Linq; | |
// You need to signin to https://platform.openai.com/ and create an API key for your profile then paste that key | |
// into the apiKey constant below | |
const string apiKey = "<YOUR_API_KEY>"; | |
const string uri = "https://api.openai.com/v1/completions"; | |
const string question = "Please describe this power query code for me:\n\n"; |