read_core | R Documentation |
Be aware that the files this is designed to work with are large and this function may take a while to execute. This function takes folder of Core files and reads it them in. The output is a data.table
.
read_core( dir = "core_poi/", filter = NULL, select = NULL, key = NULL, secret = NULL, silent = FALSE, ... )
dir |
The directory that the CORE files are in. If this folder contains multiple months of Core files, it will use the most recent (this only works if you are using the standard AWS file structure). |
filter |
A character string describing a logical statement for filtering the data, for example |
select |
Character vector of variables to get from the file. Set to |
key |
A character string containing an AWS Access Key ID. If |
secret |
A character string containing an AWS Secret Access Key. |
silent |
Suppress timing messages. |
... |
Other arguments to be passed to |
AS OF SafeGraphR VERSION 0.3.0 THIS FUNCTION ONLY WORKS WITH NEW CORE FILE FORMATS. For old-format Core files, you can still use the less-flexible and otherwise deprecated link_poi_naics()
function.
## Not run: # Location of our CORE file # Note we probably don't have to specify 2020/10 if that's the most recent one dir <- '../SafeGraph/core_poi/2020/10/' # Let's only get retail POIs in California # And locations <- read_core(dir = dir, filter = 'region == "CA" & floor(naics_code/10000) %in% 44:45') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.