[r-cran-maps] 38/64: Import Upstream version 2.2-1
Andreas Tille
tille at debian.org
Thu Sep 7 07:32:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-cran-maps.
commit 39aec49b810f1ef9a7f2b06153015a1ce788fcf0
Author: Andreas Tille <tille at debian.org>
Date: Thu Sep 7 09:27:07 2017 +0200
Import Upstream version 2.2-1
---
DESCRIPTION | 14 ++++----
MD5 | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++
NAMESPACE | 1 +
R/map.r | 4 +--
R/misc.r | 2 ++
R/zzz.R | 14 ++++----
data/county.fips.rda | Bin 0 -> 32983 bytes
data/state.fips.rda | Bin 0 -> 1224 bytes
data/unemp.rda | Bin 0 -> 23584 bytes
data/us.cities.rda | Bin 15676 -> 18587 bytes
man/county.fips.Rd | 18 ++++++++++
man/map.Rd | 35 ++++++++++++++++++
man/ozone.Rd | 2 ++
man/state.fips.Rd | 20 +++++++++++
src/Makefile | 4 +--
15 files changed, 194 insertions(+), 18 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
old mode 100644
new mode 100755
index 3e5e7ad..272cfca
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,17 +1,17 @@
Package: maps
Title: Draw Geographical Maps
-Version: 2.1-6
-Date: 2011-04-15
-Author: Original S code by Richard A. Becker and Allan R. Wilks. R
- version by Ray Brownrigg <Ray.Brownrigg at ecs.vuw.ac.nz>
+Version: 2.2-1
+Date: 2011-11-03
+Author: Original S code by Richard A. Becker and Allan R. Wilks.
+ R version by Ray Brownrigg <Ray.Brownrigg at ecs.vuw.ac.nz>
Enhancements by Thomas P Minka <surname at stat.cmu.edu>
Description: Display of maps. Projection code and larger maps are in
- separate packages (mapproj and mapdata).
+ separate packages (mapproj and mapdata).
Depends: R (>= 2.10.0)
LazyLoad: yes
Suggests: mapproj
License: GPL-2
Maintainer: Ray Brownrigg <Ray.Brownrigg at ecs.vuw.ac.nz>
-Packaged: 2011-04-15 03:46:26 UTC; ray
+Packaged: 2011-11-03 03:23:57 UTC; ray
Repository: CRAN
-Date/Publication: 2011-05-03 07:28:30
+Date/Publication: 2011-11-03 11:48:16
diff --git a/MD5 b/MD5
new file mode 100644
index 0000000..3d20bfd
--- /dev/null
+++ b/MD5
@@ -0,0 +1,98 @@
+13cf847a6d86dc9f38e0731d583a3275 *DESCRIPTION
+012592abf4b40a8d741b299df2ded05a *NAMESPACE
+80aa05ca421f4b4aafd2aa1c62e5bf2d *R/db.r
+4a62baaaeb68b971eba22eb579f4e414 *R/map.r
+5f0c0ab48d2ce320c4ba0d0018a57d99 *R/misc.r
+89ba2eda91abd2d6fdaebfde9da3f4e9 *R/polygon.r
+45bb5cad9ffc203d8e62dae784725f37 *R/smooth.r
+6e753ff5cb6ed7189c4e0dcd3eb46758 *R/zzz.R
+6d3acd6bf8fe0501140653a66952a160 *data/canada.cities.rda
+09229fd795049dfd32cba1042ae16c69 *data/county.fips.rda
+35d87c916a508fe3c71c917cd1c33cb3 *data/countyMapEnv.r
+982a75588059981c75480cabd4d6221f *data/franceMapEnv.r
+e905d7c3ec3746a5463aece42a29afce *data/italyMapEnv.r
+b8168bd40b33d5493e67a5d2f35d7e67 *data/nzMapEnv.r
+8d109b47aa40edeaaa43e7406c0ea3ba *data/ozone.rda
+e5e971cef422bb733644791ebdc05547 *data/state.fips.rda
+388d3067e6c9ce642d2dafbb02b8851e *data/stateMapEnv.r
+3bbbc17c88b46d5ccfc51cfdc599ce28 *data/unemp.rda
+47260e722f73cdedba76a2cc1e6a3205 *data/us.cities.rda
+c65f0fd76cf1705827c27ef6d6bf646a *data/usaMapEnv.r
+0f1a65d78161fb00e86d5386a2f883cd *data/votes.repub.rda
+bc55cff7e2a132d415275bade4846303 *data/world.cities.rda
+d92fb72bdbea7946860c1a851e230b23 *data/world2MapEnv.r
+af1a98ea280598ed1cd85d00551cba98 *data/worldMapEnv.r
+5f9fab4844ba7d6a1ad6f65e8f684355 *man/area.map.Rd
+bcd90a5871cfbca677d5e2590d308d87 *man/canada.cities.Rd
+40b9c294d387d360981778a6856a6503 *man/county.Rd
+a71b764c02af9ac06851c03ac063a192 *man/county.fips.Rd
+9a0baabe36fda722dd13221279189a19 *man/france.Rd
+f6c4336f6614dabf3573895a38ea1099 *man/identify.map.Rd
+b39d593d4b02815c823f555cf8599ee5 *man/internal.Rd
+56766404494d261648f09393180151dc *man/internal2.Rd
+b80ddc48b7415d5f4122b9ef598279b0 *man/italy.Rd
+fb972de4b0386b6cdcc42aae735212ea *man/map.Rd
+f590ca3d82f3a60d0714c70bf6bdffb6 *man/map.axes.Rd
+5a6345e78e10197ba4db0ffa550670cf *man/map.cities.Rd
+7154c4758c1f712f926af93e5fce1c60 *man/map.scale.Rd
+9e3bf07d05f43ff69672df274da89943 *man/map.text.Rd
+631a40fee9c727336502266f76e644a1 *man/map.where.Rd
+42b367151050df253705fa17c2d8e1a1 *man/match.map.Rd
+d6455f76d2c29928bc9aa7950528e3be *man/nz.Rd
+dc4256b7510c06529ade1c14c58cd5c7 *man/ozone.Rd
+e368efb53ad4d9a95938eb078ca68fd8 *man/polygon.Rd
+fc2661fa4e7119cae77f7c937205bab3 *man/smooth.map.Rd
+53e2f7fe3c4166e412fdbecab22557fa *man/state.Rd
+ba8d5d668beb64222ee0feecc3be1f83 *man/state.fips.Rd
+4772854c8b17ec1604f5e099e4375c8a *man/us.cities.Rd
+f25971f020951d5260292158a6600389 *man/usa.Rd
+8f319ab0ebd2fe4d3db27fea8b2e52fc *man/world.Rd
+dc4668c3b67ae20d466fdb60c07be88c *man/world.cities.Rd
+150ee84eeb7fb26843418b9213468e88 *man/world2.Rd
+f684d16afeece0ab0ecdaddd67397466 *src/Gmake.c
+9d0c7fa4265c2622840a930b7fa8f67a *src/Lmake.c
+b166b91401f14635f63f96152a837baf *src/Makefile
+5836a87ca9b464dd87c5cbf401e6344a *src/Makefile.win
+ee000c17ddd154301f679ce267ed4918 *src/README
+885521324ea75cdfcea9d91a5afb0ec5 *src/convert.awk
+7e6373f288c239e3c4a81dd10347d2c9 *src/county.gon
+42d31544ad47078bf51d2d43cd125658 *src/county.gonstats
+d12c98250b5ebfb76d373848f2dfe17c *src/county.line
+013879757feaded46183178af9dbf262 *src/county.linestats
+8a1b5889411471d7694d97ebdf783356 *src/county.name
+39cb343519f464aa76c254763e420890 *src/france.gon
+0ea34241398d4f8b1512e52d9039917e *src/france.gonstats
+fc3a0c540e31cc2d6c92579fd0ee9bd1 *src/france.line
+23035dcc6ed0cf83bb7b50bbb650f0b8 *src/france.linestats
+b60fcb42009e8dff53911077e8b96107 *src/france.name
+98edece48bd5a0d8669d54dbbbfdf5d8 *src/getstats.sh
+a804b957f9000f0e9ca74483fbb66df6 *src/italy.gon
+f7c622f74f28e328d3d65f265f0a26c3 *src/italy.gonstats
+0a2cf4ecf0a34ce28b2b1095cd193d22 *src/italy.line
+1495aafdb361a79248ca9c2950c57d90 *src/italy.linestats
+1ddcc46403193ad474b3934d046f10bf *src/italy.name
+28f0356bc9bb3e0b479b9cc916930730 *src/map.h
+11fb4709e58d7a684b9c48dbe54fd8b5 *src/mapget.c
+5e9c4adf4fc41a391e3539fa708961b0 *src/nz.gon
+1baecc758797af3a5db79c56f81b16be *src/nz.gonstats
+750f995d19363927fdc64f1656f5e6ac *src/nz.line
+f4813dcc9e8ace61c3127247d89ca050 *src/nz.linestats
+9f6127bc86be1670ef43b54b113a94b9 *src/nz.name
+38c841a4ae31088764a4173dea9fb99d *src/smooth.c
+efbdb5e7346ddaae0314aff52661b45f *src/state.gon
+8a5f0b214eb18898570b3d3265690c7b *src/state.gonstats
+9ec76bff7df86d5e1d1e62b231f57d8c *src/state.line
+1cf5afc6966bb36f5bc82eea4b2335c6 *src/state.linestats
+54a14292aa6880f6e3760b8f6c559a85 *src/state.name
+11c733a2db4704c9e2f13942a4c998fc *src/thin.c
+7565197b7181346e1632535bfc36650a *src/thin.c.orig
+f298493e3329a78ce0931272d511b60f *src/usa.gon
+1c1041f7228b105eaaa93d8b3a9bf8d1 *src/usa.gonstats
+64612e351ce91a03a2040b0edd64d295 *src/usa.line
+e00687fd8b955d445553fb401bf2bf3a *src/usa.linestats
+9d7b8808ac4036ebb98e4f94a5ec8281 *src/usa.name
+f1a1b6c9257c30aed9625a01dcec660b *src/world.gon
+0902fc2c7b181fbf40673b9d9748ad00 *src/world.gonstats
+0dd8f14ca75749c2fa3fdf834100f0e9 *src/world.line
+46c6d5c6021921b44d3edb8c5946f5b0 *src/world.linestats
+2abd839acc105d625c51d6c3d9287a6b *src/world.name
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100755
index 0000000..9c9f9ac
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1 @@
+exportPattern("^[^\\.]")
diff --git a/R/map.r b/R/map.r
index ca2ec0e..fc176cc 100644
--- a/R/map.r
+++ b/R/map.r
@@ -118,7 +118,7 @@ function(database = "world", regions = ".", exact = FALSE,
}
if (doproj) {
nam <- coord$names
- library(mapproj)
+ require(mapproj)
coord <- mapproject(coord, projection = projection,
parameters = parameters, orientation = orientation)
coord$projection = projection
@@ -129,7 +129,7 @@ function(database = "world", regions = ".", exact = FALSE,
stop("projection failed for all data")
else warning("projection failed for some data")
coord$names <- nam
- }
+ } else mapproject <- function() {} # Keep R CMD check quiet
# do the plotting, if requested
if (plot) {
# for new plots, set up the coordinate system;
diff --git a/R/misc.r b/R/misc.r
index 3cf692e..51a2106 100644
--- a/R/misc.r
+++ b/R/misc.r
@@ -36,6 +36,7 @@ function (x = world.cities, country = "", label = NULL, minpop = 0,
}
usr <- par("usr")
if (!missing(projection) && projection != FALSE) {
+ require(mapproj)
if (is.character(projection)) {
projx <- mapproject(x$long, x$lat, projection = projection,
parameters = parameters, orientation = orientation)
@@ -47,6 +48,7 @@ function (x = world.cities, country = "", label = NULL, minpop = 0,
x$long <- projx$x
x$lat <- projx$y
} else {
+ mapproject <- function() {} # Keep R CMD check quiet
if (usr[2] > (180 + 0.04*(usr[2] - usr[1])))
x$long[x$long < 0] <- 360 + x$long[x$long < 0]
}
diff --git a/R/zzz.R b/R/zzz.R
old mode 100644
new mode 100755
index daa3977..db98d67
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -1,7 +1,7 @@
-.First.lib <- function(lib, pkg) {
- if(!exists("Sys.setenv", envir = baseenv()))
- Sys.setenv <- Sys.putenv
- if (Sys.getenv("R_MAP_DATA_DIR") == "")
- Sys.setenv("R_MAP_DATA_DIR"=paste(lib, pkg, "mapdata/", sep="/"))
- library.dynam("maps", pkg, lib)
-}
+.onLoad <- function(lib, pkg) {
+ if(!exists("Sys.setenv", envir = baseenv()))
+ Sys.setenv <- Sys.putenv
+ if (Sys.getenv("R_MAP_DATA_DIR") == "")
+ Sys.setenv("R_MAP_DATA_DIR"=paste(lib, pkg, "mapdata/", sep="/"))
+ library.dynam("maps", pkg, lib)
+}
diff --git a/data/county.fips.rda b/data/county.fips.rda
new file mode 100644
index 0000000..2400627
Binary files /dev/null and b/data/county.fips.rda differ
diff --git a/data/state.fips.rda b/data/state.fips.rda
new file mode 100644
index 0000000..9ccbdf9
Binary files /dev/null and b/data/state.fips.rda differ
diff --git a/data/unemp.rda b/data/unemp.rda
new file mode 100644
index 0000000..163268c
Binary files /dev/null and b/data/unemp.rda differ
diff --git a/data/us.cities.rda b/data/us.cities.rda
index 432eac3..77b50ba 100644
Binary files a/data/us.cities.rda and b/data/us.cities.rda differ
diff --git a/man/county.fips.Rd b/man/county.fips.Rd
new file mode 100644
index 0000000..e7acdab
--- /dev/null
+++ b/man/county.fips.Rd
@@ -0,0 +1,18 @@
+\name{county.fips}
+\docType{data}
+\alias{county.fips}
+\title{
+FIPS county codes for US County Map
+}
+\description{
+A database matching FIPS codes to maps package county and state names.
+}
+\usage{data(county.fips)}
+\format{
+A list with 2 components, namely "fips" and "polyname", containing the
+FIPS number and respective state or county polygon name.
+}
+\seealso{
+\code{\link{state.fips}}
+}
+\keyword{datasets}
diff --git a/man/map.Rd b/man/map.Rd
index 0cdb43e..317b7f2 100644
--- a/man/map.Rd
+++ b/man/map.Rd
@@ -225,6 +225,41 @@ data(ozone)
map("state", xlim = range(ozone$x), ylim = range(ozone$y))
text(ozone$x, ozone$y, ozone$median)
box()
+if(require(mapproj)) { # mapproj is used for projection="polyconic"
+ # color US county map by 2009 unemployment rate
+ # match counties to map using FIPS county codes
+ # Based on J's solution to the "Choropleth Challenge"
+ # http://blog.revolutionanalytics.com/2009/11/choropleth-challenge-result.html
+
+ # load data
+ # unemp includes data for some counties not on the "lower 48 states" county
+ # map, such as those in Alaska, Hawaii, Puerto Rico, and some tiny Virginia
+ # cities
+ data(unemp)
+ data(county.fips)
+
+ # define color buckets
+ colors = c("#F1EEF6", "#D4B9DA", "#C994C7", "#DF65B0", "#DD1C77", "#980043")
+ unemp$colorBuckets <- as.numeric(cut(unemp$unemp, c(0, 2, 4, 6, 8, 10, 100)))
+ leg.txt <- c("<2\%", "2-4\%", "4-6\%", "6-8\%", "8-10\%", ">10\%")
+
+ # align data with map definitions by matching FIPS codes
+ # works much better than trying to match the state, county names
+ # which also include multiple polygons for some counties
+ colorsmatched <- unemp$colorBuckets [match(county.fips$fips, unemp$fips)]
+
+ # draw map
+ map("county", col = colors[colorsmatched], fill = TRUE, resolution = 0,
+ lty = 0, projection = "polyconic")
+ map("state", col = "white", fill = FALSE, add = TRUE, lty = 1, lwd = 0.2,
+ projection="polyconic")
+ title("unemployment by county, 2009")
+ legend("topright", leg.txt, horiz = TRUE, fill = colors)
+
+ # Choropleth Challenge example, based on J's solution, see:
+ # http://blog.revolutionanalytics.com/2009/11/choropleth-challenge-result.html
+ # To see the faint county boundaries, use RGui menu: File/SaveAs/PDF
+}
}
\seealso{
\code{\link{map.text}}, \code{\link{map.axes}},
diff --git a/man/ozone.Rd b/man/ozone.Rd
index c301c13..342bf2b 100644
--- a/man/ozone.Rd
+++ b/man/ozone.Rd
@@ -2,9 +2,11 @@
\docType{data}
\alias{ozone}
\alias{votes.repub}
+\alias{unemp}
\title{Sample datasets}
\usage{
data(ozone)
+data(unemp)
data(votes.repub)
}
\description{Datasets used to illustrate map functions.}
diff --git a/man/state.fips.Rd b/man/state.fips.Rd
new file mode 100644
index 0000000..9212730
--- /dev/null
+++ b/man/state.fips.Rd
@@ -0,0 +1,20 @@
+\name{state.fips}
+\docType{data}
+\alias{state.fips}
+\title{
+FIPS state codes for US 48 State Map
+}
+\description{
+A database matching FIPS codes to maps package state names.
+}
+\usage{data(state.fips)}
+\format{
+A list with 6 components, namely "fips", "ssa", "region", division",
+"abb" and "polyname", containing the FIPS, SSA, REGION and DIVISION
+numbers, the standard state abbreviation and the the respective state
+polygon name.
+}
+\seealso{
+\code{\link{county.fips}}
+}
+\keyword{datasets}
diff --git a/src/Makefile b/src/Makefile
index 4cb14fb..2fd87fb 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -51,5 +51,5 @@ world2.line: world.line
@$(CP) world.name world2.name
clean:
- $(RM) $(OBJS) Gmake Lmake world2.* $(PKGNAME).s[lo] $(PKGNAME).dylib
- $(RM) -r ../inst
+ $(RM) $(OBJS) Gmake Lmake world2.* $(PKGNAME).s[lo] $(PKGNAME).dylib *.exe maps.dll
+ $(RM) -r ../inst ../libs
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-maps.git
More information about the debian-science-commits
mailing list