-
Notifications
You must be signed in to change notification settings - Fork 20
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
Scaffold for Statistics block on Landing pages #4261
Draft
leenagupte
wants to merge
10
commits into
main
Choose a base branch
from
landing-pages-backend-data-statistics-scaffold
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leenagupte
force-pushed
the
landing-pages-backend-data-statistics-scaffold
branch
from
October 9, 2024 12:13
a842149
to
e64d5a5
Compare
leenagupte
force-pushed
the
landing-pages-backend-data-statistics-scaffold
branch
from
October 9, 2024 12:48
e64d5a5
to
ce72256
Compare
andysellick
force-pushed
the
landing-pages-backend-data-statistics-scaffold
branch
from
October 17, 2024 14:43
954bc77
to
6ca4b44
Compare
leenagupte
force-pushed
the
landing-pages-backend-data-statistics-scaffold
branch
from
October 18, 2024 16:05
f49841e
to
27996d2
Compare
Statistics data will be read in from a CSV to be provided by departments and then converted into a chart in the statistics block on landing pages. It is assumed that users will not need to be able to download the CSV files directly and that a link will be provided to an externally hosted data source, e.g. ONS data.
leenagupte
force-pushed
the
landing-pages-backend-data-statistics-scaffold
branch
from
October 18, 2024 16:16
27996d2
to
0f9111c
Compare
It's unclear exactly how the data from the CSV files will be used to display the graphs, so for the moment the unmodified rows are just being returned.
The block should render twice as two statistics have been added to the sample content item data.
A new "rows" method will be created in the next commit
Divides the rows method to a small public rows method and a private `row_lines` method. This allows further refactoring without having to change the tests. Use a map rather than an each in rows method to make the method slightly smaller. `each_with_index` has been replaced with `each_with_object` for the same reason. The CSV rows are being returned with symbol keys to that `to_sym` doesn't need to be used in multiple places. Finally, the row keys and values are being obfuscated. We can't guarantee what the keys will be named so it's better not to rely on them. We're still assuming that each row will have 3 columns: - x-axis value - variable / line name - y-axis value
leenagupte
force-pushed
the
landing-pages-backend-data-statistics-scaffold
branch
from
October 18, 2024 16:36
0f9111c
to
3e54bb9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Attempts to model CSV data for a new statistics block on landing pages
Why
Trello card
How
Screenshots?