David Lucey

David Lucey

@luceydav.bsky.social

Finance, Education, Urbanism, real estate & Tax data explorations. Came late to data, but all in now.

286 followers2.4K following191 posts

4" of rain this morning and our storm drain on Roosevelt still surcharging this evening under heavy pressure. This spot already suffered a sinkhole collapse from sub-base washout last year. We need DPW line scoping and a real drainage upgrade. 🕳️⚠️ #OldGreenwich #GreenwichCT #Infrastructure #CTNews

View full thread

Act 7: Making the playoffs is not enough. Teams go deep when the WAR they banked from April through September actually shows up in October. Health and usable depth are the final edge. #MLB #Playoffs #BaseballAnalytics

View full thread

Act 4: Dead money (salary paid to zero-WAR players) is a budget elasticity problem. Large markets absorb it. Small markets get crippled. One bad long-term deal can swallow an entire year of flexibility. #Sabermetrics #MLB #PayrollAnalysis

Act 6: Payroll explains ~60% of long-run playoff achievement (r = 0.77). Money matters — but it's incomplete. The gap between payroll and results is where front-office skill (or failure) lives. #MLB #BaseballData #Sabermetrics

View full thread

Act 1: Pipeline edge has two parts — rookie quality AND roster share. Most teams get one. Very few do both. Cardinals, Astros, Braves in top-right. Yankees surprisingly thin. #MLB #FrontOffice #BaseballAnalytics

Act 2: Trades are where clubs extend the pipeline or cut it off at the knees. Net losers rarely recover without elite draft luck. #MLB #BaseballAnalytics #Sabermetrics

The analysis runs on {lahmanTools} — my R package built to extend the Lahman baseball DB with WAR, modern salary data, and a DuckDB backend. GitHub Copilot CLI did the heavy lifting on scaffolding. 📦 github.com/luceydav/lahmanTools #rstats #DuckDB #OpenSource

github.comGitHub - luceydav/lahmanTools: Tools for setting up a Lahman baseball data duckdb and interacting with mcpTools for setting up a Lahman baseball data duckdb and interacting with mcp - luceydav/lahmanTools
View full thread

I tried to show why WLR looked so difficult from a data and topology perspective from my Town of Greenwich. I hope this Legislative round can involve more compromise on both sides. I would love to see my town become Transit hub.

It turns out that slicing a docx based on pattern match is a deceptively challenging problem not easily solved by an LLM, definitely not SO. I would gladly trade my working R #officer solution for anyone’s Python version or even sympathetic words. #rstats #python #python-docx

View full thread

To finalize, solution is to run your R function from Python with rpy2. The word document object is zipped xml, so murder to copy subset of text, tables, images and formats cleanly without breaking links. R’s officer package “cursor”functions abstracts xml navigation for people like me.

It turns out that slicing a docx based on pattern match is a deceptively challenging problem not easily solved by an LLM, definitely not SO. I would gladly trade my working R #officer solution for anyone’s Python version or even sympathetic words. #rstats #python #python-docx

Update of progress, this is possible with Python’s win32com library, essentially opening every docx & saving after pattern, but slow for my 1000 slices/wk and breaks for small number with images. Wondering if I can port some R functions into my new Python workspace in case any thoughts out there!

Homebrew upgraded to 3.13 along with all my packages,many relying on python-packaging 3.12, which got unlinked and now can’t be symlinked. This is probably bad, but had pyenv 3.12 virtualenv set to global and would like to stay with 3.12. Any advice/resources on how to untangle this mess welcome!

Updated one of my older side #rstats #shiny projects tracking property sales in #ct for new data from Socrata. Over 25 years, price/assessment for lowest ⅓ of sales values is often lower, suggesting that lower may be persistently over-assessed vs higher priced properties in many towns.

View full thread

I'm biased working at CCS with four schools (about to be six) in the So Brx these last 3y, but many things are said about charters which seem off base to me. I read one particularly misinformed discussion on Reddit only today. Posting just in case this year's repeat data is of interest to some!

You are up to date.