Giter VIP home page Giter VIP logo

codeforphilly / vacant-lots-proj Goto Github PK

View Code? Open in Web Editor NEW
19.0 9.0 33.0 112.66 MB

Dashboard to target Philly vacant properties for anti-gun violence interventions

Home Page: https://www.cleanandgreenphilly.org/

License: MIT License

Jupyter Notebook 39.54% Python 20.07% C++ 1.04% JavaScript 0.63% TypeScript 32.53% CSS 5.85% Dockerfile 0.34%
cities civic-tech environment gun-violence public-health public-safety vacant-property

vacant-lots-proj's Introduction

Clean & Green Philly

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.

Motivation

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.

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. 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.

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.

Current Draft

You can view the current build of the website here. We are building based off of a prototype which looks like this:

User prototype landing page

User prototype map

An older proptotype is also available here, although it is now significantly out of date.

Likewise, you can view the very first iteration as an ArcGIS Storymap here.

Project Updates

Feb. 1, 2024: We have soft launched a minimum viable product! The website is functional at www.cleanandgreenphilly.org.

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.

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.

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.

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.

Current Tasks

At the moment, we are working on:

  • Organizing a steering committee of stakeholders to guide future project development
  • Improving the accessibility and responsiveness of our MVP
  • Improving the content and design of our Take Action pages
  • Laying groundwork to apply for a grant to support our work

Current tasks for the are visible under the Issues section.

Looking For

  • An experienced developer to lead our front-end work and coordinate with our UX team
  • A graphic designer to work on content for the website
  • Someone with grant-writing expertise

Languages/Frameworks

  • React
  • NextJS
  • Tailwind CSS
  • Python (data engineering)

Codebase

This is a single repository for both the React app and the Python pipeline to ETL the data.

Contribution

Please see the documents in our docs folder for background on the project and instructions on how to contribute. At a minimum, please read:

  1. The guide to contributing
  2. The code of conduct
  3. The appropriate installation setup instructions (front end, back end, or full stack)

Contributors

Nissim Lebovits
Nissim Lebovits

📖 💻 🖋 🔣 🔍 🚧 📆 🔬
Kedgard Cordero
Kedgard Cordero

💻
Brandon Cohen
Brandon Cohen

💻 📖 🚇
Jack Roper
Jack Roper

💻
Will
Will

🔬 🎨
Nathaniel Sidwell
Nathaniel Sidwell

🎨 🔬
Marvie Mulder
Marvie Mulder

️️️️♿️
Mark Goetz
Mark Goetz

💻
Tracy Tran
Tracy Tran

️️️️♿️
Elizabeth Walker
Elizabeth Walker

💻
Alex Byrd-Leitner
Alex Byrd-Leitner

💻 ️️️️♿️
Greg Turmel
Greg Turmel

💻
Liat
Liat

💻
Julien Gaye
Julien Gaye

💻
Bay Chairangsaris
Bay Chairangsaris

💻 📖
Paul Choi
Paul Choi

💻
Amberroseweeks
Amberroseweeks

💻 ️️️️♿️

License

MIT © Code for Philly

vacant-lots-proj's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vacant-lots-proj's Issues

fix warnings on images

Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13
Image with src "/image1.jpg" has legacy prop "objectFit". Did you forget to run the codemod?
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13
Image with src "/image2.jpg" has legacy prop "layout". Did you forget to run the codemod?
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13
Image with src "/image2.jpg" has legacy prop "objectFit". Did you forget to run the codemod?
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13
Image with src "/image3.jpg" has legacy prop "layout". Did you forget to run the codemod?
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13
Image with src "/image3.jpg" has legacy prop "objectFit". Did you forget to run the codemod?
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13```

Attach street view images to properties

At some point, we'll want to find a way to attach street view images to every property in the dashboard. This may be best implemented in the front end, rather than in the dataset itself, but I want us to start exploring here. Philadelphia uses Cyclomedia for its street view images, although these appear to be paid. Google Street View images now cost something like 7 cents/image. This isn't urgent, but I'd like us to investigate possible options for sourcing images and come up with a best approach for getting the images onto the rest of the data in the dashboard itself, whether that's while building the dataset or in the browser.

Update logic flow for priority level classification

The current classification of lots by priority level depends only on gun crime and tree canopy cover. I would like to update it so that it is more nuanced. This will required joining PHS LandCare and L&I complaints + violations data to the primary dataset. Once this is done, the attached decision tree can be used as the basis for the updated classifications.

WhatsApp Image 2023-08-04 at 10 05 12 AM

Add neighboring vacant properties count

At some point, I'd like to add functionality to the Python script that will allow us to calculate:

  1. If a given vacant property is immediately adjacent to any other vacant properties and, if so:
    a) How many such properties it's adjacent to
    b) Whether these properties share the same owner

This will give people insight into how feasible it would be to consolidate properties for things like affordable housing development.

I imagine this could be built out using something like nearest neighbors from geopandas (https://geopandas.org/en/stable/docs/reference/api/geopandas.sjoin_nearest.html), but the more complicated thing would be counting all neighbors that are either contiguous with a given property or contiguous with any properties that are contiguous with it.

Adaptive bandwidth kernel density estimate

Currently, the gun crime layer in this project is based on a fixed bandwidth kernel density estimate. It creates a raster, the values of which are then extracted to the centroids of vacant properties in the primary dataset. Before launching this dashboard, we need to switch to an adaptive bandwidth kernel density estimate. Full justification can be found in this memo from the Philadelphia District Attorney's Office.

However, there is no implementation in Python that I have been able to find. PySal does allow for the creation of adaptive bandwidth weights, but I have not figured out how to use this in our specific case. The best example I can find is implemented in the spatstat package in R and includes references to the paper that explains the methodology. My suggestion would be to use that as the basis for writing a custom function in Python.

Task: Activate search bar

Describe the task

Hook up the search bar with the results. We'll probably have to chat through what we want to search.

fix duplicate db conn issues

    at eval (webpack-internal:///(rsc)/./src/app/api/db/db.ts:11:12)
    at (rsc)/./src/app/api/db/db.ts (/Users/brandoncohen/Documents/dev/vacant-lots-proj/.next/server/app/api/generateTiles/[z]/[x]/[y]/route.js:112:1)
    at __webpack_require__ (/Users/brandoncohen/Documents/dev/vacant-lots-proj/.next/server/webpack-runtime.js:33:43)```

Add "I want to help now!" button

We would like to add a button to enable people to identify all the lots where they can take action immediately. This would basically be places where 1) they are high priority and 2) tactical urbanism is feasible (meaning that there would be minimal legal and safety obstacles to intervening immediately). The idea is to make it as easy as possible for people to instantly filter for these properties and find somewhere to help.

Get fonts, colors, and icons into app

Our design team has given us font, colors, and icons for the project. These need to be integrated consistently throughout the app. See below.

Icons:
Clean & Green Icons.zip

Colors:
image

Fonts:



:root {
  /* TYPE */
  --heading-l-family: "Nunito";
  --heading-l-size: 26px;
  --heading-l-size-rem: 1.625rem;
  --heading-l-weight: 700;
  --heading-l-style: normal;
  --heading-m-family: "Nunito";
  --heading-m-size: 27px;
  --heading-m-size-rem: 1.6875rem;
  --heading-m-weight: 700;
  --heading-m-style: normal;
  --heading-s-family: "Nunito";
  --heading-s-size: 18px;
  --heading-s-size-rem: 1.125rem;
  --heading-s-weight: 700;
  --heading-s-style: normal;
  --body-l-family: "Nunito";
  --body-l-size: 16px;
  --body-l-size-rem: 1rem;
  --body-l-weight: 400;
  --body-l-style: normal;
  --body-m-family: "Nunito";
  --body-m-size: 14px;
  --body-m-size-rem: 0.875rem;
  --body-m-weight: 400;
  --body-m-style: normal;
  --body-s-family: "Nunito";
  --body-s-size: 12px;
  --body-s-size-rem: 0.75rem;
  --body-s-weight: 400;
  --body-s-style: normal;
  --heading-xs-family: "Nunito";
  --heading-xs-size: 16px;
  --heading-xs-size-rem: 1rem;
  --heading-xs-weight: 700;
  --heading-xs-style: normal;
  --heading-xs-line-height: 20px;
  --heading-xs-line-height-rem: 1.25rem;
  --body-xl-family: "Nunito";
  --body-xl-size: 20px;
  --body-xl-size-rem: 1.25rem;
  --body-xl-weight: 400;
  --body-xl-style: normal;
}

Task: review contributor docs

Now that we've set up basic contributor docs, it would be good to have folks review them for clarity and accessibility. We should identify:

  • things that are confusing
  • gaps in information
  • typos, broken hyperlinks, etc.

Additionally, it would be good to review the contributor docs for other open source projects to see if there are any ways in which we could improve ours. The Justice 40 project is a good model; their contributor docs are here.

123sample

UX Design catch-up
Translating the mock-up to development web flows.

Task: build out tech docs based on Justice 40

To make the project clearer and more accessible, we should build out our technical documentation.

The open source Justice 40 project provides a good model. It's more complex than ours needs to be (and much bigger), but their docs folder includes good models for what we can do, including files that can be copied pretty much verbatim.

It would be good to have:

Any other docs that seem appropriate can be added, too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.