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

JSON specs for articles #12

Closed
PabloLeon opened this issue Aug 10, 2017 · 1 comment
Closed

JSON specs for articles #12

PabloLeon opened this issue Aug 10, 2017 · 1 comment
Labels

Comments

@PabloLeon
Copy link
Owner

I need a JSON spec for the article structure.

  • What is the sequence of text
  • Parameters for the map (we assume all articles have a map - so simply zoom/rotation params)
  • What is displayed in the text: data sources, survey questions etc..

Additionally the user might have an accumulated "Inventory" of previously made decisions, say chosen targets, chosen predictors etc..

A good candidate for a JSON spec might be one of "choose your own adventure" packages. Have a look at:
https://github.com/pistacchio/Dedalus
https://github.com/Nanofus/novel.js

@PabloLeon
Copy link
Owner Author

Slides are self-contained. But actions pass an id + type (value, choice) + potentially value and need to correspond to some data transformations? For example if I choose a predictor, how is this translated to the dataset?

Simple version: hardcode predictor+ id -> action, option + id -> action, value selection + id + value -> action
option + id always should choose one of several columns in the data, value selection should always test against a value in the id column in the data (we would need to specify if we want to be < or > than).

A more flexible approach could be a query dsl: https://github.com/jsonata-js/jsonata
There is more exciting ways to (possibly) do this, e.g. graphql schemas look suspiciously like JSON, see gatsbyjs/gatsby#420 or https://github.com/superawesomelabs/leo and could potentially even be inferred automatically from examples (https://github.com/aweary/json-to-graphql)?

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

No branches or pull requests

1 participant