[r-cran-wdi] 02/05: rjson.patch: refresh patch
Sébastien Villemot
sebastien at alioth.debian.org
Sun Sep 8 13:06:43 UTC 2013
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository r-cran-wdi.
commit 55a3fbb6b7b328e41f4f1046cf92d328482691c6
Author: Sébastien Villemot <sebastien at debian.org>
Date: Sun Sep 8 14:48:01 2013 +0200
rjson.patch: refresh patch
---
debian/patches/rjson.patch | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/debian/patches/rjson.patch b/debian/patches/rjson.patch
index 6ddd7a9..4da78c0 100644
--- a/debian/patches/rjson.patch
+++ b/debian/patches/rjson.patch
@@ -1,9 +1,10 @@
Description: Use rjson package instead of RJSONIO
WDI normally uses RJSONIO, which is faster than rjson. Unfortunately, RJSONIO
- is nonfree (it is affected by the infamous "good, not evil" clause).
+ is nonfree (it is affected by the infamous "good, not evil" clause, see
+ #712159).
Author: Sébastien Villemot <sebastien at debian.org>
Forwarded: not-needed
-Last-Update: 2013-06-30
+Last-Update: 2013-09-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/DESCRIPTION
@@ -11,31 +12,31 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -12,7 +12,7 @@
URL: http://www.umich.edu/~varel ,
https://www.github.com/vincentarelbundock/WDI
- Date: 2012-12-04
+ Date: 2013-08-20
-Depends: RJSONIO
+Depends: rjson
Collate: 'WDI.R' 'WDI-package.R' 'WDI_data.R'
- Packaged: 2012-12-04 14:46:31 UTC; hotsauce
- Repository: CRAN
+ Packaged: 2013-08-20 20:36:04 UTC; hotsauce
+ NeedsCompilation: no
--- a/R/WDI.R
+++ b/R/WDI.R
-@@ -62,8 +62,8 @@
+@@ -72,8 +72,8 @@
wdi.dl = function(indicator, country, start, end){
daturl = paste("http://api.worldbank.org/countries/", country, "/indicators/", indicator,
"?date=",start,":",end, "&per_page=25000", "&format=json", sep = "")
-- dat = fromJSON(daturl, nullValue=NA)[[2]]
+- dat = RJSONIO::fromJSON(daturl, nullValue=NA)[[2]]
- dat = lapply(dat, function(j) cbind(j$country[[1]], j$country[[2]], j$value, j$date))
-+ dat = fromJSON(file = daturl)[[2]]
++ dat = rjson::fromJSON(file = daturl)[[2]]
+ dat = lapply(dat, function(j) cbind(j$country[[1]], j$country[[2]], ifelse(is.null(j$value), NA, j$value), j$date))
dat = data.frame(do.call('rbind', dat))
for(i in 1:4){
dat[,i] = as.character(dat[,i])
-@@ -89,14 +89,14 @@
+@@ -103,14 +103,14 @@
WDIcache = function(){
# Series
series_url = 'http://api.worldbank.org/indicators?per_page=25000&format=json'
- series_dat = fromJSON(series_url, nullValue=NA)[[2]]
-+ series_dat = fromJSON(file = series_url)[[2]]
++ series_dat = rjson::fromJSON(file = series_url)[[2]]
series_dat = lapply(series_dat, function(k) cbind(
'indicator'=k$id, 'name'=k$name, 'description'=k$sourceNote,
'sourceDatabase'=k$source[2], 'sourceOrganization'=k$sourceOrganization))
@@ -43,7 +44,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
# Countries
country_url = 'http://api.worldbank.org/countries/all?per_page=25000&format=json'
- country_dat = fromJSON(country_url, nullValue=NA)[[2]]
-+ country_dat = fromJSON(file = country_url)[[2]]
++ country_dat = rjson::fromJSON(file = country_url)[[2]]
country_dat = lapply(country_dat, function(k) cbind(
'iso3c'=k$id, 'iso2c'=k$iso2Code, 'country'=k$name, 'region'=k$region[2],
'capital'=k$capitalCity, 'longitude'=k$longitude, 'latitude'=k$latitude,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-wdi.git
More information about the debian-science-commits
mailing list