Open datscience17 opened 2 years ago
Hi @datscience17,
Thanks for your question.
In the repository, we provided other examples to construct the scores for multiple states of interest or the states via different branches of the repository. You can find these examples via
More importantly, you will need to check out the _targets.R file. When creating the scores for multiple areal units, we use implicit loops (see pattern=map(states)
in the tar_target
function) to iterate over all areas of interest. This implicit looping is implemented with the dynamic programming feature in the workflow package targets
.
In addition, you need to configure which states are of interest by supplying a vector of state names to the tar_target(states, state_names_vec)
. For example, you can pass in
tar_target(states, c("Arizona", "Utah"))
for the two statestar_target(states, state.name)
for all US states. Of course, you’ll need to use the version of _targets.R with the implicit loop.
When pulling census data, if I want to create scores for the entire country, how do I configuration with tar_target?