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

configuration residential segregation #9

Open
datscience17 opened this issue Mar 25, 2022 · 1 comment
Open

configuration residential segregation #9

datscience17 opened this issue Mar 25, 2022 · 1 comment
Labels
question Further information is requested

Comments

@datscience17
Copy link

When pulling census data, if I want to create scores for the entire country, how do I configuration with tar_target?

@boyiguo1
Copy link
Owner

boyiguo1 commented Apr 2, 2022

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 states
  • tar_target(states, state.name) for all US states.

Of course, you’ll need to use the version of _targets.R with the implicit loop.

@boyiguo1 boyiguo1 added the question Further information is requested label Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants