Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Source Needs Assessment Data #617

Closed
5 of 7 tasks
jtfairbank opened this issue Sep 13, 2022 · 1 comment · Fixed by #664
Closed
5 of 7 tasks

Source Needs Assessment Data #617

jtfairbank opened this issue Sep 13, 2022 · 1 comment · Fixed by #664
Assignees
Labels
enhancement New feature or request hacktoberfest

Comments

@jtfairbank
Copy link
Contributor

jtfairbank commented Sep 13, 2022

We need to source data from the needs assessment at build time in order to display it on the region pages. See this issue which documents the Needs Assessment Storage API for retrieving anonymized survey data. Shoutout to @coderbyheart for the implementation! 🥳

We'll be following this documentation to guide the implementation: https://www.gatsbyjs.com/docs/conceptual/data-fetching/#fetching-data-at-build-time

Goals

  • Filter needs assessment data by region & quarter.
  • Auto-sum needs assessment data across regions or quarters?
  • Expose needs assessment data nicely via Gatsby's GraphQL API.
  • Control when new needs assessment data is ingested (so we don't use the next round of needs assessment data too early).
    • Note: this is a reach goal and will likely be moved to another issue as it may involve using the CMS (Forestry) to whitelist quarters.

Checklist

  • Source the data using gatsby's sourceNodes hook.
  • Use gatsby's createNode function to create NeedsAssessmentSummary nodes.
  • Use gatsby's createResolvers hook to link NeedsAssessmentSummary nodes to their corresponding region. Should be resolvable via DANeed.place.region and DANeed.place.subregion. Every place has a region, most places have subregions but on occasion subregion might be set to null if the data applies to an entire region ("Lebanon") or the "Other" region was selected.
  • Write end-to-end tests to ensure that data is being ingested & exposed through Gatsby's graphql endpoint.

Next Up

@jtfairbank jtfairbank added the enhancement New feature or request label Sep 13, 2022
@jtfairbank jtfairbank self-assigned this Sep 13, 2022
@jtfairbank
Copy link
Contributor Author

Made a request to get broken down data for all reqions / quarters: distributeaid/needs-assessment-storage#90

coderbyheart added a commit that referenced this issue Oct 16, 2022
Fixes #617

Co-authored-by: Ramón Huidobro <hola@ramonh.dev>
Co-authored-by: Markus Tacker <m@coderbyheart.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant