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

Integration With Plots2 #60

Open
3 tasks
IshaGupta18 opened this issue Jun 26, 2019 · 12 comments
Open
3 tasks

Integration With Plots2 #60

IshaGupta18 opened this issue Jun 26, 2019 · 12 comments

Comments

@IshaGupta18
Copy link
Collaborator

This is the next thing we need to do.
Once this is integrated with the main site like PL editor, the functionality will remain the same, but we need to understand how this is to be done.
I am not very sure about how to begin with it, and it would be great if I could get some guidance here for the same.
Once we have integrated this, we have to implement (some or all) of the following features:

  • Displaying per-user data

  • Publishing generated charts as a Research Note

  • Plot charts from previously uploaded files.

Detailed explanations can be found at https://publiclab.org/notes/IshaGupta18/03-04-2019/gsoc-proposal-sensor-data-upload-and-display-library

@jywarren @namangupta01 @gauravano @rexagod @IgorWilbert it would be great if you all could start me up with this one. Thanks a ton!

@jywarren
Copy link
Member

Hi Isha! Just copying in the note from the open call on this:

See how this code pattern-matches the [graph:example.csv] in node and comment text, and replaces it with the _graph.html.erb template?

https://github.com/publiclab/plots2/blob/61684ae2fce32b5c53fba23cb7be46dd69867b60/app/models/concerns/node_shared.rb#L38-L54

@jywarren
Copy link
Member

So let's implement a second version like [simple-graph:/path/to/example.csv] by copying that filter function and then adding a second html template.

@jywarren
Copy link
Member

and once we feel good about it we can replace the original!

@IshaGupta18
Copy link
Collaborator Author

Oh alright, let me have a look and understand these ones! Thank you!

@IshaGupta18
Copy link
Collaborator Author

So let's implement a second version like [simple-graph:/path/to/example.csv] by copying that filter function and then adding a second html template.

I am not very sure on what exactly we are supposed to do here? Could you please elaborate more on this?

@IshaGupta18
Copy link
Collaborator Author

@jywarren I am happy to tell you that I have published the first version of simple-data-grapher on npm and will be updating it soon to remove redundant code and I am about to begin with the process of integrating it with plots2 very soon.

https://www.npmjs.com/package/simple-data-grapher

@IshaGupta18
Copy link
Collaborator Author

@jywarren I have done the basic integration with plots2!!
image

@jywarren
Copy link
Member

jywarren commented Jul 2, 2019 via email

@IshaGupta18
Copy link
Collaborator Author

Yes definitely, I would be creating one in plots2 and share the link here!

@jywarren
Copy link
Member

jywarren commented Jul 2, 2019

This is a simpler example we mentioned on the call!

https://github.com/publiclab/plots2/blob/master/app/views/editor/rich.html.erb#L17-L18

@jywarren
Copy link
Member

jywarren commented Jul 2, 2019

Here is where we're inserting the Ruby values into the constructor of the Editor library!

https://github.com/publiclab/plots2/blob/a9d4e3048eee72aa3161f8999a6fde5b95443e58/app/views/editor/rich.html.erb#L315-L342

@IshaGupta18
Copy link
Collaborator Author

Here's the PR @jywarren publiclab/plots2#5993

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

2 participants