Skip to content

Feat: add recent activity as ML feature #1173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from

Conversation

nlebovits
Copy link
Collaborator

Add recent activity for ML features

Description

This PR adds permits, business licenses, and appeals data for each property in the dataset, tracking whether there has ever been such a record associated with a given opa_id, as well as the date of the most recent record and the days since that date (to the date of the pipeline run). My hunch is that some combination of these features will significantly improve our ability to identify vacant properties with ML.

@nlebovits nlebovits requested a review from adamzev April 13, 2025 22:31
Copy link

vercel bot commented Apr 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vacant-lots-proj ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 0:09am

Copy link
Contributor

This PR has been marked as stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale label Apr 21, 2025


def fetch_recent_activity(query: str) -> pd.DataFrame:
response = requests.get("https://phl.carto.com/api/v2/sql", params={"q": query})
Copy link
Contributor

@adamzev adamzev May 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already should have a class that is capable of grabbing a carto query and converting the results to a df. Is there are reason it didn't work for this case?

I'd like to keep with using that class rather than duplicating the functionality.

@adamzev
Copy link
Contributor

adamzev commented May 10, 2025

Generally, this looks ready to go. I just had one thing I think we should change regarding the carto API call.

@github-actions github-actions bot removed the stale label May 11, 2025
Copy link
Contributor

This PR has been marked as stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale label May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants