Hi everyone,
I have a list of selected airports in lat/lon format and want to scatter these points in the US map. My objective is to show all these points and their corresponding CBSA areas in a US map with state divisions.
I tried the following code, but I cannot add the selected CBSAs in the map:
line _Y _X, cmiss(n)||sc airport_X airport_Y, leg(off) xla(-124/-71) yla(,nogrid) ysc(off) xsc(off) graphr(fc(white))
Array
I also tried to use spmap, but all airport locations are in latitude and longitude format. When I ran the code directly, all airport points do not scatter in their CBSAs (shadow areas.) How can I converse these lat/lon points usable in spmap? I tried to converse them in some website, but the outputs do not contain shp data file. Is there anyway that I can converse the airport lat/lon usable in the spmap command? Thank you!
use "cbsa_sm_gis2.dta", clear
spmap using "uscoord_cbsa.dta", id(id) polygon(data("uscoord_st.dta") select(keep if _ID!=1 &_ID!=39 & _ID!=13 & _ID!=4 & _ID!=54 & _ID!=55 & _ID!=39 & _ID!=46) fcolor(none) ocolor(gray*.7)) ///
point(data("airport_sm_gis2.dta") x(_X) y(_Y) ///
size(*0.6) fcolor(sienna) ocolor(white)) ///
fcolor(ebg*.7) ocolor(ebg*.7) osize(vthin) ///
plotregion(icolor(white)) graphregion(icolor(white) lcolor(black))
Array
Related Posts with How to convert the unprojected point data in lat/lon format into projected point dat, usable in spmap
Drop all observations featuring a particular value of a variable if any one observation with that value meets a separate criteriaHello all, I've seen the helpful responses here and since I can't quite seem to find the right solu…
Marginal effects using dydx for panel data regression using country fixed effects and a time-invariant variable in the interaction term.Dear Statalisters, I am new to the forum and I have tried to find a solution for my problem. I coul…
How to do a DiD-analysis in stata with multiple pre- and post-observations per firm and different treatment times per firm?Hi all, I am studying the effects of stock splits on the liquidity of a firm. In my sample I have c…
georoute troubleshootingI'm trying to generate travel distances using georoute in Stata but getting different error messages…
Problems merging dataHi all, I have been trying to merge my data using key variables but error I keep getting is : " key…
Subscribe to:
Post Comments (Atom)
0 Response to How to convert the unprojected point data in lat/lon format into projected point dat, usable in spmap
Post a Comment