Skip to content

An interactive tool for exploring Lexington residents' 2022 On The Table feedback

Notifications You must be signed in to change notification settings

rlmead/lex-autocomplete

Repository files navigation

Lex Autocomplete

A text prediction project based on the ideas that residents of Lexington, Kentucky have about their city's future.

The data used for this project was gathered by CivicLex as part of their 2022 On The Table project.

Training the model

Get the data

Download the Main View of the Codes Summed sheet in the OTT Combined Codes base (here) as a CSV file, and store it in the data/ directory (Git will ignore it there).

Set up your Python environment

  1. python -m venv venv
  2. source venv/bin/activate
  3. pip install -r requirements.txt

Running the React App locally

Install dependencies

  1. cd into this repo's root directory
  2. Run npm install

Run the app

Run npm run start

Firebase

This project has been developed with Firebase hosting for the React App. This web app pulls data from a Firebase Realtime Database. That database holds all the n-gram data as output by the R scripts in this repo.

To run and host your own instance of this app your own n-gram model:

  1. Set up your own Firebase project with hosting and a Realtime Database
  2. Make a file src/data/firebaseconfig.js with your Firebase config variables (see src/data/firebaseconfig-example.js for the formatting and variables you'll need)
  3. Store your n-gram json data in data/model.json
  4. Run node populate_database.js to send your n-gram data to your Firebase Realtime Database

About

An interactive tool for exploring Lexington residents' 2022 On The Table feedback

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published