![]() We are going to generate the distance between New York and other cities in KM. The data that we are going to use, is us_cities.dta that contains latitude and longitude of US cities. Syntax: geodist lat1 lon1 lat2 lon2, generate(new_dist_var) Please install geodist if you haven't installed this command. The geodist command is used to calculate the distance between two locations, cities or latitude and longitude.ġ. Working with Geo-Distance Part 1: How do I calculate the distance between two locations with Stata? Read about them in the online help file (type help spmap).ī. Spmap has many options that control the color, legend, etc. ![]() Graphregion(icolor(stone)) - graph region color Plotregion(icolor(stone)) - plot region color Legend(region(lcolor(black))) - legend region line color Title ("Poverty in Nepal by Districts") ///įcolor(Reds) - fill color of base map polygons (using Reds pallets here)Ĭlnumber(9) - number of classes or number of color legends Spmap poverty using nepalcoord, id(id) /// Variable name type format label variable labelī) Napel Coordinate data (extracted from the map)Īdding Title, Legends and Colors to the base map based on the povery level dta datasets: nepaldb.dta and nepalcoord.dta.Ī) Nepal Dataset (extracted from the map) In any case, the translation has created two new. We would have translated MapInfo files the same way, but we would have used the command mif2dta instead of shp2dta. The Nepal map, however, took only a few seconds. Shp2dta can take several minutes to run, depending on the map’s size and level of detail.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |