This project
-
calculates statistics (e.g., area, total population, mean precipitation) for a series of focal regions
-
Pulls, processes, and visualizes data from the USGS Inventory of water bottling facilities in the United States, 2023, and select water-use data, 1955-2022
-
Builds a javascript website using data visualization to communicate the motivation for the USGS Water Mission Area's Bottled Water Assessment project, the distribution of bottling facilities across the United States, where bottling facilities source water, and the available water use data for bottled water facilities. The website can be accessed here
This repo contains an R pipeline that uses the targets
package to process the national inventory of water bottling facilities and generate static charts and maps.
Two data files must be downloaded manually to run the pipeline
-
2020 global gridded population count data. Downloading the data requires creating a free account and logging in. Select "Population Count, v4.11" with options 2020, tif format, 30-second resolution. Unzip the folder into 1_fetch/in. Final directory path should be
'1_fetch/in/gpw-v4-population-count-rev11_2020_30_sec_tif/gpw_v4_population_count_rev11_2020_30_sec.tif'
. -
The Koppen climate classifications data. This analysis used version V1 of the maps, as described in Betck et al., 2018, which can be downloaded here. The
'Beck_KG_V1.zip
should be downloaded and placed in'1_fetch/in'
. Final file path should be'1_fetch/in/Beck_KG_V1.zip'
.
To run this pipeline, clone the repo, install targets
, download the data as instructed above, and run the following from the directory:
library(targets)
tar_make()
Clone the repo. In the directory, run npm install
to install the required modules. This repository requires npm v20
to run. If you are using a later version of npm
, you may try using nvm
to manage multiple versions of npm.
Once the dependencies have been installed, run npm run dev
to run locally from your browser.