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

Integrate Dash reports into the app #837

Closed
5 tasks done
adamkendis opened this issue Nov 3, 2020 · 10 comments · Fixed by #1010
Closed
5 tasks done

Integrate Dash reports into the app #837

adamkendis opened this issue Nov 3, 2020 · 10 comments · Fixed by #1010
Assignees
Labels
Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Discussion Needs to be discussed as a team Feature: Missing Milestone: Missing Role: Frontend React front end work size: Missing

Comments

@adamkendis
Copy link
Member

adamkendis commented Nov 3, 2020

Description

We have decided to use Dash from Plotly as the main reporting engine for 311 Data reports. The main benefit is flexibility and the authoring workflow. They are generated server-side with a dedicated server and the resulting interactive reports have their data cached nightly so they will be performant. The best plan seems to be to host the reports in iframes in the client. Some work has been done to align the design and styling.

Action Items

  • Confirm the iframe solution as the best
  • Modify the report CSS per UX direction
  • Change any report design parameter that can't be handled in CSS (e.g. graph layout, axes, etc.)
  • Figure out how to make the list of reports available in the client
  • Explore linking between reports and the map (and vice-versa)

Resources

@adamkendis adamkendis added Role: Frontend React front end work Needs More Info Request for more info...Issue not clear labels Nov 3, 2020
@rufataliy
Copy link
Contributor

I would like to take part in it and other visualization tasks.

@adamkendis adamkendis added Role: Backend Related to API or other server-side work Role: Data Science Data management, loading, or analysis and removed Needs More Info Request for more info...Issue not clear labels Feb 5, 2021
@adamkendis
Copy link
Member Author

adamkendis commented Feb 5, 2021

Idea from @mattyweb :

Chart demos via jupyter notebook.
Relevant libraries: jupyter-dash, pandas, plotly (python)

https://colab.research.google.com/drive/1_22tL048ZfAGUt7Ftj4VtW5BzWQ6om7b?usp=sharing#scrollTo=dvy1IUS6F23x

Benefits: Data-first over design-first approach to visualizations. Allows data team to easily explore and quickly generate plotly charts via Jupyter notebook.
Unknowns: Best method for integrating with React client.

@adamkendis adamkendis changed the title Visualizations library selection Visualizations decisions Feb 5, 2021
@mattyweb
Copy link
Collaborator

mattyweb commented Feb 8, 2021

I finished the prototype version of this: https://dash-reporting.tofn9kh9mlm7g.us-east-1.cs.amazonlightsail.com/

Been tracking in a separate card: https://github.com/hackforla/311-data/projects/10#card-54099353

Next step is to figure out how to include in the client. I'm thinking there should be a menu that has those 3 reports/links and they should appear in an iframe...but there may be a more elegant way to do this. Let me know if I can help!

@mattyweb mattyweb added this to the Initial v2 Launch milestone Feb 9, 2021
@adamkendis
Copy link
Member Author

Client rendering the dash prototype /dashboards endpoint in an iframe:
http://plotly-experimental.s3-website-us-east-1.amazonaws.com/plotly-serverside

Looking pretty good. I spent a little time translating the python plotly into client-side react-plotly. This isn't working yet and now seems like a poor use of time when the Dash app in an iframe works.

@adamkendis
Copy link
Member Author

Suggestion from @rufataliy
https://pivottable.js.org/examples/

The UI might be too confusing for basic users.

@mattyweb mattyweb changed the title Visualizations decisions Integrate Dash reports into the app Feb 22, 2021
@mattyweb
Copy link
Collaborator

To clarify, this task is really about exploring and finalizing the approach. I'll open another for building the report page.

@danarchen
Copy link

@adamkendis could you detail what the requirements are for the UX/UI team?

@adamkendis
Copy link
Member Author

@danarchen The reports have been merged in and can be viewed on dev.311-data.org. Let's discuss this at tonight's meeting.

@ExperimentsInHonesty ExperimentsInHonesty removed Role: Backend Related to API or other server-side work Role: Data Science Data management, loading, or analysis labels Mar 12, 2021
@ExperimentsInHonesty ExperimentsInHonesty added the Discussion Needs to be discussed as a team label Mar 12, 2021
@mattyweb
Copy link
Collaborator

I think this one is done. For this version we'll just include the Dash reports using the menu of the React app. I don't think we need to worry about linking between reports and the map in v2. But we should look into that in a follow-on release.

@mattyweb
Copy link
Collaborator

I added a responsive layout to the reports. They now look at least tolerable on mobile.

@ExperimentsInHonesty ExperimentsInHonesty moved this to Done (without merge) in P: 311: Project Board Jun 7, 2024
@cottonchristopher cottonchristopher added size: Missing Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) labels Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Discussion Needs to be discussed as a team Feature: Missing Milestone: Missing Role: Frontend React front end work size: Missing
Projects
Status: Done (without merge)
Development

Successfully merging a pull request may close this issue.

6 participants