Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise graphics #248

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
98 changes: 49 additions & 49 deletions data/processed/interim_results_capacity.csv

Large diffs are not rendered by default.

Binary file modified data/raw/life_cycle_data.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion scripts/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def calc_total_emissions():
'total_human_toxicity' : 'total_human_toxicity_cases'}

df1.rename(columns = renamed_columns, inplace = True)

filename2 = 'total_emissions.csv'
path_out2 = os.path.join(BASE_PATH, '..', 'results', filename2)
df1.to_csv(path_out2, index = False)
Expand Down
Binary file modified validation/Total rocket emissions.xlsx
Binary file not shown.
Binary file modified validation/percentage_calculations.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion vis/aggregate_metrics.r
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ df$rocket_type = factor(

totals <- df %>%
group_by(combined) %>%
summarize(value = signif(sum(no_launches), 2))
summarize(value = sum(no_launches))

sat_launches =
ggplot(df, aes(x = combined, y = no_launches)) +
Expand Down
8 changes: 4 additions & 4 deletions vis/capacity.r
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,16 @@ df$CNR = factor(
const_capacity <-
ggplot(df, aes(
x = constellation,
y = (mean) * 0.65 / 1e6,
y = (mean_gbps),
fill = CNR
)) +
geom_bar(stat = "identity",
position = position_dodge(),
width = 0.98) +
geom_errorbar(
aes(
ymin = mean * 0.65 / 1e6 - sd * 0.65 / 1e6,
ymax = mean * 0.65 / 1e6 + sd * 0.65 / 1e6
ymin = mean_gbps - sd_gbps,
ymax = mean_gbps + sd_gbps
),
width = .2,
position = position_dodge(.98),
Expand All @@ -212,7 +212,7 @@ const_capacity <-
labels = function(y)
format(y, scientific = FALSE),
expand = c(0, 0),
limits = c(0, 45)
limits = c(0, 53)
) +
theme_minimal() +
theme(
Expand Down
50 changes: 29 additions & 21 deletions vis/cost.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,22 @@ data <- select(
##Constellation Capex##
#######################

df = data %>%
df_capex = data %>%
group_by(constellation) %>%
summarize(mean = mean(capex_costs),
sd = sd(capex_costs))
sd = sd(capex_costs),
mean_bn = round(mean(capex_costs)/1e9,2),
sd_bn = round(sd(capex_costs)/1e9,2)
)

df$constellation = factor(
df$constellation,
df_capex$constellation = factor(
df_capex$constellation,
levels = c('Kuiper', 'OneWeb', 'Starlink', 'GEO'),
labels = c('Kuiper', 'OneWeb', 'Starlink', 'GEO')
)

constellation_capex <-
ggplot(df, aes(x = constellation, y = mean / 1e6)) +
ggplot(df_capex, aes(x = constellation, y = mean / 1e6)) +
geom_bar(stat = "identity",
position = position_dodge(),
width = 0.9) +
Expand All @@ -66,7 +69,7 @@ constellation_capex <-
scale_y_continuous(
labels = function(y)
format(y, scientific = FALSE),
limits = c(0, 4599),
limits = c(0, 7800),
expand = c(0, 0)
) + theme_minimal() +
theme(
Expand All @@ -92,19 +95,22 @@ constellation_capex <-
##Constellation Total operating Costs##
#######################################

df = data %>%
df_opex = data %>%
group_by(constellation) %>%
summarize(mean = mean(opex_costs),
sd = sd(opex_costs))
sd = sd(opex_costs),
mean_bn = round(mean(opex_costs)/1e9,2),
sd_bn = round(sd(opex_costs)/1e9,2)
)

df$constellation = factor(
df$constellation,
df_opex$constellation = factor(
df_opex$constellation,
levels = c('Kuiper', 'OneWeb', 'Starlink', 'GEO'),
labels = c('Kuiper', 'OneWeb', 'Starlink', 'GEO')
)

constellation_opex <-
ggplot(df, aes(x = constellation, y = mean / 1e6)) +
ggplot(df_opex, aes(x = constellation, y = mean / 1e6)) +
geom_bar(stat = "identity",
position = position_dodge(),
width = 0.9) +
Expand All @@ -128,7 +134,7 @@ constellation_opex <-
scale_y_continuous(
labels = function(y)
format(y, scientific = FALSE),
limits = c(0, 4599),
limits = c(0, 7800),
expand = c(0, 0)
) + theme_minimal() +
theme(
Expand All @@ -154,20 +160,22 @@ constellation_opex <-
##Annualized Constellation Total Cost of Ownership##
####################################################


df = data %>%
df_tco = data %>%
group_by(constellation) %>%
summarize(mean = mean(total_cost_ownership / assessment_period_year),
sd = sd(total_cost_ownership / assessment_period_year))
summarize(mean = mean(total_cost_ownership),
sd = sd(total_cost_ownership),
mean_bn = round(mean(total_cost_ownership)/1e9,2),
sd_bn = round(sd(total_cost_ownership)/1e9,2)
)

df$constellation = factor(
df$constellation,
df_tco$constellation = factor(
df_tco$constellation,
levels = c('Kuiper', 'OneWeb', 'Starlink', 'GEO'),
labels = c('Kuiper', 'OneWeb', 'Starlink', 'GEO')
)

constellation_tco <-
ggplot(df, aes(x = constellation, y = mean / 1e6)) +
ggplot(df_tco, aes(x = constellation, y = mean / 1e6)) +
geom_bar(stat = "identity",
position = position_dodge(),
width = 0.9) +
Expand All @@ -186,13 +194,13 @@ constellation_tco <-
title = " ",
subtitle = NULL,
x = NULL,
y = "Annualized TCO\n(US$ Millions)",
y = "TCO\n(US$ Millions)",
fill = 'Cost\nScenario'
) +
scale_y_continuous(
labels = function(y)
format(y, scientific = FALSE),
expand = c(0, 0), limits = c(0, 4599)
expand = c(0, 0), limits = c(0, 7800)
) + theme_minimal() +
theme(
strip.text.x = element_blank(),
Expand Down
19 changes: 14 additions & 5 deletions vis/emissions.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ df = data %>%

check_sums = df %>%
group_by(constellation) %>%
summarize(annual_baseline_emission_Mt = round(
sum(cc_baseline)/1e9,1))
summarize(
annual_baseline_emission_kg = round(sum(cc_baseline)/5,2),
baseline_emission_kg = round(sum(cc_baseline),1),
annual_baseline_emission_Mt = round(sum(cc_baseline)/5/1e9,2),
baseline_emission_Mt = round(sum(cc_baseline)/1e9,1)
)

totals <- df %>%
group_by(constellation, rocket_type) %>%
Expand Down Expand Up @@ -136,9 +140,14 @@ check_sums = df1 %>%
summarize(cc_worst_case_Mt = round(
sum(cc_worst_case)/1e9,1))

totals <- df1 %>%
group_by(constellation, rocket_type) %>%
summarize(value = signif(sum(cc_worst_case)))
check_sums = df1 %>%
group_by(constellation) %>%
summarize(
annual_baseline_emission_kg = round(sum(cc_worst_case)/5,2),
baseline_emission_kg = round(sum(cc_worst_case),1),
annual_baseline_emission_Mt = round(sum(cc_worst_case)/5/1e9,2),
baseline_emission_Mt = round(sum(cc_worst_case)/1e9,1)
)

climate_change_wc <-
ggplot(df1, aes(x = constellation, y = cc_worst_case / 1e9)) +
Expand Down
Binary file modified vis/figures/c_aggregate_metrics.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vis/figures/g_capacity_metrics.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vis/figures/z_meta_figures_file.pptx
Binary file not shown.
22 changes: 11 additions & 11 deletions vis/rocket_scenario_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ emission_subscriber <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 10),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 9),
Expand Down Expand Up @@ -167,7 +167,7 @@ df = data %>%
check_sums = df %>%
group_by(constellation, scenario) %>%
summarize(cc_baseline_sum = round(
sum(cc_baseline)/ 1e9,3))
sum(cc_baseline)/ 1e9,2))

df$scenario = factor(
df$scenario,
Expand All @@ -188,7 +188,7 @@ climate_change <-
aes(
x = constellation,
y = value / 1e9,
label = round(value / 1e9, 3)
label = round(value / 1e9, 2)
),
size = 2.5,
data = totals,
Expand All @@ -213,7 +213,7 @@ climate_change <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 6),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 9),
Expand Down Expand Up @@ -256,7 +256,7 @@ climate_change_wc <-
aes(
x = constellation,
y = value / 1e9,
label = round(value / 1e9, 1)
label = round(value / 1e9, 2)
),
size = 2.5,
data = totals,
Expand All @@ -281,7 +281,7 @@ climate_change_wc <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 6),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 9),
Expand Down Expand Up @@ -350,7 +350,7 @@ ozone_depletion <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 6),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 9),
Expand Down Expand Up @@ -418,7 +418,7 @@ ozone_depletion_wc <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 6),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 9),
Expand Down Expand Up @@ -484,7 +484,7 @@ resource_depletion <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 6),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 12),
Expand Down Expand Up @@ -551,7 +551,7 @@ freshwater_ecotixicity <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 6),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 12),
Expand Down Expand Up @@ -618,7 +618,7 @@ human_toxicity <-
legend.position = 'none',
axis.text.x = element_text(size = 9),
panel.spacing = unit(0.6, "lines"),
plot.title = element_text(size = 12, face = "bold"),
plot.title = element_text(size = 8, face = "bold"),
plot.subtitle = element_text(size = 6),
axis.text.y = element_text(size = 9),
axis.title.y = element_markdown(size = 12),
Expand Down