Skip to content

Commit 438b9b7

Browse files
authored
Merge pull request #1267 from CodeForPhilly/staging
Staging
2 parents f93476b + ac45580 commit 438b9b7

File tree

104 files changed

+14851
-1598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+14851
-1598
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
backup_data/ filter=lfs diff=lfs merge=lfs -text

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@nlebovits @brandonfcohen1 @marvieqa @bacitracin @paulhchoi @CodeWritingCow @SofiaFasullo @cfreedman
1+
@nlebovits @cfreedman

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ data/src/app/service-account-key.json
6565

6666
# Cached and temporary data files from pipeline
6767
storage/
68+
69+
# cursor
70+
.cursor/

.pre-commit-config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ repos:
2323
echo "All MI grades are B or above."'
2424
language: system
2525
files: \.py$
26-
pass_filenames: true
26+
pass_filenames:
27+
true
28+
# Code similarity detection
29+
- id: pylint-similarities
30+
name: Code similarity detection (non-blocking)
31+
entry: bash -c 'echo "Checking for code similarities in data/src/..."; pylint --disable=all --enable=similarities --score=no data/src/ || true'
32+
language: system
33+
files: ^data/src/.*\.py$
34+
pass_filenames: false
2735
- repo: https://github.com/jendrikseipp/vulture
2836
rev: 'v2.3'
2937
hooks:

README.md

Lines changed: 28 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,57 @@
11
# Clean & Green Philly
22

3-
Philadelphia has a gun violence problem. This dashboard aims to help solve it by empowering community groups to carry out cleaning and greening interventions in the vacant properties where they can have the biggest impact.
4-
5-
## Motivation
6-
7-
Philadelphia has a gun violence problem. Homicides have been on the rise since 2013. The past three years—2020, 2021, and 2022—have been the deadliest on record, with a high of 562 homicides in 2021. Community members need solutions, but many city-run initiatives are frustratingly slow or inadequate. Nearly 80% of the city’s anti-violence spending focuses on long-term violence reduction without any clear, immediate impact.
8-
9-
Research shows that greening and cleaning vacant and abandoned parcels is one of the most impactful, cost-effective interventions available to reduce gun violence in a neighborhood. Drs. Eugenia South and Charles Branas have led several studies that [demonstrate that greening vacant lots in Philadelphia reduced gun violence by as much as 29% in the surrounding area](https://www.pnas.org/doi/10.1073/pnas.1718503115). Similarly, cleaning and lightly repairing vacant houses led a 13% drop in gun assaults compared to nearby blocks. These “greening and cleaning” interventions not only reduce gun violence but also provide other benefits, such as reducing the urban heat island effect, lowering residents’ stress levels, and contributing to lower levels of depression among residents.
10-
11-
There are roughly 40,000 vaccant properties in Philadelphia. Identifying the highest-priority vacant properties will allow community groups to invest their limited resources where they will have the biggest impact. Combining various public data, this dashboard helps users identify the properties that are ideal for them to intervene in. It also offers additional information about each property to facilitate interventions and indicates the best possible route to cleaning up the property.
12-
13-
## Current Draft
14-
15-
You can view [the current build of the website here](https://www.cleanandgreenphilly.org/). We are building based off of a prototype which looks like this:
16-
17-
![User prototype map](/docs/map.png)
18-
19-
An older proptotype is also [available here](https://nlebovits.github.io/dashboard_demo_website/more_info.html), although it is now significantly out of date.
20-
21-
Likewise, you can view the [very first iteration as an ArcGIS Storymap here](https://storymaps.arcgis.com/stories/551f77d85a584705b97c41db7711ba1b).
22-
23-
## Project Updates
3+
[Contributor Guide](/docs/CONTRIBUTING.md) | [Code of Conduct](/docs/CODE_OF_CONDUCT.md) | [Setup Instructions](/docs/SETUP/) | [Roadmap](/docs/ROADMAP.md)
244

25-
**May 1, 2024:** Clean & Green Philly won second place in the [36th annual NJ DEP Mapping Contest's](https://dep.nj.gov/gis/36th-mapping-contest/) Dashboard category!
5+
🚨 Project Status
266

27-
**April 26, 2024:** On behalf of Clean & Green Philly, Nissim gave testimony to a Philadelphia City Council hearing on the uses of data and tech to reduce gun violence through place-based interventions. His statement is [available here](/docs/PROJECT_BACKGROUND/City%20Council%20Testimony%20Final,%20April%2026,%202024.pdf).
7+
_Note: Clean & Green Philly ceased active development and maintainence in July of 2025. For more information, please see our [letter to stakeholders](/docs/PROJECT_BACKGROUND/C&GP%20Shutdown%20Letter,%20June%205,%202025.pdf) from July 2025. The website is still available at [cleanandgreenphilly.org](https://www.cleanandgreenphilly.org/) and the site, codebase, and data will remain available and open source for the foreseeable future._
288

29-
**April 21, 2024:** We have officially launched v1.0.0! The website is now live at [www.cleanandgreenphilly.org](https://www.cleanandgreenphilly.org/).
9+
Philadelphia has a gun violence problem. This dashboard aims to help solve it by empowering community groups to carry out cleaning and greening interventions in the vacant properties where they can have the biggest impact.
3010

31-
**Feb. 1, 2024:** We have soft launched a minimum viable product! The website is functional at [www.cleanandgreenphilly.org](https://www.cleanandgreenphilly.org/).
11+
For more information on the research and data behind the project, please see the background information in [our docs](docs/).
3212

33-
**Nov. 15, 2023:** The Center for Philadelphia's Urban Future has officially voted to be a fiscal sponsor for our project and maintain it long-term. We are working with them to assemble a steering committee that will help inform future development of the web tool.
13+
## Data Access
3414

35-
**Oct. 2, 2023:** Met with the Philadelphia District Attorney's Office data analytics team. They are very excited about the dashboard and are connecting us with folks in the Managing Director's Office and the Civic Coalition to Save Lives.
15+
All of our final output data, including final backups of the last reasonably valid vacant properties data, are available in [our `data` subdirectory](/data/backup_data/). There, you will find the backup vacant properties data, along with a GeoParquet file containing our last data outputs from July 2025 and a PMtiles dataset that we use for visualizing the vacant properties on the website. A README in the folder gives more context on the data.
3616

37-
**Sept. 29, 2023** Got our first funding from a donor! He's writing us a check to cover costs associated with user testing, hosting, domain name, etc., and will connet us with other folks who may be willing to give us more.
17+
Anyone interested in generating new data can simply install the codebase and run the pipeline via Docker, provided they bear in mind that everything _but_ the vacant properties data will be up to date.
3818

39-
**Sept. 27, 2023** Nissim spoke with a reporter from WHYY who may be including our project in a longer piece about Philadelphians working on solutions to the gun violence crisis.
19+
## Project History
4020

41-
## Current Tasks and Project Roadmap
21+
### 2025
4222

43-
At the moment, we are working on:
23+
**July 2025:** Clean & Green Philly ceases active development due to a lack of available data on vacant properties in Philadelphia.
4424

45-
- Organizing a steering committee of stakeholders to guide future project development
46-
- Improving the accessibility and responsiveness of our MVP
47-
- Improving the content and design of our Take Action pages
48-
- Laying groundwork to apply for a grant to support our work
25+
**July 2025:** Clean & Green Philly publisheds v2.0, which incorporates data on all ~580,000 properties in Philadelphia.
4926

50-
Current tasks for the are visible under the [Issues](https://github.com/CodeForPhilly/vacant-lots-proj/issues) section.
27+
**June 25, 2025:** Nissim and Amanda publish an op ed in _The Philadelphia Inquirer_ highlighting [the lack of official vacancy data](www.inquirer.com/opinion/commentary/mayor-parker-housing-plan-missing-data-20250625.html) and encourage the City to resume data collection.
5128

52-
For a detailed project roadmap, please see our [ROADMAP.md](/docs/ROADMAP.md) document.
29+
### 2024
5330

54-
## Looking For
31+
**October 22, 2024:** Nissim and Amanda publish an op ed in _The Philadelphia Citizen_ encouraging the City to [adopt our approach to strategically targeting vacant properties](https://thephiladelphiacitizen.org/guest-commentary-clean-and-green-philly-where-its-most-needed/).
5532

56-
- An experienced developer to lead our front-end work and coordinate with our UX team
57-
- A graphic designer to work on content for the website
58-
- Someone with grant-writing expertise
33+
**September 20, 2024:** Clean & Green Philly wins [HopePHL's "Great Idea" pitch competition](https://www.instagram.com/p/DAJg9SZprim/).
5934

60-
## Languages/Frameworks
35+
**June 2024:** The City of Philadelphia ceases to provide accurate vacancy data via the public API.
6136

62-
- React
63-
- NextJS
64-
- Tailwind CSS
65-
- Python (data engineering)
37+
**May 1, 2024:** Clean & Green Philly won second place in the [36th annual NJ DEP Mapping Contest's](https://dep.nj.gov/gis/36th-mapping-contest/) Dashboard category!
6638

67-
## Codebase
39+
**April 26, 2024:** On behalf of Clean & Green Philly, Nissim gave testimony to a Philadelphia City Council hearing on the uses of data and tech to reduce gun violence through place-based interventions. His statement is [available here](/docs/PROJECT_BACKGROUND/City%20Council%20Testimony%20Final,%20April%2026,%202024.pdf).
6840

69-
This is a single repository for both the React app and the Python pipeline to ETL the data.
41+
**April 21, 2024:** We have officially launched v1.0.0! The website is now live at [www.cleanandgreenphilly.org](https://www.cleanandgreenphilly.org/).
7042

71-
## Contribution
43+
**Feb. 1, 2024:** We have soft launched a minimum viable product! The website is functional at [www.cleanandgreenphilly.org](https://www.cleanandgreenphilly.org/).
7244

73-
Please see the documents in our [docs](/docs) folder for background on the project and instructions on how to contribute. At a minimum, please read:
45+
### 2023
7446

75-
1. The [guide to contributing](/docs/CONTRIBUTING.md)
76-
2. The [code of conduct](/docs/CODE_OF_CONDUCT.md)
77-
3. The appropriate installation setup instructions ([front end](/docs/SETUP/FRONT_END.md) and/or [back end](/docs/SETUP/BACK_END.md))
47+
**Nov. 15, 2023:** The Center for Philadelphia's Urban Future becomes our fiscal sponsor.
7848

79-
### Point of Contact
49+
**June 2023:** Clean & Green Philly is launched as a Code for Philly project.
8050

8151
## License
8252

8353
MIT © Code for Philly
54+
55+
---
56+
57+
_This project was developed to address gun violence in Philadelphia through data-driven community interventions. While no longer actively maintained, we hope the code and data continue to benefit researchers and community organizations working on similar initiatives._

data/.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Environment variables for Clean and Green Philly backend
2+
# Copy this file to data/.env and fill in your actual values
3+
4+
# Google Cloud Platform credentials
5+
CLEAN_GREEN_GOOGLE_KEY=your-api-key-here
6+
GOOGLE_CLOUD_BUCKET_NAME=your-bucket-name-here
7+
GOOGLE_CLOUD_PROJECT=your-project-id
8+
9+
# Slack integration for diff reporting
10+
CAGP_SLACK_API_TOKEN=your-slack-token

data/backup_data/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Backup Data
2+
3+
This folder contains 1) backup vacant properties data from June 2024, the last time these data were reasonably accurate; and 2) the final outputs of our pipeline before project shutdown in July of 2025.
4+
5+
### Vacancy Data
6+
7+
The land backup file contains vacant land data sent to us by the Department of Licenses and Inspections, corresponding to the last reasonably complete dataset on vacant land prior to the City [no longer collecting vacany data](https://www.inquirer.com/opinion/commentary/mayor-parker-housing-plan-missing-data-20250625.html).
8+
9+
The buildings backup are data that we collected ourselves in June of 2024. They are likely missing about a thousand or more buildings, as we hadn't realized at the time that the buildings dataset was corrupted, too, but they are the best data we have available under the circumstances.
10+
11+
Combined, these represent about 34,000 properties. The pipeline is configured to run using these backup data unless the City's APIs suddenly start returning data above the expected threshold again.
12+
13+
### Pipeline Outputs
14+
15+
As it's currently confiured, the pipeline will return new data for everything _except_ the vacant properties themselves, for which it uses our June of 2024 backups. This means that all associated data are the currently-available numbers from their corresponding services, but we have no way to update the vacant properties data themselves. We have stored these here in both GeoParquet format (representing all 580,000+ properties in Philadelphia) and the PMtiles that we use to visualize vacant properties on the website (representing ~34,000 vacant properties from June of 2024, with the rest of the data from July of 2025).
628 KB
Binary file not shown.
3.03 MB
Binary file not shown.

data/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ services:
1313
- CAGP_SLACK_API_TOKEN
1414
volumes:
1515
- ./src:/app/src
16+
- ./backup_data:/app/backup_data
1617
- ~/.config/gcloud/application_default_credentials.json:/app/service-account-key.json
1718
- /etc/timezone:/etc/timezone:ro
1819
- /etc/localtime:/etc/localtime:ro

0 commit comments

Comments
 (0)