Skip to content

About

A tile map showing a month of streamflow conditions across the U.S.

Resources

Code of conduct

Contributing

Stars

45 stars

Watchers

5 watching

Forks

Repository files navigation

Recreating the streamflow tile map

This repository uses the targets package to build the chart. Run tar_make() to execute _targets.R .

Install all packages needed to run:

install.packages(c('targets', 'tidyverse', 'lubridate', 'geofacet', 'cowplot', 'ggfx', 'showtext', 'magick', 'maps', 'svglite', 'xml2', 'rsvg', 'ragg', 'arrow', 'dataRetrieval'))

Running tar_make() will produce:

flow_cartogram

ig_1_title ig_2_national ig_3_cartogram

To disable showtext font styling after running pipeline, run:

showtext_auto(enable = FALSE)

Data

Streamflow data come from the current conditions pipeline, which writes a daily parquet file of streamflow percentile categories at USGS streamgages to S3. This pipeline downloads one file per day of the focal month from:

https://dfi09q69oy2jm.cloudfront.net/visualizations/current_conditions/streamflow/data/sf_categorizations_{YYYY-MM-DD}.parquet

To build a new month, set focal_month in _targets.R to the first day of that month (e.g. as.Date("2026-09-01")) and run tar_make(). Any day without a file is skipped with a warning.

About

A tile map showing a month of streamflow conditions across the U.S.

Resources

Code of conduct

Contributing

Stars

45 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages