Skip to content

[MVP Huggingface] Define Request Type model and GET data from HuggingFace repos. #1891

@ryanfchase

Description

@ryanfchase

Overview

We need to create a version of our app that initializes the map using one request table since we are loading multiple tables for each year of data.

Developer Info

We are NOT merging this into develop. This is meant to be a staging branch for the Blank Map feature ONLY

  • I understand

Action Items

Developer Setup

  • designate a feature branch, e.g. staging-feature-blank-map
    • feature branch created as feature-blank-map
  • PM and DEV collaborate to define Request Type model @traycn @ryanfchase

Developer Actions

  • Download DBeaver
    • Setup connection with Huggingface
  • Create a file / obj for the request type model - /db/DBRequest.jsx
    • Add the createRequestTable function
    • Updating the logic to insert 2023 - 2024 ONLY data into a single table. (Prevent crashing your local)
    • create requests table on Map initialization (use data model provided) , however do not load any initial data
    • create a method, fetchData in db/DBRequest.jsx that will be the accessor method for fetching data from external sources (e.g. Socrata, Huggingface)
      • leave a comment describing how we intend to use it, what parameters should be considered for this method
      • to demonstrate that it has access to duckdb, the method should console log a DESCRIBE call as proof of concept
  • Release the dependency on DEV - Update Datepicker: Start Date, End Date, Remove Chips #1868 and if there are no other dependencies, move that issue into the new issue approval and add the label ready for dev lead

Resources/Instructions

Notes

  • currently we rely on parquet files (e.g. 2024.parquet) from HuggingFace to define the requests table.
    • obtain the table columns and field types and use them to define the requests table

Resources

Code References

  • createRequestsTable
    • path: components > Map > index.jsx::MapContainer, L69
    • note: SQL on L77 will need to modified. We will not be using datasetFileName and instead we'll simply define the table inline
  • updateHfDataset.py
    • path: scripts > updateHfDataset.py
    • note: use this as a reference to how we are handling timestampformat

Metadata

Metadata

Assignees

Labels

Complexity: Smalltickets that are prescriptive, easily understood and executableRole: FrontendReact front end workp-feature: Mapassociated with the MAP page for public viewing/interactionp-feature: datainfo available to users i.e. NC boundaries/names, SR info/data, etc (user friendly map info/data)size: 2ptCan be done in 7-12 hours

Type

No type

Projects

Status

Done (without merge)

Relationships

None yet

Development

No branches or pull requests

Issue actions