kosukeimai / wru

Who Are You? Bayesian Prediction of Racial Category Using Surname and Geolocation
132 stars 31 forks source link

How long does it take to run `get_census_data` #135

Closed geneh0 closed 9 months ago

geneh0 commented 10 months ago

Hi! I'm trying to download the census data on a block group level for every state so I can rerun analyses quickly. I was wondering how long we expect it to take to offline the data stratified by age and sex. If it's a long time, is there any other way to get the data into R quickly? Thanks!

1beb commented 9 months ago

Hello, unfortunately we are limited by the census API. Using your key, you can download it once and re-use it. You can also using multiprocessing to get the data a little quicker. You can specify a future plan before you run and it will use system resources accordingly. A note of caution, a larger machine may be impolite to the census API and you put your CENSUS_API_KEY at risk of being rate limited.

library(wru)
library(future)
plan(multiprocessing)

# wru commands here