Skip to content

Commit

Permalink
site update 2
Browse files Browse the repository at this point in the history
  • Loading branch information
RizhongLin committed Nov 21, 2024
1 parent c16d6b4 commit e6d804b
Show file tree
Hide file tree
Showing 8 changed files with 361 additions and 59 deletions.
33 changes: 21 additions & 12 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ rss-description: This website is a virtual proof that I'm awesome

# Select which social network share links to show in posts
share-links-active:
twitter: true
facebook: true
linkedin: true
twitter: false
facebook: false
linkedin: false
vk: false

# How to display the link to your website in the footer
Expand Down Expand Up @@ -246,7 +246,7 @@ footer-hover-col: "#0085A1"
################

# Ruby Date Format to show dates of posts
date_format: "%B %-d, %Y"
date_format: "%-d %b, %Y"

# Facebook App ID
#fb_app_id: ""
Expand All @@ -266,20 +266,29 @@ kramdown:
input: GFM

# Default YAML values (more information on Jekyll's site)
# defaults:
# -
# scope:
# path: ""
# type: "posts"
# values:
# layout: "post"
# comments: true # add comments to all blog posts
# social-share: true # add social media sharing buttons to all blog posts
# -
# scope:
# path: "" # any file that's not a post will be a "page" layout by default
# values:
# layout: "page"
# Default post settings
defaults:
-
scope:
path: ""
type: "posts"
values:
layout: "post"
comments: true # add comments to all blog posts
social-share: true # add social media sharing buttons to all blog posts
-
scope:
path: "" # any file that's not a post will be a "page" layout by default
values:
layout: "page"
social-share: true
nav-short: true

# Exclude these files from production site
exclude:
Expand Down
65 changes: 65 additions & 0 deletions _includes/plotly/visualization2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<div id="budget-roi-plot"></div>
<script>
// Sample data
const budgets = Array.from({length: 100}, () => Math.random() * 200000000);
const rois = budgets.map(b => (Math.random() - 0.5) * 300);
const movieNames = budgets.map((_, i) => `Movie ${i+1}`);

const trace = {
x: budgets,
y: rois,
mode: 'markers',
type: 'scatter',
text: movieNames,
marker: {
size: 10,
color: rois.map(roi => roi < 0 ? '#ff6b6b' : '#4ecdc4'),
opacity: 0.7
},
hovertemplate:
'<b>%{text}</b><br>' +
'Budget: $%{x:,.0f}<br>' +
'ROI: %{y:.1f}%<br>' +
'<extra></extra>'
};

const layout = {
title: {
text: 'Movie Budgets vs Return on Investment',
font: { size: 24 }
},
xaxis: {
title: 'Budget (USD)',
tickformat: '$,.0f'
},
yaxis: {
title: 'Return on Investment (%)',
zeroline: true,
zerolinecolor: '#969696',
gridcolor: '#e1e1e1'
},
paper_bgcolor: 'rgba(0,0,0,0)',
plot_bgcolor: 'rgba(0,0,0,0)',
hovermode: 'closest',
showlegend: false,
shapes: [{
type: 'line',
x0: 0,
x1: 200000000,
y0: 0,
y1: 0,
line: {
color: '#969696',
width: 1,
dash: 'dot'
}
}]
};

const config = {
responsive: true,
displayModeBar: false
};

Plotly.newPlot('budget-roi-plot', [trace], layout, config);
</script>
65 changes: 65 additions & 0 deletions _includes/plotly/visualization3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<div id="budget-roi-plot"></div>
<script>
// Sample data
const budgets = Array.from({length: 100}, () => Math.random() * 200000000);
const rois = budgets.map(b => (Math.random() - 0.5) * 300);
const movieNames = budgets.map((_, i) => `Movie ${i+1}`);

const trace = {
x: budgets,
y: rois,
mode: 'markers',
type: 'scatter',
text: movieNames,
marker: {
size: 10,
color: rois.map(roi => roi < 0 ? '#ff6b6b' : '#4ecdc4'),
opacity: 0.7
},
hovertemplate:
'<b>%{text}</b><br>' +
'Budget: $%{x:,.0f}<br>' +
'ROI: %{y:.1f}%<br>' +
'<extra></extra>'
};

const layout = {
title: {
text: 'Movie Budgets vs Return on Investment',
font: { size: 24 }
},
xaxis: {
title: 'Budget (USD)',
tickformat: '$,.0f'
},
yaxis: {
title: 'Return on Investment (%)',
zeroline: true,
zerolinecolor: '#969696',
gridcolor: '#e1e1e1'
},
paper_bgcolor: 'rgba(0,0,0,0)',
plot_bgcolor: 'rgba(0,0,0,0)',
hovermode: 'closest',
showlegend: false,
shapes: [{
type: 'line',
x0: 0,
x1: 200000000,
y0: 0,
y1: 0,
line: {
color: '#969696',
width: 1,
dash: 'dot'
}
}]
};

const config = {
responsive: true,
displayModeBar: false
};

Plotly.newPlot('budget-roi-plot', [trace], layout, config);
</script>
65 changes: 65 additions & 0 deletions _includes/plotly/visualization4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<div id="budget-roi-plot"></div>
<script>
// Sample data
const budgets = Array.from({length: 100}, () => Math.random() * 200000000);
const rois = budgets.map(b => (Math.random() - 0.5) * 300);
const movieNames = budgets.map((_, i) => `Movie ${i+1}`);

const trace = {
x: budgets,
y: rois,
mode: 'markers',
type: 'scatter',
text: movieNames,
marker: {
size: 10,
color: rois.map(roi => roi < 0 ? '#ff6b6b' : '#4ecdc4'),
opacity: 0.7
},
hovertemplate:
'<b>%{text}</b><br>' +
'Budget: $%{x:,.0f}<br>' +
'ROI: %{y:.1f}%<br>' +
'<extra></extra>'
};

const layout = {
title: {
text: 'Movie Budgets vs Return on Investment',
font: { size: 24 }
},
xaxis: {
title: 'Budget (USD)',
tickformat: '$,.0f'
},
yaxis: {
title: 'Return on Investment (%)',
zeroline: true,
zerolinecolor: '#969696',
gridcolor: '#e1e1e1'
},
paper_bgcolor: 'rgba(0,0,0,0)',
plot_bgcolor: 'rgba(0,0,0,0)',
hovermode: 'closest',
showlegend: false,
shapes: [{
type: 'line',
x0: 0,
x1: 200000000,
y0: 0,
y1: 0,
line: {
color: '#969696',
width: 1,
dash: 'dot'
}
}]
};

const config = {
responsive: true,
displayModeBar: false
};

Plotly.newPlot('budget-roi-plot', [trace], layout, config);
</script>
Binary file added assets/img/movie-analytics-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions assets/img/movie-failure-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/popcorn-spill.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e6d804b

Please sign in to comment.