Dear Stata Community,
I have a problem combining different point layers from the same file in one graph. I am using Stata 14 with the user written command "spmap".
I have a dataset which includes coordinates for each single project, coordinates of their projectwise mean centers and their yearwise mean centers. Additionally I have the attribute dataset, obtained from the shapefile of the country, including information about average district population estimates and district capitals with their coordinates.
I want to obtain two graphs: one with District Capitals, Single Projects and Yearly Mean Centers and another one with District Capitals, Single Projects and Project Mean Centers. Both maps should also include the information about the population estimate.
These are the four maps which I want to combine to obtain two at the end.

Additionally, it would be great to include several legends explaining population size (as already included in the graph), size of single projects, size of project mean centers and yearly mean centers in one graph.
Code:
Is this even possible with spmap in stata?
Thanks a lot.
I have a problem combining different point layers from the same file in one graph. I am using Stata 14 with the user written command "spmap".
I have a dataset which includes coordinates for each single project, coordinates of their projectwise mean centers and their yearwise mean centers. Additionally I have the attribute dataset, obtained from the shapefile of the country, including information about average district population estimates and district capitals with their coordinates.
I want to obtain two graphs: one with District Capitals, Single Projects and Yearly Mean Centers and another one with District Capitals, Single Projects and Project Mean Centers. Both maps should also include the information about the population estimate.
These are the four maps which I want to combine to obtain two at the end.
Additionally, it would be great to include several legends explaining population size (as already included in the graph), size of single projects, size of project mean centers and yearly mean centers in one graph.
Code:
Code:
/*District Capitals Map*/ use "DRCongo_attr.dta", clear replace labeldistance_x=INSIDE_X+1.3 replace labeldistance_y=INSIDE_Y+3 spmap AVG_UN_E using "DRCongo_coord.dta", id(_ID) legend(position(7)) /// clnumber(5) clmethod(quantile) fcolor(Blues) ocolor(black) osize(thin) /// point(x(INSIDE_X) y(INSIDE_Y) size(*0.8) fcolor(white) ocolor(black) osize(*0.01)) /// label(x(labeldistance_x) y(INSIDE_Y) label(DIST_CAP) size(*0.5) position(0 6) length(21)) /// title(District Capitals) name(DistrictCapitals) graph export "DistrictCapitals.png", as(png) replace /*Singel Project Map*/ use "DRCongo_attr.dta", clear spmap AVG_UN_E using "DRCongo_coord.dta", id(_ID) legend(position(7)) /// clnumber(5) clmethod(quantile) fcolor(Blues) ocolor(black) osize(thin) /// point(data("DRC_Data.dta") x(x) y(y) size(*0.1) proportional(amount) fcolor(black) ocolor(black) osize(*1)) /// title (Single Projects) name(SingleAidProjects) graph export "SingleProjects.png", as(png) replace /*Yearly Mean Centers Map*/ use "DRCongo_attr.dta", clear spmap AVG_UN_E using "DRCongo_coord.dta", id(_ID) legend(position(7)) /// clnumber(5) clmethod(quantile) fcolor(Blues) ocolor(black) osize(thin) /// point(data("DRC_Data.dta") x(y_mean_center_x) y(y_mean_center_y) proportional(y_mean_center_z)size(*0.5) fcolor(gold) ocolor(gold) osize(*0.01)) /// title(Yearly Mean Centers) name(YearlyMeanCenters) graph export "YearlyMeanCenters.png", as(png) replace /*Project Mean Centers Map*/ use "DRCongo_attr.dta", clear spmap AVG_UN_E using "DRCongo_coord.dta", id(_ID) legend(position(7)) /// clnumber(5) clmethod(quantile) fcolor(Blues) ocolor(black) osize(thin) /// point(data("DRC_Data.dta") x(p_mean_center_x) y(p_mean_center_y) proportional(p_mean_center_z)size(*0.3) fcolor(green) ocolor(green) osize(*0.01)) /// title(Project Mean Centers) name(ProjectMeanCenters) graph export "ProjectMeanCenters.png", as(png) replace
Thanks a lot.
Comment