MATLAB: How to map and analyse geodata in MATLAB

latlonmapplotradius

Hello
I have two datasets, A and B: Dataset A contains information about various cases of violent conflict that have been recorded in Nigeria over the past two decades. This dataset has information about the exact locations (longitutde and latitude) of each conflict event recorded.
Dataset B is a data on households that were recently sampled and surveyed in Nigeria. This data also has information on the exact locations (longitude and latitude) of the residence of each household surveyed. Both Datasets are in STATA format.
What I am trying to do is to sort of plot both of this datasets on the map of Nigeria so that I can exactly locate every sampled household and every recorded case of conflict on the map. More importantly, I would like to calculate, for each surveyed household, the number of cases of conflict recorded within a 5 kilometre radius. Please, how, if at all, can I achieve this on MATLAB?
Thank you.

Best Answer

It depends is your data scattered/ grdded. The below options you have:
Scattered data
i. Show by points: You can use scatter for this.
ii. Show by surface (unstructured grid): You can use delaunayTriangulation and use trosurf / patch to display.
iii. Show by surface (structured grid): You can use ScatteredInterpolant / griddata to convert the scattered data into gridded and use surf or pcolor.
Grided data
YOu can use surf or pcolor to plot the data.
Alos have a look on this package: https://www.eoas.ubc.ca/~rich/map.html
Related Question