Learn how to use Python, ChatGPT, HTML, DENEB to make this report.
🟢Skip the python with the enriched Dataset: https://onyxdata.ck.page/a12261b1fb
00:00 – Intro
00:46 – Download and Enrich Dataset
05:55 – Glassmorphism Background
11:50 – Power BI
17:38 – HTML Visual
20:33 – DENEB Visuals
29:58 – Power BI Formatting
I wanted this to be a step into Advanced Visualization Techniques,
especially if you’re a Power BI developer and haven’t used them
These techniques are powerful tools to add to your kit.
The Video covers:
💠Enriched dataset with ChatGPT & Python
💠Glassmorphism Background
💠Power BI Building
💠HTML Cover Art
💠DENEB Visuals
💠PBI Format
You want the Python code? Scroll down 👇
=================================
🔥Code Interpreter for Data Analysis
🔗https://youtu.be/WCtjoKJdx3w?si=8N_sGWM0dFo9nH1e
🔥Power BI Backgrounds
🔗https://youtu.be/YP1Tr7nrwNI?si=P3RhJycSGspGyXpj
🔥Bravo in Power BI
🔗https://youtu.be/_NEnQNp102U?si=KC9ARXr2cE1ikCa-&t=457
🔥Ahmed’s Portfolio
🔗https://photos.google.com/share/AF1QipNqulXXlB1nFDSeglnIG3ftPOY-F79O3Z3lliW6u5nvNTfHPxWd_T2sWvy0q4sG5A?key=eTFFOTdrSlJxRlRmN29iSHdMeVFLSmhfUmdqOWJn
🔥Dataset
🔗https://www.kaggle.com/datasets/nelgiriyewithana/top-spotify-songs-2023?resource=download
🔥Spotify Developer App
🔗https://developer.spotify.com/
🔥Download Python
🔗https://www.python.org/downloads/
🔥David’s Deneb Showcase
🔗https://github.com/PBI-David/Deneb-Showcase
🔥Unit Chart Code
🔗https://stackoverflow.com/questions/75881301/convert-vega-deneb-gauge-to-work-in-powerbi
🔥Heatmap Code
🔗https://github.com/PowerBI-tips/Deneb-Templates/blob/main/templates/heatmap%20with%20bars%20-%20red%20themed.json
🔥Color Pallette
🔗https://www.color-hex.com/color-palette/53188
=================================
Looking for Power BI consulting?
Reach out to me on Linkedin:
🟢https://www.linkedin.com/in/injae-park/
Thanks for taking the time to watch this video.
Python code:
=====================================================
import requests
import pandas as pd
# Function to get Spotify access token
def get_spotify_token(client_id, client_secret):
auth_url = ‘https://accounts.spotify.com/api/token’
auth_response = requests.post(auth_url, {
‘grant_type’: ‘client_credentials’,
‘client_id’: client_id,
‘client_secret’: client_secret,
})
auth_data = auth_response.json()
return auth_data[‘access_token’]
# Function to search for a track and get its ID
def search_track(track_name, artist_name, token):
query = f”{track_name} artist:{artist_name}”
url = f”https://api.spotify.com/v1/search?q={query}&type=track”
response = requests.get(url, headers={
‘Authorization’: f’Bearer {token}’
})
json_data = response.json()
try:
first_result = json_data[‘tracks’][‘items’][0]
track_id = first_result[‘id’]
return track_id
except (KeyError, IndexError):
return None
# Function to get track details
def get_track_details(track_id, token):
url = f”https://api.spotify.com/v1/tracks/{track_id}”
response = requests.get(url, headers={
‘Authorization’: f’Bearer {token}’
})
json_data = response.json()
image_url = json_data[‘album’][‘images’][0][‘url’]
return image_url
# Your Spotify API Credentials
client_id = ‘your_client_id’
client_secret = ‘your_client_secret’
# Get Access Token
access_token = get_spotify_token(client_id, client_secret)
# Read your DataFrame (replace ‘your_file.csv’ with the path to your CSV file)
df_spotify = pd.read_csv(‘your_file.csv’, encoding=’ISO-8859-1′)
# Loop through each row to get track details and add to DataFrame
for i, row in df_spotify.iterrows():
track_id = search_track(row[‘track_name’], row[‘artist_name’], access_token)
if track_id:
image_url = get_track_details(track_id, access_token)
df_spotify.at[i, ‘image_url’] = image_url
# Save the updated DataFrame (replace ‘updated_file.csv’ with your desired output file name)
df_spotify.to_csv(‘updated_file.csv’, index=False)
===============================================
!!!! All curly brackets need to be angled brackets – youtube restricts angled brackets in this text
_Image html =
Var x =
CALCULATE(
MAX(‘updated_spotify_data'[cover_url]),
‘updated_spotify_data'[streams] = MAX(‘updated_spotify_data'[streams])
)
return
”
{!DOCTYPE html}
{html lang=’en’}
{head}
{meta charset=’UTF-8′}
{title}Image Cropping{/title}
{style}
.image-container {
width: 458px; /* Width of the container */
height: 140px; /* Height of the container */
overflow: hidden; /* Hide parts of the image that don’t fit */
border-radius: 15px; /* Rounded corners */
position: relative; /* Relative positioning for the child element */
}
.image {
object-fit: cover; /* Cover the entire container */
object-position: center; /* Center the image */
width: 100%; /* Full width */
height: 100%; /* Full height */
}
{/style}
{/head}
{body}
{div class=’image-container’}
{img src='”&x&”‘ alt=’Album Cover’ class=’image’}
{/div}
{/body}
{/html}
”
=======================================================
#powerbi #shortcuts #microsoft
47件のコメント
Very good
Thanks for sharing knowledge.. I Need Help ‘how to show the last refresh date on dashboard.. need date from power bi service schedule refresh date.
Great Inspiration! Definitely taking part this month!
thank you for this video. i really enjoyed it.
I can't find the glassmorphism background in PowerPoint.
Great video. Thanks for this. Lots of great info here!
Hello, i have a question. Is this real time? I mean, once i refresh my PBI desktop report, it will get all the updates?
How can I upload the excel file in the Chat GPT? Is this only available for pro users?
Hi guys! Lemme ask you something. After publishing the report in the web, did have any issue? I used the Deneb visual in one the report I am building, and after publishing it on the service, it does not display the gradient color. Anyone knows why?
please more videos like this
Great video! Step by step! I really like this view! Now I'm your fan! I'm waiting for the next video! 🙂
Can i use this project as a portfolio project for my job hunt as a data analyst or will I not be able to use it as it is made by someone else and I am just coying it.
Please reply.
just great every fucking minute ¡¡¡
Cant wait to try it ,is there any links or data or code i need other than those mentioned in the description. i have connected with you on linked in for the lovely work you do
pls also provide the html code that u used
Thanks for sharing this amazing project👍ll definitely try this 🙂
good work
Not sure if I will ever use those advanced techiniques. But, many thanks for sharing your skills without asking anything in return. This is a great Power BI visual training.
This look super cook. Didn't knew power BI can do this. I learned something new from this. Thanks
Definitely gonna try this out! Will share my output soon! Thanks for sharing!
amazing!
I am facing a problem with the deneb visual, while in VEGA creating empty when i paste the Heat map code from git hub and changing measure name, my whole power bi screen goes blank and only shows back to report button, please resolve my problem.
Wow! Impressive. Now it's time for me to practice because nothing is easy.
Can you please add Chapter in your video? That's really important to navigate, especially for such a long video
thankyou so much for this valuable content
one of the most valuable presentations so far. Please do more of this. Thank you for your dedication!
Great video, very informative. Only got the free Chat-GPT, so decided just to use the code provided above, if anyone else gets an indentation error, you can use the free version of Chat GPT to format to code to correct the structure. Also I got the following error: KeyError: 'artist_name'. On closer inspection of the data set, artist_name is actually "artist(s)_name". If you correct this in line 52, it should fix the problem.
Thanks for sharing
How much it will take time for preparing updated_file.csv?
When I write command like Python SpotifyScript.py ….then it took too much time and then nothing happens… can't able to create updated_file.. any suggestions
Superbly done!🤩
How do you get the right option pane (from where you selected the format pane or selection pane) in your PowerBI? How can I get that in my Power BI?
Superb!! Will be adding this to my portfolio project
Amazing tutorial.. Looking forward to practice all these amazing techniques.
It's amazing but unfortunately I'm not on that level right now and you didn't have any videos on your channel for beginners.
can u send the github link , The py code isn't working
On the track image like blinding light html content, im getting a slicer which is shifting the picture to left and right, up and down. How to fix it?
How round to more decimals?
Can we perform this task without GPT-4?
sir can you please help me with the urls the code is really not working and i really want to do this project please reply as soon as possible will be the happiest person if you guide me through ig or something thankyou
Amazing😍, Bless U for ur knowledge Sharing, expecting more, thank you
Great video, very informative. I am not able to find designer section in my PowerPoint. Please help me
When I tried the html code and tried to click on Image html, its not working, no image shows up, it says image html on a a blank white screen. Am I missing anything? I even changed the data category of cover_url to Image URL and the image shows in that column but not in the above step as shown.
daily weekly monthy yearly comparing PL can made ???
I thoroughly enjoyed watching this video. It's not every day that you come across advanced projects like this available for free on the web. However, I do have a request. I currently only have access to GPT-3.5, and I find it a bit challenging to work with code. Could you please share the code with me?
Hey @Power BI Park I'm facing a problem at Deneb Heatmap where it's not showing the heat map even though I changed the name of track measure multiple times… any thoughts on why this is happening ???
Fantastic video. Just a question,
I want to create a report like that for my company, being more specific, for the connectivity department. Do you know if is possible to use Python if my datasource comes from Sharepoint?
I also want to know if make sense to create a report like that using Deneb function for any type of report.. I mean there is always a possibility to structure my data to fit with these type of visuals?
In my personal case, I need to represent the launching dates of each site within specific technology.
Thank you very much
why is it only showing url but not image
The image size for album cover does not fit the window size in the html window I tried even at 45% and higher pixels for W & H.
Cannot for the life of me get this to work. The heat map doesn't recognise my measure. so fustrating haha. just following the steps.
Is it possible to add a chatbox and open source LLM like Llama instead of openai?