Hi everyone,
I have a very quick question about Ben Jann's excellent new command: -geoplot-, and I have been struggling with it for a while.
It is probably very simple, but here is my question:
The map is depicted below.
All the best,
Michael
I have a very quick question about Ben Jann's excellent new command: -geoplot-, and I have been struggling with it for a while.
It is probably very simple, but here is my question:
- How could I obtain the exact number of observations just below the name regions, please?
Code:
******* cd ${path_geoloc}/data spshape2dta "../recintos_autonomicas_inspire_peninbal_etrs89/recintos_autonomicas_inspire_peninbal_etrs89.shp", replace saving(Spain_auton) spshape2dta "../recintos_provinciales_inspire_peninbal_etrs89/recintos_provinciales_inspire_peninbal_etrs89.shp", replace saving(Spain_provinc) use Spain_provinc, clear gen sp_zipcode_twodigits = substr(NATCODE,5, 2) destring sp_zipcode_twodigits, replace sort sp_zipcode_twodigits save Spain_provinc.dta, replace *1)Creation of Provincias limits geoframe create Spain_provinc, replace geoframe describe Spain_provinc *3)Some data cleaning, if needed geoframe describe Spain_provinc_shp merge 1:1 sp_zipcode_twodigits using solar_panel_info_collapse.dta, keep(match master) nogenerate drop in -1/l // erase "Territorio..." save Spain_provinc, replace cd ${path_geoloc}/data *4)Creation of CCAA limits geoframe create Spain_auton geoframe describe Spain_auton_shp *5)Creation of solar_panel_info_collapse connexion geoframe create solar_panel_info_collapse, replace geoframe describe solar_panel_info_collapse geoplot /// (area Spain_provinc obs_by_zipcode_solar, color(sfso orange, reverse) cuts(0 50 100 200 300 400 500 1500 2500 4500)) /// (line Spain_auton, lwidth(0.4)) /// (line Spain_provinc, lwidth(0.05)) /// (label Spain_provinc NAMEUNIT, size(tiny) color(black)), tight legend(pos(9)) cd ${EEL_ERG_02112023}/figures graph export map_obs_by_zipcodes_solarp_geoplot.png, replace graph export map_obs_by_zipcodes_solarp_geoplot.pdf, replace
All the best,
Michael
Comment