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

Machine readable format #37

Open
rwohleb opened this issue Apr 13, 2018 · 11 comments
Open

Machine readable format #37

rwohleb opened this issue Apr 13, 2018 · 11 comments
Milestone

Comments

@rwohleb
Copy link

rwohleb commented Apr 13, 2018

In addition to standardized field names ( #1 ), it would be great if all of the questions/answers were in an easily parsable format. I have some ideas for gathering demographics in a secure way, and would much prefer to be able to just slurp up everything already defined here, rather than having to manage that myself.

@rwohleb
Copy link
Author

rwohleb commented Apr 13, 2018

Since everything else is JSON these days, maybe it could be in a form such as:

age.json
{ "id": "age", "title": "Age", "description": "The age of the person", "options": [ {"id": "0to14", "title": "0 to 14"}, {"id": "15to19", "title": "15 to 19"}, { "id": "20to60", "title": "20 to 60", "options": [ {"id": "20to39", "title": "20 to 39"}, {"id": "40to60", "title": "40 to 60"} ] } ] }

This structure allows for different levels of granularity. One potential use is allowing people to broadly identify with a group without having to identify with a specific sub-group. When consuming the results, it would make it easy to roll up the stats without having to separately define a connection between values.

I'm exhausted from the end of a convention, so half of what I said may make no sense ;)

@drnikko
Copy link
Owner

drnikko commented Apr 13, 2018

Hi @rwohleb yes, this is great, thank you!! There have been some discussions of this offline - how can we enable form authors (who are also programmers) to just consume a json feed of the questions and then, theoretically, also stay up to date as questions evolve.

JSON is definitely what we'll end up using. As a first pass, can you suggest a way to structure this initiative in the issue queue?

@rwohleb
Copy link
Author

rwohleb commented Apr 13, 2018

I've started looking at what it would take to setup a PR for demonstration purposes. I'm currently trying to figure out how you are handling things between docs, doc-source, and gh-pages. Is there a README that I just happened to miss?

@drnikko
Copy link
Owner

drnikko commented Apr 13, 2018

@rwohleb nope - you caught me not documenting. :)

pip install sphinx
pip install sphinxcontrib-bibtex
pip install guzzle_sphinx_theme
sphinx-build -b html doc-source docs

it's sphinx-build that generates docs from doc-source

@drnikko
Copy link
Owner

drnikko commented Apr 13, 2018

I can add this to a readme if you can confirm that those steps work. :) that's all of the instances of sphinx that I could find in my bash history.

@hestenet
Copy link

hestenet commented May 8, 2018

Just wanted to chime in with a +1 for this issue. At DrupalCon Nashville I discussed this same idea briefly in the hallway with @drnikki and @sparklingrobots. Providing the questions and answers in JSON format would be incredibly helpful, and then my team over at Drupal.org can work on building a module to consume that for Drupal sites (and I can totally imagine other open source projects wanting to do the same).

Thanks for proposing this/moving it forward @rwohleb

@sparklingrobots
Copy link

Just a note to say that the DDI Contrib Team has been working on getting Gender Field module up for D8, which we are tying to OpenDemographics. Right now the module has a manually created version of the OpenDemographics data, but our goal is to build the module to consume this data.

We're quite close to getting this module out into beta and I think it would be swell if we could work together with you & the OpenDemographics folks to get this work done. I confess we already registered the namespace on d.o for OpenDemographics in anticipation of this work. :)

Posted this on the d.o issue queue as well.

@hestenet
Copy link

hestenet commented May 9, 2018

Thanks for the update @sparklingrobots! I'll get caught up on the Gender Field module work and start following the OpenDemographics project queue on D.O.

@ivanstegic
Copy link

I love the idea of there being a machine readable format.

I wonder if the full JSON response couldn't just be an endpoint of an HTTP request that is the latest released version on a static github pages URL, perhaps with a custom domain? That way, it would be easy to make that list available to anything that speaks HTTP (including mobile phone apps) while including versioning as well. Might be a good idea to have a separate repo for that? Perhaps even something that is owned by an open-demographics org? There's lots to unpack here... and maybe brainstorming it here is the wrong place, so I'm happy to do it elsewhere too.

@drnikko
Copy link
Owner

drnikko commented May 17, 2018

Hi all,

First, as always, thank you for participating in this! I think what makes the most sense as a next step is to agree on a data structure that would account for all questions and be extensible for the future. I've started a ticket for that here: #38

@drnikko
Copy link
Owner

drnikko commented Jun 2, 2018

@rwohleb (can't tag you in #38 for some reason), but I did a pass on this and would love your feedback since you kicked it off (others too - @ivanstegic, @sparklingrobots <3 ) Thanks, all, for your continued help with this.

@drnikko drnikko added this to the JSON Endpoint milestone Jun 2, 2018
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

5 participants