Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any SDMX Service Endpoint for Statistics Canada? #125

Open
Monduiz opened this issue Apr 23, 2017 · 18 comments
Open

Any SDMX Service Endpoint for Statistics Canada? #125

Monduiz opened this issue Apr 23, 2017 · 18 comments

Comments

@Monduiz
Copy link

Monduiz commented Apr 23, 2017

Hello,

I am working on automating the processing of official statistics in a range of applications and workflows using Statistics Canada's sources. The Canadian Agency is providing its tables from Census, National household survey and other surveys, the CANSIM database as well in the sdmx-ml format.

If I can help to add the agency as a provider by default, I would love to, otherwise, this is a request to add those sources as a provider for the sdmx package.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@eblondel
Copy link
Member

eblondel commented Apr 23, 2017

Hi, do you know if Statistics Canada provides a SDMX web-service API implentation ? if yes could you share the link? thanks

@Monduiz
Copy link
Author

Monduiz commented Apr 24, 2017

I am not sure if there is an API. My guess is no but I will ask.

The Census datasets are accessible through links like this one with the tables identified with a PID:
http://www12.statcan.gc.ca/datasets/OpenDataDownload.cfm?PID=102009"

Even though they seemed to be catalogued with an id, it is not comprehensive. The link above refers to catalogue: 98-311-XCB2011022.

The CANSIM tables can be accessed through links like this one with the table number, in this case, CANSIM 2820003:
http://www20.statcan.gc.ca/tables-tableaux/cansim/sdmx/02820003.zip

I will try to get more information.

@eblondel eblondel self-assigned this May 16, 2017
@Monduiz
Copy link
Author

Monduiz commented May 21, 2017

So, there is a Web API that will launch. I will get more details soon. What would you need to make the service provider?

@eblondel
Copy link
Member

When it is launched publicly, paste the URL of the web API here, better if there is some web documentation of the API. And then i can have a look to it and see feasibility to add it as embedded service endpoint!

@eblondel
Copy link
Member

Hello @Monduiz any news about this new SDMX web API?

@Monduiz
Copy link
Author

Monduiz commented Jun 14, 2017

I will try to get an update this week and post back.

@eblondel
Copy link
Member

@Monduiz did you get any update regarding an eventual SDMX web API for Statistics Canada?

@eblondel
Copy link
Member

@Monduiz any reference on the web mentioning an SDMX API for Canada statistics?

@Monduiz
Copy link
Author

Monduiz commented Jan 17, 2018

I am going to do a follow-up this week.

@eblondel
Copy link
Member

@Monduiz are you aware of any service for this? I've been searching a bit, no way to find a SDMX web-service for Statistics Canada.. is there something in beta stage?

@Monduiz
Copy link
Author

Monduiz commented Aug 26, 2018

@eblondel Hi! I apologize for the lack of updates. I had surgery and was stuck in bed for a few months. I want to catch up with this. Here is what I suggest, I will investigate with StatCan and start working on a way to make this happen. I am working on an analytics program proposal for my department in the Government of Canada and if we want to automate some functions, we need that form of access to the data from the agency. I will report back. Sorry again for the delay!

@eblondel
Copy link
Member

No problem, hope you are recovering well. In case you need professionnal service support related to SDMX and rsdmx, let me know. http://eblondel.github.io/#/contact Best regards

@eblondel eblondel changed the title Registering a new SDMX service provider by default: Statistics Canada SDMX Service Endpoint for Statistics Canada Aug 29, 2018
@eblondel eblondel changed the title SDMX Service Endpoint for Statistics Canada Any SDMX Service Endpoint for Statistics Canada? Oct 1, 2018
@Monduiz
Copy link
Author

Monduiz commented Dec 10, 2018

Ok, so StatsCan has been working on implementing web service APIs, this one is for the Census profile.

Census profile

More info for developers on this page:

developers

We are still looking into the specifics and what else we can have access to and if more is coming. I will update soon.

@KrishnaTO
Copy link

Fairly new to SDMX but I was looking for a similar connector, and based on StatsCan's API function getFullTableDownloadSDMX, I was able to easily get the data, with help from this snippet

In my case, enter the document number to create folder, download files per document num, and switch to the folder.

library(httr)
library(rsdmx)

statscanSDMX <- function(docNum) {
Files<-GET(paste("https://www150.statcan.gc.ca/t1/wds/rest/getFullTableDownloadSDMX", docNum, sep = "/"))
dir.create(paste(getwd(), docNum, sep = "/"))
setwd(docNum)
download.file(content(Files)$object, docNum, method="auto", quiet = FALSE)
unzippedist<-unzip(docNum)
}

file1 <- readSDMX(unzippedist[1], isURL = F)

@eblondel
Copy link
Member

eblondel commented Feb 5, 2021

Thanks, it seems this is an adhoc web-service and not a standard SDMX web api, however this might be plugged into rsdmx, why not. I will look into it when i have time.

@RichardMN
Copy link

Just to note that there are already other R packages tailored to accessing StatsCan data:

Not to say that it might not be nice to see it among the other providers, but this may not need to be a priority.

@lucasjfriesen
Copy link

Thanks for those pointers @RichardMN. Looks like I'm following a few folks down this rabbit hole.

StatsCan has set up as a proper SDMX web service now. https://www.statcan.gc.ca/en/developers/sdmx/user-guide

@eblondel
Copy link
Member

Thanks @lucasjfriesen for this, it's a good news, I will have a look the above link, and see if I can plug a connector asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants