I have a question with regard to spatial aggregation in R. What I am trying to do is aggregate a point dataset to a grid. I am unsure however how to do this as I have little experience with this sort of stuff. I was hoping anyone of you might have some useful guidance/a possible solution.
My vantage point is a dataset containing georeferenced data on conflict events in Africa (see www.acleddata.com). The points are georeferenced with latitude/longitude coordinates and contain data on event type and time. What I want to do is aggregate these points to a 1x1 degree grid.
Thus a grid-cell should contain the information of the data points if a event happened to occur within that grid-cell. The eventual product of this should be a data frame or something that I can export to a csv-file as the data is intended to be used in a panel data-set for statistical analysis.
So far I loaded and plotted the data and the shapefile using the code below. I believe that I should use the over function from the sp package to aggregate but I do not know how. Hope one of you can help.
The code I used so far can be found here with the corresponding visual result over there.
Suggestion for doing this in QGIS are welcome as well.
