Example: barber

Package ‘maps’ - R

Package maps April 3, 2018 TitleDraw Geographical S code by Richard A. Becker and Allan R. version by Ray by Thomas P Minka and Alex of maps. Projection code and larger maps are inseparate packages ('mapproj' and 'mapdata').DependsR (>= )Importsgraphics, utilsLazyDatayesSuggestsmapproj (>= ), mapdata (>= ), sp, maptools,rnaturalearthLicenseGPL-2 MaintainerAlex 08:24:49 UTCR topics ..4county ..5france ..8iso3166 ..9italy .. 10lakes .. 12map .. 22maps-deprecated .. 23nz .. 25ozone .. 26 Spatial2map .. 28state .. 32usa .. 33world .. 36world2 .. of projected map regionsDescriptionComputes the areas of regions in a projected (m, regions = ".)

x Vector of country names, may include colons. n An integer identitying which ISO code is required. Allowed values are 2 and 3. Details The ISO 3166-1 standard identifies countries by a 2 and 3 letter codes. iso.expand translates these codes into the country names as used by the world data base. iso.alpha does the reverse.

Tags:

  Name, Code

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Package ‘maps’ - R

1 Package maps April 3, 2018 TitleDraw Geographical S code by Richard A. Becker and Allan R. version by Ray by Thomas P Minka and Alex of maps. Projection code and larger maps are inseparate packages ('mapproj' and 'mapdata').DependsR (>= )Importsgraphics, utilsLazyDatayesSuggestsmapproj (>= ), mapdata (>= ), sp, maptools,rnaturalearthLicenseGPL-2 MaintainerAlex 08:24:49 UTCR topics ..4county ..5france ..8iso3166 ..9italy .. 10lakes .. 12map .. 22maps-deprecated .. 23nz .. 25ozone .. 26 Spatial2map .. 28state .. 32usa .. 33world .. 36world2 .. of projected map regionsDescriptionComputes the areas of regions in a projected (m, regions = ".)

2 ", sqmi=TRUE, ..)Argumentsma map object containing named polygons (created withfill = TRUE).regionsa character vector naming one of more regions, as , measure area in square miles. Otherwise keep the units arguments area of each matching region in the map is computed, and regions which match the same ele-ment ofregionshave their areas combined. Each region is assumed planar, with vertices specifiedby thexandycomponents of the map correct use of this function is to first usemapto create polygons and project the coordinatesonto a plane, then compute the area of the projected regions. If the projectionis area-preserving (such asalbers), then these areas will match the area on the globe, up to aconstant.

3 To get an absolute area in square miles, thesqmioption will scale the result, dependingon the coordinates frommapare affected by itsresolutionargument, so useresolution=0for themost accurate named vector of region assumes the coordinates have been projected with the mapproject (s)Tom MinkaSee , # because the projection is rectangular, these are not true areas on the = map("state", fill = TRUE, plot = FALSE) (m) (m, ".*dakota") (m, c("North Dakota", "South Dakota"))if(require(mapproj)) {# true areas on the globem = map("state", proj="bonne", param=45, fill=TRUE, plot=FALSE)# North Dakota is listed as 70,704 square (m, "North Dakota")} of Canadian citiesDescriptionThis database is of Canadian cities of population greater than about 1,000.

4 Also included areprovince capitals of any population list with 6 components, namely " name ", " ", "pop", "lat", "long", and "capital", contain-ing the city name , the province abbreviation, approximate population (as at January 2006), latitude,longitude and capital status indication (0 for non-capital, 1 for capital, 2 for of the city names may be out of date. Please send any corrections to the Package States County MapDescriptionThis database produces a map of the counties of the United States mainland generated from USDepartment of the Census data (see the reference).Usagedata(countyMapEnv)Format The data file is merely a character string which specifies the name of an environment variable whichcontains the base location of the binary files used by the map drawing functions.)

5 This environmentvariable (R_MAP_DATA_DIRfor the datasets in the maps Package ) is set at Package load timeif it doesnot already exist. Hence setting the environment variable before loading the Package can overridethe default location of the binary A. Becker, and Allan R. Wilks, "Maps in S",AT\&T Bell Laboratories Statistics ResearchReport [ ], A. Becker, and Allan R. Wilks, "Constructing a Geographical Database",AT\&T Bell Lab-oratories Statistics Research Report [ ], Department of Commerce, Census Bureau,County Boundary File,computer tape, availablefrom Customer Services, Bureau of the Census, Washingdon DC ('county','iowa', fill = TRUE, col = palette()) county codes for US County MapDescriptionA database matching FIPS codes to maps Package county and state ( )FormatA list with 2 components, namely "fips" and "polyname", containing the FIPS number and respec-tive state or county polygon name .

6 Note that "fips" is represented as an integer, so any leading zero(which is part of the fips code ) is not shown by MapDescriptionThis france database comes from the NUTS III (Tertiary Administrative Units of the EuropeanCommunity) database of the United Nations Environment Programme (UNEP) GRID-Geneva datasets. These were prepared around 1989, and so may be somewhat out of of data sets supplied through UNEP/GRID are requested to incorporate in output productsand reports acknowledgements to the originator of the data and to the fact that they were acquiredthrough UNEP/GRID. Appropriate wording may be "UNESCO (1987) through UNEP/GRID-Geneva".

7 Usagedata(franceMapEnv)FormatThe data file is merely a character string which specifies the name of an environment variable whichcontains the base location of the binary files used by the map drawing functions. This environmentvariable (R_MAP_DATA_DIRfor the datasets in the maps Package ) is set at Package load timeif it doesnot already exist. Hence setting the environment variable before loading the Package can overridethe default location of the binary A. Becker, and Allan R. Wilks, "Maps in S",AT\&T Bell Laboratories Statistics ResearchReport [ ], A. Becker, and Allan R. Wilks, "Constructing a Geographical Database",AT\&T Bell Lab-oratories Statistics Research Report [ ], AlsomapExamplesmap('france', fill = TRUE, col = 1:10) regions on a mapDescriptionIdentifies the map regions clicked by the ## S3 method for class'map'identify(x, n = 1, index = FALSE.)

8 Argumentsxa map object containing named number of clicks to wait TRUE, returns the index of the polygon, rather than its arguments passed current algorithm is somewhat crude selects the region whose centroid is closest to the more sophisticated approach would character vector of lengthn, naming the selected (s)Tom MinkaSee Alsoidentify, (map("state", fill = TRUE, col = 0))if(require(mapproj))identify(map("wor ld", proj = "lagrange", fill = TRUE, col = 0, wrap=c(-180,180,-90))) countries by ISO 3166 codes (2 or 3 letters) or by data set and the simple look-up functions allow to build lists of counrtries for the world (a, regex=TRUE) (sov, regex=TRUE) (x, n=2)ArgumentsaA vector of ISO codes.

9 All elements should have the same length, either 2 or 3letters. Not case vector of country names. The result is a list of all countries that fall undertheir sovereignty. Case sensitive, must fit TRUE (default), the return vector has the same length as the input (aorsov),but the entries may be regular expressions. If FALSE, the result is a vector ofpolygon names. This may be more readable, but the return vector may be longerthan the of country names, may include integer identitying which ISO code is required. Allowed values are 2 and ISO 3166-1 standard identifies countries by a 2 and 3 letter codes into the country names as used by theworlddata the that these functions will not work well with the legacy world data base.

10 Some countries havedifferent ISO codes for different regions ( China:Hong Kong has ISO code HK). In such cases, return the main code , return a regular expression that excludessome vector of country names. When used as input formapit will plot all the coun-tries as identified either by their sovereignty or by ISO codes. Ifregex=FALSEthe length of thevector may be shorter or longer than the input. Ifregex=TRUE, the results are concatenated inregular expressions. This format is less readable, but can be used as input returns a vector of the same length as the input, containing the 2- or functions use regular expressions and the results will often not work well withmap(.)


Related search queries