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

Information needed from API with ping #174

Open
MansMeg opened this issue Jan 8, 2019 · 5 comments
Open

Information needed from API with ping #174

MansMeg opened this issue Jan 8, 2019 · 5 comments

Comments

@MansMeg
Copy link
Contributor

MansMeg commented Jan 8, 2019

Get more information:

  • All limits (now it seem to be differences)
  • Citation information (how should data be cited)
  • Base level and structure
  • languages and versions
  • encoding used by the API
@jxpx91
Copy link

jxpx91 commented Jun 12, 2019

Hi Måns, I'm using the API using a JS program, my question is about getting the metadata in json-stat response, I need to know the HEADING and STUB values of the px file. At this moment I'm getting it from the px format response, but it means two calls (px format and json-stat format). In another response you use get_pxweb_metadata usign R, so how can I get metadata in a simple way?

@MansMeg
Copy link
Contributor Author

MansMeg commented Jun 13, 2019

Hi! Im not sure if I understand your question, but if you do a call to the table but without a query, you will get a metadata json object in return. Although, not a json-stat since the meta-data dont contain any statistical data.

@jxpx91
Copy link

jxpx91 commented Jun 13, 2019

Yes, if I do a GET without a query I get a json but it only contains title and variables. I need more metadata.

This is how I'm working:

  • I'm using Postman
  • If I call a GET to my PX API, I'll receive the JSON that we're talking about.
  • If I call a POST to my PX API with a query and format json-stat, I'll receive a json-stat with all the information that I need less the HEADING and STUB.
  • If I call a POST to my PX API with a query and format px, I'll receive all the metadata that I need with the HEADING and STUB also all the values and data.

I know that I can work with px format, but we want with json-stat. So, there is a way to get all that metadata with all the data and values on json-stat?

I attach the examples
px post (HEADING and STUB are there)
2019-06-13_10h12_39
json-stat post (HEADING and STUB missing)
2019-06-13_10h13_12
simple get (json with some metadata info)
2019-06-13_10h13_46

@MansMeg
Copy link
Contributor Author

MansMeg commented Jun 14, 2019

Hi,

I cannot tell exactly what is included in the different object. In the R pxweb package we use the JSON format. If the thing you are after is not included in neither the meta data object nor the json-stat table content object I guess it only exists in the px object and hence you need to get it twice.

You can also send an e-mail to the pxweb developers at Statistics Sweden. I think their e-mail is [email protected].

/Måns

@jxpx91
Copy link

jxpx91 commented Jun 14, 2019

Hi Måns,

Yes... It's what I was afraid for, call two get, but it seems to be the "correct" way. Thank you for all your help and attention. I'll send an email to pxweb developers and if they have a solution I'll put it here.

Regards

Juan Pablo

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

No branches or pull requests

2 participants