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

Future updates to documentation #158

Open
lindsayplatt opened this issue Sep 9, 2022 · 0 comments
Open

Future updates to documentation #158

lindsayplatt opened this issue Sep 9, 2022 · 0 comments
Assignees

Comments

@lindsayplatt
Copy link
Contributor

lindsayplatt commented Sep 9, 2022

Capturing the things I skipped in #157 here for now:

  1. How to generate the full water year animation using previous quarter's callout_cfg.yml
  2. How to create shape pngs for any callout overlays (which we don't really do anymore since it looks better without)
  3. Add that ffmpeg is needed for video formats & gifsicle is needed for gif formats. Can most likely install with package managers

Here's some code that I used previously to generate the file to use as a basemap for creating the shapes in the past, though.

# To create a template for making the overlays, run the following
# You can make it with or without the basemap. The important part is that it is the right dimensions.

source("1_fetch/src/map_utils.R")
source("2_process/src/project_shift_states.R")
source("6_visualize/src/prep_basemap_fun.R")
source("6_visualize/src/prep_view_fun.R")
source("6_visualize/src/create_animation_frame.R")

viz_config <- yaml::yaml.load_file("viz_config.yml")
viz_config[['basemap']][["border"]] <- viz_config[['basemap']][["col"]] # No outlines on states
states_projected <- project_states('1_fetch/out/pre_state_boundaries_census.zip.ind', viz_config[['projection']])
states_shifted <- shift_states(states_projected, viz_config[['shift']])

create_animation_frame(
      png_file="6_visualize/in/overlay_template.png",
      config=viz_config[c('width','height')],
      prep_view_fun(as_view_polygon(viz_config[c('bbox', 'projection', 'width', 'height')]), viz_config['background_col']),
      prep_basemap_fun(states_shifted, viz_config[['basemap']]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant