I'm quite new to the area of spatial statistics, but I'm very interest in some general principles. The last two weeks I've created an example dataset, which contains three datsets.
- A dataset of ill persons.
- A dataset of cities with the the overall population.
- A dataset of points, which visualizes waterfeatures.
The whole situation looks like this:
Blue: Water features, yellow: cities, red: persons. Please note that the persons are located on the cities coordinates.
I've already performed some basic analyses:
- I've calculated the distance between each person and the nearest waterfeature.
- I've calculated the number of ill and not_ill people per city.
- I've calculated the rate of ill and not_ill people
- Because persons and cities share the same location, I've also infer the distance between each city and the nearest water feature.
Now I want to check a possible correlation between the number of ill persons/rate of ill persons and the proximity to water features. I know, that the datasets are possibly not representative or suitable for my hyptothesis: I hold that there are more ill persons, where the distance to water features are lower than somewhere else.
I've already looked for some suitable methods, but there are so many possible ways, so I don't know, which of these could be useful for my notional use case. I've read about semivariogram, variogram, Ripley's K function, G-Function, correlation coefficient. As you can see, I have a broad range of possible methods, but unfortunately not this necessary expertise.
- Do you have any tip, which methods could be the most suitable?
- And another question: A risk/cluster analysis would be cool. Something, which shows the "areas" with a high risk of becoming ill based on the number of ill persons in a city. But I think there are two problems: I have to interpolate my dataset!? And a cluster analysis is only possible by using polygons, right? Interesting R packages (from my point of view) could be
DClusteras well as
- And one last question: is there any "general" problem of having many persons at one location? I know that this is not the best dataset, because ideally each point has a own position...
To give you a better overview, I've prepared some code in R, which loads my dataset and which plots the picture, which I've included here.
library(RgoogleMaps) library(ggplot2) library(ggmap) library(sp) library(fossil) persons = read.csv("http://pastebin.com/raw.php?i=AuAQNqVt", header = TRUE, stringsAsFactors=FALSE) city= read.csv("http://pastebin.com/raw.php?i=ZfPDFYCK", header = TRUE, stringsAsFactors=FALSE) water= read.csv("http://pastebin.com/raw.php?i=hQRvMZwE", header = TRUE, stringsAsFactors=FALSE) # plot data gc <- geocode('new york, usa') center <- as.numeric(gc) G <- ggmap(get_googlemap(center = center, color = 'bw', scale = 1, zoom = 11, maptype = "terrain", frame=T), extent="device") G1 <- G + geom_point(aes(x=POINT_X, y=POINT_Y ),data=city_all_parameters, shape = 22, color="black", fill = "yellow", size = 4) + geom_point(aes(x=POINT_X, y=POINT_Y ),data=persons, shape = 8, color="red", size=2.5) + geom_point(aes(x=POINT_X, y=POINT_Y ),data=water, color="blue", size=1) plot(G1)
I'm excited to hear from you :)