azavea / fb-gender-survey-dashboard

Interactive exploration of global results from the Facebook "Survey on Gender Equality At Home
https://gender-survey-dashboard.netlify.app/
Apache License 2.0
2 stars 2 forks source link

Generate region config and data payload #15

Closed mmcfarland closed 3 years ago

mmcfarland commented 3 years ago

Overview

Generate a compact schema for codes, questions, and answers. Additionally, add some parsed configuration data needed by the app.

The region and countries have different data dictionaries (configs) since they have different variables associated with them (although they mostly overlap). Otherwise, the schema's for config/data files are meant to be as identical as possible so that the application code does not have to distinguish between the two. It is anticipated that the application will select a "geoMode" (region or country), and then use the appropriate config + data object to provide the list of available questions and the corresponding results.

The data object is an array of values whose index is defined on the config object. This allows a very compact format, but introduces some complexity in accessing the data. As a consequence, the application will provide an "indexer" class that can abstract the schema away and provide for a nice API for getting the response for a given question (for a given geoMode)

Connects #3

Notes

Testing Instructions

mmcfarland commented 3 years ago

Thanks. I added a note about the data source "for now" in the readme. Good suggestion :+1: