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

XML Queries Documentation #111

Open
thompsoa opened this issue Jul 17, 2020 · 3 comments
Open

XML Queries Documentation #111

thompsoa opened this issue Jul 17, 2020 · 3 comments
Assignees

Comments

@thompsoa
Copy link

Is there any documentation available about how the XML queries of the database should be written?

I'm trying to access the data from some GCAM runs via rgcam and would like to optimise the query file that I'm using to extract the variables I need but I'm not sure how to set that up.

I'm starting from the sample-queries.xml file that came with rgcam.

For example, it would be useful to be able to see a full list of outputs which can be extracted from a run, and how to aggregate data - e.g. to get the global total sequestration, not split by region.

@kvcalvin kvcalvin self-assigned this Sep 1, 2020
@VincenzoFrasca
Copy link

I'm facing the same need as @thompsoa, are there any updates on this issue?

@kvcalvin
Copy link
Contributor

There is some information available. We have added information on outputs and their queries to the documentation (see http://jgcri.github.io/gcam-doc/outputs_quantity.html as an example and http://jgcri.github.io/gcam-doc/index.html for other outputs_ pages).

@pralitp
Copy link
Contributor

pralitp commented Aug 12, 2021

I would also suggest checking the Main_queries.xml which is more complete than the examples in rgcam and kept up to date. It is the place we draw the queries from in our documentation.

The queries are built upon the standard XPath (and in a few cases XQuery) syntax. You can find many resources online about the syntax, available functions, and general tips. Which you could then take advantage of to customize the examples found in Main_queries.xml for your needs.

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

4 participants