diff --git a/README.md b/README.md index 1a891777..e7b3ab91 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,32 @@ Work in Progress -Sawt is a tool designed to bridge the communication gap between New Orleanians and their city council representatives. +Sawt is a tool designed to bridge the communication gap between New Orleanians and their city council representatives. -## Quickstart (no web) -1. `cd packages/backend && pip install -r requirements && python src` -2. `cd packages/googlecloud/functions && pip install -r requirements && python getanswer` +## Prerequisites -## Project structure -- `backend`: Preprocessor, only needs to be run once -- `web`: NextJS web site -- `googlecloud`: Google Cloud Function invoked for every query +- Install [DVC](https://dvc.org/doc/install) -## Getting started -Follow the instructions below to run test locally -```bash -# Pull data (transcripts, minutes, agendas) from the preprocessed stage using DVC -dvc pull +## Quickstart -# Navigate to the 'src' directory inside 'packages/backend' -cd packages/backend/src +1. Pull data: `dvc pull` +1. Start cloud function locally: -# Install the required Python dependencies +``` +cd packages/googlecloud/functions pip install -r requirements.txt +OPENAI_API_KEY=sk-XXX functions-framework --target=getanswer --debug +``` -# Navigate to the 'getanswer' function directory inside 'packages/googlecloud/functions' -cd ../../googlecloud/functions/getanswer +1. Get answer: -# Run the main Python script -python __main__.py ``` +curl -XPOST http://localhost:8080 -v -H "Content-Type: application/json" \ + -d '{"query":"Is surveillance effective?","response_type":"in_depth"}' +``` + +## Project structure + +- `packages/backend`: Preprocessor, only needs to be run once +- `packages/googlecloud`: Google Cloud Function invoked for every query +- `packages/web`: NextJS web site diff --git a/packages/backend/.env.example b/packages/backend/.env.example new file mode 100644 index 00000000..e570b8b5 --- /dev/null +++ b/packages/backend/.env.example @@ -0,0 +1 @@ +OPENAI_API_KEY= diff --git a/packages/backend/src/__main__.py b/packages/backend/src/__main__.py index 75d3b254..13b96328 100644 --- a/packages/backend/src/__main__.py +++ b/packages/backend/src/__main__.py @@ -15,6 +15,7 @@ def main(): cj_json_directory = "json_cj_directory" fc_json_directory = "json_fc_directory" pc_json_directory = "json_public_comment_directory" + news_json_directory = "news_directory" print(f"Preprocessing videos, agendas, and minutes to generate a cache.") general_embeddings, in_depth_embeddings = create_embeddings() @@ -24,6 +25,7 @@ def main(): cj_json_directory, pdf_directory, pc_json_directory, + news_json_directory, general_embeddings, in_depth_embeddings, ) diff --git a/packages/backend/src/cache/faiss_index_general.dvc b/packages/backend/src/cache/faiss_index_general.dvc index aad362ac..d2d8fed2 100644 --- a/packages/backend/src/cache/faiss_index_general.dvc +++ b/packages/backend/src/cache/faiss_index_general.dvc @@ -1,6 +1,6 @@ outs: -- md5: e50dbff10213e5c44c74e31317370fea.dir - size: 59806708 +- md5: f86af62933bae171911ae891560b2407.dir + size: 61663926 nfiles: 2 hash: md5 path: faiss_index_general diff --git a/packages/backend/src/cache/faiss_index_in_depth.dvc b/packages/backend/src/cache/faiss_index_in_depth.dvc index ef3afe54..83865e58 100644 --- a/packages/backend/src/cache/faiss_index_in_depth.dvc +++ b/packages/backend/src/cache/faiss_index_in_depth.dvc @@ -1,6 +1,6 @@ outs: -- md5: 048b83157f31c250755ba73dc6b08f69.dir - size: 59806708 +- md5: ed5520e1a6f903d4d38105dd3d9d034b.dir + size: 61663926 nfiles: 2 hash: md5 path: faiss_index_in_depth diff --git a/packages/backend/src/news_directory/Frequent_outages_could_lead_to_big_fines_for_Entergy_New_Orleans_under_new_standards.json b/packages/backend/src/news_directory/Frequent_outages_could_lead_to_big_fines_for_Entergy_New_Orleans_under_new_standards.json new file mode 100644 index 00000000..72eb088c --- /dev/null +++ b/packages/backend/src/news_directory/Frequent_outages_could_lead_to_big_fines_for_Entergy_New_Orleans_under_new_standards.json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "HOME\nABOUT\nSUBSCRIBE\nDONATE\nELECTION 2023\nGOVT + POLITICS\nENVIRONMENT\nHEALTH\nCRIMINAL JUSTICE\nEDUCATION\nBUSINESS + LABOR\nGOVT + POLITICS\nWEATHER\nFrequent outages could lead to big fines for Entergy New Orleans under new standards\nBY: MICHAEL ISAAC STEIN, VERITE - FEBRUARY 18, 2023 10:00 AM\nEntergy\u2019s New Orleans Power Station. (Photo by Julie Dermansky)\nThe New Orleans City Council established a new set of reliability standards Thursday for Entergy New Orleans that could lead to fines up to $3.7 million per year if the number of annual blackouts exceeds those standards. The council is the regulator of Entergy New Orleans.\n\u201cEntergy New Orleans must meet our standards or owe the people of New Orleans, their customers, millions of dollars in fines,\u201d Councilwoman Helena Moreno said at a utility committee meeting this month. \u201cI believe we\u2019re one of the only regulators in the southern region that\u2019s set up these types of reliability standards.\u201d\nThe council hopes the new standards will finally allow it to collect a $1 million fine it imposed on Entergy in 2019 over frequent outages. The fine was levied after a council investigation found that the grid\u2019s reliability fell sharply shortly after the company cut millions of dollars from its budget to maintain it.\nEntergy challenged the fine in court, arguing it was unfair because the council hadn\u2019t established reliability standards. An Orleans Parish Civil District Court judge ruled in Entergy\u2019s favor in June.\nMoreno\u2019s chief of staff Andrew Tuozzolo told Verite that the council\u2019s plan was now to re-levy the $1 million fine, in the hopes that the new reliability standards will make it easier to defend in court.\nThe new standards only apply to \u201cfair-weather day\u201d outages, and exclude outages caused by major events like hurricanes. The council is currently conducting a separate process to create new rules and improvement plans for the grid\u2019s storm resilience.\nWhile hurricane-related outages are a well-known and deadly occurrence in New Orleans, the city has also struggled for years with frequent outages on sunny days. In fact, the process to pass these new rules began in 2017, when complaints grew about the number of blackouts happening on clear days, when the grid should have been operating normally.\nIn 2019, a council investigation found that Entergy failed in its responsibility to maintain an adequate grid. It found the city experienced 2,599 outages between June 1, 2016 and May 31, 2017 alone, the majority of which occurred on fair weather days. The report said the main cause of the outages were equipment failures in the local distribution grid \u2014 the poles and lines that run down every street and deliver electricity directly to buildings.\nThe investigation also found that the grid\u2019s reliability started to fall shortly after Entergy New Orleans made multi-million dollar cuts to investing in distribution system maintenance and improvement. That investigation led to the council\u2019s decision to fine Entergy $1 million.\nUnder the measure passed Thursday, Entergy will have three new reliability standards that could lead to the fine.\nThe first standard is how many fair weather outages New Orleans customers face each year. That\u2019s based on an industry standard called the system average interruption frequency index (SAIFI). The minimum SAIFI established by the council is 1.53 \u2014 meaning that a customer in New Orleans should experience, on average, 1.53 outages per year. The exact fine depends on how off that mark Entergy was in a given year, with a maximum penalty of $2.7 million.\nSUPPORT NEWS YOU TRUST.\nDONATE\nThe second standard is about the duration of fair weather outages every year, based on the system average interruption duration index (SAIDI). The maximum baseline SAIDI score for Entergy was set at 178.2, meaning New Orleans customers on average would experience 178.2 minutes \u2014 roughly three hours \u2014 of outages each year. Entergy could face an annual fine of $500,000 for failing to achieve that.\nThe last standard could lead to fines up to $500,000 if Entergy fails to adequately improve the grid\u2019s worst performing feeders \u2014 a piece of equipment in the distribution system that has been blamed for outages in the past.\nThe council\u2019s ordinance notes that under the newly established fine schedule, Entergy\u2019s poor reliability in 2016 and 2017 \u2014 for which the council originally levied a $1 million fine \u2014 would have resulted in a fine of almost the exact same amount \u2014 $1,005,000.\nRepresentatives of the Alliance for Affordable Energy, which advocates on behalf of customers, applauded the move. But they also said they believe the council should go farther and use these new standards as a starting point.\n\u201cWe\u2019re certainly supportive of having them in place, but we\u2019d like to note this is merely a first step,\u201d Alliance policy director Jesse George said at the utility meeting this month. \u201cWe encourage the council to continue making these standards more stringent over time.\u201d\nThe council\u2019s utility advisers noted that from 2013 through 2021, Entergy New Orleans would have only run afoul of the new standards in two years, 2016 and 2017.\n\u201cI think if you ask the average New Orleanian whether their electric service was reliable over the last five years they would probably say no,\u201d George said in a recent Facebook video.\nMoreno said during the committee meeting that because of pressure from the council, Entergy New Orleans had improved its reliability.\n\u201cTheir reliability is definitely not perfect, but it has improved due to insistence from the City Council,\u201d Moreno said. \u201cEntergy New Orleans has now increased its reliability performance to just above the national average. This is progress, but we are certainly far from done.\u201d\nEntergy did not respond to a request for comment.\nThis article first appeared on Verite and is republished here under a Creative Commons license.\nREPUBLISH\nOur stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site. Please see our republishing guidelines for use of photos and graphics.\nMICHAEL ISAAC STEIN, VERITE\nBefore joining Verite, Michael Isaac Stein spent five years as an investigative reporter at The Lens, a nonprofit New Orleans news publication, covering local government, housing and labor issues. Before working at The Lens, Stein was a reporter for WWNO New Orleans Public Radio and freelanced for various national publications including The Intercept, The New Republic and Bloomberg\u2019s CityLab. He holds a bachelor\u2019s degree from the University of Michigan\u2019s Ford School of Public Policy.\nMORE FROM AUTHOR\nRELATED NEWS\nEntergy threatens \u2018expensive litigation\u2019 over $1 million\u2026\nBY MICHAEL ISAAC STEIN, VERITE\nMay 13, 2023\nAfter strain from another winter storm, experts say it\u2019s\u2026\nBY ROBERT ZULLO\nDecember 31, 2022\nSHINING A LIGHT ON THE BAYOU STATE\nDemocracy Toolkit //\nRegister to vote\n|\nFind your voting precinct\n|\nBecome an election worker\n|\nConduct a voter registration drive\n|\nContact your state and federal lawmakers\nABOUT US\nThe Louisiana Illuminator is an independent, nonprofit, nonpartisan news organization with a mission to cast light on how decisions in Baton Rouge are made and how they affect the lives of everyday Louisianians. Our in-depth investigations and news stories, news briefs and commentary help residents make sense of how state policies help or hurt them and their neighbors statewide.\nOur stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site.\nDEIJ Policy | Ethics Policy | Privacy Policy\n\u00a9 Louisiana Illuminator, 2023", + "url": "https://lailluminator.com/2023/02/18/frequent-outages-could-lead-to-big-fines-for-entergy-new-orleans-under-new-standards/", + "title": "Frequent outages could lead to big fines for Entergy New Orleans under new standards" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/news_directory/How_should_New_Orleans_spend_the_millions_left_in_pandemic_relief_aid_A_new_debate_begins.json b/packages/backend/src/news_directory/How_should_New_Orleans_spend_the_millions_left_in_pandemic_relief_aid_A_new_debate_begins.json new file mode 100644 index 00000000..298ddd62 --- /dev/null +++ b/packages/backend/src/news_directory/How_should_New_Orleans_spend_the_millions_left_in_pandemic_relief_aid_A_new_debate_begins.json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "Skip to main content\nHomes\nCalendar\nStore\nPublic Notices\nE-Edition\nNewsletters\nSubscribe for $1\nHow should New Orleans spend the millions left in pandemic relief aid? A new debate begins\nBY MATT SLEDGE | Staff writer\nApr 4, 2023\n3 min to read\n1 of 2\nPeople who live on the streets are fed a hot meal in New Orleans, Sunday, Dec. 25, 2022.\nSTAFF PHOTO BY DAVID GRUNFELD\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nSolutions for crime and homelessness would claim tens of millions of the city\u2019s remaining federal relief dollars under a plan unveiled by Mayor LaToya Cantrell's administration on Tuesday, while progressive groups made a much larger pitch that would also call for the use of money from the general fund.\nIn the city\u2019s vision, the New Orleans Health Department would quarterback programs designed to prevent violence, such as mental health services for school children and a rejuvenated street team of violence \u201cinterrupters.\u201d\nAlong with a $10 million plan targeting homelessness, the plan would use $38.4 million of the remaining $53.6 million in pandemic relief funds from the American Rescue Plan Act.\nA coalition of progressive groups, by contrast, told the City Council that the city\u2019s one-time spending should rise much higher. They proposed a $147 million package, including $107 million for housing, that would also draw from a growing pot of unspent general fund dollars.\nThe council members who will have the final say sounded receptive notes but didn\u2019t make firm commitments. Next week, they will hear from the city\u2019s chief administrative officer, Gilbert Monta\u00f1o, who prefers keeping more money socked away.\nThe debate that will play out in the coming weeks is in many ways a repeat of the 2023 budget process, which culminated in a last-minute, $262 million amendment to use one-time funds. Advocates said they were caught off guard in December, and this time around, they\u2019re keen to make their voices heard.\n\u201cNow the question is, how do you reconcile what the city wants to do with the (relief) money with what we heard today from advocacy groups and from people interested in how that money is spent?\u201d said City Council member Joe Giarrusso, who chairs the budget committee.\nCity plan\nThe late-breaking budget amendment last year aimed lots of one-time money at the most urgent issue for many voters -- violent crime. Big spends included $22.5 million for police recruitment and retention, $30 million for new criminal justice software and $4.9 million for juvenile probation and parole.\nBut some advocates complained that far too many of those funds were directed at punitive measures instead of social services. The Cantrell administration is now proposing a package aimed at preventing and interrupting violence through non-policing measures.\nThe city\u2019s plan includes $10 million for a joint program between NOLA Public Schools and Children\u2019s Hospital to place mental health professionals, case managers and expanded services in the \u201chighest risk\u201d schools where kids need help to address trauma. Separately, the school system would partner with the city's Office of Workforce Development for an $8.1 million program to put at-risk high schoolers on career paths.\nMayor LaToya Cantrell and Dr. Jennifer Avegno, pictured in 2020 \nPHOTO BY MAX BECHERER / THE TIMES-PICAYUNE/NEW ORLEANS ADVOCATE\nOther expenditures would include $500,000 for a rebooted violence interruption street team, $1 million for a blight remediation partnership between Tulane public health researchers and city code enforcement, $2.5 million for pocket parks, $5 million for financial assistance programs and $1 million for food security programs.\nThe city\u2019s package is designed to put a \u201cdown payment\u201d on projects that have been proven to reduce crime, said Dr. Jennifer Avegno, health department director. The City Council in January passed a motion mandating that her department create a violence reduction program.\n\u201cIf you don\u2019t make significant investments in the root causes of crime and violence \u2013 and certainly, from the public health perspective, shootings and killings, which are a major cause of mortality in this city \u2013 then you\u2019re not getting a lot for your money,\u201d she said.\nSeparately, the city would spend $10 million on reducing homelessness.\nThe city\u2019s proposals draw only from American Rescue Plan Act funds. However, advocates note that the city also has a growing pot of unspent general fund dollars \u2013 pegged at $274 million in a recent city report.\nCAO Gilbert Montano, right \nPHOTO BY BRETT DUKE / THE TIMES-PICAYUNE\nMonta\u00f1o said that number represents an unaudited point-in-time figure. He acknowledged that the city\u2019s fund balance is \u201csizable\u201d but said he wants to keep a healthy reserve in place for emergencies and economic downturns.\n\u201cIf we don\u2019t protect the city for the future, then I don't think we\u2019re being good stewards,\u201d he said.\nAdvocates\u2019 plan\nThe community groups pitching the council on Tuesday proposed a much more aggressive spending plan. They said it would be a mistake to continue using the federal pandemic relief dollars to build up the city\u2019s fund balance.\nPresenters from the Louisiana Fair Housing Action Center, New Orleans Workers Center for Racial Justice and the Vera Institute said they had contacted dozens of community groups for input and conducted their own vetting project to come up with a wish-list of mostly existing projects that could benefit from infusions of one-time cash.\nThe top item on that list was $107 million for housing, including $70 million for the construction of affordable rental housing, $15 million for reducing street homelessness and $10 million for the renovation of existing but substandard rental units.\nOther proposals include a $20 million investment in youth development through community organizations and $18 million for \"community equity\" projects including $5 million for free public transit fares, $5 million for food banks and food producers, and $5.2 million in direct cash assistance for people who were left out of earlier rounds of government assistance during the pandemic.\nWill Snowden, director of Vera Institute of Justice's New Orleans office\nPROVIDED PHOTO\nWhile last year\u2019s budget appropriated tens of millions to agencies that respond to crime, Will Snowden, the director of the Vera Institute in New Orleans, said it was time to pivot to addressing root causes. He saw the groups\u2019 proposal as a floor, rather than a ceiling.\n\u201cThere can be more. When we\u2019re having conversations in New Orleans about what provides public safety and what creates public safety, it is these kinds of investments,\u201d he said.\nEmail Matt Sledge at msledge@theadvocate.com.\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nCity ARPA plan\nCity of New Orleans Apr 5, 2023\nMORE INFORMATION\nThe Nightly Top 5: Catch up on today's top stories\nDebate continues over how New Orleans should spend millions in pandemic relief aid, S&WB walks back its threat to cut water to tenants wit\u2026\nTags\nHardwall\nThis Day in History\nSponsored by Connatix\nRecommended for you\nRecommended by\nSECTIONS\nHOME\nNEWS\nOPINION\nSPORTS\nENTERTAINMENT/LIFE\nNEWSLETTERS\nGAMES\nSERVICES\nCLASSIFIEDS\nSEARCH\nSUBSCRIBE | GROUPS\nDIGITAL ADVERTISING\nHELP/CONTACT US\nRSS FEEDS\nMEDIA KIT\nEEDITION\nCAREERS\nTEACHER'S LINK\nREVIEWING THE RECORD\nOUR SITES\nOBITUARIES\nJOBS\nCELEBRATIONS\nNIE\nCLASSIFIEDS\nHOMES\nPETS\nARCHIVES\nSTORE\nCONTACT INFORMATION\nnola.com\n840 St. Charles Avenue\nNew Orleans, LA 70130\nPhone: 504-529-0522\n\nNews Tips:\nnolanewstips@theadvocate.com\nOther questions:\nsubscriberservices@theadvocate.com\nNeed help?\nReport a delivery issue\nCreate a temporary stop\nSign up for recurring payments\nPay your bill\nUpdate your billing info\n\n\u00a9 Copyright 2023 NOLA.com 840 St. Charles Avenue, New Orleans, LA | Terms of Use | Privacy Policy\nPowered by BLOX Content Management System from BLOX Digital.\n This website stores data such as cookies to enable essential website functionality, marketing, personalization and analytics. By remaining on this website you indicate your consent. See updated terms and conditions.", + "url": "https://www.nola.com/news/politics/how-should-new-orleans-spend-millions-of-one-time-funds-new-debate-begins/article_ef36af06-d320-11ed-b9fe-978f03c2909b.html", + "title": "How should New Orleans spend the millions left in pandemic relief aid? A new debate begins" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/news_directory/New_Orleans_S&WB_needs_sweeping_changes_if_it_wants_to_avoid_more_pitfalls,_BGR_says.json b/packages/backend/src/news_directory/New_Orleans_S&WB_needs_sweeping_changes_if_it_wants_to_avoid_more_pitfalls,_BGR_says.json new file mode 100644 index 00000000..16b442f6 --- /dev/null +++ b/packages/backend/src/news_directory/New_Orleans_S&WB_needs_sweeping_changes_if_it_wants_to_avoid_more_pitfalls,_BGR_says.json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "Skip to main content\nHomes\nCalendar\nStore\nPublic Notices\nE-Edition\nNewsletters\nSubscribe for $1\nNew Orleans S&WB needs sweeping changes if it wants to avoid more pitfalls, BGR says\nBY BEN MYERS | Staff writer\nMay 17, 2023\n5 min to read\n1 of 2\nNew Orleans Sewerage & Water Board executive director Ghassan Korban stands in the control room as employees monitor weather at the Carrollton Water Plant on June 10, 2022.\nSTAFF PHOTO BY SOPHIA GERMER\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nThe New Orleans Sewerage & Water Board is overseen by a board controlled by the mayor. Its funding is determined by the City Council, and it is regulated by the Louisiana Legislature\u2019s laws.\nThat serving of three masters is the reason for historic neglect of the city\u2019s water infrastructure, leading to drainage failures, boil water advisories and a lack of accountability that worsen the risks of living in an already vulnerable city.\nThat is according to a new report from the Bureau of Governmental Research, which called for sweeping changes to the S&WB\u2019s governing structure. Either the S&WB needs to be abolished and folded completely into city government, or it needs far greater autonomy, the report said.\nStorm clouds move in around the Sewerage and Water Board water tower closest to Claiborne Av. at the Carrollton Water Plant in New Orleans, Friday, June 10, 2022. (Photo by Sophia Germer, NOLA.com, The Times-Picayune | The New Orleans Advocate)\nSophia Germer\n\u201cThe status quo is not serving us well. We really need to choose one path or the other,\u201d said Rebecca Mowbray, BGR\u2019s chief executive. \u201cThe structure of the Sewerage and Water Board is really the root cause of a lot of the water-related problems that New Orleanians experience.\u201d\nMany of the recommendations are a repeat from 2011, when the BGR suggested a series of measures to strengthen the S&WB\u2019s independence. The report, issued Wednesday, reups some of those suggestions, such as creating metrics for the City Council to approve rate proposals and tax levies.\nConverting the utility to a city department is a new suggestion, one that BGR previously said was a bad idea because of City Hall dysfunction.\nMowbray said city leaders, including Mayor LaToya Cantrell, seem to have grown more focused on drainage after repeated street flooding in 2017. Still, the report says consolidation would require extensive planning to ensure City Hall is capable of subsuming 1,300 employees, an annual capital budget $440 million and another $580 million in outstanding debt. \nOfficials open to changes\nA Sewerage and Water Board sticker is stuck to machinery inside a water tower at the Carrollton Water Plant in New Orleans, Friday, June 10, 2022. (Photo by Sophia Germer, NOLA.com, The Times-Picayune | The New Orleans Advocate)\nSophia Germer\nCantrell and four council members who responded to inquiries said they were still weighing the report, but they were either open to consolidation or didn\u2019t reject it.\n\u201cPlacing the Sewerage & Water Board under city control as a city department would seem to be the best solution for coordination of systems,\u201d District D Council member Eugene Green said in a statement.\nA spokesperson for City Council President JP Morrell said he was still reviewing the report, but said that the legislature has too much control over the local utility.\nCantrell said the BGR is \u201csaying what the Sewerage and Water Board has been saying for years, which is that our governing structure is too complex.\u201d\nDuring a news conference Wednesday, Cantrell said she would work with the board to come up \u201cthe best next steps.\" In a statement, the S&WB said the report \"accurately characterizes the challenges we face, and we welcome the recommendation of an assessment of our governance structure, including either path forward the report suggests.\"\nSewerage and Water Board employees work in the boiler room at the Carrollton Water Plant in New Orleans, Friday, June 10, 2022. (Photo by Sophia Germer, NOLA.com, The Times-Picayune | The New Orleans Advocate)\nSophia Germer\nCatch basin issue\nFolding the S&WB into city government would end the division of labor between the S&WB and City Hall when it comes to different parts of the drainage system. The S&WB controls the primary pipes and pumping stations that push storm water out of the city, but the Department of Public Works maintains catch basins and smaller pipes that feed into the parts that the S&WB controls.\nThat arrangement \u2014 unique among 51 peer cities, according to BGR \u2014 has been a coordination nightmare and contributed to the 2017 floods, according to an analysis.\nThe Sewerage and Water Board's Carrollton plant is shown Tuesday, Dec. 7, 2021.\nSTAFF PHOTO BY DAVID GRUNFELD\nCity Council Vice President Helena Moreno has long championed giving control for all drainage components to the S&WB, in line with the BGR. But Moreno and the BGR differ when it comes to giving the S&WB funding for the additional workload.\nThe BGR says a storm water fee is likely needed. Moreno said merging the two systems would create cost savings.\n\u201cThis remains a no brainer situation,\u201d Moreno said in a prepared statement. \u201cThe operations and efficiency of (the S&WB) must improve and a drainage merger is a critical step that can\u2019t come soon enough.\u201d\nState oversight\nThe S&WB is subject to more than 80 state laws, giving lawmakers from every corner of the state a say in how the city\u2019s water systems are regulated.\nAnd with the mayor serving as the board president of a state-created utility, there is confusion over who is ultimately accountable for its management, .\nWater rates and tax levies are approved by the City Council, which, according to BGR, tends to cave to political pressure to keep rates low. That political pressure increases as infrastructure and public confidence erodes, and the cost burden gets kicked to future generations.\n\u201cThe City Council's hand in setting rates, it now injects too much politics,\u201d Cantrell told reporters on Wednesday. By the same token, the council lacks other ways to hold the S&WB accountable, the report says.\n\u201cOne of the few cards that they can really play is to raise hell about funding,\u201d Mowbray said.\nBilling woes\nThat dynamic surfaced last year, when the council refused to consider rate hikes until the S&WB fixed a meter reading system known to produce wildly inflated bills. The utility also has faced criticism for its difficult-to-navigate appeals process.\nWorkers investigate after an explosion at the the Sewerage & Water Board\u00d5s Carrollton water plant in New Orleans, Saturday, Dec. 14, 2019. Three workers were injured in the explosion that harmed two turbines.\nStaff photo by SOPHIA GERMER\nTo take politics out of utility funding, BGR recommends the council adopt a matrix for evaluating the S&WB\u2019s funding proposals. District A City Council member Joe Giarrusso said he\u2019s not opposed to the idea, but that council members\u2019 discretion should not be discarded entirely.\n\u201cIf billing isn\u2019t fixed, how do you go to the public who feels like they\u2019re paying more money than they should, and then say, by the way, we\u2019ve increased your sewer and water rates?\u201d Giarrusso said.\nMowbray credited Cantrell for hiring the S&WB\u2019s current executive director, Ghassan Korban, a civil engineer who previously ran Milwaukee\u2019s public works.\nWater flows into the street after an explosion at the Sewerage & Water Board\u00d5s Carrollton water plant in New Orleans, Saturday, Dec. 14, 2019. Three workers were injured in the explosion that harmed two turbines.\nStaff photo by SOPHIA GERMER\nUnder Korban\u2019s leadership, the S&WB has initiated capital projects to replace its drainage power and underground meters, both considered critical to improving the utility\u2019s service.\nThose two projects alone will run more than $350 million, however, and are part of the reason the S&WB is looking for more revenue.\nAs he has before, Giarrusso said the S&WB should do more to collect on delinquent bills. The S&WB says it was owed $60 million from bills more than 60 days late at the end of March.\nThe S&WB and City Council relationship is at a low point, with the council voting unanimously on May 11 to sue the S&WB for refusing to comply with some parts of new city ordinances related to billing.\nGlass lays on the ground on Spruce street behind the Sewerage & Water Board\u00d5s Carrollton water plant in New Orleans, Saturday, Dec. 14, 2019. Three workers were injured in the explosion that harmed two turbines.\nStaff photo by SOPHIA GERMER\nThat vote prompted Cantrell to order District C City Council member Freddie King to leave an S&WB executive session on Thursday about the possible upcoming litigation.\nKing serves as the council\u2019s representative on the S&WB, and the episode illustrated another issue identified by the BGR: the City Council representative on the S&WB is inherently conflicted, according to the report.\nGiarrusso said he understood why Cantrell booted King from the executive session, but disagreed that a council representative on the board is problematic.\nStill, he agreed there are too many cooks in the kitchen at the S&WB.\n\u201cWhen you have multiple responsibilities in government for a single function, you're almost destined for failure,\u201d Giarrusso said.\nEmail Ben Myers at bmyers@theadvocate.com. Follow Ben Myers on Twitter, @blevimyers.\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nTags\nHardwall\nThis Day in History\nSponsored by Connatix\nRecommended for you\nRecommended by\nSECTIONS\nHOME\nNEWS\nOPINION\nSPORTS\nENTERTAINMENT/LIFE\nNEWSLETTERS\nGAMES\nSERVICES\nCLASSIFIEDS\nSEARCH\nSUBSCRIBE | GROUPS\nDIGITAL ADVERTISING\nHELP/CONTACT US\nRSS FEEDS\nMEDIA KIT\nEEDITION\nCAREERS\nTEACHER'S LINK\nREVIEWING THE RECORD\nOUR SITES\nOBITUARIES\nJOBS\nCELEBRATIONS\nNIE\nCLASSIFIEDS\nHOMES\nPETS\nARCHIVES\nSTORE\nCONTACT INFORMATION\nnola.com\n840 St. Charles Avenue\nNew Orleans, LA 70130\nPhone: 504-529-0522\n\nNews Tips:\nnolanewstips@theadvocate.com\nOther questions:\nsubscriberservices@theadvocate.com\nNeed help?\nReport a delivery issue\nCreate a temporary stop\nSign up for recurring payments\nPay your bill\nUpdate your billing info\n\n\u00a9 Copyright 2023 NOLA.com 840 St. Charles Avenue, New Orleans, LA | Terms of Use | Privacy Policy\nPowered by BLOX Content Management System from BLOX Digital.\nThis website stores data such as cookies to enable essential website functionality, marketing, personalization and analytics. By remaining on this website you indicate your consent. See updated terms and conditions.\n ", + "url": "https://www.nola.com/news/politics/swb-needs-major-changes-to-avoid-more-failures-bgr-says/article_1d13e9c8-f50b-11ed-9c45-67da1c67c50c.html", + "title": "New Orleans S&WB needs sweeping changes if it wants to avoid more pitfalls, BGR says" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/news_directory/New_Orleans_argues_case_to_exit_NOPD_consent_decree._After_3_hours,_a_judge_defers_the_ruling..json b/packages/backend/src/news_directory/New_Orleans_argues_case_to_exit_NOPD_consent_decree._After_3_hours,_a_judge_defers_the_ruling..json new file mode 100644 index 00000000..07348303 --- /dev/null +++ b/packages/backend/src/news_directory/New_Orleans_argues_case_to_exit_NOPD_consent_decree._After_3_hours,_a_judge_defers_the_ruling..json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "Skip to main content\nHomes\nCalendar\nStore\nPublic Notices\nE-Edition\nNewsletters\nSubscribe for $1\nNew Orleans argues case to exit NOPD consent decree. After 3 hours, a judge defers the ruling.\nBY MISSY WILKINSON and JOHN SIMERMAN | Staff writers Jun 28, 2023\n2 min to read\nBuy Now\nThe U.S. District Courthouse in New Orleans.\nSTAFF FILE PHOTO\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nAlmost a year after filing a motion to end the sprawling reform agreement that has governed the New Orleans Police Department for a decade, Mayor LaToya Cantrell had her day in court.\nAttorneys for the city on Wednesday argued that problems the original federal consent decree was designed to address, including corruption, bias and shoddy policing, have long been ameliorated, despite consistent assertions that the police force should do more. \nU.S. Department of Justice lawyers disagreed, citing ongoing shortcomings that include improper use of force by officers and patterns of unlawful racial discrimination in stops and searches. \nAfter three hours of back-and-forth, U.S. District Judge Susie Morgan said she would take the matter under advisement.\nThe hearing culminated a legal gambit by Cantrell that began last August, when the city filed its motion to exit the deal, casting doubt on the assessments by the federal monitors who report to Morgan. In recent reports, the monitors identified backsliding in areas they'd previously checked off as compliant.\nMorgan had projected that the city would reach a two-year offramp from federal oversight last summer. But that timetable dissolved as the judge and the monitors began to find progress stifled, in part by a steep loss of police officers from the force. Morgan pumped the brakes, stoking a bitter response from Cantrell, who has since taken an aggressive tack against the judge and monitors, in court and public statements. \nCharles Zimmer, outside counsel for the city, told Morgan Wednesday that the NOPD has shown substantial compliance with the demands of the 2012 consent decree, which at the time was the most wide-reaching blueprint for police reform in the country.\nZimmer argued that changes have rendered compliance more onerous, and that perfection shouldn't be the goal. \n\"The city believes the pattern that existed in 2011 has been remedied for years, and we are legally entitled to exit,\" said Daniel Davillier, outside counsel for the city.\nAccording to a review by Independent Police Monitor Stella Cziment, 17 of the 28 instances in which the NOPD used force in 2021 weren't justified, and 37% of police pursuits that year resulted in formal disciplinary investigations. The NOPD's own audit revealed 35% of pat-downs from March 2022 weren't properly documented\u2014a potential Fourth Amendment violation.\nThough the department has exhibited enormous progress, that doesn't equate to full and effective compliance, a DOJ representative argued. \nFormer Mayor Mitch Landrieu agreed to the reforms after a blistering federal investigation portrayed a police department replete with misconduct. Morgan and the monitors have touted improvements since then, though doubts over the will to sustain those efforts remain strong. \n\"This is supposed to be a durable remedy,\" Morgan told the city's attorney. \"Once you're in compliance, the concept is you stay in compliance\u2014not that you can be compliant for two years and then forget about it.\"\nThe exchange between Morgan and Zimmer grew heated when Zimmer likened federal oversight\u2014and the accompanying $16 million paid out to federal monitors over the years\u2014to \"a hostage situation.\"\n\"I do not want you to impugn the integrity of the court to my face,\" Morgan replied.\nCziment, whose office is slated to take on a bigger watchdog role once the feds leave, cited fear in the community over a premature exit from federal oversight, and uncertainty over an NOPD left to its own devices.\n\"There isn't a clear vision of what constitutional policing will look like after the consent decree is done,\" Cziment stated after the hearing. \"As for the use of force and stop, searches and arrests, we share the concerns highlighted by the Department of Justice and the NOPD themselves (via departmental audits.)\"\nMorgan provided no timeline for her ruling.\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nMORE INFORMATION\nMayor defends reinstatement of Jeffrey Vappie to security detail\nSeven months after questions arose about his time spent with Mayor LaToya Cantrell in a French Quarter apartment, New Orleans police officer J\u2026\nNOPD says officer on Cantrell detail violated policies, but monitor says it could've looked harder\nFederal monitors cast a dim view of the New Orleans Police Department\u2019s internal investigation of Officer Jeffrey Vappie over his timesheets while serving on a team securing Mayor LaToya Cantrell, in a report released Thursday.\nNOPD to sell reforms straight to public after federal judge caves on hearing order\nNew Orleans Police Department brass were set to launch a series of public meetings on Wednesday to tout progress on a slew of reforms to the f\u2026\nIn police reform quarrel, New Orleans objects to 'unattainable' goal\nCantrell administration says Justice Department, \"faced with losing control\" is changing the rules\nMonitor slams NOPD over internal affairs, probe of Cantrell security guard\nA New Orleans police internal affairs probe into alleged payroll irregularities involving an officer who was assigned to protect Mayor LaToya \u2026\nCity must defend NOPD probe of mayor's bodyguard, appeals court rules\nA federal appeals court on Monday opposed the city\u2019s objection to a rule to show cause hearing regarding alleged violations of the consent decree that stemmed from its handling of the Vappie probe. U.S. District Judge Susie Morgan ordered the city to defend its investigation on Aug. 31.\nThree-day federal court hearing ends over NOPD's investigation of mayor's bodyguard\nMonitors who report to U.S. Judge Susie Morgan claim the city violated several reform mandates in its probe of Officer Jeffrey Vappie\nThis Day in History\nSponsored by Connatix\nRecommended for you\nRecommended by\nSECTIONS\nHOME\nNEWS\nOPINION\nSPORTS\nENTERTAINMENT/LIFE\nNEWSLETTERS\nGAMES\nSERVICES\nCLASSIFIEDS\nSEARCH\nSUBSCRIBE | GROUPS\nDIGITAL ADVERTISING\nHELP/CONTACT US\nRSS FEEDS\nMEDIA KIT\nEEDITION\nCAREERS\nTEACHER'S LINK\nREVIEWING THE RECORD\nOUR SITES\nOBITUARIES\nJOBS\nCELEBRATIONS\nNIE\nCLASSIFIEDS\nHOMES\nPETS\nARCHIVES\nSTORE\nCONTACT INFORMATION\nnola.com\n840 St. Charles Avenue\nNew Orleans, LA 70130\nPhone: 504-529-0522\n\nNews Tips:\nnolanewstips@theadvocate.com\nOther questions:\nsubscriberservices@theadvocate.com\nNeed help?\nReport a delivery issue\nCreate a temporary stop\nSign up for recurring payments\nPay your bill\nUpdate your billing info\n\n\u00a9 Copyright 2023 NOLA.com 840 St. Charles Avenue, New Orleans, LA | Terms of Use | Privacy Policy\nPowered by BLOX Content Management System from BLOX Digital.\n This website stores data such as cookies to enable essential website functionality, marketing, personalization and analytics. By remaining on this website you indicate your consent. See updated terms and conditions.", + "url": "https://www.nola.com/news/crime_police/judge-offers-no-ruling-on-citys-motion-to-exit-consent-decree/article_1871f7dc-15c9-11ee-ad6c-afaeccd8e9dc.html", + "title": "New Orleans argues case to exit NOPD consent decree. After 3 hours, a judge defers the ruling." + } + ] +} \ No newline at end of file diff --git "a/packages/backend/src/news_directory/New_Orleans_ignores_\342\200\230clean_fleet\342\200\231_law_during_$50_million_vehicle-buying_spree.json" "b/packages/backend/src/news_directory/New_Orleans_ignores_\342\200\230clean_fleet\342\200\231_law_during_$50_million_vehicle-buying_spree.json" new file mode 100644 index 00000000..bbe1bb38 --- /dev/null +++ "b/packages/backend/src/news_directory/New_Orleans_ignores_\342\200\230clean_fleet\342\200\231_law_during_$50_million_vehicle-buying_spree.json" @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "HOME\nABOUT\nSUBSCRIBE\nDONATE\nELECTION 2023\nGOVT + POLITICS\nENVIRONMENT\nHEALTH\nCRIMINAL JUSTICE\nEDUCATION\nENVIRONMENT\nGOVT + POLITICS\nINVESTIGATIONS\nNew Orleans ignores \u2018clean fleet\u2019 law during $50 million vehicle-buying spree\nBY: MICHAEL ISAAC STEIN, VERITE - JUNE 3, 2023 6:00 AM\nVerite photo\nNEW ORLEANS \u2014 The city of New Orleans, flush with federal pandemic aid dollars, is in the midst of a spending spree to replace its aging vehicle fleet.\nSo far this year, the city has spent $50 million in federal pandemic relief aid to buy 791 vehicles. But it appears that almost all of those purchases violate a city law that mandates low emissions for city-owned vehicles.\nThe \u201cclean fleet\u201d ordinance, which the City Council approved last year, requires the city to stop buying gas-powered vehicles altogether in 2025. But the law also stipulates that starting in 2023, newly purchased city vehicles have to at least follow the same low-emissions standards required for the federal government as part of the 2007 Energy Independence and Security Act.\nMayor LaToya Cantrell recently released a list of 2023 vehicle purchases. An analysis by Verite didn\u2019t identify a single car model that met those emissions standards.\nSome of the listed vehicles don\u2019t have the specific model number necessary to look up their emissions on the federal government\u2019s emissions database, including \u201c15 passenger vans\u201d and \u201cambulances.\u201d But of the 686 vehicles that do provide model information, none of them appear to meet the city\u2019s standards.\nMany of the vehicles don\u2019t even come close to meeting the standard, including SUVs with emissions two or three times higher than the threshold.\n\u201cMost concerning here is that not only are all of the vehicles gas, they\u2019re guzzlers,\u201d Logan Burke, executive director of the Alliance for Affordable Energy, told Verite.\nThe \u201cclean fleet\u201d ordinance does allow the city\u2019s Chief Administrative Officer, Gilbert Monta\u00f1o, to grant exceptions. But the law says that \u201cexemptions are disfavored and may only be approved on a case-by-case basis.\u201d It also requires Monta\u00f1o to provide a written explanation for each exemption that provides \u201ca substantial public-safety justification.\u201d\nA written statement from Cantrell\u2019s office on Thursday said that Monta\u00f1o \u201chas exercised his discretion to grant exemptions from the cited standard when appropriate.\u201d But the city did not respond to a request to provide copies of those exemptions by the time of publication.\nIn the statement, Cantrell\u2019s office said the high-emission vehicles were necessary due to \u201csupply chain challenges\u201d and because \u201cunfortunately, currently available vehicles that meet the cited standard are not effective for every job.\u201d\n\u201cThe age and functionality of the current fleet impacts the effectiveness of City services and carries a significant financial burden,\u201d the statement said. \u201cAs the vehicle designs improve and the marketplace recovers from its challenges, the City will purchase vehicles that meet the cited standard. \u2026 But the City will not risk the safety of City employees and the public in order to meet a standard that vehicle manufacturers have been unable to keep up with thus far.\u201d\nThe majority of the vehicles, 512 out of 791, went to the New Orleans Police Department. NOPD Superintendent Michelle Woodfork said in April that she planned to use vehicles to offer take-home cars for every NOPD officer. The rest of the money was spread over 29 other departments, including the Department of Safety and Permits, the Fire Department, the District Attorney\u2019s Office, the Mayor\u2019s Office and the New Orleans Public Library.\nBurke said that even if Monta\u00f1o did issue a formal exception for each of the vehicles, and the administration didn\u2019t violate the law, it was still a mistake to upgrade the city\u2019s fleet with the same high-emissions vehicles it\u2019s always relied on.\n\u201cIf municipalities like New Orleans pass policies intended to take climate action and act as a role model for people and businesses, it is vital that they follow their own rules,\u201d Burke said. \u201cOtherwise policies wind up as performance and handwaving, and that\u2019s how people lose confidence in their government.\u201d\nWhen the clean fleet ordinance was introduced by Councilwoman Helena Moreno last year, she said the fleet transition was a vital step for a city so vulnerable to the impacts of climate change.\nCantrell has framed herself as a leader on climate. She recently returned from a climate conference in South Korea, where, her office said in a press release, she was the only mayor in attendance.\n\u201cWe expect the Administration to understand and follow the law,\u201d Moreno said in a statement on Wednesday. \u201cClimate leadership requires execution, not just rhetoric. I need to know why they failed to follow the law.\u201d\nMoreno and experts acknowledged from the start that transitioning the city\u2019s hundreds of vehicles to a low-emission fleet would cost money, and that they would likely need federal funds to help make that happen. And at the beginning of this year, when the new threshold went into effect, the city happened to be sitting on hundreds of millions of dollars in unallocated pandemic aid and surplus money.\nBurke\u2019s frustration over the new vehicle purchases is a sentiment shared by many local advocates and residents over the federal funds, the feeling that the city missed a rare golden opportunity to fund transformational projects, and instead doubled down on what it\u2019s already doing.\n\u201cThis specific example of the cars is a symptom of the problem \u2014 the failure to make these dollars and spending decisions align with community priorities,\u201d said Cashauna Hill, executive director of the Louisiana Fair Housing Action Center.\n\u2018The administration needs to make this all make sense\u2019\nThis is not the first time Cantrell has been criticized for how the city has used $388 million in federal pandemic relief aid it began receiving in mid-2021.\nAs 2022 was winding down, it became clear that the city hadn\u2019t spent almost any of the money. The big question was how the city should spend the unexpected windfall.\nThe administration told residents that there would be a public process to determine how to spend it. But that never happened, advocates said.\nOver the past six months, the administration and council quickly appropriated the vast majority of the money. Although all the cash was formally allocated in public council votes, residents, advocates and good government watchdogs have said the process has been last-minute, non-transparent and unaccountable.\n\u201cThe issue here is that what\u2019s happening is that the administration has gone out of its way to avoid having a transparent conversation about what they\u2019re choosing to spend money on and why,\u201d Hill said.\nHill and other advocates say they were pushed to the side, and that since almost all the money has been allocated, it may be too late. Hill was particularly adamant about the high level of federal funds Cantrell spent on the police, including the recent vehicle purchases.\n\u201cWe continue to hear that it\u2019s so difficult to recruit and attract and retain NOPD officers,\u201d Hill said. \u201cYet we\u2019re continuing to spend millions of dollars on vehicles for these nonexistent police officers to take home. The administration needs to make this all make sense. And so far they have refused to do that.\u201d\nThe NOPD has seen a big drop in its ranks in the past few years, at the same time that the city, and most of the country, experienced a rise in some violent crimes. Much of the ARPA funds have been dedicated to fixing that staffing problem at the NOPD, including a multimillion-dollar retention and recruitment package.\nTake-home vehicles for officers was also a recruiting recommendation provided by former New York police officers the city hired as consultants last year.\nLooking at the city\u2019s official allocations, it\u2019s difficult to tell exactly how much was spent on the NOPD. For example, $1.5 million for a new facility for NOPD\u2019s police dogs and horses was officially marked as a transfer of funds from the City Council to the Chief Administrative Office. It\u2019s also unclear how much of a $30 million criminal justice IT overhaul will go directly to the police.\nAccording to a city dashboard, of the first $141 million of federal pandemic funds the city appropriated to special projects, 62% went to \u201cpublic safety.\u201d\n\u201cI\u2019m not aware of the exact amount [spent on NOPD], my guess would be that it\u2019s the majority.\u201d Hill said. \u201cThey are clearly showing us what their actual priorities are. \u2026 It seems like this administration has fully decided that giving more money to the NOPD is the way we\u2019re going to address what they\u2019re calling a historic crime wave.\u201d\nHill said that once again, government officials are failing to take a holistic approach to the community\u2019s problems, failing to see the connections between safety and housing and education and transportation.\n\u201cIt\u2019s such a short-sighted plan,\u201d Hill said. \u201cBecause it fails once again to address the actual needs of community members, and instead gives into fear and continues to pad the budget of the NOPD, which has not helped us.\u201d\nThis article first appeared on Verite and is republished here under a Creative Commons license. Join Verite\u2019s Mailing List | Get the news that matters to you\nREPUBLISH\nOur stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site. Please see our republishing guidelines for use of photos and graphics.\nMICHAEL ISAAC STEIN, VERITE\nBefore joining Verite, Michael Isaac Stein spent five years as an investigative reporter at The Lens, a nonprofit New Orleans news publication, covering local government, housing and labor issues. Before working at The Lens, Stein was a reporter for WWNO New Orleans Public Radio and freelanced for various national publications including The Intercept, The New Republic and Bloomberg\u2019s CityLab. He holds a bachelor\u2019s degree from the University of Michigan\u2019s Ford School of Public Policy.\nMORE FROM AUTHOR\nRELATED NEWS\n\u2018Healthy Homes\u2019 ordinance falls short for New Orleans\u2026\nBY KARLI WINFREY, VERITE\nNovember 10, 2022\nNew Orleans government remains understaffed despite\u2026\nBY MICHAEL ISAAC STEIN, VERITE\nApril 2, 2023\nSHINING A LIGHT ON THE BAYOU STATE\nDemocracy Toolkit //\nRegister to vote\n|\nFind your voting precinct\n|\nBecome an election worker\n|\nConduct a voter registration drive\n|\nContact your state and federal lawmakers\nABOUT US\nThe Louisiana Illuminator is an independent, nonprofit, nonpartisan news organization with a mission to cast light on how decisions in Baton Rouge are made and how they affect the lives of everyday Louisianians. Our in-depth investigations and news stories, news briefs and commentary help residents make sense of how state policies help or hurt them and their neighbors statewide.\nOur stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site.\nDEIJ Policy | Ethics Policy | Privacy Policy\n\u00a9 Louisiana Illuminator, 2023", + "url": "https://lailluminator.com/2023/06/03/theyre-guzzlers-new-orleans-ignores-clean-fleet-law-during-50-million-vehicle-buying-spree/", + "title": "New Orleans ignores \u2018clean fleet\u2019 law during $50 million vehicle-buying spree" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/news_directory/New_Orleans_police_use_of_facial_recognition_nets_zero_arrests_in_nine_months.json b/packages/backend/src/news_directory/New_Orleans_police_use_of_facial_recognition_nets_zero_arrests_in_nine_months.json new file mode 100644 index 00000000..a985798c --- /dev/null +++ b/packages/backend/src/news_directory/New_Orleans_police_use_of_facial_recognition_nets_zero_arrests_in_nine_months.json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "HOME\nABOUT\nSUBSCRIBE\nDONATE\nELECTION 2023\nGOVT + POLITICS\nENVIRONMENT\nHEALTH\nCRIMINAL JUSTICE\nEDUCATION\nCRIMINAL JUSTICE\nNew Orleans police use of facial recognition nets zero arrests in nine months\nBY: MICHAEL ISAAC STEIN, VERITE - JULY 28, 2023 6:00 AM\nNew Orleans Police Department officers stand at attention. (Image courtesy of NOPD)\nNEW ORLEANS \u2014 Facial recognition technology that has been touted as an important tool to reduce violent crime in the city was used by the New Orleans Police Department only 13 times from Oct. 1, 2022, to July 1, 2023, resulting in zero arrests, according to a new report from City Council consultant AH Datalytics.\nThe technology provided potential identities in just five cases, two of which were deemed \u201cbad matches,\u201d the report said.\nThe report comes roughly a year after the council lifted a ban on the controversial surveillance technology following pressure from the NOPD, Mayor LaToya Cantrell and a civic group called the NOLA Coalition.\n\u201cLast year, some argued overturning [the council\u2019s] ban on Facial Recognition tech was \u2018key\u2019 to solving violent crime. \u2026 They were wrong,\u201d Andrew Tuozzolo, chief of staff to Councilwoman Helena Moreno, said on Twitter earlier this month.\nNOPD policy requires officers to submit a request form to utilize facial recognition through a partnership with a state surveillance hub called the Louisiana State Analytical and Fusion Exchange. According to data the NOPD provided to the City Council, the 15 requests in the nine-month period included 14 requests to identify a Black male and one for a Black woman.\nOne of the requests was canceled because the suspect was identified through other means. Another request in an identity fraud case was denied because it violated NOPD policy, which says that facial recognition can only be used in connection with a \u201ccrime of violence\u201d or to find a missing person.\nIn the remaining 13 cases, facial recognition provided a match in only five of them. Two of those were considered \u201cbad matches,\u201d the report said. In another case, the NOPD arrested a different man than the one identified through facial recognition, noting that the \u201clead may have been bad information, match\u2019s subject was not in the area during the homicide.\u201d The last two cases that had a match are still open.\n\u201cThere have been no arrests of an individual matched by facial recognition per data from NOPD,\u201d the report said.\nAbout half of the 15 requests came from specialized NOPD offices focused on the most serious crimes, including the homicide division and the FBI-NOPD combined task force. The other half came from officers assigned to the NOPD\u2019s 8th District, which covers the French Quarter and the Central Business District. The request in the identity fraud case came from the 4th District, which covers the West Bank.\nEye on Surveillance, a leading local anti-surveillance coalition, was instrumental in passing the original facial recognition ban, and strongly opposed the council reversing it. Organizers told Verite that the report validated one of their central arguments in favor of the facial recognition ban \u2014 that mass crime camera systems simply aren\u2019t very effective, and are a waste of public dollars needed to address the root causes of crime, like the lack of housing, education and jobs.\n\u201cThis is a bittersweet moment because although it\u2019s rewarding to witness the validation of what we\u2019ve stated for years about this surveillance technology\u2019s inefficacy, we\u2019re disappointed that neither our coalition nor the people of New Orleans who resoundingly opposed the repeal were believed to begin with,\u201d an emailed statement from the organization said.\nThree council members at the time \u2014 Moreno, JP Morrell and Leslie Harris \u2014 opposed lifting the surveillance ban and likewise questioned whether facial recognition and crime cameras were vital to reducing crime.\n\u201cAs the data continues to show, facial recognition is not one of NOPD\u2019s main crime fighting tools,\u201d Harris told Verite in an email.\nAn NOPD spokesperson didn\u2019t respond directly to questions about the system\u2019s effectiveness.\n\u201cFacial recognition is one of the many tools available to investigators to assist in trying to generate leads in investigations and to identify criminal offenders,\u201d an NOPD spokesperson told Verite in an email. \u201cAny leads or results that are formed through technology are thoroughly vetted to ensure the correct outcome.\u201d\nGET THE MORNING HEADLINES DELIVERED TO YOUR INBOX\nSUBSCRIBE\nQuestions of reliability, racial discrimination\nNew Orleans\u2019 vast network of crime cameras was born under former Mayor Mitch Landrieu in 2017, and has progressed rapidly under Mayor LaToya Cantrell. The city\u2019s surveillance hub, the Real Time Crime Center, now has access to more than 1,000 live camera feeds around the clock, seven days a week. About half of those come from city-owned cameras and half from private residents and businesses who pay to give the city direct access to their cameras\u2019 live feeds.\nCivil rights and privacy advocates voiced concerns from the jump, which only grew when it became clear that the city was bolstering the power of its camera network with powerful, military-grade software that could automatically and instantly search footage for specific people, vehicles and more.\nSome objected to the technology because of the massive amount of power it would give to the police and criminal justice apparatus. Others pointed to the facial recognition technology\u2019s well-documented biases and inaccuracies.\nSeveral studies, including one by a federal agency, showed that facial recognition is far more unreliable at identifying people who aren\u2019t white, leading to more false matches and, in some cases, false arrests.\nFor example, last year, the Jefferson Parish Sheriff\u2019s Office used facial recognition to identify and issue an arrest warrant for a suspect in a robbery of luxury purses in Metairie. But the software identified the wrong person, a man in Georgia who was falsely arrested and kept in jail for a week as a result.\nIn November 2020, The Lens reported that despite years of denials, the city had in fact been utilizing facial recognition technology. That revelation, combined with the fact that it was apparently being done without the knowledge of the NOPD superintendent, convinced some council members that the NOPD shouldn\u2019t have access to facial recognition.\nIn December 2020, the council approved a new law limiting the city\u2019s surveillance capabilities and putting bans on four pieces of technology, including facial recognition and predictive policing software.\nThe 2020 surveillance law was already much less restrictive than critics like Eye on Surveillance originally pitched. But council members at the time \u2014 including Moreno and current District Attorney Jason Williams \u2014 said the ordinance would set a baseline to build on, and that more restrictions would be added in the future.\nBut public support for surveillance restrictions began to drop among elected officials as New Orleans, like most major cities in the United States, started experiencing a spike in violent crime. Also similar to other cities, New Orleans police force shrank to its lowest numbers in decades.\nPressure began building on the council to loosen the surveillance restrictions to help curb violent crime. The pressure came not just from the NOPD and Cantrell, but also from certain community groups \u2014 namely the NOLA Coalition, a partnership of more than a hundred local businesses and groups that claimed to form to try and reduce violent crime in the city.\nOne of the first things the group advocated for was lifting the city\u2019s surveillance bans. The group declined to comment on this story through a spokesperson Matt Wolfe, vice president of communications at Greater New Orleans, Inc.\nAs District Attorney, Williams was asked about lifting the ban and told the council \u201cit could be an amazing tool\u201d and could be a \u201cforce multiplier\u201d for the NOPD. That\u2019s despite the fact that Williams helped author the original ban when he was a council member.\nIn July 2022, the council voted 4-2 to lift the surveillance bans and loosen other surveillance restrictions. Council members Eugene Green, Freddie King, Joe Giarrusso and Oliver Thomas voted in favor. Morrell and Harris voted against. Moreno was absent for the vote but had spoken in opposition to it. Moreno, Harris and Morrell later authored an ordinance, which the council approved unanimously in August 2022, to create some limited guardrails on surveillance usage. The law requires the NOPD to share certain data with the council, including the facial recognition use included in the recent council report from AH Datalytics.\nThis article first appeared on Verite and is republished here under a Creative Commons license.\nREPUBLISH\nOur stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site. Please see our republishing guidelines for use of photos and graphics.\nMICHAEL ISAAC STEIN, VERITE\nBefore joining Verite, Michael Isaac Stein spent five years as an investigative reporter at The Lens, a nonprofit New Orleans news publication, covering local government, housing and labor issues. Before working at The Lens, Stein was a reporter for WWNO New Orleans Public Radio and freelanced for various national publications including The Intercept, The New Republic and Bloomberg\u2019s CityLab. He holds a bachelor\u2019s degree from the University of Michigan\u2019s Ford School of Public Policy.\nMORE FROM AUTHOR\nRELATED NEWS\nLawsuit shows growth in surveillance-based police stops,\u2026\nBY MICHAEL ISAAC STEIN, VERITE\nMarch 18, 2023\nSurveillance cameras recorded you. Who should be able to\u2026\nBY MICHAEL ISAAC STEIN, VERITE\nJanuary 14, 2023\nSHINING A LIGHT ON THE BAYOU STATE\nDemocracy Toolkit //\nRegister to vote\n|\nFind your voting precinct\n|\nBecome an election worker\n|\nConduct a voter registration drive\n|\nContact your state and federal lawmakers\nABOUT US\nThe Louisiana Illuminator is an independent, nonprofit, nonpartisan news organization with a mission to cast light on how decisions in Baton Rouge are made and how they affect the lives of everyday Louisianians. Our in-depth investigations and news stories, news briefs and commentary help residents make sense of how state policies help or hurt them and their neighbors statewide.\nOur stories may be republished online or in print under Creative Commons license CC BY-NC-ND 4.0. We ask that you edit only for style or to shorten, provide proper attribution and link to our web site.\nDEIJ Policy | Ethics Policy | Privacy Policy\n\u00a9 Louisiana Illuminator, 2023", + "url": "https://lailluminator.com/2023/07/28/new-orleans-police-use-of-facial-recognition-nets-zero-arrests-in-9-months/", + "title": "New Orleans police use of facial recognition nets zero arrests in nine months" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/news_directory/New_Orleans_preparing_for_three_months_of_salt_water_in_drinking_water_supply.json b/packages/backend/src/news_directory/New_Orleans_preparing_for_three_months_of_salt_water_in_drinking_water_supply.json new file mode 100644 index 00000000..fd71faa1 --- /dev/null +++ b/packages/backend/src/news_directory/New_Orleans_preparing_for_three_months_of_salt_water_in_drinking_water_supply.json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "Skip to main content\nHomes\nCalendar\nStore\nPublic Notices\nE-Edition\nNewsletters\nSubscribe for $1\nNew Orleans preparing for three months of salt water in drinking water supply\nBy MIKE SMITH | Staff writer\nSep 27, 2023\n1 min to read\nPipes carrying sediment crisscross the Mississippi River where the U.S. Army Corps of Engineers is building an underwater sill with that mud that should slow the flow of saltwater up the Mississippi River south of New Orleans on Tuesday, September 26, 2023. (Photo by Chris Granger | The Times-Picayune | NOLA.com)\nStaff photo by Chris Granger NOLA.com | The Times-Picayune\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nNew Orleans may need to deal with salt threatening local drinking water supplies for as long as three months, meaning through January according to current forecasts, a top city official said Wednesday.\nCollin Arnold, New Orleans' homeland security chief, said that timeframe was based on advice from the Army Corps of Engineers.\nThe city, in cooperation with the surrounding region, is hoping to build a pipeline further upriver to pump water that would dilute the salt at treatment plants \u2014 an expensive plan, but one that could potentially be converted into a permanent solution.\n+2\nWhen will the saltwater wedge reach your drinking water system? Here's a timeline.\nPlans made to barge in 36 million gallons of fresh water a day\n\"About 90 days is what we've been told by the Corps of Engineers,\" Arnold said after addressing a City Council committee meeting on the subject. \n\"So we'd be looking at maybe the end of January under under those circumstances.\"\nArnold noted that caution was necessary when estimating timeframes given the unknowns related to the forecast, but said that was the current thinking. Sufficient rain must occur in the Mississippi River basin to flush out the salt moving up from the Gulf of Mexico.\nThe current forecast shows salt reaching the intakes for New Orleans' Carrollton water plant, which supplies water to the city's east bank, around Oct. 28. \nArnold said New Orleans and Jefferson Parish were now focusing on building a pipeline for the east bank in both parishes because barges delivering water would not provide sufficient capacity.\nCost estimates for the pipeline are anywhere from $100 million to $250 million, but federal funds could cover the majority given the White House's disaster declaration for the saltwater intrusion.\nArnold says he hopes construction could begin on the pipeline in seven to 10 days, so long as officials are able to get expedited contracting and approvals.\nContractors are offering assurances that the work could be completed despite the short timeframe, but officials are preparing for the possibility of making bottled water available if there is a gap. The city is also looking at water conservation methods, Arnold said.\nArnold stressed that the city's water remains safe and drinkable. He called on residents not to panic and said the situation was manageable. \nEmail Mike Smith at msmith@theadvocate.com or follow him on Twitter, @MikeJSmith504.\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nMORE INFORMATION\nEverything you need to know about salt water moving inland in Louisiana, including a tracker\nSalt water is creeping up the mouth of the Mississippi River and threatening the drinking supply of several parishes in Southeast Louisiana, i\u2026\nCantrell: Biden administration has issued disaster declaration on saltwater intrusion\nMayor LaToya Cantrell on Wednesday said President Joe Biden has moved forward with a federal disaster declaration for the saltwater intrusion \u2026\n+7\nHow would salt water affect my lawn, garden? Everything you need to know\nSaltwater incursion in the municipal water supply sounds scary. But gardeners shouldn't panic. This has happened before, as recently as 1988. \u2026\n+6\nWhite House declares emergency, pipeline planned as salt threatens drinking water\nThe White House declared an emergency Wednesday for four Louisiana parishes threatened by salt intrusion in drinking water and officials warne\u2026\n+4\nLive updates: Saltwater tracker shows latest location of intrusion near New Orleans\nAn intrusion of salt water moving up the Mississippi River from the Gulf of Mexico is threatening local drinking water supplies. \n+12\nLead contamination could rise as salt water enters New Orleans-area water systems\nThere\u2019s growing concern that the impending intrusion of salt water in the region\u2019s drinking water systems could trigger a spike in lead contam\u2026\nTags\nFej\nThis Day in History\nSponsored by Connatix\nRecommended for you\nRecommended by\nSECTIONS\nHOME\nNEWS\nOPINION\nSPORTS\nENTERTAINMENT/LIFE\nNEWSLETTERS\nGAMES\nSERVICES\nCLASSIFIEDS\nSEARCH\nSUBSCRIBE | GROUPS\nDIGITAL ADVERTISING\nHELP/CONTACT US\nRSS FEEDS\nMEDIA KIT\nEEDITION\nCAREERS\nTEACHER'S LINK\nREVIEWING THE RECORD\nOUR SITES\nOBITUARIES\nJOBS\nCELEBRATIONS\nNIE\nCLASSIFIEDS\nHOMES\nPETS\nARCHIVES\nSTORE\nCONTACT INFORMATION\nnola.com\n840 St. Charles Avenue\nNew Orleans, LA 70130\nPhone: 504-529-0522\n\nNews Tips:\nnolanewstips@theadvocate.com\nOther questions:\nsubscriberservices@theadvocate.com\nNeed help?\nReport a delivery issue\nCreate a temporary stop\nSign up for recurring payments\nPay your bill\nUpdate your billing info\n\n\u00a9 Copyright 2023 NOLA.com 840 St. Charles Avenue, New Orleans, LA | Terms of Use | Privacy Policy\nPowered by BLOX Content Management System from BLOX Digital.\nThis website stores data such as cookies to enable essential website functionality, marketing, personalization and analytics. By remaining on this website you indicate your consent. See updated terms and conditions.\n ", + "url": "https://www.nola.com/news/environment/new-orleans-prepares-for-three-months-of-salt-intrusion/article_03452ac2-5d64-11ee-ba66-2fb982d2b7c1.html", + "title": "New Orleans preparing for three months of salt water in drinking water supply" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/news_directory/No_excuses_Frustrated_council_members_press_Richards_Disposal_over_garbage_failures.json b/packages/backend/src/news_directory/No_excuses_Frustrated_council_members_press_Richards_Disposal_over_garbage_failures.json new file mode 100644 index 00000000..f392cc8d --- /dev/null +++ b/packages/backend/src/news_directory/No_excuses_Frustrated_council_members_press_Richards_Disposal_over_garbage_failures.json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "Skip to main content\nFun & Free\nNewsletter\nAdvertise\nClassifieds\nCalendar\nBECOME A MEMBER\n\u2018No excuses\u2019: Frustrated council members press Richard\u2019s Disposal over garbage failures\nBY SARAH RAVITS\nJan 6, 2023\nA Richard's Disposal truck \nPHOTO BY DAVID GRUNFELD/ THE TIMES-PICAYUNE\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nFrustrated New Orleans City Council members are demanding swift action from Mayor LaToya Cantrell\u2019s administration to resolve Richard\u2019s Disposal\u2019s ongoing failure to haul off residential waste. \nCouncil members Freddie King, Joe Giarrusso and Lesli Harris issued a joint statement Friday, calling on the Department of Sanitation to come up with new plans, citing escalating public health concerns and a declining quality of life for fed-up residents who have complained for months about missed pickups and overflowing, festering bins. \n\u201cThere can be no excuses,\u201d said Giarrusso, who represents District A. \u201cThe trash needs to be collected. This is urgent. This is about delivering basic services. This is a public health issue. The solution is self-evident: Immediate supplementation must be provided with a focus on the missed routes.\u201d \nThe call for action is part of the Council\u2019s ongoing push to get waste management on track in New Orleans.\nAlthough overshadowed by the controversy surrounding Metro Services' trash collection woes, Richard's record has also been inadequate for much of the last year and a half following Hurricane Ida. \n\u201cThe lack of basic trash and recycling pickup service is unacceptable,\u201d District B's Harris said. \u201cIt\u2019s time for the City to get to the bottom of this issue. The Department of Sanitation must announce a plan to stabilize trash collection across Service Area 2.\u201d \nFor months, residents in the service area \u2014 which encompasses large swaths of Uptown, Mid-City, Broadmoor, Gentilly, Ninth Ward and Algiers, have been in distress over the city\u2019s failure to provide this basic municipal service. \n\u201cWe are still seeing a high volume of calls about missed trash and recycling collections in District C on both sides of the river,\u201d said King. \u201cThis issue does not seem to be improving.\" \nAs Carnival season kicks off, the council members emphasized the need for swift action as the city\u2019s population is expected to swell with tourists and celebrations in the coming weeks. \nHarris, who chairs the council\u2019s Quality of Life Committee, said, \u201cit should not be the responsibility of residents to constantly report missed pickups.\" \nCantrell's administration also acknowledged the problem Friday afternoon and issued a statement, saying they were confident that they will find a solution. \"The City of New Orleans is aware of Richard's failure to live up to the demands of its contract,\" a spokesperson said. \"The administration has been working toward a solution that will ensure the residents will receive the sanitations they pay for and that they deserve.\" \nThis story has been updated with a statement from the Cantrell administration. \nBECOME A GAMBIT MEMBER AND JOIN OUR KREWE TODAY\nFor more than 40 years, Gambit has covered New Orleans, for New Orleans. We\u2019ve stood up to city hall with you, cheered the Saints with you, danced in the streets with you and cried over our collective loss with you. And we\u2019re plannin\u2019 on being here for 40 more. To do that, we need your help. Become a Gambit member today and help us continue our mission\nSUPPORT GAMBIT\nEmail Sarah Ravits at sravits@gambitweekly.com\nFacebook\nTwitter\nEmail\nPrint\nCopy article link\nSave\nGambit's Events Calendar\nFor more upcoming events visit calendar.gambitweekly.com\nOct\n10\nMusic\nRichard \"Piano\" Scott\nTue, Oct 10, 2023\nOct\n10\nMusic\nThe Villians\nTue, Oct 10, 2023\nOct\n10\nMusic\nYusa & Victor Campbell\nTue, Oct 10, 2023\nOct\n10\nMusic\nColin Myers\nTue, Oct 10, 2023\nC'est What?\nWhat are you most looking forward to eating this fall?\nGumbo\nIt's a month ending in \"r,\" so oysters\nSome Louisiana game, like duck\nI've been freebasing pumpkin spice since Oct. 1\nVote View Results\nAbout Gambit\nCurrent Issue of Gambit\nNewsletter Sign-Up\nHome Delivery\nAd Info & Rates\nNational Advertising\nAbout Us\nCareers at Gambit\nArchives\nContact\nPuzzles\nComing to New Orleans?\nArt\nEvents\nMusic\nFestivals\nGambit Ink Settings Privacy Statement Terms of Use\n\n\u00a9 2023 Gambit\nPowered by BLOX Content Management System from BLOX Digital.\nThis website stores data such as cookies to enable essential website functionality, marketing, personalization and analytics. By remaining on this website you indicate your consent. See updated terms and conditions.\n ", + "url": "https://www.nola.com/gambit/news/the_latest/no-excuses-frustrated-council-members-press-richard-s-disposal-over-garbage-failures/article_e62546c4-8df8-11ed-bab6-2b43058e872b.html", + "title": "\u2018No excuses\u2019: Frustrated council members press Richard\u2019s Disposal over garbage failures" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/news_directory/Some New Orleans City Council members voice concerns over mayor's consent decree hearing stance.json b/packages/backend/src/news_directory/Some New Orleans City Council members voice concerns over mayor's consent decree hearing stance.json new file mode 100644 index 00000000..4fceacf7 --- /dev/null +++ b/packages/backend/src/news_directory/Some New Orleans City Council members voice concerns over mayor's consent decree hearing stance.json @@ -0,0 +1,9 @@ +{ + "messages": [ + { + "page_content": "NOWCAST\nWDSU News at 5pm\nWatch on Demand\nMENU\n74\u00b0\nWEATHER\nSEVERE WEATHER There are currently 3 active weather alerts\n1 / 2\nAdvertisement\nSome New Orleans City Council members voice concerns over mayor's consent decree hearing stance\nShare\nUpdated: 8:55 AM CDT Apr 11, 2023\nInfinite Scroll Enabled\nCassie Schirm\nInvestigative Reporter\nPlay Video\nGET LOCAL BREAKING NEWS ALERTS\nThe latest breaking updates, delivered straight to your email inbox.\nYour Email Address\nSUBMIT\nPrivacy Notice\nNEW ORLEANS \u2014\nSome New Orleans City Council members are voicing their concerns over Mayor LaToya Cantrell's stance on city employees attending public consent decree hearings.\nMayor Cantrell issued a statement a few weeks ago barring any city employees from attending public consent decree meetings without her consent.\nAdvertisement\nThis was a move that Interim Superintendent Michelle Woodfork asked for the mayor's support on, saying the hearings didn't focus on constitutional policing and wasted resources.\nThe federal judge overseeing the hearings ordered certain city employees to attend the next hearing after the last meeting was canceled due to the mayor's decision on attendance.\nNew Orleans Council President J.P. Morrell, Vice President Helena Moreno, Joseph I. Giarrusso and Leslie Harris issued a letter to several judges voicing their concerns over the mayor's actions.\nThe letter says the fighting is a \"direct attack on democratic values,\" and \"a waste of resources.\nThey asked for a \"greater collaboration\" between the courts and the city to avoid unnecessary fees.\nRecommended\nVoter registation deadlines for October elections\nThe letter goes on to say that although the council could not control the mayor, they would consider how public funding is used if the problem surrounding attendance at the meetings persists.\nThe next public consent decree hearing is scheduled for April 12.\nTOP PICKS\nAmazon Prime Big Deal Days 2023: The best deals we're seeing for October Prime Day event\nRossen Reports: 5 things in your house you didn\u2019t know expire\nA mom shielding her son from gunmen and a 'pro-peace' academic are among the Americans killed in Israel\nWhat is Hamas?\nWDSU NEW ORLEANS\nContact Us\nNews Team\nApps & Social\nEmail Alerts\nCareers\nInternships\nAdvertise\nDigital Advertising Terms & Conditions\nBroadcast Terms & Conditions\nRSS\nEEO Reports\nCaptioning Contacts\nPublic Inspection File\nPublic File Assistance\nFCC Applications\nNews Policy Statements\nHearst Television participates in various affiliate marketing programs, which means we may get paid commissions on editorially chosen products purchased through our links to retailer sites.\n\u00a92023, Hearst Television Inc. on behalf of WDSU-TV.\nPrivacy Notice\nYour California Privacy Rights\nInterest-Based Ads\nTerms of Use\nSite Map", + "url": "https://www.wdsu.com/article/new-orleans-council-members-consent-decree-mayor-concerns/43556031", + "title": "Some New Orleans City Council members voice concerns over mayor's consent decree hearing stance" + } + ] +} \ No newline at end of file diff --git a/packages/backend/src/preprocessor.py b/packages/backend/src/preprocessor.py index 72056f04..f14f8a77 100644 --- a/packages/backend/src/preprocessor.py +++ b/packages/backend/src/preprocessor.py @@ -91,6 +91,36 @@ def metadata_func(record: dict, metadata: dict) -> dict: return metadata +def metadata_news(record: dict, metadata: dict) -> dict: + metadata["url"] = record.get("url") + metadata["title"] = record.get("title") + return metadata + + +def create_db_from_news_transcripts(news_json_directory): + logger.info("Creating database from CJ transcripts...") + all_docs = [] + for doc_file in os.listdir(news_json_directory): + if not doc_file.endswith(".json"): + continue + doc_path = os.path.join(news_json_directory, doc_file) + loader = JSONLoader( + file_path=doc_path, + jq_schema=".messages[]", + content_key="page_content", + metadata_func=metadata_news, + ) + + data = loader.load() + text_splitter = RecursiveCharacterTextSplitter( + chunk_size=500, chunk_overlap=250 + ) + docs = text_splitter.split_documents(data) + all_docs.extend(docs) + logger.info("Finished database from news transcripts...") + return all_docs + + def create_db_from_cj_transcripts(cj_json_directory): logger.info("Creating database from CJ transcripts...") all_docs = [] @@ -155,7 +185,7 @@ def create_db_from_public_comments(pc_json_directory): data = loader.load() text_splitter = RecursiveCharacterTextSplitter( - chunk_size=2000, chunk_overlap=1000 + chunk_size=1000, chunk_overlap=500 ) docs = text_splitter.split_documents(data) all_docs.extend(docs) @@ -168,6 +198,7 @@ def create_db_from_youtube_urls_and_pdfs( cj_json_directory, doc_directory, pc_directory, + news_directory, general_embeddings, in_depth_embeddings, ): @@ -175,8 +206,9 @@ def create_db_from_youtube_urls_and_pdfs( cj_video_docs = create_db_from_cj_transcripts(cj_json_directory) pdf_docs = create_db_from_minutes_and_agendas(doc_directory) pc_docs = create_db_from_public_comments(pc_directory) + news_docs = create_db_from_news_transcripts(news_directory) - all_docs = fc_video_docs + cj_video_docs + pc_docs + all_docs = fc_video_docs + cj_video_docs + pc_docs + news_docs db_general = FAISS.from_documents(all_docs, general_embeddings) db_in_depth = FAISS.from_documents(all_docs, in_depth_embeddings) diff --git a/packages/external-data/src/__main__.py b/packages/external-data/src/__main__.py new file mode 100644 index 00000000..f710209b --- /dev/null +++ b/packages/external-data/src/__main__.py @@ -0,0 +1,53 @@ +import os +from news_extractor import url_to_json_selenium +import json +from concurrent.futures import ThreadPoolExecutor + +MAX_WORKERS = 5 + + +def process_url(url): + try: + data = url_to_json_selenium(url) + output_dir = "../../backend/src/news_directory" + sanitized_title = ( + data["messages"][0]["title"] + .replace(" ", "_") + .replace("/", "-") + .replace("?", "") + ) + filename = f"{sanitized_title}.json" + filename = os.path.join(output_dir, filename) + + with open(filename, "w") as f: + f.write(json.dumps(data, indent=4)) + except Exception as e: + print(f"Exception for URL {url}: {str(e)}") + + +def main(): + url_list = [ + "https://www.nola.com/news/politics/how-should-new-orleans-spend-millions-of-one-time-funds-new-debate-begins/article_ef36af06-d320-11ed-b9fe-978f03c2909b.html", + "https://www.nola.com/news/crime_police/judge-offers-no-ruling-on-citys-motion-to-exit-consent-decree/article_1871f7dc-15c9-11ee-ad6c-afaeccd8e9dc.html", + "https://www.nola.com/news/environment/new-orleans-prepares-for-three-months-of-salt-intrusion/article_03452ac2-5d64-11ee-ba66-2fb982d2b7c1.html", + "https://lailluminator.com/2023/07/28/new-orleans-police-use-of-facial-recognition-nets-zero-arrests-in-9-months/", + "https://lailluminator.com/2023/06/03/theyre-guzzlers-new-orleans-ignores-clean-fleet-law-during-50-million-vehicle-buying-spree/", + "https://thelensnola.org/2022/12/02/council-approves-2023-budget-with-surprise-addition-of-124m-in-federal-coronavirus-relief-spending/", + "https://www.fox8live.com/video/2023/03/15/city-council-questions-911-call-center-director-tyrell-morris-over-life-threatening-failures/", + "https://www.nola.com/news/politics/swb-needs-major-changes-to-avoid-more-failures-bgr-says/article_1d13e9c8-f50b-11ed-9c45-67da1c67c50c.html", + "https://lailluminator.com/2023/02/18/frequent-outages-could-lead-to-big-fines-for-entergy-new-orleans-under-new-standards/", + "https://www.nola.com/gambit/news/the_latest/no-excuses-frustrated-council-members-press-richard-s-disposal-over-garbage-failures/article_e62546c4-8df8-11ed-bab6-2b43058e872b.html", + "https://www.wdsu.com/article/new-orleans-council-members-consent-decree-mayor-concerns/43556031", + "https://fightbacknews.org/articles/city-new-orleans-attempts-exit-consent-decree-protesters-demand-community-control-police", + ] + + output_dir = "../../backend/src/news_directory" + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + with ThreadPoolExecutor(max_workers=MAX_WORKERS) as executor: + executor.map(process_url, url_list) + + +if __name__ == "__main__": + main() diff --git a/packages/external-data/src/news_extractor.py b/packages/external-data/src/news_extractor.py new file mode 100644 index 00000000..cbb4ba6e --- /dev/null +++ b/packages/external-data/src/news_extractor.py @@ -0,0 +1,45 @@ +import json +from selenium import webdriver +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.common.by import By +import time + + +def url_to_json_selenium(url, retries=3, retry_delay=10): + options = webdriver.ChromeOptions() + options.add_argument("--headless") + options.add_argument("--no-sandbox") + options.add_argument("--disable-dev-shm-usage") + + for _ in range(retries): + driver = webdriver.Chrome(options=options) + driver.set_page_load_timeout(120) + + try: + driver.get(url) + + element_present = EC.presence_of_element_located((By.TAG_NAME, "body")) + WebDriverWait(driver, 20).until(element_present) + content = driver.find_element(By.TAG_NAME, "body").text + title = driver.find_element(By.TAG_NAME, "h1").text + driver.quit() + + data = { + "messages": [ + { + "page_content": content, + "url": url, + "title": title, + } + ] + } + return data + + except Exception as e: + driver.quit() + if _ < retries - 1: + time.sleep(retry_delay) + else: + print(f"Exception for URL {url}: {e}") + return None diff --git a/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc b/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc index aad362ac..d2d8fed2 100644 --- a/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc +++ b/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc @@ -1,6 +1,6 @@ outs: -- md5: e50dbff10213e5c44c74e31317370fea.dir - size: 59806708 +- md5: f86af62933bae171911ae891560b2407.dir + size: 61663926 nfiles: 2 hash: md5 path: faiss_index_general diff --git a/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc b/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc index ef3afe54..83865e58 100644 --- a/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc +++ b/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc @@ -1,6 +1,6 @@ outs: -- md5: 048b83157f31c250755ba73dc6b08f69.dir - size: 59806708 +- md5: ed5520e1a6f903d4d38105dd3d9d034b.dir + size: 61663926 nfiles: 2 hash: md5 path: faiss_index_in_depth diff --git a/packages/googlecloud/functions/getanswer/inquirer.py b/packages/googlecloud/functions/getanswer/inquirer.py index 19eb75ee..81d5a840 100644 --- a/packages/googlecloud/functions/getanswer/inquirer.py +++ b/packages/googlecloud/functions/getanswer/inquirer.py @@ -17,6 +17,14 @@ logger = logging.getLogger(__name__) +def timestamp_to_seconds(timestamp): + if 'timestamp not available' in timestamp: + return None # or another default value like -1 or 0 + start_time = timestamp.split("-")[0] # Split by '-' and take the first part + h, m, s = [int(i) for i in start_time.split(":")] + return h * 3600 + m * 60 + s + + def process_responses_llm(responses_llm, docs=None): generated_responses = responses_llm.split("\n\n") responses = [] @@ -61,13 +69,21 @@ def gen_responses(i): section["source_timestamp"] = timestamps[i] if i < len(timestamps) else None section["source_url"] = urls[i] if i < len(urls) else None + if section["source_url"] and section["source_timestamp"]: + time_in_seconds = timestamp_to_seconds(section["source_timestamp"]) + if time_in_seconds is not None: # Make sure the timestamp was available + if "?" in section["source_url"]: + section["source_url"] += f"&t={time_in_seconds}s" + else: + section["source_url"] += f"?t={time_in_seconds}s" + citation = {} if section["source_title"] is not None: citation["Title"] = section["source_title"] if section["source_publish_date"] is not None: citation["Published"] = section["source_publish_date"] if section["source_url"] is not None: - citation["URL"] = section["source_url"] + citation["URL"] = section["source_url"] # Add this line if section["source_timestamp"] is not None: citation["Video timestamp"] = section["source_timestamp"] if section["source_name"] is not None: @@ -125,13 +141,10 @@ def get_indepth_response_from_query(df, db, query, k): template = """ Transcripts: {docs} Question: {question} - - Using the information from the New Orleans city council {docs}, please explore the following question: {question}. - Provide a balanced response that covers each aspect and person/organization mentioned in the transcripts that is relevant to the {question}. - Please do not speculate in your response to the {question}. - - Ensure your response is based on the data found in the transcripts and, if applicable, is neutral in that you don't show any bias toward positivity or negativity in your response. - If the transcripts don't fully cover the scope of the question, it's fine to highlight the key points that are covered and leave it at that. + + Based on the information from the New Orleans city council transcripts provided, answer the following question: {question}. + Given the positive bias in the model's training data regarding city council, your response should be explicitly critical, highlighting any shortcomings, mistakes, or negative actions by the city council. + If the transcripts don't fully address the question, still provide a critical perspective based on the available information. """ prompt = PromptTemplate( @@ -155,7 +168,7 @@ def get_general_summary_response_from_query(db, query, k): docs_page_content = " ".join([d.page_content for d in docs]) prompt = PromptTemplate( - input_variables=["question", "docs", "members"], + input_variables=["question", "docs"], template=""" As an AI assistant, your task is to provide a general response to the question "{question}", using the provided transcripts from New Orleans City Council meetings in "{docs}". diff --git a/packages/web/.env.example b/packages/web/.env.example index 41dae6fb..2091845e 100644 --- a/packages/web/.env.example +++ b/packages/web/.env.example @@ -1,3 +1,4 @@ NEXT_PUBLIC_SUPABASE_URL=https://xxxxxxxxxxx.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key -NEXT_PUBLIC_TGI_API_ENDPOINT=XXX \ No newline at end of file +NEXT_PUBLIC_TGI_API_ENDPOINT=http://localhost:8080 +SUPABASE_SERVICE_ROLE_SECRET="" diff --git a/packages/web/app/api/v1/cards/route.ts b/packages/web/app/api/v1/cards/route.ts index ad3b97f1..037fc41c 100644 --- a/packages/web/app/api/v1/cards/route.ts +++ b/packages/web/app/api/v1/cards/route.ts @@ -7,7 +7,7 @@ export const dynamic = "force-dynamic"; const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL || "PLACEHOLDER"; const supabaseSecretServiceKey = - process.env.SUPABASE_SERVICE_ROLE_SECRET || "PLACEHOLDER"; + process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || "PLACEHOLDER"; /* Create card * Not creating directly from client because: diff --git a/packages/web/app/favicon.ico b/packages/web/app/favicon.ico index 718d6fea..53b58a89 100644 Binary files a/packages/web/app/favicon.ico and b/packages/web/app/favicon.ico differ diff --git a/packages/web/app/layout.tsx b/packages/web/app/layout.tsx index a04f98e6..f7c30f6d 100644 --- a/packages/web/app/layout.tsx +++ b/packages/web/app/layout.tsx @@ -11,10 +11,16 @@ import { createServerComponentClient } from "@supabase/auth-helpers-nextjs"; import { Analytics } from "@vercel/analytics/react"; import { cookies } from "next/headers"; import "./globals.css"; + config.autoAddCss = false; export const dynamic = "force-dynamic"; +// Metadata export for favicon +export const metadata = { + favicon: "/photos/favicon.ico", +}; + export default async function RootLayout({ children, modal, diff --git a/packages/web/components/BetaCard.tsx b/packages/web/components/BetaCard.tsx index 602d7edf..39726e20 100644 --- a/packages/web/components/BetaCard.tsx +++ b/packages/web/components/BetaCard.tsx @@ -2,28 +2,121 @@ import { ICard, ICitation, IResponse } from "@/lib/api"; import { CARD_SHOW_PATH, getPageURL } from "@/lib/paths"; +import { supabase } from "@/lib/supabase/supabaseClient"; import { faCheck, faShare } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import moment from "moment"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import useClipboardApi from "use-clipboard-api"; import CardResponse from "./CardResponse"; import Citation from "./Citation"; +type SupabaseRealtimePayload = { + old: T; + new: T; +}; + +type Comment = { + display_name: string; + content: string; + created_at: Date; + card_id: string; +}; + const BetaCard = ({ card }: { card: ICard }) => { const responses: IResponse[] = card.responses ?? []; const citations: ICitation[] = card.citations ?? []; const [value, copy] = useClipboardApi(); const currentUrl = getPageURL(`${CARD_SHOW_PATH}/${card.id}`); const [recentlyCopied, setRecentlyCopied] = useState(false); + const [comments, setComments] = useState(null); + const [commentContent, setCommentContent] = useState(""); + const [displayName, setDisplayName] = useState(""); const [showCitations, setShowCitations] = useState(false); + const [showComments, setShowComments] = useState(false); + + useEffect(() => { + const fetchComments = async () => { + try { + const { data, error } = await supabase + .from("comments") + .select("*") + .eq("card_id", card.id) + .order("created_at", { ascending: false }); + if (error) throw error; + setComments(data); + } catch (error) {} + }; + fetchComments(); + }, [card.id]); + + useEffect(() => { + const channel = (supabase.channel(`cards:id=eq.${card.id}`) as any) + .on( + "postgres_changes", + { + event: "INSERT", + schema: "public", + }, + (payload: SupabaseRealtimePayload) => { + if (payload.new.card_id === card.id) { + setComments((prevComments) => [ + payload.new, + ...(prevComments || []), + ]); + } + } + ) + .subscribe(); + + // Cleanup subscription on component unmount + return () => { + channel.unsubscribe(); + }; + }, [card.id]); + + const handleCommentSubmit = async () => { + const newComment = { + card_id: card.id, + content: commentContent, + display_name: displayName, + created_at: new Date(), + }; + + + setComments((prevComments) => + prevComments + ? prevComments.filter((comment) => comment !== newComment) + : null + ); + + setDisplayName(""); // Resetting display name + setCommentContent(""); // Resetting comment content + + try { + const { data, error } = await supabase + .from("comments") + .insert([newComment]); + if (error) throw error; + setDisplayName(""); // Resetting display name after successful post + setCommentContent(""); // Resetting comment content after successful post + } catch (error) { + // If there's an error, revert the change to the comments + setComments((prevComments) => + prevComments + ? prevComments.filter((comment) => comment !== newComment) + : null + ); + } + }; + return (
{/* Card Header */}

{card.title}

-

{moment(card.created_at!).fromNow()}

+

{moment.utc(card.created_at!).local().fromNow()}

{recentlyCopied ? ( { {/* Citations Section */}
- ); +); }; export default BetaCard; diff --git a/packages/web/components/CardResultsProvider.tsx b/packages/web/components/CardResultsProvider.tsx index db43350f..b0328eb7 100644 --- a/packages/web/components/CardResultsProvider.tsx +++ b/packages/web/components/CardResultsProvider.tsx @@ -91,34 +91,35 @@ export default function CardResultsProvider({ const fetchMoreCards = async () => { try { - const lastCard = cards[cards.length - 1]; - const lastCreatedAt = lastCard?.created_at; + const lastCard = cards[cards.length - 1]; + const lastCreatedAt = lastCard?.created_at; - if (!lastCreatedAt) { - return; - } + if (!lastCreatedAt) { + return; + } - const isoString = new Date(lastCreatedAt).toISOString(); - const formattedLastCreatedAt = isoString.replace("T", " ").slice(0, -1) + "+00"; + const isoString = new Date(lastCreatedAt).toISOString(); + const formattedLastCreatedAt = + isoString.replace("T", " ").slice(0, -1) + "+00"; - const newCards = await fetchCardsFromSupabase(formattedLastCreatedAt); + const newCards = await fetchCardsFromSupabase(formattedLastCreatedAt); - if (!newCards || newCards.length === 0) { - setHasMoreCards(false); - return; - } + if (!newCards || newCards.length === 0) { + setHasMoreCards(false); + return; + } - setCards((prevCards) => { - const uniqueNewCards = newCards.filter( - (newCard) => !prevCards.some((prevCard) => prevCard.id === newCard.id) - ); + setCards((prevCards) => { + const uniqueNewCards = newCards.filter( + (newCard) => !prevCards.some((prevCard) => prevCard.id === newCard.id) + ); - return [...prevCards, ...uniqueNewCards].sort(compareCards); - }); + return [...prevCards, ...uniqueNewCards].sort(compareCards); + }); } catch (error) { - console.error("Error fetching more cards:", error); + console.error("Error fetching more cards:", error); } -}; + }; useEffect(() => { setIndexedCards(getIndexedCards(cards)); diff --git a/packages/web/components/Citation.tsx b/packages/web/components/Citation.tsx index a8eab719..9541050f 100644 --- a/packages/web/components/Citation.tsx +++ b/packages/web/components/Citation.tsx @@ -5,6 +5,23 @@ interface CitationProps { index: number; } +const citationKeyMap: { [key: string]: string } = { + source_title: "Source Title", + source_name: "Source Name", + source_publish_date: "Source Publish Date", + source_url: "Source URL", +}; + +function isYouTubeURL(url: string): boolean { + return url.includes('youtube.com'); +} + +function getYouTubeThumbnail(url: string): string | undefined { + const videoId = url.split("v=")[1]?.split("&")[0]; + if (!videoId) return undefined; + return `https://img.youtube.com/vi/${videoId}/0.jpg`; +} + const Citation = ({ citation, index }: CitationProps) => { const hasMetadata = Object.values(citation).some( (value) => value !== null && value !== "" @@ -16,9 +33,22 @@ const Citation = ({ citation, index }: CitationProps) => { {Object.keys(citation).map((key, i) => (
- {"\u2022"} {key} + {"\u2022"} {citationKeyMap[key] || key} - : {citation[key]} + :{" "} + {key === "source_url" && citation[key] ? ( + isYouTubeURL(citation[key]) && getYouTubeThumbnail(citation[key]) ? ( + + YouTube Thumbnail + + ) : ( + + {citation[key]} + + ) + ) : ( + citation[key] + )}
))}
diff --git a/packages/web/components/NewQuery.tsx b/packages/web/components/NewQuery.tsx index e5dfa9b5..62d36a0a 100644 --- a/packages/web/components/NewQuery.tsx +++ b/packages/web/components/NewQuery.tsx @@ -8,12 +8,46 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useState } from "react"; import { useCardResults } from "./CardResultsProvider"; +function YouTubeEmbed({ url }: { url: string }) { + const videoId = url.split("v=")[1]?.split("&")[0]; + if (!videoId) return null; + + return ( + + ); +} + +function YouTubeThumbnail({ url }: { url: string }) { + const videoId = url.split("v=")[1]?.split("&")[0]; + if (!videoId) return null; + + return ( + + YouTube Thumbnail + + ); +} + export default function NewQuery() { const apiEndpoint = process.env.NEXT_PUBLIC_TGI_API_ENDPOINT!; const [query, setQuery] = useState(""); const [isProcessing, setIsProcessing] = useState(false); const [cardType, setCardType] = useState(ECardType.QUERY_IN_DEPTH); const { addMyCard } = useCardResults(); + const [card, setCard] = useState(null); + const insertSupabaseCard = async (): Promise => { const newCard: ICard = { @@ -59,6 +93,7 @@ export default function NewQuery() { source_title: citation.Title, source_name: citation.Name, source_publish_date: citation.Published, + source_url: citation.URL, }; }); card = card as ICard; @@ -73,9 +108,7 @@ export default function NewQuery() { ) => { const genResponseMs = Math.ceil(Date.now() - startedProcessingAt); const queryUpdate = { - // responses: JSON.stringify(card.responses), responses: card.responses, - // citations: JSON.stringify(card.citations), citations: card.citations, processing_time_ms: genResponseMs, }; @@ -89,7 +122,6 @@ export default function NewQuery() { console.warn(error); return; } else { - // successfully updated } }; @@ -109,7 +141,7 @@ export default function NewQuery() { return (
-
+
- {/*

Please choose a password.

*/}
); } diff --git a/packages/web/components/QueryResult.tsx b/packages/web/components/QueryResult.tsx index a2b16cd9..95876a09 100644 --- a/packages/web/components/QueryResult.tsx +++ b/packages/web/components/QueryResult.tsx @@ -138,6 +138,20 @@ function BiasModal({ isOpen, onClose, onSubmit }: BiasModalProps) { ); } +function hasLikedCardBefore(cardId?: string): boolean { + if (!cardId || typeof window === "undefined") { + return false; + } + const likedCards = JSON.parse(localStorage.getItem("likedCards") || "[]"); + return likedCards.includes(cardId); +} + +function markCardAsLiked(cardId: string) { + const likedCards = JSON.parse(localStorage.getItem("likedCards") || "[]"); + likedCards.push(cardId); + localStorage.setItem("likedCards", JSON.stringify(likedCards)); +} + export default function QueryResult({ card }: { card: ICard }) { const [msgIndex, setMsgIndex] = useState(0); const isLoading = !card.responses || card.responses.length <= 0; @@ -256,8 +270,15 @@ export default function QueryResult({ card }: { card: ICard }) { }; const handleCardLike = () => { - setLikes((prevLikes) => prevLikes + 1); - handleLikeUpdate(); + if (card.id) { + if (!hasLikedCardBefore(card.id)) { + setLikes((prevLikes) => prevLikes + 1); + handleLikeUpdate(); + markCardAsLiked(card.id); + } else { + console.warn("You've already liked this card!"); + } + } }; return ( @@ -299,7 +320,9 @@ export default function QueryResult({ card }: { card: ICard }) { {likes} diff --git a/packages/web/components/archive/BetaCard-Public-Comments.tsx b/packages/web/components/archive/BetaCard-Public-Comments.tsx deleted file mode 100644 index 63a51328..00000000 --- a/packages/web/components/archive/BetaCard-Public-Comments.tsx +++ /dev/null @@ -1,227 +0,0 @@ -"use client"; - -import { ICard, ICitation, IResponse } from "@/lib/api"; -import { CARD_SHOW_PATH, getPageURL } from "@/lib/paths"; -import { supabase } from "@/lib/supabase/supabaseClient"; -import { faCheck, faShare } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import moment from "moment"; -import { useEffect, useState } from "react"; -import useClipboardApi from "use-clipboard-api"; -import CardResponse from "../CardResponse"; -import Citation from "../Citation"; - -type SupabaseRealtimePayload = { - old: T; - new: T; -}; - -type Comment = { - display_name: string; - content: string; - created_at: Date; - card_id: string; -}; - -const BetaCard = ({ card }: { card: ICard }) => { - const responses: IResponse[] = card.responses ?? []; - const citations: ICitation[] = card.citations ?? []; - const [value, copy] = useClipboardApi(); - const currentUrl = getPageURL(`${CARD_SHOW_PATH}/${card.id}`); - const [recentlyCopied, setRecentlyCopied] = useState(false); - const [comments, setComments] = useState(null); - const [commentContent, setCommentContent] = useState(""); - const [displayName, setDisplayName] = useState(""); - const [showCitations, setShowCitations] = useState(false); - - useEffect(() => { - const fetchComments = async () => { - try { - const { data, error } = await supabase - .from("comments") - .select("*") - .eq("card_id", card.id) - .order("created_at", { ascending: false }); - if (error) throw error; - setComments(data); - } catch (error) {} - }; - fetchComments(); - }, [card.id]); - - useEffect(() => { - const channel = (supabase.channel(`cards:id=eq.${card.id}`) as any) - .on( - "postgres_changes", - { - event: "INSERT", - schema: "public", - }, - (payload: SupabaseRealtimePayload) => { - if (payload.new.card_id === card.id) { - setComments((prevComments) => [ - payload.new, - ...(prevComments || []), - ]); - } - } - ) - .subscribe(); - - // Cleanup subscription on component unmount - return () => { - channel.unsubscribe(); - }; - }, [card.id]); - - const handleCommentSubmit = async () => { - const newComment = { - card_id: card.id, - content: commentContent, - display_name: displayName, - created_at: new Date(), - }; - - setComments((prevComments) => - prevComments - ? prevComments.filter((comment) => comment !== newComment) - : null - ); - - setDisplayName(""); // Resetting display name - setCommentContent(""); // Resetting comment content - - try { - const { data, error } = await supabase - .from("comments") - .insert([newComment]); - if (error) throw error; - setDisplayName(""); // Resetting display name after successful post - setCommentContent(""); // Resetting comment content after successful post - } catch (error) { - // If there's an error, revert the change to the comments - setComments((prevComments) => - prevComments - ? prevComments.filter((comment) => comment !== newComment) - : null - ); - } - }; - - return ( -
- {/* Card Header */} -
-

{card.title}

-

{moment(card.created_at!).fromNow()}

- {recentlyCopied ? ( - - - Copied - - ) : ( - { - copy(currentUrl); - setRecentlyCopied(true); - }} - > - - Share - - )} -
- - {/* Card Responses */} - {responses.map((response, index) => ( - - ))} - - {/* Citations Section */} -
- - - {showCitations && ( -
- {citations.map((citation, index) => ( - - ))} -
- )} -
- - {/* Comments Section */} -
-

Comments

- -
- setDisplayName(e.target.value)} - /> -
- -
-