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

Finished dashboard concept #51

Conversation

somduttasinha
Copy link
Contributor

Description of changes

What?

This PR concerns the development of the dashboard concept. This concept was built using "dummy data" and serves to act as a guide for the development of the actual dashboard's architecture.

The dashboard logic is spread into 3 parts: 1) Data processing, 2) Graph generation and 3) Dashboard app

  1. Data processing: logic is encapsulated in the 'data_utils' directory:
    a) 'data_cleaner.py' : contains the 'Cleaner' class. Eventually, this class will be filled with generic methods containing kwargs/args to allow the user to define custom cleaning rules. 'drop_columns(...)' is an example.

b) 'data_parser.py': contains the 'Parser' class. A Parser prepares the provided data in order for graph generation to be as seamless as possible. Eventually, this class will also contain generic functions to give the user an interface to implement their own parsing rules.

  1. Graph generation: logic is encapsulated in the 'graph_utils' directory:
    a) 'graph_generator.py': contains the 'Generator' class. This class will contain a variety of methods to generate different types of graphs and charts. These are created using the plotly library. However, we can look to expand this by using other libraries in the future. The method 'create_choropleth(...)' is given as an example.

  2. Dashboard app: logic is encapsulated in the 'app' directory:
    a) 'dashboard.py': contains logic for the front-end using the Dash framework. User input is accepted -> passed through the aforementioned architecture -> outputs a graph. As an example, the population evolution of London's boroughs is used as the data was easily available.

Why?

  • The concept was required to ease future development as it can be used as a reference. The concept may also help with onboarding new developers in the future. Furthermore, any new ideas can first be safely implemented in the concept before being used in the real app.

Dependencies

  • The latest versions (as of 24/10/2022) of pandas, dash and plotly were added to the requirements.txt file.

@somduttasinha somduttasinha added enhancement New feature or request good first issue Good for newcomers labels Oct 31, 2022
@somduttasinha somduttasinha self-assigned this Oct 31, 2022
Copy link
Collaborator

@Esthetech Esthetech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@Esthetech
Copy link
Collaborator

I did approve it, but I have one request, could you maybe put a README.md file in citizenvoice/dashboard with the routes that are being used. And please add in the PR comment on how to test it. E.g “Go to this route”, “Try this button” etc.

Also, did it not come with any .env variables by any chance?

@manuGil manuGil merged commit 66f32de into CUSP-Urban-Science-and-Policy:devel Mar 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants