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
🔗 • Code Interpreter for Data Analysis - ...
🔥Power BI Backgrounds
🔗 • Transform your POWER BI in 20 MIN wit...
🔥Bravo in Power BI
🔗 • Make 1000+ DAX MEASURES in 10 MINS
🔥Ahmed's Portfolio
🔗https://photos.google.com/share/AF1Qi...
🔥Dataset
🔗https://www.kaggle.com/datasets/nelgi...
🔥Spotify Developer App
🔗https://developer.spotify.com/
🔥Download Python
🔗https://www.python.org/downloads/
🔥David's Deneb Showcase
🔗https://github.com/PBI-David/Deneb-Sh...
🔥Unit Chart Code
🔗https://stackoverflow.com/questions/7...
🔥Heatmap Code
🔗https://github.com/PowerBI-tips/Deneb...
🔥Color Pallette
🔗https://www.color-hex.com/color-palet...
=================================
Looking for Power BI consulting?
Reach out to me on Linkedin:
🟢 / 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
Смотрите видео Advanced Power BI Project • End-to-End • ChatGPT • Custom Visuals онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Power BI Park 28 Сентябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 293,014 раз и оно понравилось 6.7 тысяч людям.