- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone written a macro/guide to automatically download specified vectors from Statistics Canada?
Suppose I want, as an example, v125190 v125221, is there a way to automate this? Note these are vectors with data and not tables.
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How do you access it now? Does it have a URL? Some other method?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would go to this page and get a CSV
1. https://www150.statcan.gc.ca/t1/tbl1/en/sbv.action#tables
2. Where it says enter vector numbers enter them in separated by commas, then choose 3,000 as the number of reference periods, then download manually
3. Load into SAS.
This is not an automated approach....so I thought I would ask
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So clicking around it looks like you can download a ZIP file with the data for one of those directly.
https://www150.statcan.gc.ca/n1/en/tbl/csv/24100041-eng.zip
Not sure whether it is always going to use that 24100041 number for this "vector".
The ZIP file has two files. From the names it looks like one is the data and the other is the description of the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I wrote a macro to get all data at one point, not specific vectors.
It's in the Canadian subforum.