Skip to content
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

Join Census Tract to both Prison Boundary file and Brownfields file #13

Open
lindsaypoirier opened this issue Apr 1, 2020 · 4 comments
Assignees

Comments

@lindsaypoirier
Copy link
Contributor

A precursor to national proximity analysis will be to ensure we have a census tract field in both the prison boundary shape file and the brownfields file. To do this, we will need to write a function that performs a spatial join based on the census tract polygon that a point (either the prison centroid or the brownfields point) is within.

Here's a nice blog that describes how to do such a spatial join : https://mattherman.info/blog/point-in-poly/

The trick is that census tracts are currently in 50+ separate shape files (separated by state). If anyone could do this join and then re-upload the files, it would be a huge help.

@lindsaypoirier lindsaypoirier added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 1, 2020
@gregory-bauer
Copy link

Currently do spatial analysis for the DoD and have > 10 years experience with various R libraries as well. Only caveat here is that this is for a class (Open source software) and I have never contributed to repositories using GitHub (this is the intent of the assignment). Nevertheless, I think I can help...

@shapironick
Copy link
Member

Please do take a crack at it!

Here is how to make a pull request in case you're not familiar https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request Code for the app is here https://github.com/Carceral-Ecologies/Carceral-Proximity-Analysis/tree/master/proximity-app

Thank you! Let us know if you need any further guidance.

@lindsaypoirier lindsaypoirier self-assigned this Apr 22, 2020
@lindsaypoirier lindsaypoirier removed good first issue Good for newcomers help wanted Extra attention is needed labels Apr 22, 2020
@lindsaypoirier
Copy link
Contributor Author

This spatial join has been completed and there are new files in the repo:

  • an R script to perform the join
  • the prison boundaries file with census tracts
  • the brownfields file with census tracts

All of the code is commented if anyone wants to take a look.
Next week, I'd like to do some verification on the output file to make sure that things are lining up appropriate.

@lindsaypoirier
Copy link
Contributor Author

Verification check:

  • Open the two datasets in this repo (prisons_with_census_tracts.csv and brownfields_with_census_tracts.csv)
  • Select at least two brownfields from each state and two prisons from each state
  • Copy and paste their addresses into https://geocoding.geo.census.gov/geocoder/locations/addressbatch?form
  • Check their census tracts
  • Record outputs in a spreadsheet with name, address according to dataset, census tract according to dataset, census tract according to census

Alternatively, you can create a batch file and upload to the same site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants