This does a spatial merger with the data from JusticeMap.
This is faster than using the JusticeMap API
for each data point.
It sums the total number of people of each race who live in that area.
And it sums income by multiplying the median household income
for the area by the number of people who live in that area (this introduces a small amount of error due to differences in average household size -- but this is probably a
minor factor compared to the income data confidence interval).
People who live near multiple facilities are counted once for each facility that they live near (and thus can be counted multiple times).
If you use a weight, then we weight the results for that point by multiplying the population/income by the weight.
The geographical unit of analysis depends on the distance and the Accuracy option.
Normal: blocks up to 5 miles, then block groups up to 50 miles, then census tracts.
Higher: blocks up to 10 miles, block groups up to 100 miles, then tracts.
Very High: blocks up to 25 miles, then block groups.
Highest: blocks up to 50 miles, then block groups.
You can see how changing the unit of analysis will alter your results.
The geographical join type includes areas that have a centroid within the specified distance (Ex. find all the blocks with a centroid within 1 mile of a point).
Speed: the spatial merger is faster than API calls. You can also get this script to run
faster by reducing the Accuracy option, by reducing the Number of Distances option, or analyzing a smaller number of points.
If you need more time or help using this, you can send an email to get free support (or paid support for large/complex projects).
We use a postgresql/postgis database.