I have a, hopefully, simple spatial analysis I'd like to perform in python. However, I haven't fully figured out how to get python to do what I want it to do.
I have a CSV file with 3 critical columns: Hit or Miss, X Location, Y Location. Each row is an instance of whether a hit or miss occurred, and what the x and y coordinates were for that hit or miss (e.g., "hit, 10, 58").
To give you a better picture, imagine there are hundreds of thousands of these points, and they all fall somewhere within a 100 x 100 grid (where 0,0 = bottom left corner and 100,100 = upper right corner). Hits and misses are distributed across the grid, where in some locations there are hits and misses overlapping, some locations with only hits or only misses, and some locations with neither.
My ultimate goal is to produce a heat-map that visualizes the relative accuracy (hits/(hits+misses)) across the grid.
The best idea I've been able to come up with is to plot the hits and misses on the same scatterplot, reduce the opacity of the points, and let the density of points dictate the hue, which would then represent relative accuracy.... but this looks awful....
My next idea is to make bins. So, the grid would be broken into 50 2x2 bins and I would have my program perform the accuracy analysis (hits/(hits+misses)) for each bin. But, alas, I have no idea how to do this.
Does anyone have any ideas?
Thanks!