Skip to content

Commit 811e1cc

Browse files
committed
Add "size" to the title, and use pdf figures
1 parent 7bc2841 commit 811e1cc

15 files changed

+56
-47
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ main.synctex.gz
4343
slides/very-simple-ecoregions*
4444
appendix-s1.tex
4545
appendix-s2.tex
46+
tex_src.zip

Makefile

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
data-dir = data/processed
22
gdb = data/raw/us_pbg00_2007.gdb
3-
figs = fig/ppc-density-funs.png \
4-
fig/burn-area-effs.png fig/ppc-counts.png \
5-
fig/all-coefs.png \
6-
fig/count-partial-effs.png fig/attribution-plot.png \
7-
fig/max-preds-l3.png \
8-
fig/maps.png \
9-
fig/spline-concept.png \
10-
fig/million-acre-probs.png \
11-
fig/wallow-local-conditions.png
3+
figs = fig/figure_7.pdf \
4+
fig/figure_8.pdf fig/figure_4.pdf \
5+
fig/figure_6.pdf \
6+
fig/figure_5.pdf fig/figure_11.pdf \
7+
fig/figure_9.pdf \
8+
fig/figure_2.pdf \
9+
fig/figure_3.pdf \
10+
fig/figure_10.pdf \
11+
fig/figure_12.pdf
1212

1313
tables = data/processed/burn-area-loglik.csv data/processed/count-loglik.csv \
1414
data/processed/rho_beta.csv data/processed/count_test_intervals.csv \
@@ -17,7 +17,7 @@ tables = data/processed/burn-area-loglik.csv data/processed/count-loglik.csv \
1717
data/processed/burn-area-beta.csv \
1818
data/processed/million-er-mon.csv
1919

20-
all: main.pdf appendix-s1.pdf appendix-s2.pdf
20+
all: main.pdf appendix-s1.pdf appendix-s2.pdf tex_src.zip
2121

2222
main.pdf: $(figs) $(tables) main.Rmd library.bib header.sty
2323
Rscript -e "rmarkdown::render('main.Rmd')"
@@ -96,40 +96,40 @@ ba_tpareto_fit.rds: R/fit-burn-area-tpareto.R data/processed/stan_d.rds
9696
ba_weibull_fit.rds: R/fit-burn-area-weibull.R data/processed/stan_d.rds
9797
Rscript --vanilla R/fit-burn-area-weibull.R
9898

99-
fig/ppc-density-funs.png data/processed/burn-area-loglik.csv data/processed/area_coverage.csv: R/burn-area-model-comps.R \
99+
fig/figure_7.pdf data/processed/burn-area-loglik.csv data/processed/area_coverage.csv: R/burn-area-model-comps.R \
100100
ba_gamma_fit.rds ba_lognormal_fit.rds ba_pareto_fit.rds \
101101
ba_tpareto_fit.rds ba_weibull_fit.rds
102102
Rscript --vanilla R/burn-area-model-comps.R
103103

104-
fig/burn-area-effs.png data/processed/burn-area-beta.csv: ba_lognormal_fit.rds R/burn-area-plots.R
104+
fig/figure_8.pdf data/processed/burn-area-beta.csv: ba_lognormal_fit.rds R/burn-area-plots.R
105105
Rscript --vanilla R/burn-area-plots.R
106106

107-
data/processed/count-loglik.csv fig/ppc-counts.png: R/count-model-comps.R \
107+
data/processed/count-loglik.csv fig/figure_4.pdf: R/count-model-comps.R \
108108
pois_fit.rds nb_fit.rds zip_fit.rds zinb_fit.rds
109109
Rscript --vanilla R/count-model-comps.R
110110

111-
fig/all-coefs.png fig/count-partial-effs.png data/processed/rho_beta.csv: R/count-effplots.R \
111+
fig/figure_6.pdf fig/figure_5.pdf data/processed/rho_beta.csv: R/count-effplots.R \
112112
zinb_full_fit.rds
113113
Rscript --vanilla R/count-effplots.R
114114

115-
fig/attribution-plot.png: R/interaction-plots.R zinb_full_fit.rds
115+
fig/figure_11.pdf: R/interaction-plots.R zinb_full_fit.rds
116116
Rscript --vanilla R/interaction-plots.R
117117

118118
count-preds.rds data/processed/area_df.csv data/processed/count_test_intervals.csv: R/plot-predicted-counts.R \
119119
zinb_full_fit.rds
120120
Rscript --vanilla R/plot-predicted-counts.R
121121

122-
fig/max-preds-l3.png fig/million-acre-probs.png test_preds.rds data/processed/predicted_totals.csv data/processed/million-er-mon.csv data/processed/mev_intervals.csv: count-preds.rds \
122+
fig/figure_9.pdf fig/figure_10.pdf test_preds.rds data/processed/predicted_totals.csv data/processed/million-er-mon.csv data/processed/mev_intervals.csv: count-preds.rds \
123123
ba_lognormal_fit.rds R/mev-plots.R
124124
Rscript --vanilla R/mev-plots.R
125125

126-
fig/maps.png: data/processed/mtbs.rds data/processed/ecoregions.rds R/plot-study-region.R
126+
fig/figure_2.pdf: data/processed/mtbs.rds data/processed/ecoregions.rds R/plot-study-region.R
127127
Rscript --vanilla R/plot-study-region.R
128128

129-
fig/spline-concept.png: R/spline-concept.R
129+
fig/figure_3.pdf: R/spline-concept.R
130130
Rscript --vanilla R/spline-concept.R
131131

132-
fig/wallow-local-conditions.png: R/wallow-case-study.R data/processed/ecoregions.rds data/raw/climate-data.csv
132+
fig/figure_12.pdf: R/wallow-case-study.R data/processed/ecoregions.rds data/raw/climate-data.csv
133133
Rscript --vanilla R/wallow-case-study.R
134134

135135
push_fits:
@@ -138,6 +138,9 @@ push_fits:
138138
pull_fits:
139139
aws s3 cp s3://earthlab-mjoseph/ . --recursive --exclude "*" --include "*_fit.rds"
140140

141+
tex_src.zip: $(figs) main.pdf
142+
zip tex_src.zip fig/*.pdf main.tex appendix-s1.tex appendix-s2.tex
143+
141144

142145
clean:
143146
find . -type f -name '*.png' -delete

R/burn-area-model-comps.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ sum_plot <- train_max %>%
286286

287287
cowplot::plot_grid(den_plot, tail_plot, max_plot, sum_plot,
288288
nrow = 4, rel_heights = c(1.3, 1, 1, 1))
289-
ggsave(filename = 'fig/ppc-density-funs.png', width = 6, height = 4.25)
289+
ggsave(filename = 'fig/figure_7.pdf', width = 6, height = 4.25)
290290

291291

292292

R/burn-area-plots.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ location_ts_plot
185185

186186
q <- (coefplot + p) / location_ts_plot + plot_layout(heights = c(.6, 1), ncol = 1)
187187
q
188-
ggsave('fig/burn-area-effs.png', plot = q, width = 8.5, height = 5)
188+
ggsave('fig/figure_8.pdf', plot = q, width = 8.5, height = 5)

R/count-effplots.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ coefplot <- coef_d %>%
8787
theme(legend.position = 'none') +
8888
geom_text_repel(aes(label = ifelse(nonzero, variable, '')),
8989
color = 'black', size = 2)
90-
ggsave('fig/all-coefs.png', plot = coefplot, width = 6, height = 3.5)
90+
ggsave('fig/figure_6.pdf', plot = coefplot, width = 6, height = 3.5)
9191

9292

9393
# Partial effect plots ----------------------------------------------------
@@ -187,7 +187,7 @@ p <- plot_data %>%
187187
legend.position = 'bottom') +
188188
scale_y_continuous(breaks = c(-3, 0, 3))
189189
p
190-
ggsave('fig/count-partial-effs.png', plot = p, width = 6, height = 4)
190+
ggsave('fig/figure_5.pdf', plot = p, width = 6, height = 4)
191191

192192

193193

R/count-model-comps.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,4 @@ sum_plot <- ppc_counts %>%
262262

263263
cowplot::plot_grid(den_plot, zero_plot, max_plot, sum_plot,
264264
ncol = 1, rel_heights = c(1.3, 1, 1, 1))
265-
ggsave('fig/ppc-counts.png', width = 6, height = 4.5)
265+
ggsave('fig/figure_4.pdf', width = 6, height = 4.5)

R/interaction-plots.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,6 @@ case_study_plot <- write_attribution_plot(max_d$NA_L3NAME)
153153
p1 <- case_study_plot$plot +
154154
geom_vline(aes(xintercept = ym), data = max_d, lty = 'dotted')
155155
p1
156-
ggsave(filename = 'fig/attribution-plot.png', plot = p1,
156+
ggsave(filename = 'fig/figure_11.pdf', plot = p1,
157157
width = 7, height = 4)
158158
write_rds(case_study_plot, 'data/processed/case-study-plot.rds')

R/mev-plots.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ ym_million_prob %>%
219219
legend.position = 'none') +
220220
annotate(geom = 'text', x = 2007, y = .15, label = 'Train') +
221221
annotate(geom = 'text', x = 2013, y = .15, label = 'Test', color = 'red')
222-
ggsave('fig/million-acre-probs.png', width = 4, height = 3)
222+
ggsave('fig/figure_10.pdf', width = 4, height = 3)
223223

224224

225225
# Evaluate interval coverage ----------------------------------------------
@@ -297,7 +297,7 @@ interval_df %>%
297297
ylab('Maximum fire size (hectares)') +
298298
theme(panel.grid.minor = element_blank(),
299299
axis.text.x = element_text(angle = 90))
300-
ggsave('fig/max-preds-l3.png', width = 7, height = 4)
300+
ggsave('fig/figure_9.pdf', width = 7, height = 4)
301301

302302
# get overall interval coverage stats for block maxima
303303
write_csv(interval_df, 'data/processed/mev_intervals.csv')

R/plot-study-region.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ fire_map <- ecoregions %>%
4848
ggtitle('A')
4949

5050
p <- (fire_map + l1_map) / (l2_map + l3_map)
51-
ggsave(filename = 'fig/maps.png', plot = p, width = 10, height = 7)
51+
ggsave(filename = 'fig/figure_2.pdf', plot = p, width = 10, height = 7)

R/spline-concept.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,5 @@ function_plot <- function_val %>%
8989

9090
p <- unweight_plot + weight_plot + function_plot
9191
p
92-
ggsave(filename = 'fig/spline-concept.png', plot = p, width = 6, height = 2)
92+
93+
ggsave(filename = 'fig/figure_3.pdf', plot = p, width = 6, height = 2)

0 commit comments

Comments
 (0)