link_poi_naics: Use a Core Places file to Create a POI-NAICS crosswalk

View source: R/link_poi_naics.R

link_poi_naicsR Documentation

Use a Core Places file to Create a POI-NAICS crosswalk

Description

Feed this function the most recent Core Places file, and it will give you back a data.table with two columns: safegraph_place_id and naics_code. Saving this file is recommended. Then, provide this object to read_shop or read_many_shop so that you can use 'naics_code' in the by argument.

Usage

link_poi_naics(
  filename,
  dir = ".",
  exdir = dir,
  cleanup = FALSE,
  silent = FALSE
)

Arguments

filename

The filename of the ZIP Core Places file.

dir

The directory that the file is in.

exdir

Name of the directory to unzip to.

cleanup

Set to TRUE to delete all the unzipped files after being read in.

silent

Suppress timing messages.

Details

This function is DEPRECATED. It only works with the OLD Core files (and thus the continued usage of safegraph_place_id instead of placekey), and is superseded by the more flexible read_core() function.

Examples


## Not run: 
# Core-USA-June2020-Release-CORE_POI-2020_05-2020-06-06.zip is a Core places file in the working directory
poi_link <- link_poi_naics('Core-USA-June2020-Release-CORE_POI-2020_05-2020-06-06.zip')

## End(Not run)

SafeGraphInc/SafeGraphR documentation built on Nov. 25, 2022, 11:20 a.m.