OutdoorRD / trails-viz

1 stars 3 forks source link

Move basic project config from `trails-viz` to `trails-viz-data` #217

Open jblehr opened 2 months ago

jblehr commented 2 months ago

Right now, a lot of the data updates to the dashboard involve minor updates to the trails-viz/trails-viz-api/trailsvizapi/config/app_config.py file. See here for the docs on this. For example, these are common updates to the dashboard:

However, because we are changing the code within trails-viz-api, we need to build and push a new image. Instead, I'm proposing we move this code to within trails-viz-data, so that only actual changes to the code (and not just config) require new builds of the dashboard.

See below for an example of the dictionaries found within app_config.py:

# if the project code contains the project group keyword, then it belongs to that group
PROJECT_NAMES = {
    'West Cascades': 'WestCascades',
}

CENSUS_TRACT_STATES = {
    'WestCascades': ['53'],
}

DATA_COLUMNS = {
    'WestCascades': ['estimate', 'flickr', 'twitter', 'wta', 'alltrails', 'reveal', 'onsite'],
}

See recent #212 and #216 for examples of a PR/new build that I think should happen in trails-viz-data instead.

One reason (and a good one) I can see to continue including these in this repo is to allow for us to track different versions of the data that are shown on the dashboard in this repo (in addition to trails-viz-data).

@woodsp - what do you think about this proposal? Do you think this should be a component of upcoming dashboard development?

jblehr commented 2 months ago

Just noting here that @woodsp mentioned that we initially had good reasons for NOT doing this, but we couldn't remember what they were.

Since that is the case, we decided it would be worthwhile to try this out, since this would streamline dashboard updates significantly.