Skip to content

DEV - Add toggle to switch between data sources (Hugging Face, Socrata) #2013

@efrenmarin45

Description

@efrenmarin45

Overview

We need to prepare to switch to Socrata. Need to have a toggle in order to test performance on Socrata versus Hugging Face. We can continue to use this toggle to further test data calls.

Action Items

  • Pull latest from main
  • Document all files where Hugging Face is involved.
    • Folder/Files to exclude: Scripts folder
  • Create new environment variable named VITE_DATA_SOURCE. The two possible options are HF and SOCRATA.
    • Also update example.env with new environment variable.
  • Set-up logic within the db files to check new environment variable. This should then 'toggle' between choosing Hugging Face or Socrata API.
  • Document load times between the two (Hugging Face vs Socrata API)
    • You can take advantage of the existing logging code and files (Map > index.jsx & redux-logger & log.ts). These can be see in the console on load.

Ticket Bookkeeping

Resources/Instructions

Metadata

Metadata

Assignees

Labels

Complexity: Smalltickets that are prescriptive, easily understood and executableRole: BackendRelated to API or other server-side workp-feature: datainfo available to users i.e. NC boundaries/names, SR info/data, etc (user friendly map info/data)size: 1ptCan be done in 6 hours

Type

No type

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions