Skip to content

Commit

Permalink
Merge pull request CodeForPhilly#7 from brandonfcohen1/main
Browse files Browse the repository at this point in the history
Merge BC updates to python scripts
  • Loading branch information
nlebovits authored Aug 29, 2023
2 parents 3abbaff + a86654f commit b0d7cc4
Show file tree
Hide file tree
Showing 24 changed files with 1,120 additions and 1,023 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/notebooks/.ipynb_checkpoints/
.idea
src/tmp
.DS_Store
4 changes: 4 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ scikit-learn = "*"
mapclassify = "*"
black = "*"
fiona = "*"
esridump = "*"
sqlalchemy = "*"
psycopg2-binary = "*"
geoalchemy2 = "*"

[dev-packages]

Expand Down
951 changes: 541 additions & 410 deletions Pipfile.lock

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,38 @@ In September, we hope to begin turning our attention to building the dashboard a
- Tailwind
- Python (data engineering)


# Setup Instructions

1. Install [pyenv](https://github.com/pyenv/pyenv) (or [pyenv-win](https://github.com/pyenv-win/pyenv-win) for Windows) for Python version management
2. Install the latest Python 3.11: `pyenv install 3.11.4`
3. Install [pipenv](https://github.com/pypa/pipenv) for environment management
4. Install project requirements: `pipenv install`

# Database

1. Make sure postgres and postgis are installed
TODO: Add instructions here
2. Create a new databse
`createdb vacantlotdb`
3. Connect to the db
`psql vacantlotdb`
4. Enable postgis
`CREATE EXTENSION postgis;`
5. Set your database connection string to an environment variable `VACANT_LOTS_DB`

# awkde

We are using the [awkde package](https://github.com/mennthor/awkde) to create the Adaptive Width KDE. It is not available through pip. Install directly in the `src` folder using their instructions.

# Usage Instructions

1. Activate the pipenv shell: `pipenv shell`
2. Run the main script: `python process_data.py [output_filename]`
2. Move the to src folder `cd src`
3. Run the main script `python script.py`

# Contribution Instructions

1. Create a fork of this repository and work from branches within your fork. When those changes are ready for review, create a pull request from fork:branch to upstream:main
2. Before committing changes, format your code to maintain a consistent codebase:
```
Expand Down
File renamed without changes.
97 changes: 0 additions & 97 deletions constants.py

This file was deleted.

Loading

0 comments on commit b0d7cc4

Please sign in to comment.