xml_via_python: Download xml xtab data from url, tag with code for caching...

xml_via_pythonR Documentation

Download xml xtab data from url, tag with code for caching useful for older (2006) data that does not come as csv option

Description

Download xml xtab data from url, tag with code for caching useful for older (2006) data that does not come as csv option

Usage

xml_via_python(
  code,
  url,
  python_path = "/anaconda3/bin/python3",
  refresh = FALSE,
  temp = NA
)

Arguments

code

The statcan table code, needed for caching and for locating the table to extract

url

The url to the xml table download. Only needed if the table is not cached, but reommended to always include for reproducibility

python_path

path to python executable, expects a conda environment 'r-reticulate' to exist. Can be set up with 'install_python_environment'.

refresh

Will refresh cached data if set to TRUE, default is FALSE

temp

A path to the downloaded xml zip file. Useful if file has already been downloaded and should not be downloaded again.


mountainMath/cancensusHelpers documentation built on May 14, 2022, 12:43 p.m.