codeforboston / maple

MAPLE makes it easy for anyone to view and submit testimony to the Massachusetts Legislature about the bills that will shape our future.

Home Page:https://mapletestimony.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhance the bill search 'city' facet

mvictor55 opened this issue · comments

Right now, the bill search UI allows you to filter to a city. However, IIUC this is based only on the structured metadata returned from the API and, unfortunately, this only associates cities with bills when they are explicit home rule petitions. Many other bills, which may reference or relate to cities, will not be included and that could use to user confusion.

We could potentially enhance this feature by adding additional city labeling based on bill text. We could do a simple token-level search for city names and add a label to each bill during our ETL process which is used during search.

For example, a bill whose text says "This bill will give $1M for free to the citizens of Somerville" would get parsed upon ETL from the legislature's API, the token "Somerville" would get recognized, a "Somerville" city tag would be added to the bill, and then a user filtering to "City = Somerville" in the search UI would see the bill pop up.