diff --git a/.Rbuildignore b/.Rbuildignore index c8deddae82..577f61fcda 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,5 +3,8 @@ Karthik_local.R Makefile man-roxygen man-roxygen/^.*\.Rproj$ +^.*\.Rproj$ ^\.Rproj\.user$ -vignettes/margins.sty \ No newline at end of file +^data-raw$ +vignettes/margins.sty +CONDUCT.md diff --git a/.travis.yml b/.travis.yml index 327d546cd9..3c6be983f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,35 @@ -language: r +language: c -env: - global: - - secure: "cJ1bDRrAdIRjG+JnsQI9CdA4wQJhJJ2DdCNQ3frl8dotk69z61EiGCFW1Ir1cAY5V/NbHvFHp91HDiSo28ggwqRkEPBOGE44ico5gtVaELu3M/EnkWc2ZwQoN1273Vfdm26QYidqrvWrpLZ0XkFl7Q8xgvBswx30MF7y61+0Hv4=" +before_install: + - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh + - chmod 755 ./travis-tool.sh + - ./travis-tool.sh bootstrap + # password is encrypted below + - echo "Sys.setenv('plotly_username' = 'dfvd')" > ~/.Rprofile -r_packages: - - RCurl - - RJSONIO - - lattice - - xtable - - httr +install: + - ./travis-tool.sh install_deps before_script: - - chmod 755 inst/testscripts/.push_test_table.sh + - git config --global user.name "cpsievert" + - git config --global user.email "cpsievert1@gmail.com" + - git clone https://github.com/cpsievert/plotly-test-table.git ../plotly-test-table + +script: + - Rscript -e "devtools::install(); source('tests/testthat.R', chdir = TRUE)" after_success: - - inst/testscripts/.push_test_table.sh + - cd ../plotly-test-table + - ls -R + - Rscript ../plotly/inst/build-push-comment.R + +env: + global: + # plotly_api_key (for posting to plot.ly) + - secure: "eHO4OUmgLusU9i4xSvr3daZxnsMZw3x4FH8BYVEC8Ja+Ey6kkAFFSh2iAC/CqewEYJ7I/M8aIJYqlyTMGRYUgy36WU7iWHAGgaZOU8fIB5dWzMwHbIvS4Naq2sdU7lRT7sxkS+40K1+rplpWDoLF2yt8vSRWo9rjNzp+yc8PjXM=" + # GITHUB_PAT (for pushing to plotly-test-table) + - secure: "LHJONgWOo+98vNeFLI7LSJU3RtbMVszlI79GB8CcXmc2mlgM/UtZ5b6RnkNlhmg3Gj1/uObfm/rIybVTwuS1yNpeKv73+gsZOYhobVXiUGVxdRFG/mg5mbqwyWkkuofjPGFlMZCEMgHim37eZzgjSibwVH1LClRDsCoFMCgvgV0=" + # plotlyjs_full (link to the full offline bundle) + - secure: "ivxfqGwbzpBpVJe+jVcOBktcmLrT38W/ZapAk/FNDu+yaBhag1eCYErAPPx6Snc4GzwatMt22v4SxAqXQF4SAhTRtmrWVaWnbhzuNqpTkiS6IKEd6EqaoyUZvUTgXh1ruyik00zl3ET9898O3vFfqafodljE0lCLVICHq6ANo68=" + # plotlyjs_no_jq (link to the offline bundle w/o jQuery) + - secure: "i5cYEs2lCFSYgrSTHMmzzs8hRwAwiz89GpgM16fqUDQz8T1QMWofNugQInS7fIfKL36FoTz8BaiLs2D98/2kDkkZ0LTHnfrdrY9PO+7D+CmL8QeLLp4atBT0i682nwy8RzEqlvB8yAVQo/i0Eh8tmT97pppddsxttZKoUidfOeA=" diff --git a/CONDUCT.md b/CONDUCT.md new file mode 100644 index 0000000000..52a673e80a --- /dev/null +++ b/CONDUCT.md @@ -0,0 +1,25 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free experience for +everyone, regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. + +Examples of unacceptable behavior by participants include the use of sexual language or +imagery, derogatory comments or personal attacks, trolling, public or private harassment, +insults, or other unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, +commits, code, wiki edits, issues, and other contributions that are not aligned to this +Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed +from the project team. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by +opening an issue or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the Contributor Covenant +(http:contributor-covenant.org), version 1.0.0, available at +http://contributor-covenant.org/version/1/0/0/ diff --git a/DESCRIPTION b/DESCRIPTION index 4a2870eca2..bef8f82a7e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,38 +1,43 @@ Package: plotly -Type: Package -Title: Interactive, publication-quality graphs online. -Version: 0.6.3 -Authors@R: c(person("Chris", "Parmer", role = c("aut", "cre"), +Title: Create interactive web-based graphs via plotly's API +Version: 1.0.0 +Authors@R: c(person("Chris", "Parmer", role = c("aut", "cph"), email = "chris@plot.ly"), person("Scott", "Chamberlain", role = "aut", email = "myrmecocystus@gmail.com"), person("Karthik", "Ram", role = "aut", email = "karthik.ram@gmail.com"), - person("Toby", "Hocking", role="aut", - email="tdhock5@gmail.com"), - person("Marianne", "Corvellec", role="aut", - email="marianne@plot.ly"), - person("Pedro", "Despouy", role="aut", - email="pedro@plot.ly"), - person("Carson", "Sievert", role="aut", - email="cpsievert1@gmail.com")) -Author: Chris Parmer -Maintainer: Marianne Corvellec + person("Toby", "Hocking", role = "aut", + email = "tdhock5@gmail.com"), + person("Marianne", "Corvellec", role = "aut", + email = "marianne@plot.ly"), + person("Pedro", "Despouy", role = "aut", + email = "pedro@plot.ly"), + person("Carson", "Sievert", role = c("aut", "cre"), + email = "cpsievert1@gmail.com")) License: MIT + file LICENSE -Description: An interface to plotly's online graphing tools with desktop R - environments. Send data to a plotly account and view the graphs in a web - browser. Style the graphs with code or with plotly's online interface; - share data and graphs publicly with a url or privately among other plotly - members; access your graphs from anywhere. Example graph: - https://plot.ly/~chris/1638/ +Description: Create interactive web-based graphs via plotly's API. + Easily translate ggplot2 plots to plotly and/or create custom plotly graphs. + Once uploaded to a plotly account, plotly graphs (and the data behind them) + can be viewed and modified in a web browser. URL: https://github.com/ropensci/plotly BugReports: https://github.com/ropensci/plotly/issues Depends: - RCurl, - RJSONIO, ggplot2 Imports: - knitr + scales, + httr, + jsonlite, + magrittr, + digest, + viridis Suggests: + dplyr, maps, - testthat + testthat, + knitr, + devtools, + shiny, + rmarkdown, + RColorBrewer +LazyData: true diff --git a/NAMESPACE b/NAMESPACE index ef4d1bbd1d..e410e5b8db 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,18 +1,34 @@ # Generated by roxygen2 (4.1.1): do not edit by hand +S3method(print,offline) +S3method(print,plotly) +export("%>%") +export(add_trace) +export(embed_notebook) +export(get_figure) export(gg2list) export(ggplot_build2) +export(ggplotly) export(group2NA) +export(knit_print.offline) +export(knit_print.plotly) +export(last_plot) export(layer2traces) +export(layout) +export(offline) export(paramORdefault) +export(plot_ly) export(plotly) -export(set_config_file) -export(set_credentials_file) -export(show_config_file) -export(show_credentials_file) +export(plotlyOutput) +export(plotly_POST) +export(plotly_build) +export(plotly_empty) +export(renderPlotly) export(signup) +export(style) +export(subplot) export(toRGB) -import(RCurl) -import(RJSONIO) import(ggplot2) -import(knitr) +import(httr) +import(jsonlite) +importFrom(magrittr,"%>%") diff --git a/NEWS b/NEWS index 3c86332577..c6d4d0b74e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +1.0.0 -- 31 July 2015 + +A major reworking of package internals which includes a few backwards incompatible changes. + +Major changes include: + +(1) New high-level grammar for expressing Plotly graphs from R (see the `plot_ly()`, `add_trace()`, `layout()`, and `style()` functions). +(2) New print methods which make it easier to create, modify, and embed Plotly graphs. +(3) Added a `subplot()` function for putting several graphs on a single page. +(4) Added the `renderPlotly()` and `plotlyOutput()` functions for embedding plotly graphs in shiny applications. +(5) Added `offline()` function for creating standalone HTML pages via Plotly Offline (see http://purchasing.plot.ly/) + +For more details, see the new vignettes with `browseVignettes(package = "plotly")` and/or the pull request -> https://github.com/ropensci/plotly/pull/226 + 0.6.3 -- 2 June 2015 Add new tests inspired by the R Cookbook distributions #214 diff --git a/R/data.R b/R/data.R new file mode 100644 index 0000000000..eaf4a2bfe4 --- /dev/null +++ b/R/data.R @@ -0,0 +1,23 @@ +#' Wind data +#' +#' Description TBD. +#' +#' @format A data frame with three variables: \code{r}, \code{t}, +#' \code{nms}. +"wind" + +#' Mic data +#' +#' Description TBD. +#' +#' @format A data frame with three variables: \code{r}, \code{t}, +#' \code{nms}. +"mic" + +#' Hobbs data +#' +#' Description TBD. +#' +#' @format A data frame with three variables: \code{r}, \code{t}, +#' \code{nms}. +"hobbs" diff --git a/R/figure.R b/R/figure.R new file mode 100644 index 0000000000..37a62cfb4c --- /dev/null +++ b/R/figure.R @@ -0,0 +1,24 @@ +#' Request a figure object +#' +#' Figure objects work in the same way as plotly objects, but when printed, +#' they overwrite the already existing plotly object +#' (instead of creating a new plotly). +#' +#' @param username corresponding username for the figure. +#' @param id of the Plotly figure. +#' @export +#' @references https://plot.ly/rest/ +#' @examples +#' \dontrun{ +#' # Anyone can obtain the information for a particular plot +#' fig <- get_figure("cpsievert", "559") +#' # If you have proper credentials, you can easily modify +#' layout(fig, title = paste("Modified on ", Sys.time())) +#' } +get_figure <- function(username, id) { + if (missing(username)) username <- verify("username") + if (missing(id)) stop("Please provide a figure id number") + base_url <- file.path(get_domain(), "apigetfile", username, id) + resp <- httr::GET(base_url, plotly_headers(), httr::config(ssl_verifypeer=FALSE)) + process(struct(resp, "figure")) +} diff --git a/R/ggplotly.R b/R/ggplotly.R index 13c80ddf30..cb8ce714cd 100644 --- a/R/ggplotly.R +++ b/R/ggplotly.R @@ -1,3 +1,37 @@ +#' Create plotly graphs using ggplot2 syntax +#' +#' See up-to-date documentation and examples at +#' \url{https://plot.ly/ggplot2} +#' +#' @param p a ggplot object. +#' @seealso \link{signup}, \link{plot_ly} +#' @import httr jsonlite +#' @export +#' @author Carson Sievert +#' @examples \dontrun{ +#' # simple example +#' ggiris <- qplot(Petal.Width, Sepal.Length, data = iris, color = Species) +#' ggplotly(ggiris) +#' +#' # maps!! +#' data(canada.cities, package = "maps") +#' viz <- ggplot(canada.cities, aes(long, lat)) + +#' borders(regions = "canada", name = "borders") + +#' coord_equal() + +#' geom_point(aes(text = name, size = pop), colour = "red", +#' alpha = 1/2, name = "cities") +#' ggplotly(viz) +#' } +#' +ggplotly <- function(p = last_plot()) { + l <- gg2list(p) + hash_plot(p$data, l) +} + +# ---------------------------------------------------------------------------- +# Objects accessed inside gg2list() +# ---------------------------------------------------------------------------- + # calc. the epoch now <- Sys.time() the.epoch <- now - as.numeric(now) @@ -907,8 +941,17 @@ gg2list <- function(p) { flipped.layout[["yaxis"]] <- x } - fig <- list(data=flipped.traces, layout=flipped.layout) - - fig - + l <- list(data = flipped.traces, layout = flipped.layout) + # When auto_unbox is T in jsonlite::toJSON() it doesn't unbox objects of + # class AsIs. We use this in plotly::to_JSON() and tag special fields such as + # x/y/etc so that they don't get unboxed when they are of length 1. + # unfortunately, this conflicts when using I() in qplot. For example, + # qplot(1:10, 1:10, size = I(10)) + un <- function(x) { + if (is.null(x)) return(NA) + if (is.list(x)) lapply(x, un) + else if (inherits(x, "AsIs")) unclass(x) + else x + } + lapply(l, un) } diff --git a/R/offline.R b/R/offline.R new file mode 100644 index 0000000000..05809f20af --- /dev/null +++ b/R/offline.R @@ -0,0 +1,119 @@ +#' Plotly Offline +#' +#' Create a plotly visualization that doesn't require an external plotly server. +#' +#' @param p a plotly object +#' @param height A valid CSS unit. (like "100\%", "600px", "auto") or a number, +#' which will be coerced to a string and have "px" appended. +#' @param width A valid CSS unit. (like "100\%", "600px", "auto") or a number, +#' which will be coerced to a string and have "px" appended. +#' @param out_dir a directory to place the visualization. +#' If \code{NULL}, a temporary directory is used when the offline object is printed. +#' @param open_browser open the visualization after creating it? +#' @author Carson Sievert +#' @return a plotly object of class "offline" +#' @references \url{http://purchasing.plot.ly/} +#' @export +#' @examples \dontrun{ +#' # If you purchased plotly offline, you should've received a private link +#' # to the source files. You may use this code to install them +#' link <- "private link" # put the link you received here +#' tmp <- tempfile(fileext = ".zip") +#' js_dir <- "~/.plotly/plotlyjs" +#' download.file(link, tmp) +#' if (!dir.exists(js_dir)) dir.create(js_dir, recursive = TRUE) +#' unzip(tmp, exdir = js_dir) +#' unlink(tmp) +#' +#' # now start making offline plots! +#' p <- plot_ly(data = iris, x = Sepal.Width, y = Sepal.Length, color = Species, +#' mode = "markers") +#' offline(p) +#' +#' # works with ggplot2 +#' gg <- qplot(data = iris, x = Sepal.Width, y = Sepal.Length, color = Species) +#' offline(gg) +#' +#' # also works with shiny/rmarkdown +#' shiny::runApp(system.file("examples/UN_Simple", package = "plotly")) +#' } +#' + +offline <- function(p = last_plot(), height = 400, width = "100%", + out_dir = NULL, open_browser = interactive()) { + haz <- has_offline() + if (!haz) offline_stop() + p <- plotly_build(p) + structure( + list( + data = to_JSON(p$data), + layout = to_JSON(p$layout), + id = digest::digest(p), + height = if (is.numeric(height)) paste0(height, "px") else height, + width = if (is.numeric(width)) paste0(width, "px") else width, + out_dir = out_dir, + viewer = if (open_browser) get_browser() + ), + class = "offline" + ) +} + +new_offline <- function(data, layout, height, width, id) { + sprintf( + '
Drawing...
', + id, id, height, width, id, data, layout, id + ) +} + +has_offline <- function() { + off <- Sys.getenv("plotly_offline") + bundles <- c("plotly-matlab-offline-bundle.js", + "plotly-ipython-offline-bundle.js") + haz <- all(bundles %in% list.files(off)) + # if bundles don't exist and a zip does try to unzip + if (!haz) { + zipf <- paste0(off, ".zip") + if (file.exists(zipf)) { + dir.create(off, showWarnings = FALSE, recursive = TRUE) + unzip(zipf, exdir = off) + haz <- all(bundles %in% list.files(off)) + } + } + # return the path as well as T/F + setNames(haz, off) +} + +offline_stop <- function() { + stop("Required source files are not located under ", + Sys.getenv("plotly_offline"), "\n\n", + "If you have Plotly Offline, and those files are located under a different \n", + "directory, you can change the default search path: \n ", + " Sys.setenv('plotly_offline' = '/path/to/plotlyjs') \n", + "If you don't have Plotly Offline, you may purchase it here: \n", + " http://purchasing.plot.ly \n", + "If you have any questions, please contact team@plot.ly", call. = FALSE) +} + +offline_bundle <- function(jq = FALSE) { + haz <- has_offline() + if (!haz) offline_stop() + # ipython already has jQuery, and so does shiny + f <- if (jq) "plotly-matlab-offline-bundle.js" else "plotly-ipython-offline-bundle.js" + file.path(names(haz), f) +} + +get_browser <- function() { + # Try to view an 'embedded' version in RStudio preview. This was + # copied/adapted from Yihui Xie's work on servr -- + # https://github.com/yihui/servr/blob/39a61972e278adc5bbd49a74c68de858bb2c144f/R/utils.R#L55-L69 + browseR = if ('tools:rstudio' %in% search()) getOption('viewer') else { + if (Sys.getenv('RSTUDIO') == '1') getFromNamespace('viewer', 'rstudioapi') + } + # rstudioapi::viewer() does not seem to work when a separate R session is + # launched from RStudio, so we need to try() and if it fails, fall back to the + # default web browser + if (is.null(browseR) || !is.function(browseR) || + inherits(try(browseR('http://www.rstudio.com'), silent = TRUE), 'try-error')) + browseR = getOption("browser") + browseR +} diff --git a/R/pipe.R b/R/pipe.R new file mode 100644 index 0000000000..c2a38452de --- /dev/null +++ b/R/pipe.R @@ -0,0 +1,11 @@ +#' Pipe operator +#' +#' See \code{\link[magrittr]{\%>\%}} for more details. +#' +#' @name %>% +#' @rdname pipe +#' @keywords internal +#' @export +#' @importFrom magrittr %>% +#' @usage lhs \%>\% rhs +NULL diff --git a/R/plotly-package.r b/R/plotly-package.r deleted file mode 100644 index 29ee33cbd0..0000000000 --- a/R/plotly-package.r +++ /dev/null @@ -1,32 +0,0 @@ -#' plot.ly is a browser-based data visualization tool that creates interactive and publication -#' quality figures. This API allows R users to generate plot.ly graphs from their desktop -#' R environment. -#' -#' An example of an interactive graph made from the R API: https://plot.ly/~chris/407/ -#' -#' \itemize{ -#' \item Package: plotly -#' \item Type: Package -#' \item Version: 0.6.3 -#' \item Date: 2014-03-07 -#' \item License: MIT -#' } -#' -#' @section Authentication: -#' -#' There are a few different options. First, you can pass in your username and key -#' to the \code{plotly} function as parameters, like \code{plotly(, -#' )}. Second, you can set your username and key as options temporarily -#' within each R session by executing \code{options(plotlyUsername='')} -#' and \code{options(plotlyKey='')}. Third, you set your username and key -#' permanently (until removed) in your .Rprofile file. Put entries in for each of -#' username and password: \code{options(plotlyUsername='')} and -#' \code{options(plotlyKey='')}. -#' -#' @author Chris Parmer chris@@plot.ly -#' @references Documentation and examples at https://plot.ly/API -#' @name plotly-package -#' @docType package -#' @title A R API for plot.ly -#' @keywords package -NULL diff --git a/R/plotly.R b/R/plotly.R index b0b057b00c..5532c0bcb3 100644 --- a/R/plotly.R +++ b/R/plotly.R @@ -1,241 +1,446 @@ -#' Main interface to plotly +#' Initiate a plotly visualization +#' +#' Transform data into a plotly visualization. #' -#' Plotly interface object. See up-to-date documentation and examples at -#' https://plot.ly/API +#' There are a number of "visual properties" that aren't included in the officical +#' Reference section (see below). #' -#' @description -#' A call to \code{plotly(username, key)} creates an object of class -#' 'PlotlyClass', which has methods: -#' \itemize{ -#' \item Plotting: py$plotly(x1, y1[, x2, y2, ...], kwargs=kwargs) or -#' py$plotly({data1[, data2, ...]}, kwargs=kwargs), py$ggplotly() -#' \item Styling Data: py$style(data1,data2,..., kwargs=kwargs) -#' \item Styling Layout: py$layout(layout, kwargs=kwargs) -#' \item Utilities: py$get_figure(file_owner, file_id) +#' @param data A data frame (optional). +#' @param ... These arguments are documented in the references section below. +#' Note that acceptable arguments depend on the trace type. +#' @param type A charater string describing the type of trace. +#' @param group Either a variable name or a vector to use for grouping. If used, +#' a different trace will be created for each unique value. +#' @param color Either a variable name or a vector to use for color mapping. +#' @param colors Either a colorbrewer2.org palette name (e.g. "YlOrRd" or "Blues"), +#' or a vector of colors to interpolate in hexadecimal "#RRGGBB" format, +#' or a color interpolation function like \link{grDevices::colorRamp}. +#' @param symbol Either a variable name or a (discrete) vector to use for symbol encoding. +#' @param symbols A character vector of symbol types. Possible values: +#' 'dot', 'cross', 'diamond', 'square', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-up' +#' @param size A variable name or numeric vector to encode the size of markers. +#' @param inherit should future traces inherit properties from this initial trace? +#' @param evaluate logical. Evaluate arguments when this function is called? +#' @seealso \code{\link{layout}()}, \code{\link{add_trace}()}, \code{\link{style}()} +#' @references \url{https://plot.ly/r/reference/} +#' @author Carson Sievert +#' @export +#' @examples +#' \dontrun{ +#' data(economics, package = "ggplot2") +#' # basic time-series plot +#' p <- plot_ly(economics, x = date, y = uempmed, type = "scatter", +#' showlegend = FALSE) +#' # add a loess smoother +#' p2 <- add_trace(p, y = fitted(loess(uempmed ~ as.numeric(date)))) +#' # add a title +#' p3 <- layout(p2, title = "Median duration of unemployment (in weeks)") +#' # change the font +#' layout(p3, font = list(family = "Courier New, monospace")) +#' +#' # sometimes, a data frame isn't fit for the use case... +#' # for 3D surface plots, a numeric matrix is more natural +#' plot_ly(z = volcano, type = "surface") #' } #' -#' @import knitr -#' @import RJSONIO -#' @param username plotly username -#' @param key plotly API key -#' @param base_url plotly server +plot_ly <- function(data = data.frame(), ..., type = "scatter", + group, color, colors, symbol, symbols, size, + inherit = TRUE, evaluate = FALSE) { + # "native" plotly arguments + argz <- substitute(list(...)) + # tack on "special" arguments + if (!missing(group)) argz$group <- substitute(group) + if (!missing(color)) argz$color <- substitute(color) + if (!missing(colors)) argz$colors <- substitute(colors) + if (!missing(symbol)) argz$symbol <- substitute(symbol) + if (!missing(symbols)) argz$symbols <- substitute(symbols) + if (!missing(size)) argz$size <- substitute(size) + # trace information + tr <- list( + type = type, + args = argz, + env = list2env(data), # environment in which to evaluate arguments + enclos = parent.frame(), # if objects aren't found in env, look here + inherit = inherit + ) + # plotly objects should always have a _list_ of trace(s) + p <- list( + data = list(tr), + layout = NULL, + url = NULL + ) + if (evaluate) p <- plotly_build(p) + hash_plot(data, p) +} + +#' Add a trace to a plotly visualization #' -#' @return An object of class PlotlyClass, except for the final object after -#' adding layers becomes a list class. -#' @details See documentation and examples at https://plot.ly/API -#' @references https://plot.ly/API -#' @author Chris Parmer chris@@plot.ly +#' @param p A plotly object. +#' @param ... These arguments are documented in the references section below. +#' Note that acceptable arguments depend on the trace type. +#' @param group Either a variable name or a vector to use for grouping. If used, +#' a different trace will be created for each unique value. +#' @param color Either a variable name or a vector to use for color mapping. +#' @param colors Either a colorbrewer2.org palette name (e.g. "YlOrRd" or "Blues"), +#' or a vector of colors to interpolate in hexadecimal "#RRGGBB" format, +#' or a color interpolation function like \link{grDevices::colorRamp}. +#' @param symbol Either a variable name or a (discrete) vector to use for symbol encoding. +#' @param symbols A character vector of symbol types. Possible values: +#' 'dot', 'cross', 'diamond', 'square', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-up' +#' @param size A variable name or numeric vector to encode the size of markers. +#' @param data A data frame to associate with this trace (optional). If not +#' provided, arguments are evaluated using the data frame in \code{\link{plot_ly}()}. +#' @param evaluate logical. Evaluate arguments when this function is called? +#' @seealso \code{\link{plot_ly}()} +#' @references \url{https://plot.ly/r/reference/} +#' @author Carson Sievert #' @export -#' @examples \dontrun{ -#' ## View https://plot.ly/API for more examples -#' ## Generate a simple plot -#' username <- 'anna.lyst' # fill in with your plotly username -#' api_key <- 'y37zkd' # fill in with your plotly API key -#' py <- plotly(username, api_key) -#' ## generate some data -#' x <- c(0, 1, 2) -#' y <- c(10, 11, 12) #' -#' ## Send data to Plotly. Plotly will render an interactive graph and will -#' ## return a URL where you can view your plot -#' ## This call sends data to Plotly, Plotly renders an interactive -#' ## graph, and returns a URL where you can view your plot -#' response <- py$plot(x, y) -#' response$url # view your plot at this URL -#' browseURL(response$url) # use browseURL to go to the URL in your browser -#' -#' ## Export ggplots directly to plot.ly -#' ggiris <- qplot(Petal.Width, Sepal.Length, data=iris, color=Species) -#' py$ggplotly(ggiris) -#' data(canada.cities, package="maps") -#' viz <- ggplot(canada.cities, aes(long, lat)) + -#' borders(regions="canada", name="borders") + -#' coord_equal() + -#' geom_point(aes(text=name, size=pop), colour="red", -#' alpha=1/2, name="cities") -#' py$ggplotly(viz) -#' } +add_trace <- function(p = last_plot(), ..., + group, color, colors, symbol, symbols, size, + data = NULL, evaluate = FALSE) { + # "native" plotly arguments + argz <- substitute(list(...)) + # tack on "special" arguments + if (!missing(group)) argz$group <- substitute(group) + if (!missing(color)) argz$color <- substitute(color) + if (!missing(colors)) argz$colors <- substitute(colors) + if (!missing(symbol)) argz$symbol <- substitute(symbol) + if (!missing(symbols)) argz$symbols <- substitute(symbols) + if (!missing(size)) argz$size <- substitute(size) + data <- data %||% if (is.data.frame(p)) p else list() + tr <- list( + args = argz, + env = list2env(data), + enclos = parent.frame() + ) + p <- last_plot(p) + p$data <- c(p$data, list(tr)) + if (evaluate) p <- plotly_build(p) + hash_plot(data, p) +} +#' Add and/or modify layout of a plotly +#' +#' @param p A plotly object. +#' @param ... Arguments to the layout object. For documentation, +#' see \url{https://plot.ly/r/reference/#Layout_and_layout_style_objects} +#' @param data A data frame to associate with this layout (optional). If not +#' provided, arguments are evaluated using the data frame in \code{\link{plot_ly}()}. +#' @param evaluate logical. Evaluate arguments when this function is called? +#' @author Carson Sievert +#' @export +#' +layout <- function(p = last_plot(), ..., + data = NULL, evaluate = FALSE) { + data <- data %||% if (is.data.frame(p)) p else list() + layout <- list( + args = substitute(list(...)), + env = list2env(data), + enclos = parent.frame() + ) + p <- last_plot(p) + p$layout <- c(p$layout, list(layout)) + if (evaluate) p <- plotly_build(p) + hash_plot(data, p) +} -plotly <- function(username=NULL, key=NULL, base_url=NULL) { - - if (is.null(username)) { - username <- get_credentials_file(c("username", "api_key"))$username - } - if (is.null(key)) { - key <- get_credentials_file(c("username", "api_key"))$api_key - } - if (is.null(username) || username == "" || is.null(key) || key == "") { - stop("Credentials Not Found!\n -It looks like you haven't set up your Plotly account credentials yet.\n -To get started, save your plotly username and API key by calling:\n -> set_credentials_file(UserName, ApiKey)\n -For more help, see https://plot.ly/R or contact .") +#' Modify trace(s) +#' +#' Modify trace(s) of an existing plotly visualization. Useful when used in +#' conjunction with \code{\link{get_figure}()}. +#' +#' @param p A plotly visualization. +#' @param ... Visual properties. +#' @param traces numeric vector. Which traces should be modified? +#' @param evaluate logical. Evaluate arguments when this function is called? +#' @seealso \code{\link{get_figure}()} +#' @author Carson Sievert +#' @export +#' +style <- function(p = last_plot(), ..., traces = 1, evaluate = FALSE) { + idx <- traces >= length(p$data) + if (any(idx)) warning("You've referenced non-existent traces", call. = FALSE) + style <- list( + args = substitute(list(...)), + # not optimal.... + env = p$data[[max(traces)]]$env, + enclos = parent.frame(), + traces = traces + ) + p$style <- c(p$style, list(style)) + if (evaluate) p <- plotly_build(p) + hash_plot(data, p) +} + +#' Build a plotly object before viewing it +#' +#' For convenience and efficiency purposes, plotly objects are subject to lazy +#' evaluation. That is, the actual content behind a plotly object is not +#' created until it is absolutely necessary. In some instances, you may want +#' to perform this evaluation yourself, and work directly with the resulting +#' list. +#' +#' @param l a ggplot object, or a plotly object, or a list. +#' @export +plotly_build <- function(l = last_plot()) { + # ggplot objects don't need any special type of handling + if (is.ggplot(l)) return(gg2list(l)) + l <- get_plot(l) + # plots without NSE don't need it either + nmz <- c(lapply(l$data, names), lapply(l$layout, names), lapply(l$style, names)) + if (!all(c("args", "env") %in% unlist(nmz))) return(structure(l, class = unique("plotly", class(l)))) + # assume unnamed list elements are data/traces + nms <- names(l) + idx <- nms %in% "" + l <- if (is.null(nms)) { + list(data = l) + } else if (any(idx)) { + c(data = c(l$data, l[idx]), l[!idx]) + } else l + dats <- list() + for (i in seq_along(l$data)) { + d <- l$data[[i]] + # if appropriate, evaluate trace arguments in a suitable environment + idx <- names(d) %in% c("args", "env") + if (sum(idx) == 2) { + dat <- c(d[!idx], eval(d$args, as.list(d$env), d$enclos)) + dat[c("args", "env", "enclos")] <- NULL + # start processing specially named arguments + s <- dat[["size"]] + if (!is.null(s)) { + if (!is.numeric(s)) warning("size should be numeric", call. = FALSE) + # if autosizing is used, guess that the plot is 300 by 600 + auto <- dat[["layout"]][["autosize"]] %||% TRUE + hw <- if (auto) c(300, 600) + else c(dat[["layout"]][["height"]], dat[["layout"]][["width"]]) + # ensure that markers cover 30% of the plot area + m <- list( + size = 0.3 * prod(hw) * (s/sum(s)), + sizemode = "area" + ) + # the marker object is the only type of object which respects size + dat[["marker"]] <- modifyList(dat[["marker"]] %||% list(), m) + # either add some appropriate hover text + txt <- paste0(as.list(d$args)[["size"]], " (size): ", s) + dat[["text"]] <- if (is.null(dat[["text"]])) txt else paste0(dat[["text"]], "
", txt) + } + has_color <- !is.null(dat[["color"]]) || + isTRUE(!is.null(dat[["z"]]) && !dat[["type"]] %in% "scatter3d") + has_symbol <- !is.null(dat[["symbol"]]) + has_group <- !is.null(dat[["group"]]) + if (has_color) { + title <- as.list(d$args)[["color"]] %||% as.list(d$args)[["z"]] %||% "" + dats <- c(dats, colorize(dat, title)) + } + # TODO: add a legend title (is this only possible via annotations?!?) + if (has_symbol) dats <- c(dats, symbolize(dat)) + if (has_group) dats <- c(dats, traceify(dat, "group")) + if (!has_color && !has_symbol && !has_group) dats <- c(dats, list(dat)) + } else { + dats <- c(dats, list(d)) + } } - # Plotly server - if (is.null(base_url)) { - base_url <- get_config_file("plotly_domain")$plotly_domain + x <- list(data = dats) + # carry over properties/data from first trace (if appropriate) + if (length(x$data) > 1 && isTRUE(l$data[[1]]$inherit)) { + for (i in seq.int(2, length(x$data))) { + x$data[[i]] <- modifyList(x$data[[1]], x$data[[i]]) + } } - if (is.null(base_url) || base_url == "") { - base_url <- "https://plot.ly" + # layout() tacks on an unnamed list element to potentially pre-existing + # layout(s). Note that ggplotly() will return a named list + # of length n >= 1 (so we need to carefully merge them ). + nms <- names(l$layout) + if (!is.null(nms) && any(idx <- nms %in% "")) { + # TODO: does this always preserve the correct order to layouts? + # (important since we use modifyList at a later point) + l$layout <- c(list(l$layout[!idx]), l$layout[idx]) } - - # public attributes/methods that the user has access to - pub <- list(username=username, key=key, filename="from api", fileopt=NULL, - version="0.6.3") - priv <- list() - - pub$makecall <- function(args, kwargs, origin) { - if (is.null(kwargs$filename)) - kwargs$filename <- pub$filename - if (is.null(kwargs$fileopt)) - kwargs$fileopt <- pub$fileopt - url <- paste(base_url, "/clientresp", sep="") - - respst <- postForm(url, platform="R", version=pub$version, - args=toJSON(args, digits=50, collapse=""), un=pub$username, - key=pub$key, origin=origin, - kwargs=toJSON(kwargs, digits=50, collapse=""), - .opts=list(sslversion=1, # 1 is for TLSv1 - cainfo=system.file("CurlSSL", - "cacert.pem", - package="RCurl"))) - if (is.raw(respst)) { - respst <- rawToChar(respst) + for (i in seq_along(l$layout)) { + layout <- l$layout[[i]] + idx <- names(layout) %in% c("args", "env") + x$layout[[i]] <- if (sum(idx) == 2) { + c(layout[!idx], eval(layout$args, as.list(layout$env), layout$enclos)) + } else { + layout } - - resp <- fromJSON(respst, simplify = FALSE) - if (!is.null(kwargs$filename)) - resp$filename <- kwargs$filename - if (!is.null(resp$error)) - cat(resp$err) - if (!is.null(resp$warning)) - cat(resp$warning) - if (!is.null(resp$message)) - cat(resp$message) - return(resp) } - priv$plotly_hook <- function(before, options, envir) { - if (!before) { - # set width and height from options or default square - w <- if(is.null(options[["width"]])) "600" else options[["width"]] - h <- if(is.null(options[["height"]])) "600" else options[["height"]] - paste("", sep="") + x$layout <- Reduce(modifyList, x$layout) + # if style is not null, use it to modify existing traces + if (!is.null(l$style)) { + for (i in seq_along(l$style)) { + sty <- l$style[[i]] + idx <- names(sty) %in% c("args", "env") + new_sty <- if (sum(idx) == 2) c(sty[!idx], eval(sty$args, as.list(sty$env), sty$enclos)) else sty + for (k in sty$traces) x$data[[k]] <- modifyList(x$data[[k]], new_sty) } } - - pub$plotly <- function(..., kwargs = list(filename = NULL, fileopt = NULL)) { - args <- list(...) - return(pub$makecall(args = args, kwargs = kwargs, origin = "plot")) + # add appropriate axis title (if they don't already exist) + x <- axis_titles(x, l) + # tack on other keyword arguments, if necessary + idx <- !names(l) %in% c("data", "layout") + if (any(idx)) x <- c(x, l[idx]) + for (i in seq_along(x$data)) { + # if any traces don't have a type, fall back on scatter + # (this could happen if inherit = FALSE in plot_ly() and add_trace() + # doesn't have a type argument) + d <- x$data[[i]] + x$data[[i]][["type"]] <- d[["type"]] %||% "scatter" + # some object keys require an array, even if length one + # one way to ensure atomic vectors of length 1 are not automatically unboxed, + # by to_JSON(), is to attach a class of AsIs (via I()) + idx <- names(d) %in% get_boxed() & sapply(d, length) == 1 + if (any(idx)) x$data[[i]][idx] <- lapply(d[idx], I) } - pub$ggplotly <- function(gg=last_plot(), kwargs=list(filename=NULL, - fileopt=NULL, - width=NULL, - height=NULL), - session="interactive") { - if(!is.ggplot(gg)){ - stop("gg must be a ggplot") - } - fig <- gg2list(gg) - if (!"auto_open" %in% names(kwargs)) { - kwargs <- c(kwargs, auto_open=TRUE) - } - - pargs <- fig$data - pargs$kwargs <- kwargs - pargs$kwargs$layout <- fig$layout - - if (session == "interactive") { # we are on the command line - resp <- do.call(pub$plotly, pargs) - if (pargs$kwargs$auto_open) { - browseURL(resp$url) - } - invisible(list(data=pargs, response=resp)) - } else if (session == "notebook") { # we are in the IR notebook - do.call(pub$irplot, pargs) - invisible(list(data=pargs)) - } else if (session == "knitr") { # we are in knitr/RStudio - do.call(pub$iplot, pargs) - invisible(list(data=pargs)) + # search for keyword args in traces and place them at the top level + kwargs <- lapply(x$data, function(z) z[get_kwargs()]) + if (length(kwargs) == 1) kwargs <- c(kwargs, kwargs) + x <- c(x, Reduce(modifyList, kwargs)) + # traces shouldn't have any names + x$data <- setNames(x$data, NULL) + # add plotly class mainly for printing method + structure(x, class = unique("plotly", class(x))) +} + +# returns a _list of traces_. +colorize <- function(dat, title = "") { + cols <- dat[["color"]] %||% dat[["z"]] + if (is.numeric(cols)) { + # by default, use viridis::viridis(10) -> http://rud.is/b/2015/07/20/using-the-new-viridis-colormap-in-r-thanks-to-simon-garnier/ + colors <- dat[["colors"]] %||% viridis::viridis(10) + cols <- as.vector(cols) + rng <- range(cols, na.rm = TRUE) + x <- seq(min(rng), max(rng), length.out = 10) + colz <- scales::col_numeric(colors, rng, na.color = "transparent")(x) + df <- if (length(cols) > 1) data.frame(scales::rescale(x), colz) + else data.frame(c(0, 1), rep(colz, 2)) + col_list <- list( + colorbar = list(title = as.character(title)), + colorscale = setNames(df, NULL) + ) + # scatter-like traces can have both line and marker objects + if (grepl("scatter", dat[["type"]] %||% "scatter")) { + col_list$color <- cols + dat[["marker"]] <- modifyList(col_list, dat[["marker"]] %||% list()) + #mode <- dat[["mode"]] %||% "markers+lines" + # can't have a colorscale for both markers and lines??? + #dat[["line"]] <- modifyList(col_list, dat[["line"]] %||% list()) } else { - stop("Value of session can be: 'interactive', 'notebook', or 'knitr'.") + dat <- c(dat, col_list) } + dat <- list(dat) + } else { # discrete color scale + dat <- traceify(dat, "color") + lvls <- unlist(lapply(dat, function(x) unique(x[["color"]]))) + N <- length(lvls) + default <- if (is.ordered(cols)) viridis::viridis(N) + else RColorBrewer::brewer.pal(N, "Set2") + colors <- dat[[1]][["colors"]] %||% default + colz <- scales::col_factor(colors, levels = lvls, na.color = "transparent")(lvls) + dat <- Map(function(x, y) { x[["marker"]] <- c(x[["marker"]], list(color = y)); x }, + dat, colz) } - pub$get_figure <- function(file_owner, file_id) { - headers <- c("plotly-username"=pub$username, - "plotly-apikey"=pub$key, - "plotly-version"=pub$version, - "plotly-platform"="R") - response_handler <- basicTextGatherer() - header_handler <- basicTextGatherer() - curlPerform(url=paste(base_url, "apigetfile", file_owner, file_id, - sep="/"), - httpheader=headers, - writefunction=response_handler$update, - headerfunction=header_handler$update, - .opts=list(sslversion=1, # 1 is for TLSv1 - cainfo=system.file("CurlSSL", "cacert.pem", - package="RCurl"))) - resp_header <- as.list(parseHTTPHeader(header_handler$value())) - - # Parse status - if (resp_header$status != "200") { - cat(resp_header$statusMsg) - stop(resp_header$status) + dat <- lapply(dat, function(x) { x$color <- NULL; x$colors <- NULL; x }) + dat +} + +symbolize <- function(dat) { + # symbols really only make sense when markers are in the mode, right? + dat$mode <- dat$mode %||% "markers" + dat <- traceify(dat, "symbol") + dat <- lapply(dat, function(x) { x$symbol <- NULL; x }) + N <- length(dat) + if (N > 8) warning("Plotly supports 8 different symbols, but you have ", N, " levels!") + symbols <- c('dot', 'cross', 'diamond', 'square', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-up') + sym <- dat[[1]][["symbols"]][seq_len(N)] %||% symbols[seq_len(N)] + dat <- Map(function(x, y) { x$marker$symbol <- y; x }, dat, sym) + dat +} + +# break up a single trace into multiple traces according to values stored +# a particular key name +traceify <- function(dat, nm = "group") { + x <- dat[[nm]] + if (is.null(x)) { + return(list(dat)) + } else { + # the order of lvls determines the order in which traces are drawn + # for ordered factors at least, it makes sense to draw the highest level first + # since that _should_ be the darkest color in a sequential pallette + lvls <- if (is.factor(x)) rev(levels(x)) else unique(x) + n <- length(x) + # recursively search for a non-list of appropriate length (if it is, subset it) + recurse <- function(z, n, idx) { + if (is.list(z)) lapply(z, recurse, n, idx) else if (length(z) == n) z[idx] else z } - - body_string <- response_handler$value() - resp <- RJSONIO::fromJSON(body_string) - if (!is.null(resp$error) && resp$error != "") - stop(resp$err) - if (!is.null(resp$warning) && resp$error != "") - cat(resp$warning) - if (!is.null(resp$message) && resp$error != "") - cat(resp$message) - - resp$payload$figure - } - pub$iplot <- function(..., kwargs = list(filename = NULL, fileopt = NULL)) { - # Embed plotly graphs as iframes for knitr documents - r <- pub$plotly(..., kwargs = kwargs) - # bind url to the knitr options and pass into the plotly knitr hook - knit_hooks$set(plotly = function(before, options, envir) { - options[["url"]] <- r[["url"]] - priv$plotly_hook(before, options, envir) - }) - } - pub$irplot <- function(..., kwargs=list(filename=NULL, fileopt=NULL, - width=NULL, height=NULL)) { - # Embed plotly graphs as iframes in IR notebooks - r <- pub$plotly(..., kwargs=kwargs) - w <- if (is.null(kwargs$width)) "100%" else kwargs$width - h <- if (is.null(kwargs$height)) "525" else kwargs$height - html <- paste("", sep="") - require(IRdisplay) - display_html(html) + new_dat <- list() + for (j in seq_along(lvls)) { + new_dat[[j]] <- lapply(dat, function(y) recurse(y, n, x %in% lvls[j])) + new_dat[[j]]$name <- lvls[j] + } + return(new_dat) } - pub$embed <- function(url) { - # knitr hook - knit_hooks$set(plotly = function(before, options, envir) { - options[["url"]] <- url - priv$plotly_hook(before, options, envir) - }) +} + +axis_titles <- function(x, l) { + d <- l$data[[1]] + argz <- as.list(d$args) + scene <- if (isTRUE(d$type %in% c("scatter3d", "surface"))) TRUE else FALSE + for (i in c("x", "y", "z")) { + ax <- paste0(i, "axis") + t <- x$layout[[ax]]$title + if (is.null(t)) { + idx <- which(names(argz) %in% i) + if (length(idx)) { + title <- if (is.language(argz[[idx]])) deparse(argz[[idx]]) else i + if (scene) x$layout[["scene"]][[ax]]$title <- title + else x$layout[[ax]]$title <- title + } + } } - pub$layout <- function(..., kwargs = list(filename = NULL, fileopt = NULL)) { - args <- list(...) - return(pub$makecall(args = args, kwargs = kwargs, origin = "layout")) + x +} + +#' Create a complete empty plotly graph. +#' +#' Useful when used with \link{subplot} +#' +#' @export +plotly_empty <- function() { + eaxis <- list( + showticklabels = FALSE, + showgrid = FALSE, + zeroline = FALSE + ) + layout(plot_ly(), xaxis = eaxis, yaxis = eaxis) +} + + +#' Main interface to plotly +#' +#' Deprecated: see \link{signup} for credentials/configuration storage details. +#' See \link{ggplotly} for the new ggplot2 interface. +#' +#' @param username plotly username +#' @param key plotly API key +#' @export +plotly <- function(username, key) { + + if (!missing(username)) { + message("Storing 'username' as the environment variable 'plotly_username'") + Sys.setenv("plotly_username" = username) + } else { + usr <- verify("username") } - pub$style <- function(..., kwargs = list(filename = NULL, fileopt = NULL)) { - args <- list(...) - cat(kwargs) - return(pub$makecall(args = args, kwargs = kwargs, origin = "style")) + if (!missing(key)) { + message("Storing 'key' as the environment variable 'plotly_api_key'") + Sys.setenv("plotly_api_key" = key) + } else { + key <- verify("api_key") } - # wrap up the object - pub <- list2env(pub) - class(pub) <- "PlotlyClass" - return(pub) + + .Deprecated("ggplotly") + .Deprecated("plot_ly") + invisible(NULL) } diff --git a/R/plotly_POST.R b/R/plotly_POST.R new file mode 100644 index 0000000000..fe94adcf5e --- /dev/null +++ b/R/plotly_POST.R @@ -0,0 +1,74 @@ +#' Create/Modify plotly graphs +#' +#' POST messages to the clientresp resource of plotly's REST API. Unlike \link{ggplotly}, +#' this function does not translate ggplot objects. +#' +#' @param x either a plotly object or a list. +#' @export +#' @references https://plot.ly/rest/ +#' @seealso \link{signup} +#' @return An R object created by mapping the JSON content of the plotly API +#' response to its R equivalent. +#' @author Carson Sievert +#' @examples +#' \dontrun{ +#' # If you want, you can still construct lists by hand... +#' trace1 <- list( +#' x = c(1, 2, 3, 4), +#' y = c(10, 15, 13, 17), +#' type = "scatter" +#' ) +#' trace2 <- list( +#' x = c(1, 2, 3, 4), +#' y = c(16, 5, 11, 9), +#' type = "scatter" +#' ) +#' plotly_POST(list(trace1, trace2)) +#' } + +plotly_POST <- function(x) { + x <- plotly_build(x) + # empty keyword arguments can cause problems + kwargs <- x[get_kwargs()] + kwargs <- kwargs[sapply(kwargs, length) > 0] + + # filename & fileopt are keyword arguments required by the API + # (note they can also be specified by the user) + + if (!is.null(x$url) || !is.null(kwargs$filename)) kwargs$fileopt <- "overwrite" + if (is.null(kwargs$filename)) { + kwargs$filename <- + as.character(kwargs$layout$title) %||% + paste( + c(kwargs$layout$xaxis$title, + kwargs$layout$yaxis$title, + kwargs$layout$zaxis$title), + collapse = " vs. " + ) %||% + "plot from api" + } + if (is.null(kwargs$fileopt)) kwargs$fileopt <- "new" + # ugh, annotations _must_ be an _array_ of object(s)... + a <- kwargs$layout$annotations + if (!is.null(a) && !is.null(names(a))) { + kwargs$layout$annotations <- list(kwargs$layout$annotations) + } + # construct body of message to plotly server + bod <- list( + un = verify("username"), + key = verify("api_key"), + origin = if (is.null(x$origin)) "plot" else x$origin, + platform = "R", + version = as.character(packageVersion("plotly")), + args = to_JSON(x$data), + kwargs = to_JSON(kwargs) + ) + base_url <- file.path(get_domain(), "clientresp") + resp <- httr::POST(base_url, body = bod) + con <- process(struct(resp, "clientresp")) + msg <- switch(kwargs$fileopt, + new = "Success! Created a new plotly here -> ", + overwrite = "Success! Modified your plotly here -> ") + message(msg, con$url) + con +} diff --git a/R/print.R b/R/print.R new file mode 100644 index 0000000000..0dce7a89f1 --- /dev/null +++ b/R/print.R @@ -0,0 +1,111 @@ +# ---------------------------------------------------------------------------- +# Printing methods +# ---------------------------------------------------------------------------- + +#' Print a plotly object +#' +#' @param x an object with class 'plotly' +#' @param ... other arguments +#' @export +print.plotly <- function(x, ...) { + l <- plotly_POST(x) + if (!is.null(l$url)) { + if (httr::url_ok(l$url) && interactive()) browseURL(l$url) + } + # get_figure() instead? + invisible(l) +} + +#' Embed a plotly iframe into an R markdown document via \code{knit_print} +#' @param x named list of ggplots and option lists to pass to \code{animint2dir}. +#' @param options knitr options. +#' @param ... placeholder. +#' @export +#' @references https://github.com/yihui/knitr/blob/master/vignettes/knit_print.Rmd +knit_print.plotly <- function(x, options, ...) { + if (!requireNamespace("knitr")) { + warning("Please install.packages('knitr')") + return(x) + } + resp <- print(x) + w <- if (is.null(options[["width"]])) "800" else options[["width"]] + h <- if (is.null(options[["height"]])) "600" else options[["height"]] + iframe <- plotly_iframe(resp$url, w, h) + knitr::asis_output(iframe) +} + +#' Print an "offline" (local) plotly object +#' +#' @param x an object with class 'offline' +#' @param ... other arguments +#' @export +print.offline <- function(x, ...) { + off <- offline_bundle(jq = TRUE) + plotlyjs <- readChar(off, file.info(off)$size) + html <- sprintf( + ' + + + + My Plotly + + + + %s + ', plotlyjs, with(x, new_offline(data, layout, height, width, id)) + ) + d <- if (is.null(x$out_dir)) { + tempdir() + } else { + if (!dir.exists(x$out_dir)) dir.create(x$out_dir, recursive = TRUE) + x$out_dir + } + index <- file.path(d, "index.html") + res <- writeLines(html, index) + if (!is.null(x$viewer)) x$viewer(index) +} + +#' Embed a plotly iframe into an R markdown document via \code{knit_print} +#' @param x named list of ggplots and option lists to pass to \code{animint2dir}. +#' @param options knitr options. +#' @param ... placeholder. +#' @export +#' @references https://github.com/yihui/knitr/blob/master/vignettes/knit_print.Rmd +knit_print.offline <- function(x, options, ...) { + if (!requireNamespace("knitr")) { + warning("Please install.packages('knitr')") + return(x) + } + p <- with(x, new_offline(data, layout, height, width, id)) + # if this is the first plot, place bundle just before the plot + if (length(knitr::knit_meta(class = "plotly", clean = FALSE)) == 0) { + off <- offline_bundle(jq = TRUE) + b <- readChar(off, file.info(off)$size) + p <- paste0( + sprintf('', b), + p + ) + } + knitr::asis_output(p, meta = list(plotly = structure("", class = "plotly"))) +} + +#' Embed a plotly iframe into a IPython Notebook +#' @param x a plotly object +#' @param width attribute of the iframe +#' @param height attribute of the iframe +#' @export +embed_notebook <- function(x, width = "100%", height = "525") { + if (!requireNamespace("IRdisplay")) { + warning("You need the IRdisplay package to use this function: \n", + "devtools::install_github(c('IRkernel/repr', 'IRKernel/IRdisplay'))") + return(x) + } + resp <- print(x) + iframe <- plotly_iframe(attr(resp, "url"), width, height) + IRdisplay::display_html(iframe) +} + +plotly_iframe <- function(url, width, height) { + paste("", sep="") +} diff --git a/R/process.R b/R/process.R new file mode 100644 index 0000000000..d0fe9abf58 --- /dev/null +++ b/R/process.R @@ -0,0 +1,34 @@ +# ---------------------------------------------------------------------------- +# Methods for processing API responses +# ---------------------------------------------------------------------------- + +process <- function(resp) { + UseMethod("process") +} + +process.clientresp <- function(resp) { + httr::stop_for_status(resp) + con <- from_JSON(httr::content(resp, as = "text")) + if (nchar(con$error) > 0) stop(con$error, call. = FALSE) + if (nchar(con$warning) > 0) warning(con$warning, call. = FALSE) + if (nchar(con$message) > 0) message(con$message, call. = FALSE) + con +} + +process.figure <- function(resp) { + httr::stop_for_status(resp) + con <- from_JSON(content(resp, as = "text")) + fig <- con$payload$figure + fig$url <- sub("apigetfile/", "~", resp$url) + # any reasonable way to return a data frame? + hash_plot(data.frame(), fig) +} + +process.signup <- function(resp) { + httr::stop_for_status(resp) + con <- from_JSON(content(resp, as = "text")) + if (nchar(con[["error"]]) > 0) stop(con$error, call. = FALSE) + # Relaying a message with a private key probably isn't a great idea -- + # https://github.com/ropensci/plotly/pull/217#issuecomment-100381166 + con +} diff --git a/R/shiny.R b/R/shiny.R new file mode 100644 index 0000000000..58287c6ff0 --- /dev/null +++ b/R/shiny.R @@ -0,0 +1,88 @@ +#' Shiny ui output function +#' @param outputId output variable to read the plot from +#' @param width width of the output. +#' @param height height of the output. +#' @param offline Use plotly offline, if available? +#' @seealso http://shiny.rstudio.com/articles/building-outputs.html +#' @export +#' +plotlyOutput <- function(outputId, width = "100%", height = "550px", offline = TRUE) { + if (!requireNamespace("shiny")) message("Please install.packages('shiny')") + dep <- shiny::createWebDependency(plotly_shiny()) + if (offline && has_offline()) { + dep <- list(dep, shiny::createWebDependency(shiny_offline())) + el <- htmltools::tags$div( + id = outputId, + class = 'plotly_shiny', + style = sprintf("width: %s; height: %s;", width, height) + ) + } else { + el <- htmltools::tags$iframe( + id = outputId, + src = "https://plot.ly/~playground/7.embed", + class = "plotly_shiny", + style = "border:none;", + seamless = TRUE, + width = width, + height = height + ) + } + htmltools::attachDependencies(el, dep) +} + +#' Render a plotly graph in shiny +#' +#' Shiny server output function customized for plotly. +#' +#' @param expr An expression that creates a ggplot or plotly object +#' @param envir The environment in which to evaluate \code{expr}. +#' @param quoted Is expr a quoted expression (with \code{quote()})? +#' @param offline Use plotly offline, if available? +#' This is useful if you want to save an expression in a variable. +#' @export +#' + +renderPlotly <- function(expr, envir = parent.frame(), quoted = FALSE, offline = TRUE) { + if (!requireNamespace("shiny")) message("Please install.packages('shiny')") + func <- shiny::exprToFunction(expr, envir, quoted) + offline <- offline && has_offline() + renderFunc <- function(shinysession, name, ...) { + p <- func() + l <- if (offline) offline(p) else plotly_build(p) + l$offline <- offline + # eventually let users alter this? + l$task <- "newPlot" + # return a list of named lists that describe valid postMessage + # commands to be sent to the embedded iframe. See binding.renderValue for + # the receiving JS side of this function and https://github.com/plotly/Embed-API + # for more about the postMessage graph messages + list(l) + } + # this will tell knitr how to manage the app in an interactive document + # implementation is similar to htmlwidgets::shinyRenderWidget() + shiny::markRenderFunction(plotly::plotlyOutput, renderFunc) +} + +# --------------------------------------------------------------------------- +# html dependencies according htmltools protocols +# these are here basically so we can take advantage of shiny::createWebDependency +# --------------------------------------------------------------------------- + +# the shiny binding +plotly_shiny <- function() { + htmltools::htmlDependency(name = "plotly_shiny", + version = packageVersion("plotly"), + src = system.file("shiny", package = "plotly"), + script = "plotly_shiny.js") +} + +# the plotly offline bundle +shiny_offline <- function() { + # shiny already has jQuery (and it requires >= 1.10) + off <- offline_bundle(jq = FALSE) + htmltools::htmlDependency(name = "shiny_offline", + # better way to track the bundle version? + version = packageVersion("plotly"), + src = dirname(off), + script = basename(off)) +} diff --git a/R/signup.R b/R/signup.R index bd74396ff5..2d8f5051a3 100644 --- a/R/signup.R +++ b/R/signup.R @@ -1,49 +1,57 @@ -#' Sign up to plotly. -#' -#' A sign up interface to Plotly through the R Console. See documentation and -#' examples at https://plot.ly/API -#' -#' @import RCurl RJSONIO -#' @param username Desired username -#' @param email Desired email -#' @details See documentation and examples at https://plot.ly/API +#' Create a new plotly account. +#' +#' A sign up interface to plotly through the R Console. +#' +#' @param username Desired username. +#' @param email Desired email. +#' @param save If request is successful, should the username & API key be +#' automatically stored as an environment variable in a .Rprofile? +#' #' @return #' \itemize{ #' \item api_key key to use with the api #' \item tmp_pw temporary password to access your plotly account #' } -#' @references https://plot.ly/API -#' @author Chris Parmer chris@@plot.ly -#' @note https://plot.ly/API +#' @references https://plot.ly/rest/ #' @export #' @examples \dontrun{ -#' username <- 'anna.lyst' -#' email <- 'anna.lyst@@plot.ly' -#' response <- signup(username, email) -#' response$api_key # key to access plotly with -#' response$tmp_pw # temporary password to access your plotly account +#' # You need a plotly username and API key to communicate with the plotly API. +#' +#' # If you don't already have an API key, you can obtain one with a valid +#' # username and email via signup(). +#' s <- signup('anna.lyst', 'anna.lyst@@plot.ly') +#' +#' # If you already have a username and API key, please create the following +#' # environment variables: +#' Sys.setenv("plotly_username" = "me") +#' Sys.setenv("plotly_api_key" = "mykey") +#' # You can also change the default domain if you have a plotly server. +#' Sys.setenv("plotly_domain" = "http://mydomain.com") +#' +#' # If you want to automatically load these environment variables when you +#' # start R, you can put them inside your ~/.Rprofile +#' # (see help(.Rprofile) for more details) +#' #' } -signup <- function(username=NULL, email=NULL){ - if(is.null(username)) - key <- getOption("plotlyUsername", stop("you need a user name for Plot.ly - See the signup function")) - if(is.null(key)) - key <- getOption("plotlyKey", stop("you need an API key for Plot.ly - See the signup function")) - - platform = 'R' - version = as.character(packageVersion("plotly")) - url <- "https://plot.ly/apimkacct" - options(RCurlOptions = list(sslversion = 3, cainfo = system.file("CurlSSL", "cacert.pem", - package = "RCurl"))) - respst <- postForm(url, platform = platform, version = version, email = email, - un = username) - resp <- fromJSON(respst, simplify = FALSE) - if (!is.null(resp$filename)) - pub$filename <- resp$filename - if (!is.null(resp$error)) - cat(resp$err) - if (!is.null(resp$warning)) - cat(resp$warning) - if (!is.null(resp$message)) - cat(resp$message) - return(resp) -} \ No newline at end of file +signup <- function(username, email, save = TRUE) { + if (missing(username)) username <- verify("username") + if (missing(email)) stop("Must specify a valid email") + # construct body of message to plotly server + bod <- list( + un = username, + email = email, + platform = "R", + version = as.character(packageVersion("plotly")) + ) + base_url <- file.path(get_domain(), "apimkacct") + resp <- httr::POST(base_url, body = bod) + con <- process(struct(resp, "signup")) + if (save) { + # store API key as an environment variable in .Rprofile + cat_profile("username", con$un) + cat_profile("api_key", con$api_key) + } + Sys.setenv("plotly_username" = con$un) + Sys.setenv("plotly_api_key" = con$api_key) + invisible(con) +} diff --git a/R/stream.R b/R/stream.R new file mode 100644 index 0000000000..6c5cb06055 --- /dev/null +++ b/R/stream.R @@ -0,0 +1,58 @@ +#' Stream objects +#' +#' @param p a plotly or figure object. +#' @examples +#' +#' # generate 100 random observations +#' n <- 100 +#' x <- rnorm(n) +#' +#' # start a plotly stream +#' s <- stream() +#' # write to the stream +#' for (i in seq_len(50)) { +#' s$write(x = x) +#' x <- x[-n] +#' x[1] <- rnorm(1) +#' } +#' # close the stream +#' s$close() +#' + +# Implementation of https://plot.ly/streaming/ +stream <- function(x) { + haz <- has_stream() + if (!haz) { + stop("To use plotly streams, you need to create streaming token(s). \n", + "To see how to create token(s), please visit: \n", + "https://plot.ly/python/streaming-tutorial/#Get-your-stream-tokens \n", + "Once created, save these token(s) as an environment variable: \n", + " Sys.setenv('plotly_streamtoken' = 'token1;token2;token3')") + } + # obtain streaming tokens + toks <- strsplit(names(haz), ";")[[1]] + if (length(toks)) { + warning("Multiple token handling coming soon!") + toks <- toks[1] + } + # request headers + headerz <- httr::add_headers(.headers = c( + "Transfer-Encoding" = "chunked", + "plotly-streamtoken" = toks + )) + # request body + st <- list(stream = list(token = toks, maxpoints = 500)) + resp <- httr::POST(get_domain("stream"), headerz) + httr::stop_for_status(resp) + + + list( + write = function() {}, + close = function() {} + ) +} + +has_stream <- function() { + token <- Sys.getenv("plotly_streamtoken") + setNames(token != "", token) +} diff --git a/R/subplots.R b/R/subplots.R new file mode 100644 index 0000000000..2887085f29 --- /dev/null +++ b/R/subplots.R @@ -0,0 +1,174 @@ +#' View multiple plots in a single view +#' +#' @param ... any number of plotly objects +#' @param nrows number of rows for laying out plots in a grid-like structure. +#' Only used if no domain is already specified. +#' @param which_layout adopt the layout of which plot? If the default value of +#' "merge" is used, all plot level layout options will be included in the final +#' layout. This argument also accepts a numeric vector which will restric +#' @param margin either a single value or four values (all between 0 and 1). +#' If four values are provided, the first is used as the left margin, the second +#' is used as the right margin, the third is used as the top margin, and the +#' fourth is used as the bottom margin. +#' If a single value is provided, it will be used as all four margins. +#' @return A plotly object +#' @export +#' @author Carson Sievert +#' @examples \dontrun{ +#' p1 <- plot_ly(economics, x = date, y = uempmed, showlegend = F) +#' p2 <- plot_ly(economics, x = date, y = unemploy, showlegend = F) +#' offline(subplot(p1, p2, p1, p2, nrows = 2)) +#' } + + +## TODO: throw warning if geo and non-geo coordinates are used!!! +subplot <- function(..., nrows = 1, which_layout = "merge", margin = 0.02) { + # note that dots is a _list of plotlys_ + dots <- lapply(list(...), plotly_build) + # put existing plot anchors and domain information into a tidy format + # (geo, xaxis, or yaxis can be used to anchor traces on different plots) + p_info <- list() + ctr <- 1 + for (i in seq_along(dots)) { + dat <- dots[[i]]$data + layout <- dots[[i]]$layout + for (j in seq_along(dat)) { + tr <- dat[[j]] + idx <- if (j == 1) "" else j + geo <- unique(tr$geo) %||% "" + # if a valid geo property exists, use that and ignore x/y axis properties + info <- if (grepl("^geo[0-9]+$", geo)) { + d <- layout[[paste0("geo", idx)]][["domain"]] %||% list(x = NA, y = NA) + c( + geo = sub("^geo1$", "geo", geo), + xaxis = "", + xstart = d$x[1], + xend = d$x[2], + yaxis = "", + ystart = d$y[1], + yend = d$y[2] + ) + } else { + dx <- layout[[paste0("xaxis", idx)]][["domain"]] %||% NA + dy <- layout[[paste0("yaxis", idx)]][["domain"]] %||% NA + c( + geo = "", + xaxis = unique(tr$xaxis) %||% "", + xstart = dx[1], + xend = dx[2], + yaxis = unique(tr$yaxis) %||% "", + ystart = dy[1], + yend = dy[2] + ) + } + p_info[[ctr]] <- c(info, plot = i, trace = j) + ctr <- ctr + 1 + } + } + # put p_info into a data.frame() + p_info <- Reduce(rbind, p_info) + row.names(p_info) <- NULL + p_info <- data.frame(p_info, stringsAsFactors = FALSE) + # obtain the _actual_ plot id + key <- with(p_info, paste0(geo, xaxis, yaxis, plot)) + p_info$key <- match(key, unique(key)) + # bump x/y axis anchors appropriately + p_info$xaxis <- sub("x1", "x", paste0("x", p_info$key)) + p_info$yaxis <- sub("y1", "y", paste0("y", p_info$key)) + + # Only do domain computations if they are _completely_ missing + # (I don't think it makes sense to support partial specification of domains) + if (all(is.na(with(p_info, c(xstart, xend, ystart, yend))))) { + p_info[c("xstart", "xend", "yend", "ystart")] <- + get_domains(max(p_info$key), nrows, margin) + } + # empty plot container that we'll fill up with new info + p <- list( + data = vector("list", nrow(p_info)) + ) + # merge layouts of the subplots + ls <- if (which_layout == "merge") { + lapply(dots, "[[", "layout") + } else { + if (!is.numeric(which_layout)) warning("which_layout must be numeric") + if (!all(idx <- which_layout %in% seq_along(dots))) { + warning("which_layout is referencing non-existant layouts") + which_layout <- which_layout[idx] + } + lapply(dots[which_layout], "[[", "layout") + } + ls <- ls[!vapply(ls, is.null, logical(1))] + p[["layout"]] <- Reduce(modifyList, ls) + + # tack on trace, domain, and anchor information + p_info$plot <- as.numeric(p_info$plot) + p_info$trace <- as.numeric(p_info$trace) + for (i in seq_along(p$data)) { + info <- p_info[i, ] + xdom <- c(info$xstart, info$xend) + ydom <- c(info$ystart, info$yend) + p$data[[i]] <- dots[[info$plot]]$data[[info$trace]] + if (grepl("^geo", info$geo)) { + # carry over first geo object if this one is missing + p$layout[[info$geo]] <- p$layout[[info$geo]] %||% p$layout[["geo"]] + # add domains to the layout + p$layout[[info$geo]] <- modifyList( + p$layout[[info$geo]] %||% list(), + list(domain = list(x = xdom, y = ydom)) + ) + # ensure the geo anchor is a single value + p$data[[i]]$geo <- info$geo + } else { + xaxis <- sub("x", "xaxis", info$xaxis) + yaxis <- sub("y", "yaxis", info$yaxis) + # does this plot contain x/y axis styling? If so, use it + # (but overwrite domain/anchor info) + l <- dots[[info$plot]]$layout + p$layout[[xaxis]] <- modifyList( + if (any(idx <- names(l) %in% "xaxis")) l[idx][[1]] else list(), + list(domain = xdom, anchor = info$yaxis) + ) + p$layout[[yaxis]] <- modifyList( + if (any(idx <- names(l) %in% "yaxis")) l[idx][[1]] else list(), + list(domain = ydom, anchor = info$xaxis) + ) + p$data[[i]]$xaxis <- info$xaxis + p$data[[i]]$yaxis <- info$yaxis + } + } + hash_plot(data.frame(), p) +} + + +get_domains <- function(nplots = 1, nrows = 1, margins = 0.01) { + if (length(margins) == 1) margins <- rep(margins, 4) + if (length(margins) != 4) stop("margins must be length 1 or 4", call. = FALSE) + ncols <- ceiling(nplots / nrows) + + xs <- vector("list", ncols) + for (i in seq_len(ncols)) { + xs[[i]] <- c( + xstart = ((i - 1) / ncols) + ifelse(i == 1, 0, margins[1]), + xend = (i / ncols) - ifelse(i == ncols, 0, margins[2]) + ) + } + xz <- rep_len(xs, nplots) + + ys <- vector("list", nrows) + for (i in seq_len(nplots)) { + j <- ceiling(i / ncols) + ys[[i]] <- c( + ystart = 1 - ((j - 1) / nrows) - ifelse(j == 1, 0, margins[3]), + yend = 1 - (j / nrows) + ifelse(j == nrows, 0, margins[4]) + ) + } + list2df(Map(c, xz, ys)) +} + +list2df <- function(x, nms) { + stopifnot(length(unique(sapply(x, length))) == 1) + m <- Reduce(rbind, x) + row.names(m) <- NULL + df <- data.frame(m) + if (!missing(nms)) setNames(df, nms) else df +} diff --git a/R/tools.R b/R/tools.R deleted file mode 100644 index 6330659b98..0000000000 --- a/R/tools.R +++ /dev/null @@ -1,149 +0,0 @@ -# Functions that USERS will possibly want access to. - - -PLOTLY_DIR <- file.path(path.expand("~"), ".plotly") -CREDENTIALS_FILE <- file.path(PLOTLY_DIR, ".credentials") -CONFIG_FILE <- file.path(PLOTLY_DIR, ".config") -# PLOT_OPTIONS_FILE <- file.path(PLOTLY_DIR, ".plot_options") -# THEMES_FILE <- file.path(PLOTLY_DIR, ".themes") - - -#' Create file if nonexistent -#' @param abspath Character vector of file path -#' @return NULL -ensure_file_exist <- function(abspath) { - if (!file.exists(abspath)) { - dir.create(dirname(abspath), showWarnings=FALSE, recursive=TRUE) - file.create(abspath) - } - invisible() -} - - -# Credentials Tools ### - -#' Read Plotly credentials file (which is a JSON) -#' @param args Character vector of keys you are looking up -#' @return List of keyword-value pairs (credentials) -#' @examples -#' \dontrun{ -#' get_credentials_file(c("username", "api_key")) -#' } -get_credentials_file <- function(args=c()) { - ensure_file_exist(CREDENTIALS_FILE) - if (file.info(CREDENTIALS_FILE)$size) { - credentials_data <- fromJSON(CREDENTIALS_FILE) - if (!is.null(args)) { - credentials_data <- credentials_data[args] - } - } else { - credentials_data <- NULL - } - return(as.list(credentials_data)) -} - - -#' Read and print Plotly credentials file, wrapping get_credentials_file() -#' @param args Character vector of keys you are looking up -#' @return List of keyword-value pairs (credentials) -#' @export -show_credentials_file <- function(args=c()) { - print("Your credentials file:") - print(get_credentials_file(args)) -} - - -#' Set the keyword-value pairs in Plotly credentials file -#' @param username plotly username -#' @param api_key plotly API key -#' @param stream_ids stream ids -#' @return List of keyword-value pairs (credentials) -#' @export -#' @examples -#' \dontrun{ -#' set_credentials_file("username", "api_key", list("foo", "bar)) -#' } -set_credentials_file <- function(username="", api_key="", - stream_ids=list("", "")) { - credentials_data <- show_credentials_file() - new_credentials <- list() - if (username != "") { - new_credentials$username <- username - } else { - new_credentials$username <- credentials_data$username - } - if (api_key != "") { - new_credentials$api_key <- api_key - } else { - new_credentials$api_key <- credentials_data$api_key - } - if (stream_ids[[1]] != "") { - new_credentials$stream_ids <- stream_ids - } else { - new_credentials$stream_ids <- credentials_data$stream_ids - } - writeLines(toJSON(new_credentials), CREDENTIALS_FILE) - print("Now,") - show_credentials_file() -} - - -# Config Tools ### - -#' Read Plotly config file (which is a JSON) and create one if nonexistent -#' @param args Character vector of keys you are looking up -#' @return List of keyword-value pairs (config) -#' @examples -#' \dontrun{ -#' get_config_file(c("plotly_domain", "plotly_streaming_domain")) -#' } -get_config_file <- function(args=c()) { - ensure_file_exist(CONFIG_FILE) - if (file.info(CONFIG_FILE)$size) { - config_data <- fromJSON(CONFIG_FILE) - if (!is.null(args)) { - config_data <- config_data[args] - } - } else { - config_data <- NULL - } - return(as.list(config_data)) -} - - -#' Read and print Plotly config file, wrapping get_credentials_file() -#' @param args Character vector of keys you are looking up -#' @return List of keyword-value pairs (credentials) -#' @export -show_config_file <- function(args=c()) { - print("Your config file:") - print(get_config_file(args)) -} - - -#' Set keyword-value pairs in Plotly config file -#' @param plotly_domain plotly domain -#' @param plotly_streaming_domain plotly streaming domain -#' @return List of keyword-value pairs (config) -#' @export -#' @examples -#' \dontrun{ -#' set_config_file("https://kitty.plot.ly", "stream.kitty.plot.ly") -#' } -set_config_file <- function(plotly_domain="", plotly_streaming_domain="") { - config_data <- show_config_file() - new_config <- list() - if (plotly_domain != "") { - new_config$plotly_domain <- plotly_domain - } else { - new_config$plotly_domain <- "https://plot.ly" - } - if (plotly_streaming_domain != "") { - new_config$plotly_streaming_domain <- plotly_streaming_domain - } else { - new_config$plotly_streaming_domain <- "stream.plot.ly" - } - writeLines(toJSON(new_config), CONFIG_FILE) - print("Now,") - show_config_file() -} diff --git a/R/trace_generation.R b/R/trace_generation.R index 3cdf9f465d..04b15905c0 100644 --- a/R/trace_generation.R +++ b/R/trace_generation.R @@ -536,7 +536,7 @@ geom2trace <- list( L <- list(x=data$x, y=data$y, name=params$name, - text=data$text, + text=as.character(data$text), type="scatter", mode="markers", marker=paramORdefault(params, aes2marker, marker.defaults)) diff --git a/R/utils.R b/R/utils.R new file mode 100644 index 0000000000..30e08fa65e --- /dev/null +++ b/R/utils.R @@ -0,0 +1,178 @@ +is.plotly <- function(x) inherits(x, "plotly") +is.offline <- function(x) inherits(x, "offline") + +"%||%" <- function(x, y) { + if (length(x) > 0) x else y +} + +# this function is called after the package is loaded +.onAttach <- function(...) { + usr <- verify("username") + if (nchar(usr) > 0) + packageStartupMessage("\n", "Howdy, ", usr, "!") + key <- verify("api_key") + if (nchar(key) > 0) { + packageStartupMessage("Sweet, you have an API key already! \n", + "Start making plots with ggplotly() or plot_ly().") + } + # set a default for the offline bundle directory + if (Sys.getenv("plotly_offline") == "") { + Sys.setenv("plotly_offline" = "~/.plotly/plotlyjs") + # maybe rely a message if bundle is (or isn't) found? + } + invisible(NULL) +} + +# special enviroment that tracks trace/layout information +plotlyEnv <- new.env(parent = emptyenv()) + +# hash plot info, assign it to the special plotly environment, & attach it to data +hash_plot <- function(df, p) { + if (missing(df) || is.null(df)) df <- data.frame() + hash <- digest::digest(p) + # terrible hack to ensure we can always find the most recent hash + hash <- paste(hash, length(ls(plotlyEnv)), sep = "#") + assign(hash, p, envir = plotlyEnv) + attr(df, "plotly_hash") <- hash + # add plotly class mainly for printing method + class(df) <- unique(c("plotly", class(df))) + # return a data frame to be compatible with things like dplyr + df +} + +#' Obtain underlying data of plotly object +#' +#' Given a data frame with a class of plotly, this function returns the arguments +#' and/or data used to create the plotly. If no data frame is provided, +#' the last plotly object created in this R session is returned (if it exists). +#' +#' @param data a data frame with a class of plotly (and a plotly_hash attribute). +#' @param last if no plotly attribute is found, return the last plot or NULL? +get_plot <- function(data = NULL, last = FALSE) { + hash <- attr(data, "plotly_hash") + if (!is.null(hash)) { + get(hash, envir = plotlyEnv) + } else if (last) { + envs <- strsplit(ls(plotlyEnv), "#") + last_env <- ls(plotlyEnv)[which.max(sapply(envs, "[[", 2))] + get(last_env, envir = plotlyEnv) + } else { + data %||% list() + } +} + +#' Retrive last plotly to be modified or created +#' +#' @seealso \link{plotly_build} +#' @export +#' +last_plot <- function(...) { + p <- get_plot(..., last = TRUE) + structure( + p, + class = unique(c("plotly", class(p))) + ) +} + +# Check for credentials/configuration and throw warnings where appropriate +verify <- function(what = "username") { + val <- grab(what) + if (val == "") { + switch(what, + username = warning("You need a plotly username. See help(signup, package = 'plotly')", call. = FALSE), + api_key = warning("You need an api_key. See help(signup, package = 'plotly')", call. = FALSE)) + warning("Couldn't find ", what, call. = FALSE) + } + as.character(val) +} + +# Check whether a certain credential/configuration exists. +grab <- function(what = "username") { + who <- paste0("plotly_", what) + val <- Sys.getenv(who, "") + # If the environment variable doesn't exist, try reading hidden files that may + # have been created using other languages or earlier versions of this package + if (val == "") { + PLOTLY_DIR <- file.path(normalizePath("~", mustWork = TRUE), ".plotly") + CREDENTIALS_FILE <- file.path(PLOTLY_DIR, ".credentials") + CONFIG_FILE <- file.path(PLOTLY_DIR, ".config") + # note: try_file can be 'succesful', yet return NULL + val2 <- try_file(CREDENTIALS_FILE, what) + val <- if (length(nchar(val2)) == 0) try_file(CONFIG_FILE, what) else val2 + val <- val %||% "" + } + # return true if value is non-trivial + setNames(val, who) +} + +# try to grab an object key from a JSON file (returns empty string on error) +try_file <- function(f, what) { + tryCatch(jsonlite::fromJSON(f)[[what]], error = function(e) NULL) +} + +# preferred defaults for toJSON mapping +to_JSON <- function(x, ...) { + jsonlite::toJSON(x, digits = 50, auto_unbox = TRUE, force = TRUE, ...) +} + +# preferred defaults for toJSON mapping +from_JSON <- function(x, ...) { + jsonlite::fromJSON(x, simplifyDataFrame = FALSE, simplifyMatrix = FALSE, ...) +} + +# plotlyjs properties that must _always_ be an array (even if length 1) +get_boxed <- function() { + c("x", "y", "lat", "lon", "text") +} + +# add a class to an object only if it is new, and keep any existing classes of +# that object +struct <- function(x, y, ...) { + structure(x, class = unique(c(class(x), y)), ...) +} + +# TODO: what are some other common configuration options we want to support?? +get_domain <- function(type = "main") { + if (type == "stream") { + Sys.getenv("plotly_streaming_domain", "http://stream.plot.ly") + } else { + Sys.getenv("plotly_domain", "https://plot.ly") + } + +} + +# plotly's special keyword arguments in POST body +get_kwargs <- function() { + c("filename", "fileopt", "style", "traces", "layout", + "world_readable", "kwarg_example") +} + +# POST header fields +plotly_headers <- function() { + httr::add_headers(.headers = c( + "plotly-username" = verify("username"), + "plotly-apikey" = verify("api_key"), + "plotly-version" = as.character(packageVersion("plotly")), + "plotly-platform" = "R")) +} + +# try to write environment variables to an .Rprofile +cat_profile <- function(key, value, path = "~") { + r_profile <- file.path(normalizePath(path, mustWork = TRUE), + ".Rprofile") + snippet <- sprintf('\nSys.setenv("plotly_%s" = "%s")', key, value) + if (!file.exists(r_profile)) { + message("Creating", r_profile) + r_profile_con <- file(r_profile) + } + if (file.access(r_profile, 2) != 0) { + stop("R doesn't have permission to write to this file: ", path, "\n", + "You should consider putting this in an .Rprofile ", "\n", + "(or sourcing it when you use plotly): ", snippet) + } + if (file.access(r_profile, 4) != 0) { + stop("R doesn't have permission to read this file: ", path) + } + message("Adding plotly_", key, " environment variable to ", r_profile) + cat(snippet, file = r_profile, append = TRUE) +} diff --git a/README.md b/README.md index 16e0370fd9..6ca8665d97 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,78 @@ [![Build Status](https://travis-ci.org/ropensci/plotly.png?branch=master)](https://travis-ci.org/ropensci/plotly) +# plotly -![](http://i.imgur.com/gp0muqe.gif) +An R package for creating (and modifying) interactive web-based graphs via [plotly](https://plot.ly/)'s JavaScript graphing library. +## Installation -Interactive R and ggplot2 figures in your web browser ---- +__plotly__ is not (yet) available on CRAN, but you can install it via [devtools](http://cran.r-project.org/web/packages/devtools/): +```r +devtools::install_github("ropensci/plotly") ``` + +## Getting Started + +### Signup + +If you don't already have a plotly account, either [signup online](https://plot.ly/how-to-sign-up-to-plotly/) or use the `signup()` function (see the `help(signup)` page for more details). + +Note you can check if you have a username and API key with: + +```r +plotly:::verify("username") +plotly:::verify("api_key") +``` + +### Introduction + +If you use [ggplot2](http://cran.r-project.org/web/packages/ggplot2/index.html), simply call `ggplotly()` to make your ggplots online and interactive! + +```r library(plotly) +set.seed(100) +d <- diamonds[sample(nrow(diamonds), 1000), ] +p <- ggplot(data = d, aes(x = carat, y = price)) + + geom_point(aes(text = paste("Clarity:", clarity)), size = 4) + + geom_smooth(aes(colour = cut, fill = cut)) + facet_wrap(~ cut) +(gg <- ggplotly(p)) +``` -# --> your ggplot2 methods <-- -dsamp <- diamonds[sample(nrow(diamonds), 1000), ] -qplot(carat, price, data=dsamp, colour=clarity) +![https://plot.ly/~agvd/1153](http://imgur.com/tbKybEb) -# --> send your ggplot2 figure to plotly <-- -py <- plotly() -py$ggplotly() +[Click here](https://plot.ly/~agvd/1153) to interact with the resulting graph (notice the custom hover text!) + + +The `ggplotly()` function converts a ggplot object to a plotly object, so if you like, you may 'post-process' your ggplot graphs to add custom plotly features, for example: + +```r +layout(gg, hovermode = "closest") ``` -[![](https://plot.ly/~chris/2703.png)](https://plot.ly/~chris/2703) -Interact with the Plotly graph: [https://plot.ly/~chris/2703](https://plot.ly/~chris/2703) +plotly also supports certain chart types that ggplot2 doesn't support (such as 3D [surface](https://plot.ly/r/3d-surface-plots/), [point](https://plot.ly/r/3d-scatter-plots/), and [line](https://plot.ly/r/3d-line-plots/) plots). You can easily create these (or any other plotly) charts using the high-level interface. +```r +plot_ly(z = volcano, type = "surface") +``` -[Get started](https://plot.ly/ggplot2/) -------------- +![https://plot.ly/~brnvg/1134](https://plot.ly/~brnvg/1134.png) +## Learn more -Learn More ---- -- [Getting started with ggplot2 and plotly](https://plot.ly/ggplot2/getting-started/) -- [A Brief Introduction to Plotly « Bad Hessian](http://badhessian.org/2014/08/a-brief-introduction-to-plotly/) -- [Plot with ggplot2, interact, collaborate, and share online « Bayesian Biologist](http://bayesianbiologist.com/2014/07/31/plot-with-ggplot2-interact-collaborate-and-share-online/) -- [A Rosetta Stone for R, ggplot2, Python, MATLAB, and Excel Plotting](http://nbviewer.ipython.org/gist/msund/61cdbd5b22c103fffb84) +* [An introduction to plotly's R API](http://ropensci.github.io/plotly/intro) +* [Plotly Offline Mode](http://ropensci.github.io/plotly/offline) +* Plotly's [R homepage](https://plot.ly/r) and [ggplot2 homepage](https://plot.ly/ggplot2) +## Contributing + +- We love collaboration! See the [wiki](https://github.com/ropensci/plotly/wiki/Development-guidelines) and the [code of conduct](https://github.com/ropensci/plotly/blob/master/CONDUCT.md) for more information. + +## Stay in touch -Stay in touch ---- - - [@plotlygraphs](https://twitter.com/plotlygraphs) -Contributing ---- -- Contributions welcome! Check out our [wiki](https://github.com/ropensci/plotly/wiki/Development-guidelines) for more information. - --- [![](http://ropensci.org/public_images/github_footer.png)](http://ropensci.org) diff --git a/data-raw/hobbs.R b/data-raw/hobbs.R new file mode 100644 index 0000000000..0c85d30243 --- /dev/null +++ b/data-raw/hobbs.R @@ -0,0 +1,27 @@ +r = c(6.80498578527, 3.38959601061, 5.38147211075, 8.05954021942, 5.31822922787, 2.98509993563, 1.96658700238, 6.76926540821, 4.07340189872, 6.50437182527, 7.556369819, 4.04745609407, 7.38666249607, 5.41362473698, 7.47071653116, 7.98211021694, 4.73781408009, 4.20645304293, 5.47860480459, 4.8245202807, 5.5996006099, 6.86679521708, 3.08567136626, 7.77181094323, 3.6877944351, 5.36035668519, 5.1404467393, 6.04544568093, 6.83392094019, 3.62076946254, 3.9894305834, 5.3118244995, 4.60821348028, 6.64058471615, 3.05518885448, 7.49256416375, 5.48507817779, 3.89779499662, 5.97624511403, 5.44706156091, 5.37703411681, 4.69080578773, 4.71164049118, 3.62991932939, 5.95766807637, 5.35712128439, 3.84923528282, 6.25050713632, 7.12224335715, 3.39940423384, 3.51055667227, 4.10099760366, 4.0963821002, 6.23358307481, 3.93948852677, 3.9254450774, 6.11813250146, 3.94045034629, 7.58301557326, 3.51320214534) +t = c(-30.3529443619, -25.6114598545, -12.4252274527, 13.9613805187, -4.95093284067, -25.6922741909, 12.4687641616, -4.91376410703, -10.9673802876, 30.8141940549, 2.47495943114, 17.9755437524, 0.771130593362, 6.13748848563, -14.451963574, 28.1845341129, 12.538680066, -8.98323033713, 5.23128516476, -64.4890025358, 11.3574866818, 3.45407479151, 13.9243466131, -25.3640020468, -16.818006386, -10.2600510306, -13.2121341256, 2.5793388653, 8.71757496585, -10.6754987192, -2.92636601252, 25.1958807548, 40.5903293216, -9.12143363019, -24.2973623813, -3.17694450569, 10.8504984192, -31.3320597474, 4.84956746221, 15.0482769541, 3.29510469926, -6.19709187313, -8.77857413578, 29.5491741194, -5.13744879288, 23.0268604879, -6.63481657837, 2.75501499186, 21.7332501137, -24.8169949601, -7.83054706253, 28.3257962102, 12.3009774678, -21.56315724, -19.3355162838, 26.1464431708, -1.70607120268, 16.071723695, 2.05326630285, -5.09791161233) +r2 = c(3.48804392301, 2.91847857636, 4.20182735997, 8.22732460685, 4.77669042724, 3.04191230311, 4.78994771908, 5.66388078036, 3.85826239317, 8.26021288114, 6.86862448643, 5.74019759967, 6.59497928246, 5.69270377821, 5.33791657446, 9.28360418518, 5.76459089314, 4.02886455205, 5.66234474837, 0.422837231101, 6.20126646393, 6.43926538132, 5.09675851306, 4.63208190873, 3.42184613631, 4.36940470335, 4.02833441941, 5.80576719754, 6.84818992143, 3.80929551278, 4.38526818383, 6.98332684555, 7.39627318603, 5.21512500314, 3.08614877924, 6.33539449149, 6.09041471406, 2.4480560069, 5.94278402031, 6.37312988559, 5.45420534118, 4.39333761656, 4.20594467998, 6.15554228796, 5.11908717116, 6.86986083083, 4.10459986058, 5.95434812558, 8.09233287715, 2.96176970545, 3.97401218758, 6.37338412891, 5.41540914318, 3.87689091998, 3.26144694742, 6.1458085297, 5.50245198719, 5.57155329531, 6.85304926109, 4.14035507494) +t2 = c(14.8066257809, 79.0063403726, 49.0220655413, 49.699083136, 54.1374910829, 86.4193210205, 96.9523919357, 41.4634882636, 67.1376916934, 68.0610394397, 42.6819303227, 76.3986566081, 42.1947934722, 59.5778889746, 27.5108667993, 60.7534448323, 68.3708327991, 65.7480281495, 58.5330083721, -176.744106458, 61.17401858, 47.451508589, 84.4266531858, 12.4793465505, 72.4808027618, 50.5788317578, 51.5602282402, 52.4378561813, 51.5868279921, 73.8729447773, 70.2170569279, 70.7142991543, 82.2343944264, 38.935390447, 84.7093666702, 38.1658284365, 61.7040536538, 70.1969562924, 54.4542925901, 64.3348949686, 58.2738931466, 60.4998223904, 59.155232539, 83.8656184676, 47.8734098973, 69.2826015659, 71.1899104287, 51.048396463, 59.4275824152, 78.5987369617, 75.7558645152, 79.9704837232, 73.8937802463, 31.7334111317, 68.084751177, 80.4110799786, 48.9242507089, 76.6502557554, 42.1828643629, 76.0333358945) +r3 = c(1.85587083503, 5.28696206204, 3.88601339194, 6.282863313, 4.45341484774, 5.68800805076, 7.33086428261, 3.82566059479, 4.98960417696, 7.89743146977, 4.65669311302, 6.66715369631, 4.43100628714, 5.34611325338, 2.47994569588, 8.11347734853, 6.08131168231, 4.96821689621, 5.24445392063, 5.42220788417, 5.79277461602, 4.78758059223, 6.78431863718, 1.10893690948, 5.13891110524, 4.04292965729, 4.02289202968, 4.82842879131, 5.41737837431, 5.37863521067, 5.42109717546, 7.12056197886, 8.3493085399, 3.41048558832, 5.62837847088, 3.91493697614, 5.76394026236, 4.7643741068, 5.0762362679, 6.1655581832, 5.10557651628, 4.76103637693, 4.59624954094, 7.50418841135, 4.10703141792, 6.92042229938, 5.34912894956, 4.79806571939, 7.0232515323, 5.28368096546, 5.56907115243, 7.38379490845, 6.26923321044, 2.65652964501, 4.8439843388, 7.24799236156, 4.37295939441, 6.57098108136, 4.60247924389, 5.67005205083) +t3 = c(151.294255181, 147.188025028, 125.282157112, 87.0672979717, 119.627898357, 147.740824147, 139.564598145, 101.391497102, 134.56018428, 104.024444705, 89.3931429448, 123.1940314, 91.4743405152, 113.332373614, 96.1499255673, 93.2807345226, 118.215565226, 132.322937378, 112.941186391, -179.746233138, 110.303513559, 97.7508361661, 131.608089257, 115.496919231, 140.58118216, 123.396662119, 128.342009045, 107.608810398, 97.9046897875, 137.128447975, 130.431244912, 112.227084481, 118.630202246, 106.05822559, 146.908109706, 90.2773495582, 111.505282363, 151.089742536, 107.721394157, 111.300854997, 114.680277936, 126.569379493, 128.218952233, 125.354857195, 112.418068253, 111.797355679, 133.418052258, 105.184116842, 97.2310361206, 146.668036804, 136.239315201, 121.791844193, 123.911327971, 129.86224497, 141.34395085, 123.270967749, 108.458821723, 124.412377056, 89.0271107387, 134.876701145) +r4 = c(5.37247092432, 7.09635557204, 4.8838239032, 2.92013544124, 4.72396304568, 7.42369395093, 8.0909460754, 3.30684459137, 6.05082848252, 5.53023207444, 2.47230695264, 6.27567053686, 2.61589617379, 4.65353994458, 3.33544001388, 4.79588360487, 5.47271134648, 5.88193049095, 4.57158707205, 9.0398611698, 4.6429075999, 3.1727677358, 7.04424813882, 4.46633651411, 6.5573302898, 4.82084943725, 5.13191551521, 3.97001223705, 3.40632381283, 6.476722964, 6.01921850933, 5.66450153495, 7.15875852255, 3.60071266167, 7.32412716876, 2.55294615625, 4.72713386039, 6.97175520718, 4.07657836107, 4.94622340701, 4.64215544904, 5.36057486441, 5.39171906736, 7.0725243051, 4.10111157028, 5.48573262102, 6.19253528611, 3.76871139184, 4.29031138976, 7.06019536969, 6.53969184418, 6.67974440649, 6.0608253587, 4.78657404093, 6.41668652967, 6.70328133339, 3.88884781048, 6.30859108119, 2.4370447709, 6.5081863479) +t4 = c(-140.203327641, -168.084245433, -166.285141329, 138.248866753, -174.424386436, -169.960482759, 176.991822687, -169.901416249, -172.641581594, 142.951668814, 172.415746367, 168.519359196, 177.822053694, 172.855190349, -146.014521701, 128.177293024, 169.167072781, -173.588573789, 173.726992705, -151.206104772, 166.260477163, 172.507566082, 173.949183904, -131.806840938, -170.635273831, -168.577085483, -166.765503421, 176.070487348, 162.297501498, -174.055746313, -178.060929857, 156.47126885, 155.239142145, -163.000526394, -170.116713265, -170.639272487, 167.383143694, -163.098817056, 172.880737006, 163.386007682, 176.182541977, -174.579680174, -172.335844882, 165.338025694, -172.525664261, 157.542877739, -175.881511093, 175.427643994, 142.069674723, -168.340734019, -175.805831123, 163.063745419, 171.720974997, -151.403904569, -168.27136909, 165.045327878, -177.315336665, 170.042412897, 173.59919661, -177.250656746) +r5 = c(7.93755787138, 7.30274649152, 5.92930222144, 2.40717871317, 5.27092188706, 7.40059612754, 6.81082033836, 4.96775903442, 6.19022937045, 2.15851865795, 4.00412589387, 4.77661732163, 4.23225045181, 4.30765487269, 6.20027517286, 0.727513848534, 4.37800680381, 6.00496493944, 4.34193170292, 10.2379829353, 3.8021588887, 3.96928117014, 5.75898014247, 7.67417906914, 6.69995353301, 5.73431038813, 6.0442759153, 4.31294306609, 3.37754528241, 6.36766672727, 5.73724418155, 3.39635147199, 4.21646748139, 5.46488501672, 7.31113557753, 4.74540076936, 3.91646853189, 7.60297299033, 4.12520482944, 3.67679494965, 4.55123578852, 5.60696053152, 5.79484425749, 5.03052815569, 5.10958624099, 3.40544020796, 6.02630612539, 4.22110926364, 1.90978293658, 7.25466939392, 6.26887587203, 4.56258056659, 4.91805796544, 6.83656096253, 6.78648654914, 4.75101433449, 4.71992634764, 4.92780521518, 4.05919058739, 6.12833898429) +t5 = c(-101.833785776, -127.478391579, -112.244284997, -82.3259108712, -114.688855621, -130.537863362, -145.010264976, -98.7488450072, -124.441748821, -152.45411927, -89.2942365523, -139.832451718, -91.5435951844, -119.442163004, -92.4558385274, -129.659924316, -131.051235099, -123.852917454, -118.086739004, -121.979217138, -121.915029968, -99.3618475777, -141.467701997, -93.5662631891, -126.336901405, -112.834944178, -114.386479929, -109.796072327, -102.743264712, -128.246728907, -127.792092643, -142.473629745, -161.587294187, -99.9406107796, -130.163117326, -90.2288120096, -122.650491214, -123.267750572, -111.997308801, -127.528316806, -117.931295338, -120.391634245, -119.386871479, -149.674695492, -107.850517506, -138.989931341, -127.595470214, -107.32083544, -117.573807423, -127.481660968, -129.912033166, -148.495211671, -135.33164137, -104.421659276, -123.875440211, -146.816826618, -107.058485424, -138.902564873, -88.8968825195, -130.754467356) +r6 = c(8.46918052789, 5.82199756737, 6.14091832822, 5.83172428479, 5.54675447186, 5.6274877092, 3.94832897602, 6.49018461461, 5.32061824515, 3.24359304149, 6.44408533158, 3.36377810065, 6.46311681051, 4.73094492578, 7.79657841111, 4.57012782992, 3.926206816, 5.25434813987, 4.83841110661, 8.69452399898, 4.39953181822, 5.85648390518, 3.62157703921, 8.89491237311, 5.49454283608, 5.96898089085, 6.0478995736, 5.38467139672, 5.3812200182, 5.11157462274, 4.77056110506, 3.09833088263, 1.66508317194, 6.74025853333, 5.59449492888, 6.87963082567, 4.38279246628, 6.41084361649, 5.15420431777, 4.01515851866, 4.93914886826, 5.29829731449, 5.49041717695, 2.62375125938, 5.95358866167, 3.30147937192, 4.9548890011, 5.50005366961, 4.45051234955, 5.78662451335, 4.90683442406, 2.62996947345, 3.76970360805, 7.3967357155, 5.76448190196, 2.79458519588, 5.78203326982, 3.48535191762, 6.50065359862, 4.74864071013) +t6 = c(-66.5358363273, -84.5144226769, -63.3397416996, -24.1468127442, -59.7012453226, -88.06537268, -98.4442045353, -49.1583968172, -73.636223312, -17.9238746786, -38.4123994546, -66.3403623779, -40.8888387392, -52.46063321, -52.6104625591, -7.03935105091, -57.2354586922, -71.642203502, -52.3453961691, -92.7830386735, -47.187163055, -41.9692084629, -82.1442282499, -59.4391656032, -79.1948225932, -62.2999085353, -65.5379040394, -48.9060554476, -37.748311038, -78.0533334583, -71.8731176631, -41.8910928259, -53.1154554855, -52.9976280973, -87.0843610179, -43.6119048384, -48.7979984056, -82.5668031571, -47.9099629957, -46.5704855853, -54.5004832176, -65.9007271268, -66.8733174636, -75.4808072521, -54.7776938669, -42.5983345914, -74.5081662691, -47.1102184434, -22.3568731833, -84.192986745, -78.5052847562, -65.0363717923, -66.5137336813, -63.5267765618, -77.8090785513, -68.5101797401, -51.2968693109, -68.3399130277, -38.6317330684, -77.8518485851) + +nms <- c( + rep("Trial 1", length(r)), + rep("Trial 2", length(r2)), + rep("Trial 3", length(r3)), + rep("Trial 4", length(r4)), + rep("Trial 5", length(r5)) +) + +hobbs <- data.frame( + r = c(r, r2, r3, r4, r5), + t = c(t, t2, t3, t4, t5), + nms +) +save(hobbs, file = "data/hobbs.rda") diff --git a/data-raw/mic.R b/data-raw/mic.R new file mode 100644 index 0000000000..aabfbdeb99 --- /dev/null +++ b/data-raw/mic.R @@ -0,0 +1,24 @@ +r = c(1, 0.995, 0.978, 0.951, 0.914, 0.866, 0.809, 0.743, 0.669, 0.588, 0.5, 0.407, 0.309, 0.208, 0.105, 0, 0.105, 0.208, 0.309, 0.407, 0.5, 0.588, 0.669, 0.743, 0.809, 0.866, 0.914, 0.951, 0.978, 0.995, 1, 0.995, 0.978, 0.951, 0.914, 0.866, 0.809, 0.743, 0.669, 0.588, 0.5, 0.407, 0.309, 0.208, 0.105, 0, 0.105, 0.208, 0.309, 0.407, 0.5, 0.588, 0.669, 0.743, 0.809, 0.866, 0.914, 0.951, 0.978, 0.995, 1) +t = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360) +r2 = c(1, 0.997, 0.989, 0.976, 0.957, 0.933, 0.905, 0.872, 0.835, 0.794, 0.75, 0.703, 0.655, 0.604, 0.552, 0.5, 0.448, 0.396, 0.345, 0.297, 0.25, 0.206, 0.165, 0.128, 0.095, 0.067, 0.043, 0.024, 0.011, 0.003, 0, 0.003, 0.011, 0.024, 0.043, 0.067, 0.095, 0.128, 0.165, 0.206, 0.25, 0.297, 0.345, 0.396, 0.448, 0.5, 0.552, 0.604, 0.655, 0.703, 0.75, 0.794, 0.835, 0.872, 0.905, 0.933, 0.957, 0.976, 0.989, 0.997, 1) +t2 = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360) +r3 = c(1, 0.996, 0.984, 0.963, 0.935, 0.9, 0.857, 0.807, 0.752, 0.691, 0.625, 0.555, 0.482, 0.406, 0.328, 0.25, 0.172, 0.094, 0.018, 0.055, 0.125, 0.191, 0.252, 0.307, 0.357, 0.4, 0.435, 0.463, 0.484, 0.496, 0.5, 0.496, 0.484, 0.463, 0.435, 0.4, 0.357, 0.307, 0.252, 0.191, 0.125, 0.055, 0.018, 0.094, 0.172, 0.25, 0.328, 0.406, 0.482, 0.555, 0.625, 0.691, 0.752, 0.807, 0.857, 0.9, 0.935, 0.963, 0.984, 0.996, 1) +t3 = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360) +r4 = c(1, 0.998, 0.993, 0.985, 0.974, 0.96, 0.943, 0.923, 0.901, 0.876, 0.85, 0.822, 0.793, 0.762, 0.731, 0.7, 0.669, 0.638, 0.607, 0.578, 0.55, 0.524, 0.499, 0.477, 0.457, 0.44, 0.426, 0.415, 0.407, 0.402, 0.4, 0.402, 0.407, 0.415, 0.426, 0.44, 0.457, 0.477, 0.499, 0.524, 0.55, 0.578, 0.607, 0.638, 0.669, 0.7, 0.731, 0.762, 0.793, 0.822, 0.85, 0.876, 0.901, 0.923, 0.943, 0.96, 0.974, 0.985, 0.993, 0.998, 1) +t4 = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360) +r5 = c(1, 0.997, 0.986, 0.969, 0.946, 0.916, 0.88, 0.838, 0.792, 0.74, 0.685, 0.626, 0.565, 0.501, 0.436, 0.37, 0.304, 0.239, 0.175, 0.114, 0.055, 0, 0.052, 0.098, 0.14, 0.176, 0.206, 0.229, 0.246, 0.257, 0.26, 0.257, 0.246, 0.229, 0.206, 0.176, 0.14, 0.098, 0.052, 0, 0.055, 0.114, 0.175, 0.239, 0.304, 0.37, 0.436, 0.501, 0.565, 0.626, 0.685, 0.74, 0.792, 0.838, 0.88, 0.916, 0.946, 0.969, 0.986, 0.997, 1) +t5 = c(0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360) +nms <- c( + rep("Figure8", length(r)), + rep("Cardioid", length(r2)), + rep("Hypercardioid", length(r3)), + rep("Subcardioid", length(r4)), + rep("Supercardioid", length(r5)) +) +mic <- data.frame( + r = c(r, r2, r3, r4, r5), + t = c(t, t2, t3, t4, t5), + nms +) +save(mic, file = "data/mic.rda") + diff --git a/data-raw/wind.R b/data-raw/wind.R new file mode 100644 index 0000000000..c1aa8f7269 --- /dev/null +++ b/data-raw/wind.R @@ -0,0 +1,22 @@ +r = c(77.5, 72.5, 70.0, 45.0, 22.5, 42.5, 40.0, 62.5) +t = c("North", "N-E", "East", "S-E", "South", "S-W", "West", "N-W") +r2 = c(57.5, 50.0, 45.0, 35.0, 20.0, 22.5, 37.5, 55.0) +t2 = c("North", "N-E", "East", "S-E", "South", "S-W", "West", "N-W") +r3 = c(40.0, 30.0, 30.0, 35.0, 7.5, 7.5, 32.5, 40.0) +t3 = c("North", "N-E", "East", "S-E", "South", "S-W", "West", "N-W") +r4 = c(20.0, 7.5, 15.0, 22.5, 2.5, 2.5, 12.5, 22.5) +t4 = c("North", "N-E", "East", "S-E", "South", "S-W", "West", "N-W") + +nms <- c( + rep("11-14 m/s", length(r)), + rep("8-11 m/s", length(r2)), + rep("5-8 m/s", length(r3)), + rep("less than m/s", length(r4)) +) + +wind <- data.frame( + r = c(r, r2, r3, r4), + t = c(t, t2, t3, t4), + nms = ordered(nms, levels = c("less than m/s", "5-8 m/s", "8-11 m/s", "11-14 m/s")) +) +save(wind, file = "data/wind.rda") diff --git a/data/hobbs.rda b/data/hobbs.rda new file mode 100644 index 0000000000..d849444c5d Binary files /dev/null and b/data/hobbs.rda differ diff --git a/data/mic.rda b/data/mic.rda new file mode 100644 index 0000000000..7df2dd7a68 Binary files /dev/null and b/data/mic.rda differ diff --git a/data/wind.rda b/data/wind.rda new file mode 100644 index 0000000000..039a8f5717 Binary files /dev/null and b/data/wind.rda differ diff --git a/inst/.Rapp.history b/inst/.Rapp.history new file mode 100644 index 0000000000..e69de29bb2 diff --git a/inst/arguments.R b/inst/arguments.R new file mode 100644 index 0000000000..2df5e5340a --- /dev/null +++ b/inst/arguments.R @@ -0,0 +1,180 @@ +# This script grabs argument names from plotly documentation and provides some +# convenience functions for translating all those arguments to the R package + +library(rvest) +ref <- read_html("https://plot.ly/javascript-graphing-library/reference") +# complete set of args +argz <- ref %>% html_nodes(".gamma .link--impt") %>% html_text() %>% + gsub("\\n", "", .) %>% stringr::str_trim() + + +# function arguments +fun_args <- function(x) paste(x, "= NULL", collapse = ", ") +# argument documentation (put inside @param) +doc_args <- function(x) paste(x, collapse = ", ") +# put inside function body +in_args <- function(x) paste(x, "=", x, collapse = ", ") + +# scatter args +fun_args(argz[1:24]) +doc_args(argz[1:24]) +in_args(argz[1:24]) + +# bar args +fun_args(argz[26:43]) +doc_args(argz[26:43]) +in_args(argz[26:43]) + +# histogram args +fun_args(argz[45:68]) +doc_args(argz[45:68]) +in_args(argz[45:68]) + +# box args +fun_args(argz[70:89]) +doc_args(argz[70:89]) +in_args(argz[70:89]) + +# heatmap args +fun_args(argz[91:116]) +doc_args(argz[91:116]) +in_args(argz[91:116]) + +# contour args +fun_args(argz[118:145]) +doc_args(argz[118:145]) +in_args(argz[118:145]) + +# histogram2d args +fun_args(argz[147:173]) +doc_args(argz[147:173]) +in_args(argz[147:173]) + +# histogram2dcontour args +fun_args(argz[175:204]) +doc_args(argz[175:204]) +in_args(argz[175:204]) + +# area args +fun_args(argz[206:214]) +doc_args(argz[206:214]) +in_args(argz[206:214]) + +# scatter3d args +fun_args(argz[216:230]) +doc_args(argz[216:230]) +in_args(argz[216:230]) + +# surface args +fun_args(argz[232:240]) +doc_args(argz[232:240]) +in_args(argz[232:240]) + +# ---------------------------------------------------------------------- +# Trace auxiliary objects (in R/aux.R) +# ---------------------------------------------------------------------- + +# error_y args +fun_args(argz[241:251]) +doc_args(argz[241:251]) +in_args(argz[241:251]) + +# error_x args +fun_args(argz[252:263]) +doc_args(argz[252:263]) +in_args(argz[252:263]) + +# xbins args +fun_args(argz[264:266]) +doc_args(argz[264:266]) +in_args(argz[264:266]) + +# ybins args +fun_args(argz[267:269]) +doc_args(argz[267:269]) +in_args(argz[267:269]) + +# marker args +fun_args(argz[270:282]) +doc_args(argz[270:282]) +in_args(argz[270:282]) + +# line args +fun_args(argz[283:290]) +doc_args(argz[283:290]) +in_args(argz[283:290]) + +# contour args +fun_args(argz[291:295]) +doc_args(argz[291:295]) +in_args(argz[291:295]) + +# colorbar args +fun_args(argz[296:326]) +doc_args(argz[296:326]) +in_args(argz[296:326]) + +# stream args +fun_args(argz[327:328]) +doc_args(argz[327:328]) +in_args(argz[327:328]) + +# error_z args +fun_args(argz[329:339]) +doc_args(argz[329:339]) +in_args(argz[329:339]) + +# ---------------------------------------------------------------------- +# Axis objects (in R/axis.R) +# ---------------------------------------------------------------------- + +# xaxis/yaxis/zaxis args are identical +x <- fun_args(argz[340:378]) +y <- fun_args(argz[379:417]) +z <- fun_args(argz[444:482]) +identical(x, y) && identical(y, z) + +x +doc_args(argz[340:378]) +in_args(argz[340:378]) + + +# radialaxis/angularaxis args +fun_args(argz[418:437]) +doc_args(argz[418:437]) +in_args(argz[418:437]) + +# scene args +fun_args(argz[438:443]) +doc_args(argz[438:443]) +in_args(argz[438:443]) + + +# ---------------------------------------------------------------------- +# Layout objects (in R/layout.R) +# ---------------------------------------------------------------------- + +# layout args +fun_args(argz[483:512]) +doc_args(argz[483:512]) +in_args(argz[483:512]) + +# font args +fun_args(argz[513:516]) +doc_args(argz[513:516]) +in_args(argz[513:516]) + +# legend args +fun_args(argz[517:527]) +doc_args(argz[517:527]) +in_args(argz[517:527]) + +# annotation args +fun_args(argz[528:549]) +doc_args(argz[528:549]) +in_args(argz[528:549]) + +# margin args +fun_args(argz[550:557]) +doc_args(argz[550:557]) +in_args(argz[550:557]) diff --git a/inst/build-push-comment.R b/inst/build-push-comment.R new file mode 100644 index 0000000000..76cac03a84 --- /dev/null +++ b/inst/build-push-comment.R @@ -0,0 +1,158 @@ +# ----------------------------------------------------------------------- +# This script will build a visual testing table for comparing ggplot and plotly +# figures. Travis does two types of builds: +# +# (1) A so-called "push". This essentially does a checkout on the most +# recent commit of the pull request, but *doesn't* merge with master. +# In this case, $TRAVIS_PULL_REQUEST = "false" +# (2) A so-called "pr" (pull request). This *does* merge with master. +# In this case, $TRAVIS_PULL_REQUEST contains the pull request number. +# +# Since it makes more sense to visually compared what we'd see *after* we +# merge with master, we don't do anything here if it's a push build. +# ----------------------------------------------------------------------- +library("httr") +library("testthat") + +# check the working directory +stopifnot(basename(getwd()) == "plotly-test-table") +# define create_diff() which helps build the diff pages +source("jsondiff/create_diff.R") + +# http://docs.travis-ci.com/user/ci-environment/#Environment-variables +build_link <- file.path('https://travis-ci.org/ropensci/plotly/builds', + Sys.getenv("TRAVIS_BUILD_ID")) +tpr <- Sys.getenv("TRAVIS_PULL_REQUEST") +# is this build a pull request, build the test table +if (tpr != "false" && tpr != "") { + # gistr is a good reference for talking to the github API via httr + # https://github.com/ropensci/gistr/blob/master/R/zzz.R + base <- 'https://api.github.com/repos/ropensci/plotly/' + header <- add_headers(`User-Agent` = "plotly", + `Accept` = 'application/vnd.github.v3+json', + `Authorization` = paste0("token ", Sys.getenv("GITHUB_PAT"))) + # Grab the branch name for this pull request (must be successful!!) + # http://stackoverflow.com/questions/15096331/github-api-how-to-find-the-branches-of-a-pull-request + pr <- sprintf(paste0(base, 'pulls/%s'), tpr) + res <- GET(url = pr, header) + stop_for_status(res) + info <- content(res) + branch <- strsplit(info$head$label, ":")[[1]][2] + + # Return an abbreviated version of a hash + abbrev_hash <- function(hash = "") substr(hash, 1, 7) + + # NOTE: $TRAVIS_COMMIT won't match the HEAD of this (or the master) branch!!! + # (since this is a pull requst, we're *simulating* a merge with master) + this_hash <- abbrev_hash(Sys.getenv("TRAVIS_COMMIT")) + this_dir <- file.path("R", this_hash) + this_pngs <- dir(this_dir, pattern = "\\.png$") + + # HEAD of the master branch. + base_hash <- abbrev_hash(info$base$sha) + base_dir <- file.path("R", base_hash) + base_pngs <- dir(base_dir, pattern = "\\.png$") + # Re-run (current) test suite with master branch if it's missing any tests + if (!all(this_pngs %in% base_pngs)) { + dir.create(base_dir, showWarnings = FALSE) + devtools::install_github("ropensci/plotly", ref = base_hash) + print("Rerunning tests with master") + try(source("../plotly/tests/testthat.R", chdir = TRUE)) + } + + # --------------------------------------------------------------------------- + # Build the main HTML page for this build + # --------------------------------------------------------------------------- + ggversion <- as.character(packageVersion("ggplot2")) + tests <- sub("\\.png$", "", this_pngs) + df <- data.frame( + tests, + file.path("..", paste0("ggplot2-", ggversion), this_pngs), + this_pngs, + file.path("..", base_hash, this_pngs), + stringsAsFactors = FALSE + ) + names(df) <- c("test", "ggplot2", branch, "master") + # eventually link to page for each test? + #df$test <- sprintf(' %s ', df$test, df$test) + # show just the thumbnail, but link to the bigger image + for (i in setdiff(names(df), "test")) { + thumb <- file.path(dirname(df[, i]), "thumbs", basename(df[, i])) + df[, i] <- sprintf('', df[, i], thumb) + } + + html <- sprintf( + ' + + + + + + + %s + + ', as.character(knitr::kable(df, format = "html", escape = FALSE))) + writeLines(html, file.path(this_dir, "index.html")) + + # start constructing automated GitHub message + tbl_link <- sprintf("http://cpsievert.github.io/plotly-test-table/R/%s/", this_hash) + msg1 <- paste("> The message below was automatically generated after build", build_link, "\n\n") + msg2 <- sprintf("On TravisCI, commit %s was successfully merged with %s (master) to create %s. A visual testing table comparing %s with %s can be found here -> \n\n %s", + abbrev_hash(info$head$sha), base_hash, this_hash, base_hash, this_hash, tbl_link) + # --------------------------------------------------------------------------- + # For each test, build a webpage (under this commit hash directory) + # If plot hashed were different, include a JSON diff and links in the github comment + # --------------------------------------------------------------------------- + hashes <- read.csv("R/hashes.csv") + # strip any leading/trailing whitespace in urls + hashes$url <- sub("\\s$", "", sub("^\\s", "", hashes$url)) + hashes <- hashes[hashes$commit %in% c(this_hash, base_hash), ] + devtools::install("../plotly") + diffs <- character() + for (i in tests) { + test_info <- hashes[hashes$test %in% i, ] + # are the plot hashes different for this test? + has_diff <- length(unique(test_info$hash)) > 1 + if (has_diff) { + diffs[[i]] <- 1 + Dir <- file.path(this_dir, i) + dir.create(Dir) + file.copy(dir("jsondiff", full.names = T), Dir, recursive = TRUE) + png1 <- paste0(test_info$url[1], ".png") + png2 <- paste0(test_info$url[2], ".png") + res <- create_diff(png1, png2, Dir) + } + } + msg3 <- sprintf("Detected %s differences", length(diffs)) + msg <- paste(msg1, msg2, msg3, sep = "\n\n") + if (length(diffs)) { + links <- file.path(tbl_link, names(diffs)) + msg <- paste(msg, " -> \n\n", paste(links, collapse = "\n")) + } + commentz <- sprintf(paste0(base, 'issues/%s/comments'), tpr) + res <- GET(commentz, header) + warn_for_status(res) + old_body <- unlist(lapply(content(res), "[", "body")) + # only post a comment if this hash doesn't appear in any of the comments + # (needed since Travis randomly re-builds stuff) + if (!any(grepl(this_hash, old_body))) { + json <- jsonlite::toJSON(list(body = msg), auto_unbox = TRUE) + POST(url = commentz, header, body = json, encode = "json") + } else { + message("Link already posted") + } +} + +system("git status") +st <- system("git status", intern = TRUE) +# if the working state is dirty, clean it, and push! +# (if tests are added, or if ggplot2 updates, the push travis build will add ggplot2 pngs) +if (any(grepl("Changes not staged for commit:|Untracked files:", st))) { + system("git add *") + commit_msg <- paste0('"Pushed from ', build_link, '"') + system(paste('git commit -q -m', commit_msg)) + # This post explains how this works -- http://rmflight.github.io/posts/2014/11/travis_ci_gh_pages.html + repo <- sprintf("https://%s@github.com/cpsievert/plotly-test-table.git", Sys.getenv("GITHUB_PAT")) + system(paste("git pull", repo, "gh-pages")) + system(paste("git push -q", repo, "gh-pages")) +} diff --git a/inst/docs.R b/inst/docs.R new file mode 100644 index 0000000000..3c5abfffcd --- /dev/null +++ b/inst/docs.R @@ -0,0 +1,1132 @@ +# install the new/experimental plotly R package +# devtools::install_github("ropensci/plotly@carson-dsl") + +################################################################################ +# Basic Charts (https://plot.ly/r/#basic-charts) +################################################################################ + +# ---------------------------------------------------------------------- +# https://plot.ly/r/3d-line-plots/ +# ---------------------------------------------------------------------- + +# initiate a 100 x 3 matrix filled with zeros +m <- matrix(numeric(300), ncol = 3) +# simulate a 3D random-walk +for (i in 2:100) m[i, ] <- m[i-1, ] + rnorm(3) +# collect everything in a data-frame +df <- setNames( + data.frame(m, seq(1, 100)), + c("x", "y", "z", "time") +) + +# create the plotly +library(plotly) +plot_ly(df, x = x, y = y, z = z, color = time, type = "scatter3d") + +# ---------------------------------------------------------------------- +# https://plot.ly/r/3d-scatter-plots/ +# ---------------------------------------------------------------------- + +# variance-covariance matrix for a multivariate normal distribution +s <- matrix(c(1, .5, .5, + .5, 1, .5, + .5, .5, 1), ncol = 3) +# use the mvtnorm package to sample 200 observations +obs <- mvtnorm::rmvnorm(200, sigma = s) +# collect everything in a data-frame +df <- setNames(data.frame(obs), c("x", "y", "z")) + +library(plotly) +plot_ly(df, x = x, y = y, z = z, type = "scatter3d", mode = "markers") + +# ---------------------------------------------------------------------- +# https://plot.ly/r/3d-surface-plots/ +# ---------------------------------------------------------------------- + +library(plotly) +# volcano is a numeric matrix that ships with R +plot_ly(z = volcano, type = "surface") + +# 2D kernel density estimation +kd <- with(MASS::geyser, MASS::kde2d(duration, waiting, n = 50)) +with(kd, plot_ly(x = x, y = y, z = z, type = "surface")) + + +# ---------------------------------------------------------------------- +# https://plot.ly/r/filled-area-plots/ +# ---------------------------------------------------------------------- + +library(plotly) +p <- plot_ly(x = c(1, 2, 3, 4), y = c(0, 2, 3, 5), fill = "tozeroy") +add_trace(p, x = c(1, 2, 3, 4), y = c(3, 5, 1, 7), fill = "tonexty") + + +# ---------------------------------------------------------------------- +# https://plot.ly/r/bar-charts/ +# ---------------------------------------------------------------------- + +library(plotly) +p <- plot_ly( + x = c("giraffes", "orangutans", "monkeys"), + y = c(20, 14, 23), + name = "SF Zoo", + type = "bar" +) +p + +p2 <- add_trace( + p, + x = c("giraffes", "orangutans", "monkeys"), + y = c(12, 18, 29), + name = "LA Zoo" +) +p2 + +layout(p2, barmode = "stack") + +## customizing colors + +library(dplyr) +ggplot2::diamonds %>% count(cut) %>% + plot_ly(x = cut, y = n, type = "bar", marker = list(color = toRGB("black"))) + +# mapping a color variable +ggplot2::diamonds %>% count(cut, clarity) %>% + plot_ly(x = cut, y = n, type = "bar", color = clarity) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/box-plots/ +# ---------------------------------------------------------------------- + +library(plotly) +#' basic boxplot +plot_ly(y = rnorm(50), type = "box") %>% + add_trace(y = rnorm(50, 1)) +#' adding jittered points +plot_ly(y = rnorm(50), type = "box", boxpoints = "all", jitter = 0.3, + pointpos = -1.8) +#' several box plots +plot_ly(ggplot2::diamonds, y = price, color = cut, type = "box") + +#' grouped box plots +plot_ly(ggplot2::diamonds, x = cut, y = price, color = clarity, type = "box") %>% + layout(boxmode = "group") + +# ---------------------------------------------------------------------- +# https://plot.ly/r/bubble-charts/ +# ---------------------------------------------------------------------- + +# IMO, this page should be a part of this page -> https://plot.ly/r/line-and-scatter/ +library(plotly) +d <- diamonds[sample(nrow(diamonds), 1000), ] +# note how size is automatically scaled and added as hover text +plot_ly(d, x = carat, y = price, size = carat, mode = "markers") + +plot_ly(d, x = carat, y = price, text = paste("Clarity: ", clarity), + mode = "markers", color = carat, size = carat, opacity = carat) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/contour-plots/ +# ---------------------------------------------------------------------- + +#' Basic contour +library(plotly) +plot_ly(z = volcano, type = "contour") + +#' Advanced +x <- rnorm(200) +y <- rnorm(200) +p1 <- plot_ly(x = x, type = "histogram", showlegend = FALSE) +p2 <- plot_ly(x = x, y = y, type = "histogram2dcontour") +p3 <- plot_ly(y = y, type = "histogram", showlegend = FALSE) +a1 <- list(domain = c(0, .85)) +a2 <- list(domain = c(.85, 1)) +hide <- list(title = "", showticklabels = FALSE) +subplot( + layout(p1, xaxis = c(a1, hide), yaxis = a2), + layout(p2, xaxis = a1, yaxis = a1), + layout(p3, xaxis = a2, yaxis = c(a1, hide)) +) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/error-bars/ +# ---------------------------------------------------------------------- + +library(dplyr) +library(plotly) + +p <- ggplot2::mpg %>% group_by(class) %>% + summarise(mn = mean(hwy), sd = 1.96 * sd(hwy)) %>% + arrange(desc(mn)) %>% + plot_ly(x = class, y = mn, error_y = list(value = sd), + mode = "markers", name = "Highway") %>% + layout(yaxis = list(title = "Miles Per Gallon")) +p + +df2 <- mpg %>% group_by(class) %>% + summarise(mn = mean(cty), sd = 1.96 * sd(cty)) + +add_trace(p, y = mn, error_y = list(value = sd), + name = "City", data = df2) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/heatmaps/ +# ---------------------------------------------------------------------- + +library(plotly) +plot_ly(z = volcano, type = "heatmap") + + +#' categorical x/y axis +m <- matrix(rnorm(9), nrow = 3, ncol = 3) +plot_ly(z = m, x = c("a", "b", "c"), y = c("d", "e", "f"), type = "heatmap") + +#' Sequential Colorscales (Hot) +plot_ly(z = volcano, colorscale = "Hot", type = "heatmap") + +#' Sequential Colorscales (Greys) +plot_ly(z = volcano, colorscale = "Greys", type = "heatmap") + +#' Sequential Colorscales (Greens) +plot_ly(z = volcano, colorscale = "Greens", type = "heatmap") + +#' Custom colorscale via scales package +vals <- unique(scales::rescale(c(volcano))) +o <- order(vals, decreasing = FALSE) +cols <- scales::col_numeric("Blues", domain = NULL)(vals) +colz <- setNames(data.frame(vals[o], cols[o]), NULL) +plot_ly(z = volcano, colorscale = colz, type = "heatmap") + +library(viridis) +plot_ly(z = volcano, colors = viridis(256), type = "heatmap") + +# ---------------------------------------------------------------------- +# https://plot.ly/r/2D-Histogram/ +# ---------------------------------------------------------------------- + +library(plotly) +s <- matrix(c(1, -.75, -.75, 1), ncol = 2) +obs <- mvtnorm::rmvnorm(500, sigma = s) +plot_ly(x = obs[,1], y = obs[,2], type = "histogram2d") + +# ---------------------------------------------------------------------- +# https://plot.ly/r/histograms/ +# ---------------------------------------------------------------------- + +#' Basic histogram +plot_ly(x = rnorm(50), type = "histogram") + +#' Vertical histogram +plot_ly(y = rnorm(50), type = "histogram") + +#' Overlayed histograms +plot_ly(x = rnorm(500), opacity = 0.6, type = "histogram") %>% + add_trace(x = rnorm(500)) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/line-and-scatter/ +# ---------------------------------------------------------------------- + +#' Simple scatterplot +plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, mode = "markers") + +#' Scatterplot with qualitative colorscale +plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, color = Species, + mode = "markers") + +#' colors argument accepts colorbrewer2.org palette names +plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, color = Species, + colors = "Set1", mode = "markers") +#' By default, colors will 'span the gamut' +# scales::show_col(RColorBrewer::brewer.pal("Set1")) + +#' If you want finer control over the color scheme, you can pass +#' RGB or hex color codes directly to colors +pal <- RColorBrewer::brewer.pal(nlevels(iris$Species), "Set1") +plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, color = Species, + colors = pal, mode = "markers") + +#' Scatterplot with sequential colorscale +plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, color = Petal.Width, mode = "markers") + +#' Basic time-series (line) plot with loess smooth +plot_ly(economics, x = date, y = uempmed, name = "unemployment") +add_trace(y = fitted(loess(uempmed ~ as.numeric(date)))) + +#' Density plot +dens <- with(diamonds, tapply(price, INDEX = cut, density)) +df <- data.frame( + x = unlist(lapply(dens, "[[", "x")), + y = unlist(lapply(dens, "[[", "y")), + cut = rep(names(dens), each = length(dens[[1]]$x)) +) +plot_ly(df, x = x, y = y, color = cut) + +#' Different line interpolation options +x <- 1:5 +y <- c(1, 3, 2, 3, 1) +plot_ly(x = x, y = y, name = "linear", line = list(shape = "linear")) %>% + add_trace(y = y + 5, name = "spline", line = list(shape = "spline")) %>% + add_trace(y = y + 10, name = "vhv", line = list(shape = "vhv")) %>% + add_trace(y = y + 15, name = "hvh", line = list(shape = "hvh")) %>% + add_trace(y = y + 20, name = "vh", line = list(shape = "vh")) %>% + add_trace(y = y + 25, name = "hv", line = list(shape = "hv")) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/log-plot/ +# ---------------------------------------------------------------------- + +d <- diamonds[sample(nrow(diamonds), 1000), ] + +#' Without log scales +(p <- plot_ly(d, x = carat, y = price, mode = "markers")) + +#' With log scales +layout(p, xaxis = list(type = "log", autorange = T), + yaxis = list(type = "log", autorange = T)) + +# --------------------------------------------------------------------- +# https://plot.ly/r/graphing-multiple-chart-types/ +# ---------------------------------------------------------------------- + +#' Scatterplot with loess smoother + +library(plotly) +mtcars <- mtcars[order(mtcars$disp), ] +p <- plot_ly(mtcars, x = disp, y = mpg, mode = "markers", + text = rownames(mtcars), showlegend = FALSE) +add_trace(p, y = fitted(loess(mpg ~ disp)), mode = "lines", + name = "loess smoother", showlegend = TRUE) + +#' Scatterplot with loess smoother and it's uncertaincy estimates +m <- loess(mpg ~ disp, data = mtcars) +f <- with(predict(m, se = TRUE), data.frame(fit, se.fit)) + +l <- list( + color = toRGB("gray90", alpha = 0.3), + fillcolor = toRGB("gray90", alpha = 0.3) +) + +p %>% + add_trace(p, data = f, y = fit, mode = "lines") %>% + add_trace(p, data = f, y = fit + 1.96 * se.fit, mode = "lines", + fill = "tonexty", line = l) %>% + add_trace(p, data = f, y = fit - 1.96 * se.fit, mode = "lines", + fill = "tonexty", line = l) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/polar-chart/ +# ---------------------------------------------------------------------- + +p <- plot_ly(plotly::mic, r = r, t = t, color = nms, mode = "lines") +layout(p, title = "Mic Patterns", orientation = -90) + +p <- plot_ly(plotly::hobbs, r = r, t = t, color = nms, opacity = 0.7, mode = "markers") +layout(p, title = "Hobbs-Pearson Trials", plot_bgcolor = toRGB("grey90")) + +p <- plot_ly(plotly::wind, r = r, t = t, color = nms, type = "area") +layout(p, radialaxis = list(ticksuffix = "%"), orientation = 270) + +# ---------------------------------------------------------------------- +# https://plot.ly/r/time-series/ +# ---------------------------------------------------------------------- + +#' POSIXlt date/time class +now_lt <- as.POSIXlt(Sys.time(), tz = "GMT") +tm <- seq(0, 600, by = 10) +x <- now_lt - tm +y <- rnorm(length(x)) +plot_ly(x = x, y = y, text = paste(tm, "seconds from now in GMT")) + +#' POSIXct date/time class +now_ct <- as.POSIXct(Sys.time()) +tm <- seq(0, 600, by = 10) +x <- now_ct - tm +y <- rnorm(length(x)) +plot_ly(x = x, y = y, text = paste(tm, "seconds from now in", Sys.timezone())) + +#' Dates +today <- Sys.Date() +tm <- seq(0, 600, by = 10) +x <- today - tm +y <- rnorm(length(x)) +plot_ly(x = x, y = y, text = paste(tm, "days from today")) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/choropleth-maps/ (new) +# ---------------------------------------------------------------------------- + +#' World Choropleth Map +df <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/2011_us_ag_exports.csv") +df$hover <- with(df, paste(state, '
', "Beef", beef, "Dairy", dairy, "
", + "Fruits", total.fruits, "Veggies", total.veggies, + "
", "Wheat", wheat, "Corn", corn)) +# give state boundaries a white border +l <- list( + color = toRGB("white"), + width = 2 +) +# specify some map projection/options +g <- list( + scope = 'usa', + projection = list(type = 'albers usa'), + showlakes = TRUE, + lakecolor = toRGB('white') +) + +plot_ly(df, z = total.exports, text = hover, locations = code, type = 'choropleth', + locationmode = 'USA-states', color = total.exports, colors = 'Purples', + marker = list(line = l), colorbar = list(title = "Millions USD")) %>% + layout(title = '2011 US Agriculture Exports by State
(Hover for breakdown)', geo = g) + +#' World Choropleth Map +df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_world_gdp_with_codes.csv') + +# light grey boundaries +l <- list( + color = toRGB("grey"), + width = 0.5 +) + +# specify map projection/options +g <- list( + showframe = FALSE, + showcoastlines = FALSE, + projection = list(type = 'Mercator') +) + +plot_ly(df, z = GDP..BILLIONS., text = COUNTRY, locations = CODE, type = 'choropleth', + color = GDP..BILLIONS., colors = 'Blues', marker = list(line = l), + colorbar = list(tickprefix = '$', title = 'GDP Billions US$')) %>% + layout(title = '2014 Global GDP
Source:CIA World Factbook', + geo = g) + +#' Choropleth Inset Map +df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_ebola.csv') +# restrict from June to September +df <- subset(df, Month %in% 6:9) +# ordered factor variable with month abbreviations +df$abbrev <- ordered(month.abb[df$Month], levels = month.abb[6:9]) +# September totals +df9 <- subset(df, Month == 9) + +# common plot options +g <- list( + scope = 'africa', + showframe = F, + showland = T, + landcolor = toRGB("grey90") +) + +g1 <- c( + g, + resolution = 50, + showcoastlines = T, + countrycolor = toRGB("white"), + coastlinecolor = toRGB("white"), + projection = list(type = 'Mercator'), + list(lonaxis = list(range = c(-15, -5))), + list(lataxis = list(range = c(0, 12))), + list(domain = list(x = c(0, 1), y = c(0, 1))) +) + +g2 <- c( + g, + showcountries = F, + bgcolor = toRGB("white", alpha = 0), + list(domain = list(x = c(0, .6), y = c(0, .6))) +) + + +plot_ly(df, type = 'scattergeo', mode = 'markers', locations = Country, + locationmode = 'country names', text = paste(Value, "cases"), + color = as.ordered(abbrev), marker = list(size = Value/50), inherit = F) %>% + add_trace(type = 'scattergeo', mode = 'text', geo = 'geo2', showlegend = F, + lon = 21.0936, lat = 7.1881, text = 'Africa') %>% + add_trace(type = 'choropleth', locations = Country, locationmode = 'country names', + z = Month, colors = "black", showscale = F, geo = 'geo2', data = df9) %>% + layout(title = 'Ebola cases reported by month in West Africa 2014
Source: HDX', + geo = g1, geo2 = g2) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/lines-on-maps/ (new) +# ---------------------------------------------------------------------------- + +#' US Flight Paths Map + +# airport locations +air <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2011_february_us_airport_traffic.csv') +# flights between airports +flights <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2011_february_aa_flight_paths.csv') +flights$id <- seq_len(nrow(flights)) + +# map projection +geo <- list( + scope = 'north america', + projection = list(type = 'azimuthal equal area'), + showland = TRUE, + landcolor = toRGB("gray95"), + countrycolor = toRGB("gray80") +) + +plot_ly(air, lon = long, lat = lat, text = airport, type = 'scattergeo', + locationmode = 'USA-states', marker = list(size = 2, color = 'red'), + inherit = FALSE) %>% + add_trace(lon = list(start_lon, end_lon), lat = list(start_lat, end_lat), + group = id, opacity = cnt/max(cnt), data = flights, + mode = 'lines', line = list(width = 1, color = 'red'), + type = 'scattergeo', locationmode = 'USA-states') %>% + layout(title = 'Feb. 2011 American Airline flight paths
(Hover for airport names)', + geo = geo, showlegend = FALSE) + +#' London to NYC Great Circle +library(plotly) +plot_ly(lat = c(40.7127, 51.5072), lon = c(-74.0059, 0.1275), type = 'scattergeo', + mode = 'lines', line = list(width = 2, color = 'blue')) %>% + layout( + title = 'London to NYC Great Circle', + showlegend = FALSE, + geo = list( + resolution = 50, + showland = TRUE, + showlakes = TRUE, + landcolor = toRGB("grey80"), + countrycolor = toRGB("grey80"), + lakecolor = toRGB("white"), + projection = list(type = "equirectangular"), + coastlinewidth = 2, + lataxis = list( + range = c(20, 60), + showgrid = TRUE, + tickmode = "linear", + dtick = 10 + ), + lonaxis = list( + range = c(-100, 20), + showgrid = TRUE, + tickmode = "linear", + dtick = 20 + ) + ) + ) + +#' Contour lines on globe +library(plotly) +df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/globe_contours.csv') +df$id <- seq_len(nrow(df)) + +library(tidyr) +d <- df %>% + gather(key, value, -id) %>% + separate(key, c("l", "line"), "\\.") %>% + spread(l, value) + +p <- plot_ly(type = 'scattergeo', mode = 'lines', + line = list(width = 2, color = 'violet')) + +for (i in unique(d$line)) + p <- add_trace(p, lat = lat, lon = lon, data = subset(d, line == i)) + +geo <- list( + showland = TRUE, + showlakes = TRUE, + showcountries = TRUE, + showocean = TRUE, + countrywidth = 0.5, + landcolor = toRGB("grey90"), + lakecolor = toRGB("white"), + oceancolor = toRGB("white"), + projection = list( + type = 'orthographic', + rotation = list( + lon = -100, + lat = 40, + roll = 0 + ) + ), + lonaxis = list( + showgrid = TRUE, + gridcolor = toRGB("gray40"), + gridwidth = 0.5 + ), + lataxis = list( + showgrid = TRUE, + gridcolor = toRGB("gray40"), + gridwidth = 0.5 + ) +) + +layout(p, showlegend = FALSE, geo = geo, + title = 'Contour lines over globe
(Click and drag to rotate)') + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/scatter-plots-on-maps/ (new) +# ---------------------------------------------------------------------------- + +#' US Airports Map +library(plotly) +df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2011_february_us_airport_traffic.csv') +df$hover <- with(df, paste(airport, city, state, "Arrivals: ", cnt)) + +# marker styling +m <- list( + colorbar = list(title = "Incoming flights February 2011"), + size = 8, opacity = 0.8, symbol = 'square' +) + +# geo styling +g <- list( + scope = 'usa', + projection = list(type = 'albers usa'), + showland = TRUE, + landcolor = toRGB("gray95"), + subunitcolor = toRGB("gray85"), + countrycolor = toRGB("gray85"), + countrywidth = 0.5, + subunitwidth = 0.5 +) + +plot_ly(df, lat = lat, lon = long, text = hover, color = cnt, + type = 'scattergeo', locationmode = 'USA-states', mode = 'markers', + marker = m) %>% + layout(title = 'Most trafficked US airports
(Hover for airport)', geo = g) + +#' North American Precipitation Map +library(plotly) +df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2015_06_30_precipitation.csv') +df$hover <- paste(df$Globvalue, "inches") + +# change default color scale title +m <- list(colorbar = list(title = "Total Inches")) + +# geo styling +g <- list( + scope = 'north america', + showland = TRUE, + landcolor = toRGB("grey83"), + subunitcolor = toRGB("white"), + countrycolor = toRGB("white"), + showlakes = TRUE, + lakecolor = toRGB("white"), + showsubunits = TRUE, + showcountries = TRUE, + resolution = 50, + projection = list( + type = 'conic conformal', + rotation = list( + lon = -100 + ) + ), + lonaxis = list( + showgrid = TRUE, + gridwidth = 0.5, + range = c(-140, -55), + dtick = 5 + ), + lataxis = list( + showgrid = TRUE, + gridwidth = 0.5, + range = c(20, 60), + dtick = 5 + ) +) + +plot_ly(df, lat = Lat, lon = Lon, text = hover, color = Globvalue, + type = 'scattergeo', marker = m) %>% + layout(title = 'US Precipitation 06-30-2015
Source: NOAA', geo = g) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/bubble-maps/ (new) +# ---------------------------------------------------------------------------- + +#' United States Bubble Map +library(plotly) +df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_us_cities.csv') +df$hover <- paste(df$name, "Population", df$pop/1e6, " million") + +df$q <- with(df, cut(pop, quantile(pop))) +levels(df$q) <- paste(c("1st", "2nd", "3rd", "4th", "5th"), "Quantile") +df$q <- as.ordered(df$q) + +g <- list( + scope = 'usa', + projection = list(type = 'albers usa'), + showland = TRUE, + landcolor = toRGB("gray85"), + subunitwidth = 1, + countrywidth = 1, + subunitcolor = toRGB("white"), + countrycolor = toRGB("white") +) + +plot_ly(df, lon = lon, lat = lat, text = hover, + marker = list(size = sqrt(pop/10000) + 1), + color = q, type = 'scattergeo', locationmode = 'USA-states') %>% + layout(title = '2014 US city populations
(Click legend to toggle)', geo = g) + +#' Ebola Cases in West Africa + +# see 'Choropleth Inset Map' example + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/map-subplots-and-small-multiples/ (new) +# ---------------------------------------------------------------------------- + +#' US map small multiples +library(plotly) +df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/1962_2006_walmart_store_openings.csv') + +# common map properties +g <- list( + scope = 'usa', + showland = T, + landcolor = toRGB("gray90"), + showcountries = F, + subunitcolor = toRGB("white") +) + +# year text labels +yrs <- unique(df$YEAR) +id <- seq_along(yrs) +df2 <- data.frame( + YEAR = yrs, + id = id +) + +# id for anchoring traces on different plots +df$id <- as.integer(factor(df$YEAR)) + +p <- plot_ly(df, type = 'scattergeo', lon = LON, lat = LAT, group = YEAR, + geo = paste0("geo", id), showlegend = F, + marker = list(color = toRGB("blue"), opacity = 0.5)) %>% + add_trace(lon = -78, lat = 47, mode = 'text', group = YEAR, + geo = paste0("geo", id), text = YEAR, data = df2) %>% + layout(title = 'New Walmart Stores per year 1962-2006
Source: University of Minnesota', + geo = g, + autosize = F, + width = 1000, + height = 900, + hovermode = F) + +subplot(p, nrows = 9) + +################################################################################ +# Multiple Axes, Subplots, and Insets (https://plot.ly/r/#multiple-axes-subplots-and-insets) +################################################################################ + + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/subplots/ +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/multiple-axes/ +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/insets/ +# ---------------------------------------------------------------------------- + +p1 <- plot_ly(x = c(1, 2, 3), y = c(4, 3, 2)) +p2 <- plot_ly(x = c(20, 30, 40), y = c(30, 40, 50)) %>% + layout(xaxis = list(domain = c(0.6, 0.95)), + yaxis = list(domain = c(0.6, 0.95))) +subplot(p1, p2) + + +################################################################################ +# Layout Options +################################################################################ + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/setting-graph-size/ +# ---------------------------------------------------------------------------- + +library(plotly) +m = list( + l = 50, + r = 50, + b = 100, + t = 100, + pad = 4 +) +plot_ly(x = seq(0, 8), y = seq(0, 8)) %>% + layout(autosize = F, width = 500, height = 500, margin = m) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/legend/ +# ---------------------------------------------------------------------------- + +#' Legend Names +library(plotly) +p <- plot_ly(x = seq(0, 8), y = rnorm(8), name = "Blue Trace") %>% + add_trace(y = rnorm(8), name = "Orange Trace") +p + +#' Hiding the Legend +p %>% layout(showlegend = FALSE) + +#' Positioning the Legend +p %>% layout(legend = list(x = 0.5, y = 0)) + +#' Styling the Legend +f <- list( + family = "sans-serif", + size = 12, + color = "#000" +) +l <- list( + font = f, + bgcolor = "#E2E2E2", + bordercolor = "#FFFFFF", + borderwidth = 2 +) +p %>% layout(legend = l) + +#' Hiding Legend Entries +plot_ly(x = seq(0, 8), y = rnorm(8), showlegend = FALSE) %>% + add_trace(y = rnorm(8), name = "Orange Trace", showlegend = TRUE) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/LaTeX/ +# ---------------------------------------------------------------------------- + +library(plotly) +plot_ly(x = c(1, 2, 3, 4), y = c(1, 4, 9, 16), + name = "$\\alpha_{1c} = 352 \\pm 11 \\text{ km s}^{-1}$") %>% + add_trace(x = c(1, 2, 3, 4), y = c(0.5, 2, 4.5, 8), + name = "$\\beta_{1c} = 25 \\pm 11 \\text{ km s}^{-1}$") %>% + layout(xaxis = list(title = "$\\sqrt{(n_\\text{c}(t|{T_\\text{early}}))}$"), + yaxis = list(title = "$d, r \\text{ (solar radius)}$")) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/figure-labels/ +# ---------------------------------------------------------------------------- + +# NOTE: title and link of this page could be improvded + +library(plotly) +f <- list( + family = "Courier New, monospace", + size = 18, + color = "#7f7f7f" +) +x <- list( + title = "x Axis", + titlefont = f +) +y <- list( + title = "y Axis", + titlefont = f +) +plot_ly(x = rnorm(10), y = rnorm(10), mode = "markers") %>% + layout(xaxis = x, yaxis = y) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/font/ +# ---------------------------------------------------------------------------- + +library(plotly) +f <- list( + family = "Courier New, monospace", + size = 18, + color = "#7f7f7f" +) +plot_ly(x = 0:8, y = 0:8) %>% + layout(title = "Global Font", font = f) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/axes/ +# ---------------------------------------------------------------------------- + +#' Style Axes Ticks and Placement + +library(plotly) +a <- list( + autotick = FALSE, + ticks = "outside", + tick0 = 0, + dtick = 0.25, + ticklen = 5, + tickwidth = 2, + tickcolor = toRGB("blue") +) +s <- seq(1, 4, by = 0.25) +plot_ly(x = s, y = s) %>% + layout(xaxis = a, yaxis = a) + +#' Style Axes Title and Ticks Labels + +library(plotly) +f1 <- list( + family = "Arial, sans-serif", + size = 18, + color = "lightgrey" +) +f2 <- list( + family = "Old Standard TT, serif", + size = 14, + color = "black" +) +a <- list( + title = "AXIS TITLE", + titlefont = f1, + showticklabels = TRUE, + tickangle = 45, + tickfont = f2, + exponentformat = "e", + showexponent = "All" +) + +s <- seq(0, 8) +plot_ly(x = s, y = s) %>% + add_trace(y = rev(s)) %>% + layout(xaxis = a, yaxis = a, showlegend = FALSE) + +#' Style Axes and the Zero-Line + +library(plotly) +ax <- list( + zeroline = TRUE, + showline = TRUE, + mirror = "ticks", + gridcolor = toRGB("gray50"), + gridwidth = 2, + zerolinecolor = toRGB("red"), + zerolinewidth = 4, + linecolor = toRGB("black"), + linewidth = 6 +) +s <- seq(-1, 4) +plot_ly(x = s, y = s) %>% + layout(xaxis = ax, yaxis = ax) %>% offline + +#' Hide Axes Title, Lines, Ticks, and Labels + +library(plotly) +ax <- list( + title = "", + zeroline = FALSE, + showline = FALSE, + showticklabels = FALSE, + showgrid = FALSE +) + +plot_ly(x = c(1, 2), y = c(1, 2)) %>% + layout(xaxis = ax, yaxis = ax) %>% offline + +#' Reversed Axes + +library(plotly) +plot_ly(x = c(1, 2), y = c(1, 2)) %>% + layout(xaxis = list(autorange = "reversed")) + +#' Logarithmic Axes + +library(plotly) +s <- seq(1, 8) +plot_ly(x = s, y = exp(s), name = "exponential") %>% + add_trace(y = s, name = "linear") %>% + layout(yaxis = list(type = "log")) + +#' Rangemode + +library(plotly) +plot_ly(x = seq(2, 6, by = 2), y = seq(-3, 3, by = 3)) %>% + layout( + xaxis = list(rangemode = "tozero"), + yaxis = list(rangemode = "nonnegative") + ) + +#' Manual ranges + +library(plotly) +s <- seq(1, 8) +plot_ly(x = s, y = s) %>% + add_trace(y = rev(s)) %>% + layout( + xaxis = list(range = c(2, 5)), + yaxis = list(range = c(2, 5)) + ) + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/text-and-annotations/ +# ---------------------------------------------------------------------------- + +#' Text mode +plot_ly(mtcars, x = wt, y = mpg, text = rownames(mtcars), mode = "text") + +#' Styling text +t <- list( + family = "sans serif", + size = 18, + color = toRGB("grey50") +) +plot_ly(mtcars, x = wt, y = mpg, text = rownames(mtcars), mode = "markers+text", + textfont = t, textposition = "top middle") + +#' Show custom text on hover +plot_ly(mtcars, x = wt, y = mpg, text = rownames(mtcars), mode = "markers") + +#' Single Annotation + +m <- mtcars[which.max(mtcars$mpg), ] + +a <- list( + x = m$wt, + y = m$mpg, + text = rownames(m), + xref = "x", + yref = "y", + showarrow = TRUE, + arrowhead = 7, + ax = 20, + ay = -40 +) + +plot_ly(mtcars, x = wt, y = mpg, mode = "markers") %>% + layout(annotations = a) + +#' Styling and Coloring Annotations + +m <- mtcars[which.max(mtcars$mpg), ] + +f <- list( + family = "sans serif", + size = 18, + color = toRGB("white") +) + +a <- list( + textposition = "top right", + font = f, + x = m$wt, + y = m$mpg, + text = rownames(m), + xref = "x", + yref = "y", + ax = 20, + ay = -40, + align = "center", + arrowhead = 2, + arrowsize = 1, + arrowwidth = 2, + arrowcolor = toRGB("lightblue"), + bordercolor = toRGB("gray50"), + borderwidth = 2, + borderpad = 4, + bgcolor = toRGB("blue"), + opacity = 0.8 +) + +plot_ly(mtcars, x = wt, y = mpg, mode = "markers") %>% + layout(annotations = a) + +#' Many Annotations + +a <- list() +for (i in seq_len(nrow(mtcars))) { + m <- mtcars[i, ] + a[[i]] <- list( + x = m$wt, + y = m$mpg, + text = rownames(m), + xref = "x", + yref = "y", + showarrow = TRUE, + arrowhead = 7, + ax = 20, + ay = -40 + ) +} +# could be improved with label dodging, but how to measure text height/width? +plot_ly() %>% layout(annotations = a) + + +################################################################################ +# File Settings +################################################################################ + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/privacy/ +# ---------------------------------------------------------------------------- + +library(plotly) + +#' public +plot_ly(x = c(0, 2, 4), y = c(0, 4, 2)) + +#' private +plot_ly(x = c(0, 2, 4), y = c(0, 4, 2), world_readable = FALSE) + +# another option is to "build" the plot, then tack on these properties +p <- plot_ly(x = c(0, 2, 4), y = c(0, 4, 2)) +p <- plotly_build(p) +p$world_readable <- FALSE +p + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/file-options/ +# ---------------------------------------------------------------------------- + +library(plotly) + +# By default, everytime you print a plotly object, it will create a new file +plot_ly(x = c(1, 2), y = c(1, 2), filename = "myPlot") + +# There are a couple ways to prevent a new file from being created +# (1) Use get_figure() to obtain a figure object. +fig <- get_figure("cpsievert", "559") +# Then modify and print that object (this will only work if you have proper credentials) +layout(fig, title = paste("Modified on ", Sys.time())) + +# (2) If you know the filename attached to the plot you want to modify, +# place that name in filename and specify fileopt to overwrite that file +plot_ly(x = c(1, 2), y = c(1, 2), filename = "myPlot", fileopt = "overwrite") + +# NOTE: filenames that contain "/" be treated as a Plotly directory and will be saved to your Plotly account in a folder tree. For example, to save your graphs to the folder my-graphs: + +################################################################################ +# Get Requests, Static Image Export, and Interactive Embedding (https://plot.ly/r/#get-requests-static-image-export) +################################################################################ + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/embedding-plotly-graphs-in-HTML/ +# ---------------------------------------------------------------------------- + +# Maybe copy/paste relevant bits from this vignette? -> +# https://github.com/ropensci/plotly/blob/carson-dsl/vignettes/intro.Rmd + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/shiny-tutorial/ +# ---------------------------------------------------------------------------- + +# Maybe link to an updated version of this blog post? +# http://moderndata.plot.ly/dashboards-in-r-with-shiny-plotly/ + +# If we want, we could copy/paste source from this folder -> +# https://github.com/ropensci/plotly/tree/carson-dsl/inst/examples + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/get-requests/ +# ---------------------------------------------------------------------------- + +fig <- get_figure("cpsievert", "559") +layout(fig, title = paste("Modified on ", Sys.time())) + +################################################################################ +# Miscellaneous +################################################################################ + +# ---------------------------------------------------------------------------- +# https://plot.ly/r/static-image-export/ (currently no R page) +# ---------------------------------------------------------------------------- + +# Use the curl package to download a static image of any publicly viewable figure +library(curl) +curl_download("https://plot.ly/~cpsievert/1000.png", "image.png") +curl_download("https://plot.ly/~cpsievert/1000.pdf", "image.pdf") + +# you can also download the underlying SVG + +curl_download("https://plot.ly/~cpsievert/1000.svg", "image.svg") diff --git a/inst/examples/Diamonds/server.R b/inst/examples/Diamonds/server.R new file mode 100644 index 0000000000..73c61c6036 --- /dev/null +++ b/inst/examples/Diamonds/server.R @@ -0,0 +1,27 @@ +library(shiny) +library(plotly) +data(diamonds, package = "ggplot2") + +shinyServer(function(input, output, session) { + + #add reactive data information. Dataset = built in diamonds data + dataset <- reactive({ + diamonds[sample(nrow(diamonds), input$sampleSize),] + }) + + output$trendPlot <- renderPlotly({ + # build graph with ggplot syntax + p <- ggplot(dataset(), aes_string(x = input$x, y = input$y)) + + geom_point() + + # if color is specified, add it as an aesthetic + if (input$color != 'None') p <- p + aes_string(color=input$color) + + # if at least one facet column/row is specified, add it + facets <- paste(input$facet_row, '~', input$facet_col) + if (facets != '. ~ .') p <- p + facet_grid(facets) + # return the ggplot object and renderPlotly() will know how to handle it + p + }) + +}) diff --git a/inst/examples/Diamonds/ui.R b/inst/examples/Diamonds/ui.R new file mode 100644 index 0000000000..d5d1887730 --- /dev/null +++ b/inst/examples/Diamonds/ui.R @@ -0,0 +1,28 @@ +library(shiny) +library(plotly) +data(diamonds, package = "ggplot2") +nms <- names(diamonds) + +shinyUI(pageWithSidebar( + + headerPanel("Diamonds Explorer"), + + sidebarPanel( + + sliderInput('sampleSize', 'Sample Size', min = 1, max = nrow(diamonds), + value = 1000, step = 500, round = 0), + + selectInput('x', 'X', choices = nms, selected = "carat"), + selectInput('y', 'Y', choices = nms, selected = "price"), + selectInput('color', 'Color', choices = c('None', nms), selected = "clarity"), + + selectInput('facet_row', 'Facet Row', c(None = '.', nms), selected = "clarity"), + selectInput('facet_col', 'Facet Column', c(None = '.', nms)), + sliderInput('plotHeight', 'Height of plot (in pixels)', + min = 100, max = 2000, value = 1000) + ), + + mainPanel( + plotlyOutput('trendPlot', height = "800px") + ) +)) diff --git a/inst/examples/Movies/.Rapp.history b/inst/examples/Movies/.Rapp.history new file mode 100644 index 0000000000..e69de29bb2 diff --git a/inst/examples/Movies/server.R b/inst/examples/Movies/server.R new file mode 100644 index 0000000000..7acc26231b --- /dev/null +++ b/inst/examples/Movies/server.R @@ -0,0 +1,22 @@ +library(shiny) +library(plotly) + +data(movies, package = "ggplot2") +minx <- min(movies$rating) +maxx <- max(movies$rating) + +shinyServer(function(input, output) { + + output$trendPlot <- renderPlotly({ + # size of the bins depend on the input 'bins' + size <- (maxx - minx) / input$bins + + # a simple histogram of movie ratings + p <- plot_ly(movies, x = rating, autobinx = F, type = "histogram", + xbins = list(start = minx, end = maxx, size = size)) + # style the xaxis + layout(p, xaxis = list(title = "Ratings", range = c(minx, maxx), autorange = F, + autotick = F, tick0 = minx, dtick = size)) + }) +}) + diff --git a/inst/examples/Movies/ui.R b/inst/examples/Movies/ui.R new file mode 100644 index 0000000000..92307e3c29 --- /dev/null +++ b/inst/examples/Movies/ui.R @@ -0,0 +1,12 @@ +library(shiny) +library(plotly) + +shinyUI(fluidPage( + titlePanel("Movie Ratings!"), + sidebarPanel( + sliderInput("bins", "Number of bins:", min = 1, max = 50, value = 10) + ), + mainPanel( + plotlyOutput("trendPlot") + ) +)) diff --git a/inst/examples/UN_Advanced/.Rapp.history b/inst/examples/UN_Advanced/.Rapp.history new file mode 100644 index 0000000000..e69de29bb2 diff --git a/inst/examples/UN_Advanced/Data/UN_IdealPoints.csv b/inst/examples/UN_Advanced/Data/UN_IdealPoints.csv new file mode 100644 index 0000000000..ae2904164c --- /dev/null +++ b/inst/examples/UN_Advanced/Data/UN_IdealPoints.csv @@ -0,0 +1,9121 @@ +Year,ID,Name,Ideal.point +1946,USA,United States of America,1.714 +1946,CAN,Canada,1.849 +1946,CUB,Cuba,1.214 +1946,HAI,Haiti,0.627 +1946,DOM,Dominican Republic,1.554 +1946,MEX,Mexico,0.894 +1946,GUA,Guatemala,0.448 +1946,HON,Honduras,1.218 +1946,SAL,El Salvador,1.98 +1946,NIC,Nicaragua,2.086 +1946,COS,Costa Rica,2.044 +1946,PAN,Panama,1.236 +1946,COL,Colombia,0.309 +1946,VEN,Venezuela,0.651 +1946,ECU,Ecuador,0.975 +1946,PER,Peru,1.879 +1946,BRA,Brazil,1.574 +1946,BOL,Bolivia,1.376 +1946,PAR,Paraguay,2.142 +1946,CHL,Chile,0.846 +1946,ARG,Argentina,1.841 +1946,URU,Uruguay,1.468 +1946,UKG,United Kingdom,2.158 +1946,NTH,Netherlands,2.011 +1946,BEL,Belgium,1.732 +1946,LUX,Luxembourg,1.819 +1946,FRN,France,0.894 +1946,POL,Poland,-1.606 +1946,CZE,Czechoslovakia,-0.796 +1946,YUG,Yugoslavia,-2.303 +1946,GRC,Greece,2.021 +1946,RUS,Russia,-2.296 +1946,UKR,Ukraine,-2.368 +1946,BLR,Belarus,-2.324 +1946,SWD,Sweden,1.262 +1946,NOR,Norway,0.966 +1946,DEN,Denmark,1.231 +1946,ICE,Iceland,1.209 +1946,LBR,Liberia,-0.192 +1946,ETH,Ethiopia,0.441 +1946,SAF,South Africa,1.834 +1946,IRN,Iran,0.757 +1946,TUR,Turkey,1.619 +1946,IRQ,Iraq,0.703 +1946,EGY,Egypt,0.729 +1946,SYR,Syria,0.825 +1946,LEB,Lebanon,1.009 +1946,SAU,Saudi Arabia,0.756 +1946,AFG,Afghanistan,0.669 +1946,TAW,Taiwan,0.741 +1946,IND,India,-0.043 +1946,PHI,Philippines,0.93 +1946,AUL,Australia,1.527 +1946,NEW,New Zealand,1.621 +1947,USA,United States of America,1.813 +1947,CAN,Canada,1.987 +1947,CUB,Cuba,1.059 +1947,HAI,Haiti,0.448 +1947,DOM,Dominican Republic,1.722 +1947,MEX,Mexico,0.735 +1947,GUA,Guatemala,0.341 +1947,HON,Honduras,1.047 +1947,SAL,El Salvador,1.903 +1947,NIC,Nicaragua,2.202 +1947,COS,Costa Rica,2.133 +1947,PAN,Panama,1.013 +1947,COL,Colombia,0.723 +1947,VEN,Venezuela,0.834 +1947,ECU,Ecuador,1.251 +1947,PER,Peru,1.699 +1947,BRA,Brazil,1.565 +1947,BOL,Bolivia,1.439 +1947,PAR,Paraguay,2.177 +1947,CHL,Chile,1.106 +1947,ARG,Argentina,1.966 +1947,URU,Uruguay,1.472 +1947,UKG,United Kingdom,2.119 +1947,NTH,Netherlands,1.928 +1947,BEL,Belgium,1.822 +1947,LUX,Luxembourg,1.765 +1947,FRN,France,1.157 +1947,POL,Poland,-1.667 +1947,CZE,Czechoslovakia,-1.103 +1947,YUG,Yugoslavia,-2.282 +1947,GRC,Greece,2.099 +1947,RUS,Russia,-2.264 +1947,UKR,Ukraine,-2.325 +1947,BLR,Belarus,-2.279 +1947,SWD,Sweden,1.274 +1947,NOR,Norway,1.168 +1947,DEN,Denmark,1.315 +1947,ICE,Iceland,1.273 +1947,LBR,Liberia,0.293 +1947,ETH,Ethiopia,0.066 +1947,SAF,South Africa,1.96 +1947,IRN,Iran,0.517 +1947,TUR,Turkey,1.383 +1947,IRQ,Iraq,0.533 +1947,EGY,Egypt,0.507 +1947,SYR,Syria,0.484 +1947,LEB,Lebanon,0.584 +1947,SAU,Saudi Arabia,0.466 +1947,YAR,Yemen Arab Republic,0.354 +1947,AFG,Afghanistan,0.372 +1947,TAW,Taiwan,0.653 +1947,IND,India,-0.225 +1947,PAK,Pakistan,0.355 +1947,THI,Thailand,0.778 +1947,PHI,Philippines,0.711 +1947,AUL,Australia,1.738 +1947,NEW,New Zealand,1.581 +1948,USA,United States of America,1.936 +1948,CAN,Canada,1.911 +1948,CUB,Cuba,0.877 +1948,HAI,Haiti,0.66 +1948,DOM,Dominican Republic,1.639 +1948,MEX,Mexico,0.778 +1948,GUA,Guatemala,0.38 +1948,HON,Honduras,1.305 +1948,SAL,El Salvador,1.49 +1948,NIC,Nicaragua,1.98 +1948,COS,Costa Rica,1.122 +1948,PAN,Panama,1.31 +1948,COL,Colombia,1.019 +1948,VEN,Venezuela,0.669 +1948,ECU,Ecuador,1.002 +1948,PER,Peru,1.636 +1948,BRA,Brazil,1.351 +1948,BOL,Bolivia,1.474 +1948,PAR,Paraguay,1.602 +1948,CHL,Chile,1.209 +1948,ARG,Argentina,0.933 +1948,URU,Uruguay,1.031 +1948,UKG,United Kingdom,2.074 +1948,NTH,Netherlands,2.104 +1948,BEL,Belgium,1.852 +1948,LUX,Luxembourg,1.955 +1948,FRN,France,1.17 +1948,POL,Poland,-2.085 +1948,CZE,Czechoslovakia,-1.92 +1948,YUG,Yugoslavia,-2.323 +1948,GRC,Greece,1.972 +1948,RUS,Russia,-2.401 +1948,UKR,Ukraine,-2.438 +1948,BLR,Belarus,-2.394 +1948,SWD,Sweden,1.365 +1948,NOR,Norway,1.585 +1948,DEN,Denmark,1.611 +1948,ICE,Iceland,1.872 +1948,LBR,Liberia,0.743 +1948,ETH,Ethiopia,0.661 +1948,SAF,South Africa,1.443 +1948,IRN,Iran,0.424 +1948,TUR,Turkey,1.497 +1948,IRQ,Iraq,0.248 +1948,EGY,Egypt,0.684 +1948,SYR,Syria,0.322 +1948,LEB,Lebanon,0.666 +1948,ISR,Israel,0.458 +1948,SAU,Saudi Arabia,0.421 +1948,YAR,Yemen Arab Republic,0.267 +1948,AFG,Afghanistan,0.125 +1948,TAW,Taiwan,0.828 +1948,IND,India,0.239 +1948,PAK,Pakistan,0.231 +1948,MYA,Myanmar,0.212 +1948,THI,Thailand,0.905 +1948,PHI,Philippines,0.617 +1948,AUL,Australia,1.507 +1948,NEW,New Zealand,1.381 +1949,USA,United States of America,1.877 +1949,CAN,Canada,1.672 +1949,CUB,Cuba,0.8 +1949,HAI,Haiti,0.623 +1949,DOM,Dominican Republic,1.329 +1949,MEX,Mexico,0.589 +1949,GUA,Guatemala,0.453 +1949,HON,Honduras,1.175 +1949,SAL,El Salvador,1.229 +1949,NIC,Nicaragua,1.419 +1949,COS,Costa Rica,1.145 +1949,PAN,Panama,1.383 +1949,COL,Colombia,1.126 +1949,VEN,Venezuela,0.746 +1949,ECU,Ecuador,0.769 +1949,PER,Peru,1.346 +1949,BRA,Brazil,0.911 +1949,BOL,Bolivia,1.375 +1949,PAR,Paraguay,1.517 +1949,CHL,Chile,1.297 +1949,ARG,Argentina,1.028 +1949,URU,Uruguay,0.875 +1949,UKG,United Kingdom,2.039 +1949,NTH,Netherlands,2.294 +1949,BEL,Belgium,2.299 +1949,LUX,Luxembourg,2.08 +1949,FRN,France,1.504 +1949,POL,Poland,-2.279 +1949,CZE,Czechoslovakia,-2.163 +1949,YUG,Yugoslavia,-1.733 +1949,GRC,Greece,1.745 +1949,RUS,Russia,-2.501 +1949,UKR,Ukraine,-2.521 +1949,BLR,Belarus,-2.503 +1949,SWD,Sweden,1.432 +1949,NOR,Norway,1.709 +1949,DEN,Denmark,1.849 +1949,ICE,Iceland,1.7 +1949,LBR,Liberia,0.665 +1949,ETH,Ethiopia,0.499 +1949,SAF,South Africa,1.938 +1949,IRN,Iran,0.474 +1949,TUR,Turkey,1.649 +1949,IRQ,Iraq,0.26 +1949,EGY,Egypt,0.326 +1949,SYR,Syria,0.246 +1949,LEB,Lebanon,0.405 +1949,ISR,Israel,0.609 +1949,SAU,Saudi Arabia,0.22 +1949,YAR,Yemen Arab Republic,-0.001 +1949,AFG,Afghanistan,-0.05 +1949,TAW,Taiwan,0.969 +1949,IND,India,0.203 +1949,PAK,Pakistan,0.354 +1949,MYA,Myanmar,0.434 +1949,THI,Thailand,0.923 +1949,PHI,Philippines,0.53 +1949,AUL,Australia,1.504 +1949,NEW,New Zealand,1.477 +1950,USA,United States of America,1.811 +1950,CAN,Canada,1.812 +1950,CUB,Cuba,0.667 +1950,HAI,Haiti,0.837 +1950,DOM,Dominican Republic,1.462 +1950,MEX,Mexico,0.498 +1950,GUA,Guatemala,0.62 +1950,HON,Honduras,1.223 +1950,SAL,El Salvador,0.995 +1950,NIC,Nicaragua,1.38 +1950,COS,Costa Rica,1.44 +1950,PAN,Panama,1.262 +1950,COL,Colombia,1.217 +1950,VEN,Venezuela,0.95 +1950,ECU,Ecuador,0.909 +1950,PER,Peru,1.489 +1950,BRA,Brazil,1.084 +1950,BOL,Bolivia,1.409 +1950,PAR,Paraguay,1.505 +1950,CHL,Chile,1.176 +1950,ARG,Argentina,0.84 +1950,URU,Uruguay,0.63 +1950,UKG,United Kingdom,1.574 +1950,NTH,Netherlands,2.234 +1950,BEL,Belgium,2.355 +1950,LUX,Luxembourg,2.183 +1950,FRN,France,1.492 +1950,POL,Poland,-2.421 +1950,CZE,Czechoslovakia,-2.33 +1950,YUG,Yugoslavia,-1.095 +1950,GRC,Greece,1.786 +1950,RUS,Russia,-2.569 +1950,UKR,Ukraine,-2.581 +1950,BLR,Belarus,-2.553 +1950,SWD,Sweden,1.411 +1950,NOR,Norway,1.508 +1950,DEN,Denmark,1.595 +1950,ICE,Iceland,1.568 +1950,LBR,Liberia,0.556 +1950,ETH,Ethiopia,0.684 +1950,SAF,South Africa,2.17 +1950,IRN,Iran,0.41 +1950,TUR,Turkey,1.523 +1950,IRQ,Iraq,0.311 +1950,EGY,Egypt,-0.076 +1950,SYR,Syria,-0.121 +1950,LEB,Lebanon,0.251 +1950,ISR,Israel,0.623 +1950,SAU,Saudi Arabia,-0.026 +1950,YAR,Yemen Arab Republic,-0.13 +1950,AFG,Afghanistan,-0.183 +1950,TAW,Taiwan,0.984 +1950,IND,India,-0.069 +1950,PAK,Pakistan,0.303 +1950,MYA,Myanmar,0.049 +1950,THI,Thailand,1.17 +1950,PHI,Philippines,0.603 +1950,INS,Indonesia,-0.303 +1950,AUL,Australia,1.466 +1950,NEW,New Zealand,1.65 +1951,USA,United States of America,1.828 +1951,CAN,Canada,1.916 +1951,CUB,Cuba,0.745 +1951,HAI,Haiti,0.764 +1951,DOM,Dominican Republic,1.114 +1951,MEX,Mexico,0.329 +1951,GUA,Guatemala,0.317 +1951,HON,Honduras,1.184 +1951,SAL,El Salvador,0.88 +1951,NIC,Nicaragua,1.526 +1951,COS,Costa Rica,1.559 +1951,PAN,Panama,1.149 +1951,COL,Colombia,1.065 +1951,VEN,Venezuela,1.099 +1951,ECU,Ecuador,0.667 +1951,PER,Peru,1.432 +1951,BRA,Brazil,1.186 +1951,BOL,Bolivia,1.176 +1951,PAR,Paraguay,1.436 +1951,CHL,Chile,0.844 +1951,ARG,Argentina,0.848 +1951,URU,Uruguay,0.783 +1951,UKG,United Kingdom,1.832 +1951,NTH,Netherlands,2.294 +1951,BEL,Belgium,2.319 +1951,LUX,Luxembourg,2.242 +1951,FRN,France,1.652 +1951,POL,Poland,-2.43 +1951,CZE,Czechoslovakia,-2.364 +1951,YUG,Yugoslavia,-0.838 +1951,GRC,Greece,1.48 +1951,RUS,Russia,-2.56 +1951,UKR,Ukraine,-2.57 +1951,BLR,Belarus,-2.561 +1951,SWD,Sweden,1.536 +1951,NOR,Norway,1.488 +1951,DEN,Denmark,1.576 +1951,ICE,Iceland,1.479 +1951,LBR,Liberia,0.494 +1951,ETH,Ethiopia,0.433 +1951,SAF,South Africa,2.17 +1951,IRN,Iran,0.28 +1951,TUR,Turkey,1.578 +1951,IRQ,Iraq,0.289 +1951,EGY,Egypt,-0.068 +1951,SYR,Syria,-0.104 +1951,LEB,Lebanon,0.315 +1951,ISR,Israel,0.915 +1951,SAU,Saudi Arabia,-0.022 +1951,YAR,Yemen Arab Republic,-0.26 +1951,AFG,Afghanistan,-0.163 +1951,TAW,Taiwan,1.122 +1951,IND,India,0.271 +1951,PAK,Pakistan,0.211 +1951,MYA,Myanmar,-0.106 +1951,THI,Thailand,1.084 +1951,PHI,Philippines,0.52 +1951,INS,Indonesia,-0.414 +1951,AUL,Australia,1.771 +1951,NEW,New Zealand,1.869 +1952,USA,United States of America,1.905 +1952,CAN,Canada,1.989 +1952,CUB,Cuba,0.984 +1952,HAI,Haiti,0.608 +1952,DOM,Dominican Republic,1.25 +1952,MEX,Mexico,0.471 +1952,GUA,Guatemala,0.122 +1952,HON,Honduras,0.673 +1952,SAL,El Salvador,0.548 +1952,NIC,Nicaragua,1.35 +1952,COS,Costa Rica,1.02 +1952,PAN,Panama,0.958 +1952,COL,Colombia,1.195 +1952,VEN,Venezuela,1.104 +1952,ECU,Ecuador,0.866 +1952,PER,Peru,1.411 +1952,BRA,Brazil,0.986 +1952,BOL,Bolivia,0.558 +1952,PAR,Paraguay,1.321 +1952,CHL,Chile,0.654 +1952,ARG,Argentina,0.736 +1952,URU,Uruguay,0.879 +1952,UKG,United Kingdom,2.106 +1952,NTH,Netherlands,2.192 +1952,BEL,Belgium,2.259 +1952,LUX,Luxembourg,2.189 +1952,FRN,France,2.096 +1952,POL,Poland,-2.41 +1952,CZE,Czechoslovakia,-2.418 +1952,YUG,Yugoslavia,-0.05 +1952,GRC,Greece,1.443 +1952,RUS,Russia,-2.512 +1952,UKR,Ukraine,-2.475 +1952,BLR,Belarus,-2.498 +1952,SWD,Sweden,1.442 +1952,NOR,Norway,1.684 +1952,DEN,Denmark,1.681 +1952,ICE,Iceland,1.72 +1952,LBR,Liberia,0.303 +1952,ETH,Ethiopia,0.298 +1952,SAF,South Africa,2.543 +1952,IRN,Iran,-0.167 +1952,TUR,Turkey,1.635 +1952,IRQ,Iraq,0.208 +1952,EGY,Egypt,-0.259 +1952,SYR,Syria,-0.285 +1952,LEB,Lebanon,0.445 +1952,ISR,Israel,1.016 +1952,SAU,Saudi Arabia,-0.381 +1952,YAR,Yemen Arab Republic,-0.376 +1952,AFG,Afghanistan,-0.377 +1952,TAW,Taiwan,0.962 +1952,IND,India,-0.169 +1952,PAK,Pakistan,-0.04 +1952,MYA,Myanmar,-0.341 +1952,THI,Thailand,1.013 +1952,PHI,Philippines,0.515 +1952,INS,Indonesia,-0.549 +1952,AUL,Australia,2.082 +1952,NEW,New Zealand,2.126 +1953,USA,United States of America,1.693 +1953,CAN,Canada,1.745 +1953,CUB,Cuba,1.044 +1953,HAI,Haiti,0.819 +1953,DOM,Dominican Republic,1.528 +1953,MEX,Mexico,0.319 +1953,GUA,Guatemala,0.091 +1953,HON,Honduras,0.969 +1953,SAL,El Salvador,0.747 +1953,NIC,Nicaragua,1.303 +1953,COS,Costa Rica,1.086 +1953,PAN,Panama,1.333 +1953,COL,Colombia,1.673 +1953,VEN,Venezuela,1.068 +1953,ECU,Ecuador,1.018 +1953,PER,Peru,1.326 +1953,BRA,Brazil,1.015 +1953,BOL,Bolivia,0.404 +1953,PAR,Paraguay,1.314 +1953,CHL,Chile,0.952 +1953,ARG,Argentina,0.852 +1953,URU,Uruguay,0.586 +1953,UKG,United Kingdom,2.193 +1953,NTH,Netherlands,2.197 +1953,BEL,Belgium,2.359 +1953,LUX,Luxembourg,2.324 +1953,FRN,France,2.201 +1953,POL,Poland,-2.393 +1953,CZE,Czechoslovakia,-2.407 +1953,YUG,Yugoslavia,-0.138 +1953,GRC,Greece,1.372 +1953,RUS,Russia,-2.496 +1953,UKR,Ukraine,-2.467 +1953,BLR,Belarus,-2.489 +1953,SWD,Sweden,1.26 +1953,NOR,Norway,1.304 +1953,DEN,Denmark,1.342 +1953,ICE,Iceland,1.148 +1953,LBR,Liberia,0.246 +1953,ETH,Ethiopia,0.281 +1953,SAF,South Africa,2.65 +1953,IRN,Iran,-0.12 +1953,TUR,Turkey,1.607 +1953,IRQ,Iraq,0.033 +1953,EGY,Egypt,-0.32 +1953,SYR,Syria,-0.326 +1953,LEB,Lebanon,0.258 +1953,ISR,Israel,1.104 +1953,SAU,Saudi Arabia,-0.381 +1953,YAR,Yemen Arab Republic,-0.388 +1953,AFG,Afghanistan,-0.386 +1953,TAW,Taiwan,0.818 +1953,IND,India,-0.147 +1953,PAK,Pakistan,-0.096 +1953,MYA,Myanmar,-0.43 +1953,THI,Thailand,0.661 +1953,PHI,Philippines,0.374 +1953,INS,Indonesia,-0.482 +1953,AUL,Australia,2.203 +1953,NEW,New Zealand,2.071 +1954,USA,United States of America,1.482 +1954,CAN,Canada,1.746 +1954,CUB,Cuba,1.019 +1954,HAI,Haiti,0.737 +1954,DOM,Dominican Republic,1.477 +1954,MEX,Mexico,0.306 +1954,GUA,Guatemala,0.455 +1954,HON,Honduras,0.62 +1954,SAL,El Salvador,0.443 +1954,NIC,Nicaragua,1.082 +1954,COS,Costa Rica,0.755 +1954,PAN,Panama,1.166 +1954,COL,Colombia,1.773 +1954,VEN,Venezuela,0.974 +1954,ECU,Ecuador,0.554 +1954,PER,Peru,1.351 +1954,BRA,Brazil,1.378 +1954,BOL,Bolivia,0.337 +1954,PAR,Paraguay,0.864 +1954,CHL,Chile,0.906 +1954,ARG,Argentina,0.829 +1954,URU,Uruguay,0.467 +1954,UKG,United Kingdom,2.391 +1954,NTH,Netherlands,2.225 +1954,BEL,Belgium,2.53 +1954,LUX,Luxembourg,2.386 +1954,FRN,France,2.402 +1954,POL,Poland,-2.427 +1954,CZE,Czechoslovakia,-2.424 +1954,YUG,Yugoslavia,-0.295 +1954,GRC,Greece,0.744 +1954,RUS,Russia,-2.498 +1954,UKR,Ukraine,-2.47 +1954,BLR,Belarus,-2.479 +1954,SWD,Sweden,1.443 +1954,NOR,Norway,1.364 +1954,DEN,Denmark,1.522 +1954,ICE,Iceland,1.032 +1954,LBR,Liberia,0.242 +1954,ETH,Ethiopia,0.385 +1954,SAF,South Africa,2.525 +1954,IRN,Iran,0.076 +1954,TUR,Turkey,1.782 +1954,IRQ,Iraq,0.128 +1954,EGY,Egypt,-0.169 +1954,SYR,Syria,-0.402 +1954,LEB,Lebanon,0.302 +1954,ISR,Israel,1.171 +1954,SAU,Saudi Arabia,-0.382 +1954,YAR,Yemen Arab Republic,-0.427 +1954,AFG,Afghanistan,-0.331 +1954,TAW,Taiwan,1.122 +1954,IND,India,-0.288 +1954,PAK,Pakistan,0.198 +1954,MYA,Myanmar,-0.581 +1954,THI,Thailand,0.555 +1954,PHI,Philippines,0.305 +1954,INS,Indonesia,-0.467 +1954,AUL,Australia,2.414 +1954,NEW,New Zealand,2.102 +1955,USA,United States of America,1.719 +1955,CAN,Canada,1.714 +1955,CUB,Cuba,1.439 +1955,HAI,Haiti,0.682 +1955,DOM,Dominican Republic,1.53 +1955,MEX,Mexico,0.352 +1955,GUA,Guatemala,0.319 +1955,HON,Honduras,0.968 +1955,SAL,El Salvador,0.4 +1955,NIC,Nicaragua,1.471 +1955,COS,Costa Rica,0.637 +1955,PAN,Panama,1.212 +1955,COL,Colombia,1.727 +1955,VEN,Venezuela,1.069 +1955,ECU,Ecuador,0.559 +1955,PER,Peru,1.284 +1955,BRA,Brazil,1.568 +1955,BOL,Bolivia,0.344 +1955,PAR,Paraguay,0.862 +1955,CHL,Chile,0.946 +1955,ARG,Argentina,0.645 +1955,URU,Uruguay,0.303 +1955,UKG,United Kingdom,2.209 +1955,NTH,Netherlands,2.189 +1955,BEL,Belgium,2.219 +1955,LUX,Luxembourg,2.325 +1955,FRN,France,2.392 +1955,SPN,Spain,1.121 +1955,POL,Poland,-2.458 +1955,HUN,Hungary,-2.653 +1955,CZE,Czechoslovakia,-2.474 +1955,YUG,Yugoslavia,-0.495 +1955,GRC,Greece,0.727 +1955,ROM,Romania,-2.65 +1955,RUS,Russia,-2.536 +1955,UKR,Ukraine,-2.506 +1955,BLR,Belarus,-2.512 +1955,SWD,Sweden,1.31 +1955,NOR,Norway,1.319 +1955,DEN,Denmark,1.387 +1955,ICE,Iceland,1.052 +1955,LBR,Liberia,0.23 +1955,ETH,Ethiopia,0.382 +1955,SAF,South Africa,2.506 +1955,IRN,Iran,0.106 +1955,TUR,Turkey,1.596 +1955,IRQ,Iraq,0.22 +1955,EGY,Egypt,-0.283 +1955,SYR,Syria,-0.596 +1955,LEB,Lebanon,0.154 +1955,JOR,Jordan,-0.789 +1955,ISR,Israel,1.326 +1955,SAU,Saudi Arabia,-0.475 +1955,YAR,Yemen Arab Republic,-0.557 +1955,AFG,Afghanistan,-0.551 +1955,TAW,Taiwan,1.266 +1955,IND,India,-0.397 +1955,PAK,Pakistan,0.361 +1955,MYA,Myanmar,-0.467 +1955,SRI,Sri Lanka,-0.178 +1955,THI,Thailand,0.614 +1955,PHI,Philippines,0.507 +1955,INS,Indonesia,-0.387 +1955,AUL,Australia,2.249 +1955,NEW,New Zealand,1.941 +1956,USA,United States of America,1.285 +1956,CAN,Canada,1.554 +1956,CUB,Cuba,1.264 +1956,HAI,Haiti,0.6 +1956,DOM,Dominican Republic,1.554 +1956,MEX,Mexico,0.63 +1956,GUA,Guatemala,0.546 +1956,HON,Honduras,1.041 +1956,SAL,El Salvador,0.608 +1956,NIC,Nicaragua,1.187 +1956,COS,Costa Rica,0.869 +1956,PAN,Panama,0.97 +1956,COL,Colombia,1.313 +1956,VEN,Venezuela,0.968 +1956,ECU,Ecuador,0.802 +1956,PER,Peru,1.283 +1956,BRA,Brazil,1.331 +1956,BOL,Bolivia,0.596 +1956,PAR,Paraguay,0.948 +1956,CHL,Chile,1.05 +1956,ARG,Argentina,0.846 +1956,URU,Uruguay,0.726 +1956,UKG,United Kingdom,2.247 +1956,IRE,Ireland,1.119 +1956,NTH,Netherlands,2.05 +1956,BEL,Belgium,2.044 +1956,LUX,Luxembourg,2.128 +1956,FRN,France,2.447 +1956,SPN,Spain,1.129 +1956,POR,Portugal,1.65 +1956,POL,Poland,-2.474 +1956,AUS,Austria,0.57 +1956,HUN,Hungary,-2.654 +1956,CZE,Czechoslovakia,-2.523 +1956,ITA,Italy,1.775 +1956,ALB,Albania,-2.582 +1956,YUG,Yugoslavia,-1.074 +1956,GRC,Greece,0.617 +1956,BUL,Bulgaria,-2.575 +1956,ROM,Romania,-2.655 +1956,RUS,Russia,-2.558 +1956,UKR,Ukraine,-2.562 +1956,BLR,Belarus,-2.541 +1956,FIN,Finland,0.336 +1956,SWD,Sweden,1.189 +1956,NOR,Norway,1.185 +1956,DEN,Denmark,1.328 +1956,ICE,Iceland,1.31 +1956,LBR,Liberia,0.501 +1956,GHA,Ghana,-0.605 +1956,ETH,Ethiopia,0.354 +1956,SAF,South Africa,1.986 +1956,MOR,Morocco,-0.528 +1956,TUN,Tunisia,0.049 +1956,LIB,Libya,-0.317 +1956,SUD,Sudan,-0.722 +1956,IRN,Iran,0.421 +1956,TUR,Turkey,1.382 +1956,IRQ,Iraq,0.338 +1956,EGY,Egypt,-0.761 +1956,SYR,Syria,-0.901 +1956,LEB,Lebanon,-0.196 +1956,JOR,Jordan,-0.885 +1956,ISR,Israel,1.593 +1956,SAU,Saudi Arabia,-0.667 +1956,YAR,Yemen Arab Republic,-0.736 +1956,AFG,Afghanistan,-0.577 +1956,TAW,Taiwan,1.365 +1956,JPN,Japan,0.699 +1956,IND,India,-0.65 +1956,PAK,Pakistan,0.706 +1956,MYA,Myanmar,-0.216 +1956,SRI,Sri Lanka,-0.209 +1956,NEP,Nepal,-0.064 +1956,THI,Thailand,0.823 +1956,CAM,Cambodia,0.126 +1956,LAO,Laos,0.784 +1956,PHI,Philippines,0.769 +1956,INS,Indonesia,-0.526 +1956,AUL,Australia,2.222 +1956,NEW,New Zealand,2.058 +1957,USA,United States of America,1.247 +1957,CAN,Canada,1.608 +1957,CUB,Cuba,1.234 +1957,HAI,Haiti,0.399 +1957,DOM,Dominican Republic,1.728 +1957,MEX,Mexico,0.338 +1957,GUA,Guatemala,0.215 +1957,HON,Honduras,1.19 +1957,SAL,El Salvador,0.65 +1957,NIC,Nicaragua,1.428 +1957,COS,Costa Rica,0.607 +1957,PAN,Panama,0.746 +1957,COL,Colombia,1.244 +1957,VEN,Venezuela,1.006 +1957,ECU,Ecuador,0.79 +1957,PER,Peru,1.102 +1957,BRA,Brazil,1.139 +1957,BOL,Bolivia,0.39 +1957,PAR,Paraguay,1.039 +1957,CHL,Chile,1.187 +1957,ARG,Argentina,1.237 +1957,URU,Uruguay,0.667 +1957,UKG,United Kingdom,2.225 +1957,IRE,Ireland,0.736 +1957,NTH,Netherlands,2.038 +1957,BEL,Belgium,2.162 +1957,LUX,Luxembourg,2.185 +1957,FRN,France,2.386 +1957,SPN,Spain,1.397 +1957,POR,Portugal,1.697 +1957,POL,Poland,-2.503 +1957,AUS,Austria,0.921 +1957,HUN,Hungary,-2.634 +1957,CZE,Czechoslovakia,-2.488 +1957,ITA,Italy,1.846 +1957,ALB,Albania,-2.579 +1957,YUG,Yugoslavia,-0.966 +1957,GRC,Greece,0.394 +1957,BUL,Bulgaria,-2.581 +1957,ROM,Romania,-2.64 +1957,RUS,Russia,-2.557 +1957,UKR,Ukraine,-2.582 +1957,BLR,Belarus,-2.573 +1957,FIN,Finland,0.699 +1957,SWD,Sweden,1.117 +1957,NOR,Norway,1.18 +1957,DEN,Denmark,1.229 +1957,ICE,Iceland,1.304 +1957,LBR,Liberia,0.621 +1957,GHA,Ghana,-0.606 +1957,ETH,Ethiopia,0.132 +1957,SAF,South Africa,2.067 +1957,MOR,Morocco,-0.634 +1957,TUN,Tunisia,0.081 +1957,LIB,Libya,-0.165 +1957,SUD,Sudan,-0.71 +1957,IRN,Iran,0.428 +1957,TUR,Turkey,1.418 +1957,IRQ,Iraq,0.069 +1957,EGY,Egypt,-0.849 +1957,SYR,Syria,-0.954 +1957,LEB,Lebanon,0.102 +1957,JOR,Jordan,-0.444 +1957,ISR,Israel,1.18 +1957,SAU,Saudi Arabia,-0.613 +1957,YAR,Yemen Arab Republic,-0.736 +1957,AFG,Afghanistan,-0.403 +1957,TAW,Taiwan,1.428 +1957,JPN,Japan,0.634 +1957,IND,India,-0.544 +1957,PAK,Pakistan,0.739 +1957,MYA,Myanmar,-0.4 +1957,SRI,Sri Lanka,-0.322 +1957,NEP,Nepal,-0.131 +1957,THI,Thailand,0.777 +1957,CAM,Cambodia,0.134 +1957,LAO,Laos,0.74 +1957,MAL,Malaysia,0.518 +1957,PHI,Philippines,0.879 +1957,INS,Indonesia,-0.583 +1957,AUL,Australia,2.215 +1957,NEW,New Zealand,1.999 +1958,USA,United States of America,1.266 +1958,CAN,Canada,1.579 +1958,CUB,Cuba,1.243 +1958,HAI,Haiti,0.762 +1958,DOM,Dominican Republic,1.846 +1958,MEX,Mexico,0.453 +1958,GUA,Guatemala,0.621 +1958,HON,Honduras,1.04 +1958,SAL,El Salvador,0.844 +1958,NIC,Nicaragua,1.385 +1958,COS,Costa Rica,0.881 +1958,PAN,Panama,0.896 +1958,COL,Colombia,1.149 +1958,VEN,Venezuela,0.972 +1958,ECU,Ecuador,1.01 +1958,PER,Peru,1.062 +1958,BRA,Brazil,1.209 +1958,BOL,Bolivia,0.657 +1958,PAR,Paraguay,1.134 +1958,CHL,Chile,1.122 +1958,ARG,Argentina,1.196 +1958,URU,Uruguay,0.897 +1958,UKG,United Kingdom,2.389 +1958,IRE,Ireland,0.456 +1958,NTH,Netherlands,1.873 +1958,BEL,Belgium,2.41 +1958,LUX,Luxembourg,2.107 +1958,FRN,France,2.327 +1958,SPN,Spain,1.715 +1958,POR,Portugal,1.688 +1958,POL,Poland,-2.536 +1958,AUS,Austria,0.691 +1958,HUN,Hungary,-2.626 +1958,CZE,Czechoslovakia,-2.522 +1958,ITA,Italy,1.744 +1958,ALB,Albania,-2.598 +1958,YUG,Yugoslavia,-1.041 +1958,GRC,Greece,0.344 +1958,BUL,Bulgaria,-2.59 +1958,ROM,Romania,-2.618 +1958,RUS,Russia,-2.574 +1958,UKR,Ukraine,-2.593 +1958,BLR,Belarus,-2.484 +1958,FIN,Finland,0.504 +1958,SWD,Sweden,0.767 +1958,NOR,Norway,0.852 +1958,DEN,Denmark,0.879 +1958,ICE,Iceland,0.893 +1958,GUI,Guinea,-0.895 +1958,LBR,Liberia,0.451 +1958,GHA,Ghana,-0.613 +1958,ETH,Ethiopia,0.091 +1958,SAF,South Africa,2.06 +1958,MOR,Morocco,-0.692 +1958,TUN,Tunisia,0.184 +1958,LIB,Libya,-0.362 +1958,SUD,Sudan,-0.572 +1958,IRN,Iran,0.614 +1958,TUR,Turkey,1.29 +1958,IRQ,Iraq,-0.436 +1958,EGY,Egypt,-0.878 +1958,LEB,Lebanon,0.011 +1958,JOR,Jordan,0.048 +1958,ISR,Israel,0.966 +1958,SAU,Saudi Arabia,-0.516 +1958,YAR,Yemen Arab Republic,-0.827 +1958,AFG,Afghanistan,-0.718 +1958,TAW,Taiwan,1.253 +1958,JPN,Japan,0.71 +1958,IND,India,-0.552 +1958,PAK,Pakistan,0.811 +1958,MYA,Myanmar,-0.355 +1958,SRI,Sri Lanka,-0.447 +1958,NEP,Nepal,-0.194 +1958,THI,Thailand,0.941 +1958,CAM,Cambodia,-0.044 +1958,LAO,Laos,0.804 +1958,MAL,Malaysia,0.51 +1958,PHI,Philippines,0.907 +1958,INS,Indonesia,-0.644 +1958,AUL,Australia,2.324 +1958,NEW,New Zealand,1.502 +1959,USA,United States of America,1.547 +1959,CAN,Canada,1.096 +1959,CUB,Cuba,0.243 +1959,HAI,Haiti,0.979 +1959,DOM,Dominican Republic,1.957 +1959,MEX,Mexico,0.418 +1959,GUA,Guatemala,0.998 +1959,HON,Honduras,1.604 +1959,SAL,El Salvador,0.939 +1959,NIC,Nicaragua,1.661 +1959,COS,Costa Rica,0.932 +1959,PAN,Panama,0.709 +1959,COL,Colombia,1.402 +1959,VEN,Venezuela,0.491 +1959,ECU,Ecuador,0.916 +1959,PER,Peru,1.777 +1959,BRA,Brazil,1.517 +1959,BOL,Bolivia,0.944 +1959,PAR,Paraguay,1.223 +1959,CHL,Chile,1.307 +1959,ARG,Argentina,1.048 +1959,URU,Uruguay,1.234 +1959,UKG,United Kingdom,2.067 +1959,IRE,Ireland,0.384 +1959,NTH,Netherlands,1.766 +1959,BEL,Belgium,2 +1959,LUX,Luxembourg,1.989 +1959,FRN,France,2.114 +1959,SPN,Spain,1.626 +1959,POR,Portugal,1.621 +1959,POL,Poland,-2.443 +1959,AUS,Austria,0.948 +1959,HUN,Hungary,-2.607 +1959,CZE,Czechoslovakia,-2.552 +1959,ITA,Italy,1.768 +1959,ALB,Albania,-2.599 +1959,YUG,Yugoslavia,-1.302 +1959,GRC,Greece,0.906 +1959,BUL,Bulgaria,-2.59 +1959,ROM,Romania,-2.62 +1959,RUS,Russia,-2.578 +1959,UKR,Ukraine,-2.597 +1959,BLR,Belarus,-2.519 +1959,FIN,Finland,0.403 +1959,SWD,Sweden,0.489 +1959,NOR,Norway,0.768 +1959,DEN,Denmark,0.819 +1959,ICE,Iceland,0.574 +1959,GUI,Guinea,-0.89 +1959,LBR,Liberia,0.399 +1959,GHA,Ghana,-0.502 +1959,ETH,Ethiopia,-0.054 +1959,SAF,South Africa,2.239 +1959,MOR,Morocco,-0.902 +1959,TUN,Tunisia,-0.034 +1959,LIB,Libya,-0.382 +1959,SUD,Sudan,-0.497 +1959,IRN,Iran,0.478 +1959,TUR,Turkey,1.063 +1959,IRQ,Iraq,-0.815 +1959,EGY,Egypt,-0.762 +1959,LEB,Lebanon,0.032 +1959,JOR,Jordan,0.139 +1959,ISR,Israel,1.188 +1959,SAU,Saudi Arabia,-0.277 +1959,YAR,Yemen Arab Republic,-0.739 +1959,AFG,Afghanistan,-0.686 +1959,TAW,Taiwan,1.132 +1959,JPN,Japan,0.667 +1959,IND,India,-0.587 +1959,PAK,Pakistan,0.479 +1959,MYA,Myanmar,-0.323 +1959,SRI,Sri Lanka,-0.262 +1959,NEP,Nepal,-0.535 +1959,THI,Thailand,1.061 +1959,CAM,Cambodia,0.176 +1959,LAO,Laos,1.157 +1959,MAL,Malaysia,0.391 +1959,PHI,Philippines,0.631 +1959,INS,Indonesia,-0.655 +1959,AUL,Australia,1.638 +1959,NEW,New Zealand,1.126 +1960,USA,United States of America,1.532 +1960,CAN,Canada,1.106 +1960,CUB,Cuba,-1.264 +1960,HAI,Haiti,0.838 +1960,DOM,Dominican Republic,0.817 +1960,MEX,Mexico,0.278 +1960,GUA,Guatemala,1.027 +1960,HON,Honduras,1.11 +1960,SAL,El Salvador,1.054 +1960,NIC,Nicaragua,1.39 +1960,COS,Costa Rica,1.085 +1960,PAN,Panama,1.01 +1960,COL,Colombia,1.331 +1960,VEN,Venezuela,0.346 +1960,ECU,Ecuador,0.531 +1960,PER,Peru,1.164 +1960,BRA,Brazil,1.044 +1960,BOL,Bolivia,0.807 +1960,PAR,Paraguay,1.011 +1960,CHL,Chile,1.059 +1960,ARG,Argentina,1.08 +1960,URU,Uruguay,0.972 +1960,UKG,United Kingdom,1.899 +1960,IRE,Ireland,0.575 +1960,NTH,Netherlands,1.768 +1960,BEL,Belgium,1.953 +1960,LUX,Luxembourg,1.864 +1960,FRN,France,1.792 +1960,SPN,Spain,1.664 +1960,POR,Portugal,1.515 +1960,POL,Poland,-2.348 +1960,AUS,Austria,0.775 +1960,HUN,Hungary,-2.432 +1960,CZE,Czechoslovakia,-2.412 +1960,ITA,Italy,1.406 +1960,ALB,Albania,-2.344 +1960,YUG,Yugoslavia,-1.311 +1960,GRC,Greece,1.219 +1960,CYP,Cyprus,0.39 +1960,BUL,Bulgaria,-2.413 +1960,ROM,Romania,-2.408 +1960,RUS,Russia,-2.414 +1960,UKR,Ukraine,-2.457 +1960,BLR,Belarus,-2.448 +1960,FIN,Finland,0.372 +1960,SWD,Sweden,0.642 +1960,NOR,Norway,0.904 +1960,DEN,Denmark,0.908 +1960,ICE,Iceland,0.996 +1960,MLI,Mali,-1.511 +1960,SEN,Senegal,0.29 +1960,BEN,Benin,0.589 +1960,NIR,Niger,0.586 +1960,CDI,Ivory Coast,0.573 +1960,GUI,Guinea,-1.471 +1960,BFO,Burkina Faso,0.307 +1960,LBR,Liberia,0.096 +1960,GHA,Ghana,-0.84 +1960,TOG,Togo,-0.185 +1960,CAO,Cameroon,0.562 +1960,NIG,Nigeria,-0.349 +1960,GAB,Gabon,0.604 +1960,CEN,Central African Republic,0.416 +1960,CHA,Chad,0.353 +1960,CON,Congo,0.505 +1960,DRC,Democratic Republic of the Congo,0.569 +1960,SOM,Somalia,-0.058 +1960,ETH,Ethiopia,-0.543 +1960,SAF,South Africa,1.884 +1960,MAG,Madagascar,0.581 +1960,MOR,Morocco,-1.254 +1960,TUN,Tunisia,-0.073 +1960,LIB,Libya,-0.539 +1960,SUD,Sudan,-0.657 +1960,IRN,Iran,0.393 +1960,TUR,Turkey,1.133 +1960,IRQ,Iraq,-1.022 +1960,EGY,Egypt,-1.053 +1960,LEB,Lebanon,-0.222 +1960,JOR,Jordan,-0.052 +1960,ISR,Israel,0.827 +1960,SAU,Saudi Arabia,-0.655 +1960,YAR,Yemen Arab Republic,-1.002 +1960,AFG,Afghanistan,-0.888 +1960,TAW,Taiwan,1.199 +1960,JPN,Japan,1.144 +1960,IND,India,-0.791 +1960,PAK,Pakistan,0.472 +1960,MYA,Myanmar,-0.334 +1960,SRI,Sri Lanka,-0.624 +1960,NEP,Nepal,-0.372 +1960,THI,Thailand,1.002 +1960,CAM,Cambodia,-0.056 +1960,LAO,Laos,0.55 +1960,MAL,Malaysia,0.226 +1960,PHI,Philippines,0.914 +1960,INS,Indonesia,-0.964 +1960,AUL,Australia,1.888 +1960,NEW,New Zealand,1.347 +1961,USA,United States of America,1.698 +1961,CAN,Canada,1.467 +1961,CUB,Cuba,-1.731 +1961,HAI,Haiti,0.647 +1961,DOM,Dominican Republic,1.23 +1961,MEX,Mexico,0.598 +1961,GUA,Guatemala,1.118 +1961,HON,Honduras,1.017 +1961,SAL,El Salvador,1.085 +1961,NIC,Nicaragua,1.584 +1961,COS,Costa Rica,1.147 +1961,PAN,Panama,1.11 +1961,COL,Colombia,1.085 +1961,VEN,Venezuela,0.73 +1961,ECU,Ecuador,0.785 +1961,PER,Peru,1.191 +1961,BRA,Brazil,0.986 +1961,BOL,Bolivia,0.834 +1961,PAR,Paraguay,1.183 +1961,CHL,Chile,0.967 +1961,ARG,Argentina,1.069 +1961,URU,Uruguay,0.917 +1961,UKG,United Kingdom,1.844 +1961,IRE,Ireland,1.213 +1961,NTH,Netherlands,1.707 +1961,BEL,Belgium,1.747 +1961,LUX,Luxembourg,1.862 +1961,FRN,France,1.436 +1961,SPN,Spain,1.628 +1961,POR,Portugal,1.562 +1961,POL,Poland,-2.331 +1961,AUS,Austria,0.928 +1961,HUN,Hungary,-2.37 +1961,CZE,Czechoslovakia,-2.369 +1961,ITA,Italy,1.587 +1961,ALB,Albania,-2.305 +1961,YUG,Yugoslavia,-1.272 +1961,GRC,Greece,1.454 +1961,CYP,Cyprus,0.196 +1961,BUL,Bulgaria,-2.362 +1961,ROM,Romania,-2.371 +1961,RUS,Russia,-2.371 +1961,UKR,Ukraine,-2.384 +1961,BLR,Belarus,-2.379 +1961,FIN,Finland,0.663 +1961,SWD,Sweden,0.912 +1961,NOR,Norway,1.056 +1961,DEN,Denmark,1.142 +1961,ICE,Iceland,1.084 +1961,MLI,Mali,-1.433 +1961,SEN,Senegal,-0.093 +1961,BEN,Benin,0.256 +1961,MAA,Mauritania,-0.074 +1961,NIR,Niger,0.305 +1961,CDI,Ivory Coast,0.201 +1961,GUI,Guinea,-1.368 +1961,BFO,Burkina Faso,0 +1961,LBR,Liberia,0.156 +1961,SIE,Sierra Leone,-0.221 +1961,GHA,Ghana,-0.849 +1961,TOG,Togo,-0.045 +1961,CAO,Cameroon,0.25 +1961,NIG,Nigeria,-0.222 +1961,GAB,Gabon,0.254 +1961,CEN,Central African Republic,0.178 +1961,CHA,Chad,0.075 +1961,CON,Congo,0.168 +1961,DRC,Democratic Republic of the Congo,-0.11 +1961,TAZ,Tanzania,-0.688 +1961,SOM,Somalia,-0.355 +1961,ETH,Ethiopia,-0.641 +1961,SAF,South Africa,1.768 +1961,MAG,Madagascar,0.238 +1961,MOR,Morocco,-1.041 +1961,TUN,Tunisia,-0.167 +1961,LIB,Libya,-0.456 +1961,SUD,Sudan,-0.486 +1961,IRN,Iran,0.545 +1961,TUR,Turkey,1.219 +1961,IRQ,Iraq,-1.172 +1961,EGY,Egypt,-1.119 +1961,SYR,Syria,-0.71 +1961,LEB,Lebanon,-0.121 +1961,JOR,Jordan,-0.191 +1961,ISR,Israel,0.768 +1961,SAU,Saudi Arabia,-0.574 +1961,YAR,Yemen Arab Republic,-0.85 +1961,AFG,Afghanistan,-0.746 +1961,MON,Mongolia,-2.043 +1961,TAW,Taiwan,1.245 +1961,JPN,Japan,0.92 +1961,IND,India,-0.615 +1961,PAK,Pakistan,0.295 +1961,MYA,Myanmar,-0.395 +1961,SRI,Sri Lanka,-0.638 +1961,NEP,Nepal,-0.423 +1961,THI,Thailand,0.785 +1961,CAM,Cambodia,-0.365 +1961,LAO,Laos,0.438 +1961,MAL,Malaysia,0.479 +1961,PHI,Philippines,0.713 +1961,INS,Indonesia,-1.123 +1961,AUL,Australia,1.798 +1961,NEW,New Zealand,1.48 +1962,USA,United States of America,1.889 +1962,CAN,Canada,1.555 +1962,CUB,Cuba,-1.844 +1962,HAI,Haiti,0.459 +1962,DOM,Dominican Republic,1.226 +1962,JAM,Jamaica,0.535 +1962,TRI,Trinidad and Tobago,0.513 +1962,MEX,Mexico,0.786 +1962,GUA,Guatemala,0.982 +1962,HON,Honduras,1.032 +1962,SAL,El Salvador,1.115 +1962,NIC,Nicaragua,1.451 +1962,COS,Costa Rica,0.978 +1962,PAN,Panama,0.797 +1962,COL,Colombia,1.017 +1962,VEN,Venezuela,0.797 +1962,ECU,Ecuador,0.775 +1962,PER,Peru,1.135 +1962,BRA,Brazil,0.891 +1962,BOL,Bolivia,0.83 +1962,PAR,Paraguay,1.101 +1962,CHL,Chile,0.826 +1962,ARG,Argentina,0.962 +1962,URU,Uruguay,0.862 +1962,UKG,United Kingdom,2.002 +1962,IRE,Ireland,1.343 +1962,NTH,Netherlands,1.773 +1962,BEL,Belgium,1.89 +1962,LUX,Luxembourg,1.886 +1962,FRN,France,1.543 +1962,SPN,Spain,1.737 +1962,POR,Portugal,1.73 +1962,POL,Poland,-2.32 +1962,AUS,Austria,1.179 +1962,HUN,Hungary,-2.345 +1962,CZE,Czechoslovakia,-2.322 +1962,ITA,Italy,1.633 +1962,ALB,Albania,-2.302 +1962,YUG,Yugoslavia,-1.385 +1962,GRC,Greece,1.361 +1962,CYP,Cyprus,0.322 +1962,BUL,Bulgaria,-2.35 +1962,ROM,Romania,-2.346 +1962,RUS,Russia,-2.343 +1962,UKR,Ukraine,-2.365 +1962,BLR,Belarus,-2.348 +1962,FIN,Finland,0.817 +1962,SWD,Sweden,1.104 +1962,NOR,Norway,1.252 +1962,DEN,Denmark,1.282 +1962,ICE,Iceland,1.307 +1962,MLI,Mali,-1.219 +1962,SEN,Senegal,-0.353 +1962,BEN,Benin,-0.058 +1962,MAA,Mauritania,-0.497 +1962,NIR,Niger,-0.2 +1962,CDI,Ivory Coast,0.024 +1962,GUI,Guinea,-1.36 +1962,BFO,Burkina Faso,-0.18 +1962,LBR,Liberia,0.103 +1962,SIE,Sierra Leone,-0.205 +1962,GHA,Ghana,-0.614 +1962,TOG,Togo,-0.169 +1962,CAO,Cameroon,0.127 +1962,NIG,Nigeria,-0.263 +1962,GAB,Gabon,0.242 +1962,CEN,Central African Republic,-0.034 +1962,CHA,Chad,-0.15 +1962,CON,Congo,-0.017 +1962,DRC,Democratic Republic of the Congo,-0.131 +1962,UGA,Uganda,-0.37 +1962,TAZ,Tanzania,-0.736 +1962,BUI,Burundi,-0.325 +1962,RWA,Rwanda,0.24 +1962,SOM,Somalia,-0.595 +1962,ETH,Ethiopia,-0.352 +1962,SAF,South Africa,1.998 +1962,MAG,Madagascar,0.028 +1962,MOR,Morocco,-0.895 +1962,ALG,Algeria,-0.96 +1962,TUN,Tunisia,-0.28 +1962,LIB,Libya,-0.508 +1962,SUD,Sudan,-0.608 +1962,IRN,Iran,0.342 +1962,TUR,Turkey,1.593 +1962,IRQ,Iraq,-1.029 +1962,EGY,Egypt,-1.029 +1962,SYR,Syria,-0.817 +1962,LEB,Lebanon,-0.085 +1962,JOR,Jordan,-0.384 +1962,ISR,Israel,0.508 +1962,SAU,Saudi Arabia,-0.655 +1962,YAR,Yemen Arab Republic,-0.741 +1962,AFG,Afghanistan,-0.668 +1962,MON,Mongolia,-2.138 +1962,TAW,Taiwan,0.843 +1962,JPN,Japan,1.166 +1962,IND,India,0.169 +1962,PAK,Pakistan,0.231 +1962,MYA,Myanmar,-0.089 +1962,SRI,Sri Lanka,-0.174 +1962,NEP,Nepal,-0.05 +1962,THI,Thailand,0.654 +1962,CAM,Cambodia,-0.263 +1962,LAO,Laos,0.125 +1962,MAL,Malaysia,0.517 +1962,PHI,Philippines,0.507 +1962,INS,Indonesia,-0.909 +1962,AUL,Australia,1.858 +1962,NEW,New Zealand,1.638 +1963,USA,United States of America,1.852 +1963,CAN,Canada,1.61 +1963,CUB,Cuba,-2.075 +1963,HAI,Haiti,0.452 +1963,DOM,Dominican Republic,1.111 +1963,JAM,Jamaica,0.665 +1963,TRI,Trinidad and Tobago,0.595 +1963,MEX,Mexico,0.695 +1963,GUA,Guatemala,0.985 +1963,HON,Honduras,1.041 +1963,SAL,El Salvador,1.179 +1963,NIC,Nicaragua,1.328 +1963,COS,Costa Rica,0.895 +1963,PAN,Panama,0.742 +1963,COL,Colombia,0.837 +1963,VEN,Venezuela,0.78 +1963,ECU,Ecuador,0.812 +1963,PER,Peru,0.75 +1963,BRA,Brazil,0.851 +1963,BOL,Bolivia,0.72 +1963,PAR,Paraguay,0.943 +1963,CHL,Chile,0.589 +1963,ARG,Argentina,0.914 +1963,URU,Uruguay,0.673 +1963,UKG,United Kingdom,2.072 +1963,IRE,Ireland,1.358 +1963,NTH,Netherlands,1.702 +1963,BEL,Belgium,1.667 +1963,LUX,Luxembourg,1.754 +1963,FRN,France,1.504 +1963,SPN,Spain,1.691 +1963,POR,Portugal,1.524 +1963,POL,Poland,-2.467 +1963,AUS,Austria,1.105 +1963,HUN,Hungary,-2.491 +1963,CZE,Czechoslovakia,-2.468 +1963,ITA,Italy,1.551 +1963,ALB,Albania,-2.364 +1963,YUG,Yugoslavia,-1.161 +1963,GRC,Greece,1.431 +1963,CYP,Cyprus,0.384 +1963,BUL,Bulgaria,-2.487 +1963,ROM,Romania,-2.444 +1963,RUS,Russia,-2.474 +1963,UKR,Ukraine,-2.503 +1963,BLR,Belarus,-2.487 +1963,FIN,Finland,0.943 +1963,SWD,Sweden,1.12 +1963,NOR,Norway,1.257 +1963,DEN,Denmark,1.192 +1963,ICE,Iceland,1.312 +1963,MLI,Mali,-1.035 +1963,SEN,Senegal,-0.128 +1963,BEN,Benin,0.047 +1963,MAA,Mauritania,-0.177 +1963,NIR,Niger,0.052 +1963,CDI,Ivory Coast,0.076 +1963,GUI,Guinea,-0.987 +1963,BFO,Burkina Faso,-0.042 +1963,LBR,Liberia,0.331 +1963,SIE,Sierra Leone,0.007 +1963,GHA,Ghana,-0.526 +1963,TOG,Togo,-0.093 +1963,CAO,Cameroon,0.164 +1963,NIG,Nigeria,-0.291 +1963,GAB,Gabon,0.292 +1963,CEN,Central African Republic,0.29 +1963,CHA,Chad,0.072 +1963,CON,Congo,0.164 +1963,DRC,Democratic Republic of the Congo,0.046 +1963,UGA,Uganda,-0.381 +1963,KEN,Kenya,-0.427 +1963,TAZ,Tanzania,-0.58 +1963,ZAN,Zanzibar,-0.142 +1963,BUI,Burundi,-0.476 +1963,RWA,Rwanda,0.351 +1963,SOM,Somalia,-0.422 +1963,ETH,Ethiopia,-0.54 +1963,SAF,South Africa,2.207 +1963,MAG,Madagascar,0.244 +1963,MOR,Morocco,-0.704 +1963,ALG,Algeria,-0.98 +1963,TUN,Tunisia,-0.261 +1963,LIB,Libya,-0.25 +1963,SUD,Sudan,-0.593 +1963,IRN,Iran,0.519 +1963,TUR,Turkey,1.623 +1963,IRQ,Iraq,-0.93 +1963,EGY,Egypt,-0.925 +1963,SYR,Syria,-0.856 +1963,LEB,Lebanon,-0.041 +1963,JOR,Jordan,-0.45 +1963,ISR,Israel,0.644 +1963,SAU,Saudi Arabia,-0.595 +1963,YAR,Yemen Arab Republic,-0.797 +1963,KUW,Kuwait,-0.247 +1963,AFG,Afghanistan,-0.559 +1963,MON,Mongolia,-2.327 +1963,TAW,Taiwan,0.866 +1963,JPN,Japan,1.244 +1963,IND,India,-0.096 +1963,PAK,Pakistan,0.4 +1963,MYA,Myanmar,-0.17 +1963,SRI,Sri Lanka,-0.265 +1963,NEP,Nepal,-0.003 +1963,THI,Thailand,0.777 +1963,CAM,Cambodia,-0.41 +1963,LAO,Laos,0.03 +1963,MAL,Malaysia,0.615 +1963,PHI,Philippines,0.563 +1963,INS,Indonesia,-0.73 +1963,AUL,Australia,1.686 +1963,NEW,New Zealand,1.438 +1965,USA,United States of America,2.011 +1965,CAN,Canada,1.685 +1965,CUB,Cuba,-1.88 +1965,HAI,Haiti,0.652 +1965,DOM,Dominican Republic,0.917 +1965,JAM,Jamaica,0.215 +1965,TRI,Trinidad and Tobago,0.315 +1965,MEX,Mexico,0.783 +1965,GUA,Guatemala,1.112 +1965,HON,Honduras,1.117 +1965,SAL,El Salvador,1.038 +1965,NIC,Nicaragua,1.237 +1965,COS,Costa Rica,0.998 +1965,PAN,Panama,0.875 +1965,COL,Colombia,0.963 +1965,VEN,Venezuela,0.826 +1965,ECU,Ecuador,0.761 +1965,PER,Peru,1.049 +1965,BRA,Brazil,1.039 +1965,BOL,Bolivia,1.158 +1965,PAR,Paraguay,1.199 +1965,CHL,Chile,0.665 +1965,ARG,Argentina,0.784 +1965,URU,Uruguay,0.886 +1965,UKG,United Kingdom,2.006 +1965,IRE,Ireland,1.357 +1965,NTH,Netherlands,1.752 +1965,BEL,Belgium,1.785 +1965,LUX,Luxembourg,1.766 +1965,FRN,France,1.508 +1965,SPN,Spain,1.389 +1965,POR,Portugal,2.078 +1965,POL,Poland,-2.245 +1965,AUS,Austria,1.249 +1965,HUN,Hungary,-2.261 +1965,CZE,Czechoslovakia,-2.249 +1965,ITA,Italy,1.549 +1965,MLT,Malta,1.789 +1965,ALB,Albania,-2.341 +1965,YUG,Yugoslavia,-1.176 +1965,GRC,Greece,0.724 +1965,CYP,Cyprus,0.015 +1965,BUL,Bulgaria,-2.264 +1965,ROM,Romania,-2.215 +1965,RUS,Russia,-2.245 +1965,UKR,Ukraine,-2.262 +1965,BLR,Belarus,-2.255 +1965,FIN,Finland,1.056 +1965,SWD,Sweden,1.275 +1965,NOR,Norway,1.387 +1965,DEN,Denmark,1.311 +1965,ICE,Iceland,1.459 +1965,GAM,Gambia,0.448 +1965,MLI,Mali,-1.055 +1965,SEN,Senegal,-0.138 +1965,BEN,Benin,-0.162 +1965,MAA,Mauritania,-0.602 +1965,NIR,Niger,-0.021 +1965,CDI,Ivory Coast,0.092 +1965,GUI,Guinea,-1.152 +1965,BFO,Burkina Faso,-0.069 +1965,LBR,Liberia,-0.019 +1965,SIE,Sierra Leone,-0.168 +1965,GHA,Ghana,-0.748 +1965,TOG,Togo,0.117 +1965,CAO,Cameroon,-0.166 +1965,NIG,Nigeria,-0.365 +1965,GAB,Gabon,0.122 +1965,CEN,Central African Republic,0.091 +1965,CHA,Chad,-0.191 +1965,CON,Congo,-0.698 +1965,DRC,Democratic Republic of the Congo,-0.071 +1965,UGA,Uganda,-0.669 +1965,KEN,Kenya,-0.439 +1965,TAZ,Tanzania,-0.816 +1965,BUI,Burundi,-0.453 +1965,RWA,Rwanda,-0.148 +1965,SOM,Somalia,-0.759 +1965,ETH,Ethiopia,-0.267 +1965,ZAM,Zambia,-0.655 +1965,MAW,Malawi,0.329 +1965,SAF,South Africa,2.138 +1965,MAG,Madagascar,0.243 +1965,MOR,Morocco,-0.641 +1965,ALG,Algeria,-1.151 +1965,TUN,Tunisia,-0.413 +1965,LIB,Libya,-0.496 +1965,SUD,Sudan,-0.846 +1965,IRN,Iran,0.48 +1965,TUR,Turkey,0.88 +1965,IRQ,Iraq,-0.838 +1965,EGY,Egypt,-0.945 +1965,SYR,Syria,-0.899 +1965,LEB,Lebanon,-0.146 +1965,JOR,Jordan,-0.287 +1965,ISR,Israel,0.872 +1965,SAU,Saudi Arabia,-0.516 +1965,YAR,Yemen Arab Republic,-0.842 +1965,KUW,Kuwait,-0.091 +1965,AFG,Afghanistan,-0.646 +1965,MON,Mongolia,-2.106 +1965,TAW,Taiwan,0.903 +1965,JPN,Japan,1.088 +1965,IND,India,0.081 +1965,PAK,Pakistan,-0.223 +1965,MYA,Myanmar,-0.003 +1965,SRI,Sri Lanka,0.207 +1965,MAD,Maldives,0.38 +1965,NEP,Nepal,-0.093 +1965,THI,Thailand,0.743 +1965,CAM,Cambodia,-0.273 +1965,LAO,Laos,0.389 +1965,MAL,Malaysia,0.502 +1965,SIN,Singapore,-0.528 +1965,PHI,Philippines,0.629 +1965,AUL,Australia,1.917 +1965,NEW,New Zealand,1.782 +1966,USA,United States of America,2.069 +1966,CAN,Canada,1.774 +1966,CUB,Cuba,-1.853 +1966,HAI,Haiti,0.905 +1966,DOM,Dominican Republic,0.815 +1966,JAM,Jamaica,0.236 +1966,TRI,Trinidad and Tobago,0.714 +1966,BAR,Barbados,0.907 +1966,MEX,Mexico,0.828 +1966,GUA,Guatemala,0.644 +1966,HON,Honduras,0.901 +1966,SAL,El Salvador,1.039 +1966,NIC,Nicaragua,1.122 +1966,COS,Costa Rica,0.885 +1966,PAN,Panama,0.638 +1966,COL,Colombia,0.893 +1966,VEN,Venezuela,0.901 +1966,GUY,Guyana,0.475 +1966,ECU,Ecuador,0.825 +1966,PER,Peru,0.798 +1966,BRA,Brazil,1.097 +1966,BOL,Bolivia,1.019 +1966,PAR,Paraguay,0.93 +1966,CHL,Chile,0.588 +1966,ARG,Argentina,0.891 +1966,URU,Uruguay,0.866 +1966,UKG,United Kingdom,2.108 +1966,IRE,Ireland,1.289 +1966,NTH,Netherlands,1.763 +1966,BEL,Belgium,1.789 +1966,LUX,Luxembourg,1.838 +1966,FRN,France,1.269 +1966,SPN,Spain,0.764 +1966,POR,Portugal,2.066 +1966,POL,Poland,-2.154 +1966,AUS,Austria,1.334 +1966,HUN,Hungary,-2.169 +1966,CZE,Czechoslovakia,-2.155 +1966,ITA,Italy,1.583 +1966,MLT,Malta,1.876 +1966,ALB,Albania,-2.29 +1966,YUG,Yugoslavia,-1.258 +1966,GRC,Greece,1.086 +1966,CYP,Cyprus,-0.098 +1966,BUL,Bulgaria,-2.164 +1966,ROM,Romania,-2.162 +1966,RUS,Russia,-2.17 +1966,UKR,Ukraine,-2.169 +1966,BLR,Belarus,-2.171 +1966,FIN,Finland,0.55 +1966,SWD,Sweden,1.335 +1966,NOR,Norway,1.407 +1966,DEN,Denmark,1.283 +1966,ICE,Iceland,1.427 +1966,GAM,Gambia,0.448 +1966,MLI,Mali,-1.425 +1966,SEN,Senegal,-0.245 +1966,BEN,Benin,0.295 +1966,MAA,Mauritania,-1.177 +1966,NIR,Niger,0.297 +1966,CDI,Ivory Coast,0.387 +1966,GUI,Guinea,-1.253 +1966,BFO,Burkina Faso,0.301 +1966,LBR,Liberia,0.179 +1966,SIE,Sierra Leone,-0.3 +1966,GHA,Ghana,0.072 +1966,TOG,Togo,0.205 +1966,CAO,Cameroon,-0.25 +1966,NIG,Nigeria,-0.46 +1966,GAB,Gabon,0.045 +1966,CEN,Central African Republic,0.34 +1966,CHA,Chad,-0.167 +1966,CON,Congo,-1.235 +1966,DRC,Democratic Republic of the Congo,-0.053 +1966,UGA,Uganda,-0.481 +1966,KEN,Kenya,-0.304 +1966,TAZ,Tanzania,-0.642 +1966,BUI,Burundi,-0.572 +1966,RWA,Rwanda,0.089 +1966,SOM,Somalia,-0.518 +1966,ETH,Ethiopia,-0.352 +1966,ZAM,Zambia,-0.565 +1966,MAW,Malawi,0.679 +1966,SAF,South Africa,2.124 +1966,LES,Lesotho,0.718 +1966,BOT,Botswana,0.758 +1966,MAG,Madagascar,0.608 +1966,MOR,Morocco,-0.447 +1966,ALG,Algeria,-1.447 +1966,TUN,Tunisia,-0.348 +1966,LIB,Libya,-0.353 +1966,SUD,Sudan,-0.642 +1966,IRN,Iran,0.265 +1966,TUR,Turkey,0.83 +1966,IRQ,Iraq,-1.04 +1966,EGY,Egypt,-1.11 +1966,SYR,Syria,-1.338 +1966,LEB,Lebanon,-0.255 +1966,JOR,Jordan,-0.283 +1966,ISR,Israel,1.001 +1966,SAU,Saudi Arabia,-0.373 +1966,YAR,Yemen Arab Republic,-0.867 +1966,KUW,Kuwait,-0.328 +1966,AFG,Afghanistan,-0.545 +1966,MON,Mongolia,-2.064 +1966,TAW,Taiwan,1.068 +1966,JPN,Japan,1.082 +1966,IND,India,-0.222 +1966,PAK,Pakistan,-0.363 +1966,MYA,Myanmar,-0.238 +1966,SRI,Sri Lanka,-0.189 +1966,MAD,Maldives,0.676 +1966,NEP,Nepal,-0.252 +1966,THI,Thailand,0.742 +1966,CAM,Cambodia,-1.15 +1966,LAO,Laos,0.657 +1966,MAL,Malaysia,0.761 +1966,SIN,Singapore,-0.497 +1966,PHI,Philippines,0.665 +1966,INS,Indonesia,-0.273 +1966,AUL,Australia,2.009 +1966,NEW,New Zealand,1.963 +1967,USA,United States of America,2.259 +1967,CAN,Canada,1.769 +1967,CUB,Cuba,-1.406 +1967,HAI,Haiti,0.521 +1967,DOM,Dominican Republic,0.787 +1967,JAM,Jamaica,0.625 +1967,TRI,Trinidad and Tobago,0.829 +1967,BAR,Barbados,0.919 +1967,MEX,Mexico,0.795 +1967,GUA,Guatemala,0.691 +1967,HON,Honduras,0.789 +1967,SAL,El Salvador,0.823 +1967,NIC,Nicaragua,0.928 +1967,COS,Costa Rica,1.06 +1967,PAN,Panama,0.775 +1967,COL,Colombia,0.841 +1967,VEN,Venezuela,0.839 +1967,GUY,Guyana,0.7 +1967,ECU,Ecuador,0.712 +1967,PER,Peru,0.908 +1967,BRA,Brazil,1.107 +1967,BOL,Bolivia,0.96 +1967,PAR,Paraguay,0.902 +1967,CHL,Chile,0.683 +1967,ARG,Argentina,0.802 +1967,URU,Uruguay,0.878 +1967,UKG,United Kingdom,2.192 +1967,IRE,Ireland,1.217 +1967,NTH,Netherlands,1.816 +1967,BEL,Belgium,1.865 +1967,LUX,Luxembourg,1.829 +1967,FRN,France,0.765 +1967,SPN,Spain,0.512 +1967,POR,Portugal,1.855 +1967,POL,Poland,-1.913 +1967,AUS,Austria,1.323 +1967,HUN,Hungary,-1.91 +1967,CZE,Czechoslovakia,-1.901 +1967,ITA,Italy,1.589 +1967,MLT,Malta,1.615 +1967,ALB,Albania,-2.254 +1967,YUG,Yugoslavia,-1.192 +1967,GRC,Greece,0.866 +1967,CYP,Cyprus,-0.094 +1967,BUL,Bulgaria,-1.907 +1967,ROM,Romania,-1.035 +1967,RUS,Russia,-1.914 +1967,UKR,Ukraine,-1.917 +1967,BLR,Belarus,-1.92 +1967,FIN,Finland,0.96 +1967,SWD,Sweden,1.36 +1967,NOR,Norway,1.47 +1967,DEN,Denmark,1.488 +1967,ICE,Iceland,1.709 +1967,GAM,Gambia,0.848 +1967,MLI,Mali,-0.991 +1967,SEN,Senegal,-0.334 +1967,BEN,Benin,0.451 +1967,MAA,Mauritania,-1.448 +1967,NIR,Niger,0.208 +1967,CDI,Ivory Coast,0.518 +1967,GUI,Guinea,-1.331 +1967,BFO,Burkina Faso,0.197 +1967,LBR,Liberia,0.696 +1967,SIE,Sierra Leone,0.44 +1967,GHA,Ghana,0.3 +1967,TOG,Togo,0.423 +1967,CAO,Cameroon,-0.184 +1967,NIG,Nigeria,-0.196 +1967,GAB,Gabon,0.144 +1967,CEN,Central African Republic,0.047 +1967,CHA,Chad,-0.062 +1967,CON,Congo,-0.83 +1967,DRC,Democratic Republic of the Congo,-0.003 +1967,UGA,Uganda,-0.403 +1967,KEN,Kenya,-0.202 +1967,TAZ,Tanzania,-0.774 +1967,BUI,Burundi,-0.946 +1967,RWA,Rwanda,0.528 +1967,SOM,Somalia,-0.807 +1967,ETH,Ethiopia,-0.24 +1967,ZAM,Zambia,-0.897 +1967,MAW,Malawi,1.311 +1967,SAF,South Africa,1.396 +1967,LES,Lesotho,0.822 +1967,BOT,Botswana,0.932 +1967,MAG,Madagascar,0.564 +1967,MAS,Mauritius,0.489 +1967,MOR,Morocco,-0.708 +1967,ALG,Algeria,-1.624 +1967,TUN,Tunisia,-0.701 +1967,LIB,Libya,-0.588 +1967,SUD,Sudan,-1.159 +1967,IRN,Iran,0.129 +1967,TUR,Turkey,0.384 +1967,IRQ,Iraq,-1.34 +1967,EGY,Egypt,-1.332 +1967,SYR,Syria,-1.597 +1967,LEB,Lebanon,-0.67 +1967,JOR,Jordan,-0.769 +1967,ISR,Israel,0.952 +1967,SAU,Saudi Arabia,-0.769 +1967,YAR,Yemen Arab Republic,-1.241 +1967,YPR,Yemen People's Republic,-0.898 +1967,KUW,Kuwait,-0.823 +1967,AFG,Afghanistan,-0.56 +1967,MON,Mongolia,-1.831 +1967,TAW,Taiwan,0.69 +1967,JPN,Japan,1.013 +1967,IND,India,-0.535 +1967,PAK,Pakistan,-0.715 +1967,MYA,Myanmar,-0.228 +1967,SRI,Sri Lanka,-0.376 +1967,MAD,Maldives,0.447 +1967,NEP,Nepal,-0.106 +1967,THI,Thailand,0.512 +1967,CAM,Cambodia,-1.089 +1967,LAO,Laos,0.397 +1967,MAL,Malaysia,0.141 +1967,SIN,Singapore,-0.217 +1967,PHI,Philippines,0.752 +1967,INS,Indonesia,-0.449 +1967,AUL,Australia,2.13 +1967,NEW,New Zealand,1.952 +1968,USA,United States of America,2.213 +1968,CAN,Canada,1.577 +1968,CUB,Cuba,-1.347 +1968,HAI,Haiti,0.496 +1968,DOM,Dominican Republic,0.513 +1968,JAM,Jamaica,0.542 +1968,TRI,Trinidad and Tobago,0.618 +1968,BAR,Barbados,0.802 +1968,MEX,Mexico,0.621 +1968,GUA,Guatemala,0.431 +1968,HON,Honduras,0.942 +1968,SAL,El Salvador,0.593 +1968,NIC,Nicaragua,1.011 +1968,COS,Costa Rica,0.955 +1968,PAN,Panama,0.701 +1968,COL,Colombia,0.621 +1968,VEN,Venezuela,0.626 +1968,GUY,Guyana,0.364 +1968,ECU,Ecuador,0.393 +1968,PER,Peru,0.546 +1968,BRA,Brazil,1.149 +1968,BOL,Bolivia,0.884 +1968,PAR,Paraguay,0.82 +1968,CHL,Chile,0.474 +1968,ARG,Argentina,0.601 +1968,URU,Uruguay,0.711 +1968,UKG,United Kingdom,2.108 +1968,IRE,Ireland,1.303 +1968,NTH,Netherlands,1.865 +1968,BEL,Belgium,1.896 +1968,LUX,Luxembourg,1.886 +1968,FRN,France,0.977 +1968,SPN,Spain,0.463 +1968,POR,Portugal,2.078 +1968,POL,Poland,-1.903 +1968,AUS,Austria,1.303 +1968,HUN,Hungary,-1.98 +1968,CZE,Czechoslovakia,-1.894 +1968,ITA,Italy,1.752 +1968,MLT,Malta,1.689 +1968,ALB,Albania,-2.284 +1968,YUG,Yugoslavia,-1.17 +1968,GRC,Greece,0.926 +1968,CYP,Cyprus,0.026 +1968,BUL,Bulgaria,-1.954 +1968,ROM,Romania,-1.15 +1968,RUS,Russia,-1.941 +1968,UKR,Ukraine,-1.836 +1968,BLR,Belarus,-1.954 +1968,FIN,Finland,0.965 +1968,SWD,Sweden,1.387 +1968,NOR,Norway,1.503 +1968,DEN,Denmark,1.51 +1968,ICE,Iceland,1.643 +1968,EQG,Equatorial Guinea,-0.525 +1968,GAM,Gambia,0.829 +1968,MLI,Mali,-1.111 +1968,SEN,Senegal,0.012 +1968,BEN,Benin,0.273 +1968,MAA,Mauritania,-1.417 +1968,NIR,Niger,0.279 +1968,CDI,Ivory Coast,0.51 +1968,GUI,Guinea,-1.389 +1968,BFO,Burkina Faso,0.063 +1968,LBR,Liberia,0.698 +1968,SIE,Sierra Leone,0.219 +1968,GHA,Ghana,0.076 +1968,TOG,Togo,0.228 +1968,CAO,Cameroon,-0.321 +1968,NIG,Nigeria,-0.031 +1968,GAB,Gabon,0.417 +1968,CEN,Central African Republic,0.428 +1968,CHA,Chad,0.024 +1968,CON,Congo,-1.019 +1968,DRC,Democratic Republic of the Congo,0.077 +1968,UGA,Uganda,-0.593 +1968,KEN,Kenya,-0.357 +1968,TAZ,Tanzania,-0.931 +1968,BUI,Burundi,-0.967 +1968,RWA,Rwanda,0.285 +1968,SOM,Somalia,-0.843 +1968,ETH,Ethiopia,-0.065 +1968,ZAM,Zambia,-0.823 +1968,MAW,Malawi,1.485 +1968,SAF,South Africa,2.156 +1968,LES,Lesotho,0.922 +1968,BOT,Botswana,1.095 +1968,SWA,Swaziland,1.097 +1968,MAG,Madagascar,0.514 +1968,MAS,Mauritius,0.492 +1968,MOR,Morocco,-0.173 +1968,ALG,Algeria,-1.384 +1968,TUN,Tunisia,-0.231 +1968,LIB,Libya,-0.487 +1968,SUD,Sudan,-1.188 +1968,IRN,Iran,0.273 +1968,TUR,Turkey,0.518 +1968,IRQ,Iraq,-1.307 +1968,EGY,Egypt,-1.236 +1968,SYR,Syria,-1.565 +1968,LEB,Lebanon,-0.242 +1968,JOR,Jordan,-0.758 +1968,ISR,Israel,0.905 +1968,SAU,Saudi Arabia,-0.239 +1968,YAR,Yemen Arab Republic,-1.329 +1968,YPR,Yemen People's Republic,-0.866 +1968,KUW,Kuwait,-0.704 +1968,AFG,Afghanistan,-0.215 +1968,MON,Mongolia,-1.804 +1968,TAW,Taiwan,0.847 +1968,JPN,Japan,1.259 +1968,IND,India,-0.481 +1968,PAK,Pakistan,-0.634 +1968,MYA,Myanmar,-0.239 +1968,SRI,Sri Lanka,-0.254 +1968,MAD,Maldives,0.685 +1968,NEP,Nepal,-0.237 +1968,THI,Thailand,0.58 +1968,CAM,Cambodia,-1.242 +1968,LAO,Laos,0.468 +1968,MAL,Malaysia,0.5 +1968,SIN,Singapore,-0.033 +1968,PHI,Philippines,0.518 +1968,INS,Indonesia,-0.259 +1968,AUL,Australia,2.052 +1968,NEW,New Zealand,1.922 +1969,USA,United States of America,2.093 +1969,CAN,Canada,1.615 +1969,CUB,Cuba,-0.49 +1969,HAI,Haiti,0.308 +1969,DOM,Dominican Republic,0.584 +1969,JAM,Jamaica,0.633 +1969,TRI,Trinidad and Tobago,0.574 +1969,BAR,Barbados,0.507 +1969,MEX,Mexico,0.64 +1969,GUA,Guatemala,0.572 +1969,HON,Honduras,0.931 +1969,SAL,El Salvador,0.74 +1969,NIC,Nicaragua,1.084 +1969,COS,Costa Rica,0.994 +1969,PAN,Panama,0.759 +1969,COL,Colombia,0.79 +1969,VEN,Venezuela,0.488 +1969,GUY,Guyana,0.481 +1969,ECU,Ecuador,0.517 +1969,PER,Peru,0.378 +1969,BRA,Brazil,1.064 +1969,BOL,Bolivia,0.798 +1969,PAR,Paraguay,0.945 +1969,CHL,Chile,0.632 +1969,ARG,Argentina,0.764 +1969,URU,Uruguay,1.048 +1969,UKG,United Kingdom,2.024 +1969,IRE,Ireland,1.092 +1969,NTH,Netherlands,1.767 +1969,BEL,Belgium,1.787 +1969,LUX,Luxembourg,1.801 +1969,FRN,France,1.337 +1969,SPN,Spain,0.619 +1969,POR,Portugal,2.207 +1969,POL,Poland,-1.817 +1969,AUS,Austria,1.264 +1969,HUN,Hungary,-1.905 +1969,CZE,Czechoslovakia,-1.797 +1969,ITA,Italy,1.537 +1969,MLT,Malta,1.715 +1969,ALB,Albania,-2.293 +1969,YUG,Yugoslavia,-1.184 +1969,GRC,Greece,0.648 +1969,CYP,Cyprus,0.036 +1969,BUL,Bulgaria,-1.943 +1969,ROM,Romania,-1.146 +1969,RUS,Russia,-1.85 +1969,UKR,Ukraine,-1.768 +1969,BLR,Belarus,-1.86 +1969,FIN,Finland,1.043 +1969,SWD,Sweden,1.424 +1969,NOR,Norway,1.452 +1969,DEN,Denmark,1.446 +1969,ICE,Iceland,1.565 +1969,EQG,Equatorial Guinea,-0.35 +1969,GAM,Gambia,0.88 +1969,MLI,Mali,-1.206 +1969,SEN,Senegal,0.286 +1969,BEN,Benin,0.326 +1969,MAA,Mauritania,-1.106 +1969,NIR,Niger,0.216 +1969,CDI,Ivory Coast,0.701 +1969,GUI,Guinea,-1.352 +1969,BFO,Burkina Faso,0.072 +1969,LBR,Liberia,0.619 +1969,SIE,Sierra Leone,0.176 +1969,GHA,Ghana,-0.026 +1969,TOG,Togo,0.312 +1969,CAO,Cameroon,-0.049 +1969,NIG,Nigeria,0.002 +1969,GAB,Gabon,0.725 +1969,CEN,Central African Republic,0.177 +1969,CHA,Chad,-0.023 +1969,CON,Congo,-1.092 +1969,DRC,Democratic Republic of the Congo,0.119 +1969,UGA,Uganda,-0.469 +1969,KEN,Kenya,-0.343 +1969,TAZ,Tanzania,-0.958 +1969,BUI,Burundi,-0.93 +1969,RWA,Rwanda,0.378 +1969,SOM,Somalia,-0.699 +1969,ETH,Ethiopia,-0.038 +1969,ZAM,Zambia,-0.945 +1969,MAW,Malawi,1.554 +1969,SAF,South Africa,2.425 +1969,LES,Lesotho,0.806 +1969,BOT,Botswana,1.227 +1969,SWA,Swaziland,1.186 +1969,MAG,Madagascar,0.464 +1969,MAS,Mauritius,0.225 +1969,MOR,Morocco,-0.25 +1969,ALG,Algeria,-1.484 +1969,TUN,Tunisia,-0.272 +1969,LIB,Libya,-0.635 +1969,SUD,Sudan,-1.306 +1969,IRN,Iran,0.174 +1969,TUR,Turkey,0.472 +1969,IRQ,Iraq,-1.425 +1969,EGY,Egypt,-1.341 +1969,SYR,Syria,-1.663 +1969,LEB,Lebanon,-0.447 +1969,JOR,Jordan,-0.733 +1969,ISR,Israel,0.845 +1969,SAU,Saudi Arabia,-0.32 +1969,YAR,Yemen Arab Republic,-1.45 +1969,YPR,Yemen People's Republic,-1.114 +1969,KUW,Kuwait,-0.799 +1969,AFG,Afghanistan,-0.278 +1969,MON,Mongolia,-1.796 +1969,TAW,Taiwan,0.728 +1969,JPN,Japan,1.143 +1969,IND,India,-0.367 +1969,PAK,Pakistan,-0.562 +1969,MYA,Myanmar,-0.155 +1969,SRI,Sri Lanka,-0.424 +1969,MAD,Maldives,0.436 +1969,NEP,Nepal,-0.17 +1969,THI,Thailand,0.534 +1969,CAM,Cambodia,-1.28 +1969,LAO,Laos,0.43 +1969,MAL,Malaysia,0.42 +1969,SIN,Singapore,0.144 +1969,PHI,Philippines,0.47 +1969,INS,Indonesia,-0.383 +1969,AUL,Australia,1.968 +1969,NEW,New Zealand,1.8 +1970,USA,United States of America,2.132 +1970,CAN,Canada,1.577 +1970,CUB,Cuba,-1.392 +1970,HAI,Haiti,0.709 +1970,DOM,Dominican Republic,0.767 +1970,JAM,Jamaica,0.563 +1970,TRI,Trinidad and Tobago,0.423 +1970,BAR,Barbados,0.63 +1970,MEX,Mexico,0.64 +1970,GUA,Guatemala,0.81 +1970,HON,Honduras,0.757 +1970,SAL,El Salvador,1.192 +1970,NIC,Nicaragua,0.974 +1970,COS,Costa Rica,1.001 +1970,PAN,Panama,0.899 +1970,COL,Colombia,0.731 +1970,VEN,Venezuela,0.533 +1970,GUY,Guyana,0.276 +1970,ECU,Ecuador,0.4 +1970,PER,Peru,0.37 +1970,BRA,Brazil,1.187 +1970,BOL,Bolivia,0.51 +1970,PAR,Paraguay,0.994 +1970,CHL,Chile,-0.029 +1970,ARG,Argentina,0.897 +1970,URU,Uruguay,0.916 +1970,UKG,United Kingdom,1.85 +1970,IRE,Ireland,1.064 +1970,NTH,Netherlands,1.633 +1970,BEL,Belgium,1.622 +1970,LUX,Luxembourg,1.664 +1970,FRN,France,1.431 +1970,SPN,Spain,0.917 +1970,POR,Portugal,2.107 +1970,POL,Poland,-2.089 +1970,AUS,Austria,1.309 +1970,HUN,Hungary,-2.199 +1970,CZE,Czechoslovakia,-2.145 +1970,ITA,Italy,1.492 +1970,MLT,Malta,1.688 +1970,ALB,Albania,-2.253 +1970,YUG,Yugoslavia,-1.019 +1970,GRC,Greece,0.476 +1970,CYP,Cyprus,-0.058 +1970,BUL,Bulgaria,-2.206 +1970,ROM,Romania,-1.471 +1970,RUS,Russia,-2.167 +1970,UKR,Ukraine,-2.116 +1970,BLR,Belarus,-2.166 +1970,FIN,Finland,1.085 +1970,SWD,Sweden,1.29 +1970,NOR,Norway,1.319 +1970,DEN,Denmark,1.357 +1970,ICE,Iceland,0.992 +1970,EQG,Equatorial Guinea,-0.555 +1970,GAM,Gambia,0.244 +1970,MLI,Mali,-1.031 +1970,SEN,Senegal,0.095 +1970,BEN,Benin,0.607 +1970,MAA,Mauritania,-0.944 +1970,NIR,Niger,0.262 +1970,CDI,Ivory Coast,0.456 +1970,GUI,Guinea,-1.17 +1970,BFO,Burkina Faso,-0.024 +1970,LBR,Liberia,0.675 +1970,SIE,Sierra Leone,-0.026 +1970,GHA,Ghana,-0.032 +1970,TOG,Togo,0.383 +1970,CAO,Cameroon,0.052 +1970,NIG,Nigeria,-0.692 +1970,GAB,Gabon,0.72 +1970,CEN,Central African Republic,-0.01 +1970,CHA,Chad,0.135 +1970,CON,Congo,-1.036 +1970,DRC,Democratic Republic of the Congo,0.281 +1970,UGA,Uganda,-0.791 +1970,KEN,Kenya,-0.215 +1970,TAZ,Tanzania,-1.016 +1970,BUI,Burundi,-0.53 +1970,RWA,Rwanda,0.575 +1970,SOM,Somalia,-0.984 +1970,ETH,Ethiopia,0.022 +1970,ZAM,Zambia,-1.009 +1970,MAW,Malawi,1.332 +1970,SAF,South Africa,2.408 +1970,LES,Lesotho,0.884 +1970,BOT,Botswana,1.004 +1970,SWA,Swaziland,0.786 +1970,MAG,Madagascar,0.67 +1970,MAS,Mauritius,0.261 +1970,MOR,Morocco,-0.325 +1970,ALG,Algeria,-1.22 +1970,TUN,Tunisia,-0.221 +1970,LIB,Libya,-0.923 +1970,SUD,Sudan,-1.309 +1970,IRN,Iran,0.21 +1970,TUR,Turkey,0.515 +1970,IRQ,Iraq,-1.364 +1970,EGY,Egypt,-1.049 +1970,SYR,Syria,-1.507 +1970,LEB,Lebanon,-0.411 +1970,JOR,Jordan,-0.562 +1970,ISR,Israel,0.811 +1970,SAU,Saudi Arabia,-0.453 +1970,YAR,Yemen Arab Republic,-1.319 +1970,YPR,Yemen People's Republic,-1.258 +1970,KUW,Kuwait,-0.713 +1970,AFG,Afghanistan,-0.194 +1970,MON,Mongolia,-2.086 +1970,TAW,Taiwan,0.726 +1970,JPN,Japan,1.056 +1970,IND,India,-0.308 +1970,PAK,Pakistan,-0.415 +1970,MYA,Myanmar,0.084 +1970,SRI,Sri Lanka,-0.541 +1970,NEP,Nepal,0.004 +1970,THI,Thailand,0.636 +1970,CAM,Cambodia,0.127 +1970,LAO,Laos,0.303 +1970,MAL,Malaysia,0.125 +1970,SIN,Singapore,0.196 +1970,PHI,Philippines,0.437 +1970,INS,Indonesia,-0.293 +1970,AUL,Australia,1.972 +1970,NEW,New Zealand,1.735 +1970,FIJ,Fiji,0.631 +1971,USA,United States of America,1.805 +1971,CAN,Canada,1.391 +1971,CUB,Cuba,-1.479 +1971,HAI,Haiti,0.863 +1971,DOM,Dominican Republic,0.977 +1971,JAM,Jamaica,0.443 +1971,TRI,Trinidad and Tobago,0.079 +1971,BAR,Barbados,0.809 +1971,MEX,Mexico,0.427 +1971,GUA,Guatemala,0.818 +1971,HON,Honduras,0.679 +1971,SAL,El Salvador,0.788 +1971,NIC,Nicaragua,0.963 +1971,COS,Costa Rica,1.171 +1971,PAN,Panama,0.708 +1971,COL,Colombia,0.763 +1971,VEN,Venezuela,0.62 +1971,GUY,Guyana,-0.1 +1971,ECU,Ecuador,0.341 +1971,PER,Peru,-0.036 +1971,BRA,Brazil,0.976 +1971,BOL,Bolivia,0.934 +1971,PAR,Paraguay,0.915 +1971,CHL,Chile,-0.505 +1971,ARG,Argentina,0.99 +1971,URU,Uruguay,1.016 +1971,UKG,United Kingdom,1.599 +1971,IRE,Ireland,0.922 +1971,NTH,Netherlands,1.362 +1971,BEL,Belgium,1.386 +1971,LUX,Luxembourg,1.458 +1971,FRN,France,1.366 +1971,SPN,Spain,0.853 +1971,POR,Portugal,2.026 +1971,POL,Poland,-2.297 +1971,AUS,Austria,0.939 +1971,HUN,Hungary,-2.35 +1971,CZE,Czechoslovakia,-2.333 +1971,ITA,Italy,1.299 +1971,MLT,Malta,0.654 +1971,ALB,Albania,-2.145 +1971,YUG,Yugoslavia,-0.965 +1971,GRC,Greece,0.546 +1971,CYP,Cyprus,-0.178 +1971,BUL,Bulgaria,-2.35 +1971,ROM,Romania,-1.648 +1971,RUS,Russia,-2.343 +1971,UKR,Ukraine,-2.325 +1971,BLR,Belarus,-2.336 +1971,FIN,Finland,0.801 +1971,SWD,Sweden,0.862 +1971,NOR,Norway,0.931 +1971,DEN,Denmark,1.006 +1971,ICE,Iceland,0.699 +1971,EQG,Equatorial Guinea,-0.922 +1971,GAM,Gambia,0.447 +1971,MLI,Mali,-1.039 +1971,SEN,Senegal,0.201 +1971,BEN,Benin,0.603 +1971,MAA,Mauritania,-0.738 +1971,NIR,Niger,0.288 +1971,CDI,Ivory Coast,0.674 +1971,GUI,Guinea,-1.191 +1971,BFO,Burkina Faso,0.34 +1971,LBR,Liberia,0.742 +1971,SIE,Sierra Leone,0.005 +1971,GHA,Ghana,0.44 +1971,TOG,Togo,0.198 +1971,CAO,Cameroon,-0.253 +1971,NIG,Nigeria,-0.387 +1971,GAB,Gabon,0.482 +1971,CEN,Central African Republic,0.542 +1971,CHA,Chad,0.171 +1971,CON,Congo,-1.004 +1971,DRC,Democratic Republic of the Congo,0.637 +1971,UGA,Uganda,-0.392 +1971,KEN,Kenya,0.193 +1971,TAZ,Tanzania,-0.945 +1971,BUI,Burundi,-0.436 +1971,RWA,Rwanda,0.243 +1971,SOM,Somalia,-0.896 +1971,ETH,Ethiopia,0.013 +1971,ZAM,Zambia,-0.579 +1971,MAW,Malawi,1.632 +1971,SAF,South Africa,2.703 +1971,LES,Lesotho,1.037 +1971,BOT,Botswana,0.595 +1971,SWA,Swaziland,0.986 +1971,MAG,Madagascar,0.872 +1971,MAS,Mauritius,0.441 +1971,MOR,Morocco,-0.293 +1971,ALG,Algeria,-1.068 +1971,TUN,Tunisia,-0.262 +1971,LIB,Libya,-0.914 +1971,SUD,Sudan,-1.109 +1971,IRN,Iran,0.086 +1971,TUR,Turkey,0.231 +1971,IRQ,Iraq,-1.27 +1971,EGY,Egypt,-0.817 +1971,SYR,Syria,-1.057 +1971,LEB,Lebanon,-0.155 +1971,JOR,Jordan,-0.17 +1971,ISR,Israel,0.983 +1971,SAU,Saudi Arabia,-0.229 +1971,YAR,Yemen Arab Republic,-1.036 +1971,YPR,Yemen People's Republic,-1.362 +1971,KUW,Kuwait,-0.732 +1971,BAH,Bahrain,-0.312 +1971,QAT,Qatar,-0.321 +1971,UAE,United Arab Emirates,-0.63 +1971,OMA,Oman,-0.657 +1971,AFG,Afghanistan,-0.501 +1971,CHN,China,-0.889 +1971,MON,Mongolia,-2.282 +1971,TAW,Taiwan,0.767 +1971,JPN,Japan,0.909 +1971,IND,India,-0.719 +1971,BHU,Bhutan,-0.024 +1971,PAK,Pakistan,-0.455 +1971,MYA,Myanmar,-0.185 +1971,SRI,Sri Lanka,-0.656 +1971,NEP,Nepal,0.137 +1971,THI,Thailand,0.486 +1971,CAM,Cambodia,0.565 +1971,LAO,Laos,0.428 +1971,MAL,Malaysia,-0.154 +1971,SIN,Singapore,0.252 +1971,PHI,Philippines,0.459 +1971,INS,Indonesia,-0.282 +1971,AUL,Australia,1.483 +1971,NEW,New Zealand,1.465 +1971,FIJ,Fiji,0.897 +1972,USA,United States of America,2.04 +1972,CAN,Canada,1.549 +1972,CUB,Cuba,-1.606 +1972,HAI,Haiti,0.708 +1972,DOM,Dominican Republic,0.988 +1972,JAM,Jamaica,0.305 +1972,TRI,Trinidad and Tobago,-0.062 +1972,BAR,Barbados,0.676 +1972,MEX,Mexico,0.186 +1972,GUA,Guatemala,0.852 +1972,HON,Honduras,0.74 +1972,SAL,El Salvador,0.943 +1972,NIC,Nicaragua,1 +1972,COS,Costa Rica,0.959 +1972,PAN,Panama,0.564 +1972,COL,Colombia,0.796 +1972,VEN,Venezuela,0.479 +1972,GUY,Guyana,-0.268 +1972,ECU,Ecuador,0.244 +1972,PER,Peru,-0.082 +1972,BRA,Brazil,1.012 +1972,BOL,Bolivia,0.993 +1972,PAR,Paraguay,0.954 +1972,CHL,Chile,-0.566 +1972,ARG,Argentina,0.769 +1972,URU,Uruguay,0.967 +1972,UKG,United Kingdom,1.965 +1972,IRE,Ireland,1.148 +1972,NTH,Netherlands,1.558 +1972,BEL,Belgium,1.622 +1972,LUX,Luxembourg,1.511 +1972,FRN,France,1.516 +1972,SPN,Spain,1.108 +1972,POR,Portugal,2.179 +1972,POL,Poland,-2.281 +1972,AUS,Austria,1.197 +1972,HUN,Hungary,-2.308 +1972,CZE,Czechoslovakia,-2.287 +1972,ITA,Italy,1.468 +1972,MLT,Malta,0.418 +1972,ALB,Albania,-1.732 +1972,YUG,Yugoslavia,-0.587 +1972,GRC,Greece,0.844 +1972,CYP,Cyprus,-0.071 +1972,BUL,Bulgaria,-2.281 +1972,ROM,Romania,-1.447 +1972,RUS,Russia,-2.275 +1972,UKR,Ukraine,-2.254 +1972,BLR,Belarus,-2.324 +1972,FIN,Finland,1.112 +1972,SWD,Sweden,1.097 +1972,NOR,Norway,1.157 +1972,DEN,Denmark,1.293 +1972,ICE,Iceland,0.847 +1972,EQG,Equatorial Guinea,-0.806 +1972,GAM,Gambia,0.338 +1972,MLI,Mali,-1.181 +1972,SEN,Senegal,-0.185 +1972,BEN,Benin,0.223 +1972,MAA,Mauritania,-0.72 +1972,NIR,Niger,0.002 +1972,CDI,Ivory Coast,0.505 +1972,GUI,Guinea,-1.092 +1972,BFO,Burkina Faso,0.073 +1972,LBR,Liberia,0.647 +1972,SIE,Sierra Leone,-0.331 +1972,GHA,Ghana,0.27 +1972,TOG,Togo,0.164 +1972,CAO,Cameroon,-0.344 +1972,NIG,Nigeria,-0.517 +1972,GAB,Gabon,0.331 +1972,CEN,Central African Republic,0.301 +1972,CHA,Chad,0.059 +1972,CON,Congo,-0.955 +1972,DRC,Democratic Republic of the Congo,0.347 +1972,UGA,Uganda,-0.415 +1972,KEN,Kenya,-0.012 +1972,TAZ,Tanzania,-0.9 +1972,BUI,Burundi,-0.537 +1972,RWA,Rwanda,0.203 +1972,SOM,Somalia,-0.793 +1972,ETH,Ethiopia,-0.078 +1972,ZAM,Zambia,-0.675 +1972,MAW,Malawi,1.308 +1972,SAF,South Africa,2.572 +1972,LES,Lesotho,0.72 +1972,BOT,Botswana,0.162 +1972,SWA,Swaziland,0.476 +1972,MAG,Madagascar,0.041 +1972,MAS,Mauritius,-0.078 +1972,MOR,Morocco,-0.282 +1972,ALG,Algeria,-1.134 +1972,TUN,Tunisia,-0.283 +1972,LIB,Libya,-0.971 +1972,SUD,Sudan,-0.926 +1972,IRN,Iran,0.231 +1972,TUR,Turkey,0.463 +1972,IRQ,Iraq,-1.16 +1972,EGY,Egypt,-0.777 +1972,SYR,Syria,-1.128 +1972,LEB,Lebanon,-0.34 +1972,JOR,Jordan,0.161 +1972,ISR,Israel,1.083 +1972,SAU,Saudi Arabia,-0.253 +1972,YAR,Yemen Arab Republic,-1.07 +1972,YPR,Yemen People's Republic,-1.229 +1972,KUW,Kuwait,-0.642 +1972,BAH,Bahrain,-0.216 +1972,QAT,Qatar,-0.361 +1972,UAE,United Arab Emirates,-0.593 +1972,OMA,Oman,-0.447 +1972,AFG,Afghanistan,-0.224 +1972,CHN,China,-0.782 +1972,MON,Mongolia,-2.243 +1972,JPN,Japan,1.231 +1972,IND,India,-0.507 +1972,BHU,Bhutan,0.169 +1972,PAK,Pakistan,-0.212 +1972,MYA,Myanmar,-0.13 +1972,SRI,Sri Lanka,-0.379 +1972,MAD,Maldives,0.124 +1972,NEP,Nepal,0.379 +1972,THI,Thailand,0.458 +1972,CAM,Cambodia,0.419 +1972,LAO,Laos,0.687 +1972,MAL,Malaysia,-0.152 +1972,SIN,Singapore,0.336 +1972,PHI,Philippines,0.495 +1972,INS,Indonesia,-0.238 +1972,AUL,Australia,1.091 +1972,NEW,New Zealand,1.381 +1972,FIJ,Fiji,0.682 +1973,USA,United States of America,2.209 +1973,CAN,Canada,1.479 +1973,BHM,Bahamas,0.71 +1973,CUB,Cuba,-1.886 +1973,HAI,Haiti,0.534 +1973,DOM,Dominican Republic,1.111 +1973,JAM,Jamaica,0.16 +1973,TRI,Trinidad and Tobago,0.003 +1973,BAR,Barbados,0.808 +1973,MEX,Mexico,0.353 +1973,GUA,Guatemala,0.86 +1973,HON,Honduras,0.772 +1973,SAL,El Salvador,0.822 +1973,NIC,Nicaragua,1.459 +1973,COS,Costa Rica,1.016 +1973,PAN,Panama,0.279 +1973,COL,Colombia,0.764 +1973,VEN,Venezuela,0.633 +1973,GUY,Guyana,-0.272 +1973,ECU,Ecuador,0.359 +1973,PER,Peru,0.035 +1973,BRA,Brazil,1.172 +1973,BOL,Bolivia,1.244 +1973,PAR,Paraguay,1.101 +1973,CHL,Chile,0.113 +1973,ARG,Argentina,0.269 +1973,URU,Uruguay,1.24 +1973,UKG,United Kingdom,2.118 +1973,IRE,Ireland,1.353 +1973,NTH,Netherlands,1.529 +1973,BEL,Belgium,1.562 +1973,LUX,Luxembourg,1.484 +1973,FRN,France,1.746 +1973,SPN,Spain,1.293 +1973,POR,Portugal,2.352 +1973,GFR,German Federal Republic,1.63 +1973,GDR,German Democratic Republic,-2.366 +1973,POL,Poland,-2.338 +1973,AUS,Austria,1.28 +1973,HUN,Hungary,-2.339 +1973,CZE,Czechoslovakia,-2.326 +1973,ITA,Italy,1.562 +1973,MLT,Malta,0.128 +1973,ALB,Albania,-1.377 +1973,YUG,Yugoslavia,-0.573 +1973,GRC,Greece,1.086 +1973,CYP,Cyprus,0.047 +1973,BUL,Bulgaria,-2.333 +1973,ROM,Romania,-1.266 +1973,RUS,Russia,-2.314 +1973,UKR,Ukraine,-2.315 +1973,BLR,Belarus,-2.29 +1973,FIN,Finland,1.161 +1973,SWD,Sweden,1.255 +1973,NOR,Norway,1.328 +1973,DEN,Denmark,1.437 +1973,ICE,Iceland,0.849 +1973,EQG,Equatorial Guinea,-0.768 +1973,GAM,Gambia,0.103 +1973,MLI,Mali,-0.92 +1973,SEN,Senegal,-0.326 +1973,BEN,Benin,0.058 +1973,MAA,Mauritania,-0.735 +1973,NIR,Niger,-0.233 +1973,CDI,Ivory Coast,0.356 +1973,GUI,Guinea,-0.934 +1973,BFO,Burkina Faso,-0.055 +1973,LBR,Liberia,0.238 +1973,SIE,Sierra Leone,-0.127 +1973,GHA,Ghana,0.196 +1973,TOG,Togo,-0.049 +1973,CAO,Cameroon,-0.269 +1973,NIG,Nigeria,-0.307 +1973,GAB,Gabon,-0.018 +1973,CEN,Central African Republic,0.144 +1973,CHA,Chad,-0.267 +1973,CON,Congo,-0.782 +1973,DRC,Democratic Republic of the Congo,-0.029 +1973,UGA,Uganda,-0.355 +1973,KEN,Kenya,-0.098 +1973,TAZ,Tanzania,-0.757 +1973,BUI,Burundi,-0.524 +1973,RWA,Rwanda,0.035 +1973,SOM,Somalia,-0.707 +1973,ETH,Ethiopia,-0.055 +1973,ZAM,Zambia,-0.611 +1973,MAW,Malawi,1.207 +1973,SAF,South Africa,2.662 +1973,LES,Lesotho,0.418 +1973,BOT,Botswana,0.216 +1973,SWA,Swaziland,0.508 +1973,MAG,Madagascar,-0.261 +1973,MAS,Mauritius,-0.094 +1973,MOR,Morocco,-0.255 +1973,ALG,Algeria,-1.013 +1973,TUN,Tunisia,-0.398 +1973,LIB,Libya,-0.908 +1973,SUD,Sudan,-0.827 +1973,IRN,Iran,0.319 +1973,TUR,Turkey,0.554 +1973,IRQ,Iraq,-0.973 +1973,EGY,Egypt,-0.765 +1973,SYR,Syria,-0.896 +1973,LEB,Lebanon,-0.361 +1973,JOR,Jordan,-0.112 +1973,ISR,Israel,1.638 +1973,SAU,Saudi Arabia,-0.365 +1973,YAR,Yemen Arab Republic,-0.895 +1973,YPR,Yemen People's Republic,-0.971 +1973,KUW,Kuwait,-0.567 +1973,BAH,Bahrain,-0.451 +1973,QAT,Qatar,-0.439 +1973,UAE,United Arab Emirates,-0.58 +1973,OMA,Oman,-0.499 +1973,AFG,Afghanistan,-0.398 +1973,CHN,China,-0.721 +1973,MON,Mongolia,-2.302 +1973,JPN,Japan,1.321 +1973,IND,India,-0.334 +1973,BHU,Bhutan,0.204 +1973,PAK,Pakistan,-0.312 +1973,MYA,Myanmar,0.024 +1973,SRI,Sri Lanka,-0.242 +1973,NEP,Nepal,0.299 +1973,THI,Thailand,0.302 +1973,CAM,Cambodia,0.648 +1973,LAO,Laos,0.433 +1973,MAL,Malaysia,0.004 +1973,SIN,Singapore,0.223 +1973,PHI,Philippines,0.281 +1973,INS,Indonesia,-0.057 +1973,AUL,Australia,0.894 +1973,NEW,New Zealand,0.976 +1973,FIJ,Fiji,0.499 +1974,USA,United States of America,2.031 +1974,CAN,Canada,1.471 +1974,BHM,Bahamas,0.688 +1974,CUB,Cuba,-2.047 +1974,HAI,Haiti,0.683 +1974,DOM,Dominican Republic,0.901 +1974,JAM,Jamaica,0.147 +1974,TRI,Trinidad and Tobago,-0.009 +1974,BAR,Barbados,0.87 +1974,GRN,Grenada,0.504 +1974,MEX,Mexico,0.385 +1974,GUA,Guatemala,0.827 +1974,HON,Honduras,0.891 +1974,SAL,El Salvador,0.842 +1974,NIC,Nicaragua,1.575 +1974,COS,Costa Rica,1.138 +1974,PAN,Panama,0.526 +1974,COL,Colombia,0.804 +1974,VEN,Venezuela,0.654 +1974,GUY,Guyana,-0.437 +1974,ECU,Ecuador,0.543 +1974,PER,Peru,0.1 +1974,BRA,Brazil,0.652 +1974,BOL,Bolivia,1.397 +1974,PAR,Paraguay,1.002 +1974,CHL,Chile,0.84 +1974,ARG,Argentina,0.17 +1974,URU,Uruguay,1.222 +1974,UKG,United Kingdom,1.777 +1974,IRE,Ireland,1.37 +1974,NTH,Netherlands,1.57 +1974,BEL,Belgium,1.621 +1974,LUX,Luxembourg,1.614 +1974,FRN,France,1.318 +1974,SPN,Spain,0.843 +1974,POR,Portugal,0.85 +1974,GFR,German Federal Republic,1.625 +1974,GDR,German Democratic Republic,-2.336 +1974,POL,Poland,-2.318 +1974,AUS,Austria,1.272 +1974,HUN,Hungary,-2.323 +1974,CZE,Czechoslovakia,-2.322 +1974,ITA,Italy,1.513 +1974,MLT,Malta,-0.224 +1974,ALB,Albania,-1.389 +1974,YUG,Yugoslavia,-0.689 +1974,GRC,Greece,0.662 +1974,CYP,Cyprus,-0.1 +1974,BUL,Bulgaria,-2.321 +1974,ROM,Romania,-1.172 +1974,RUS,Russia,-2.314 +1974,UKR,Ukraine,-2.307 +1974,BLR,Belarus,-2.292 +1974,FIN,Finland,0.843 +1974,SWD,Sweden,1.148 +1974,NOR,Norway,1.297 +1974,DEN,Denmark,1.504 +1974,ICE,Iceland,1.176 +1974,GNB,Guinea-Bissau,-0.626 +1974,EQG,Equatorial Guinea,-0.799 +1974,GAM,Gambia,-0.114 +1974,MLI,Mali,-0.801 +1974,SEN,Senegal,-0.465 +1974,BEN,Benin,-0.273 +1974,MAA,Mauritania,-0.776 +1974,NIR,Niger,-0.253 +1974,CDI,Ivory Coast,0.381 +1974,GUI,Guinea,-0.992 +1974,BFO,Burkina Faso,-0.263 +1974,LBR,Liberia,-0.309 +1974,SIE,Sierra Leone,-0.327 +1974,GHA,Ghana,0.063 +1974,TOG,Togo,-0.284 +1974,CAO,Cameroon,-0.294 +1974,NIG,Nigeria,-0.117 +1974,GAB,Gabon,-0.131 +1974,CEN,Central African Republic,0.047 +1974,CHA,Chad,-0.327 +1974,CON,Congo,-0.568 +1974,DRC,Democratic Republic of the Congo,-0.285 +1974,UGA,Uganda,-0.54 +1974,KEN,Kenya,0.103 +1974,TAZ,Tanzania,-0.676 +1974,BUI,Burundi,-0.807 +1974,RWA,Rwanda,-0.025 +1974,SOM,Somalia,-0.649 +1974,ETH,Ethiopia,-0.095 +1974,ZAM,Zambia,-0.686 +1974,MAW,Malawi,1.22 +1974,SAF,South Africa,2.666 +1974,LES,Lesotho,0.47 +1974,BOT,Botswana,0.113 +1974,SWA,Swaziland,0.46 +1974,MAG,Madagascar,-0.43 +1974,MAS,Mauritius,-0.487 +1974,MOR,Morocco,0.036 +1974,ALG,Algeria,-1.086 +1974,TUN,Tunisia,-0.161 +1974,LIB,Libya,-0.097 +1974,SUD,Sudan,-0.739 +1974,IRN,Iran,0.303 +1974,TUR,Turkey,0.4 +1974,IRQ,Iraq,-0.997 +1974,EGY,Egypt,-0.442 +1974,SYR,Syria,-0.921 +1974,LEB,Lebanon,-0.136 +1974,JOR,Jordan,0.035 +1974,ISR,Israel,2.023 +1974,SAU,Saudi Arabia,-0.244 +1974,YAR,Yemen Arab Republic,-0.888 +1974,YPR,Yemen People's Republic,-1.135 +1974,KUW,Kuwait,-0.777 +1974,BAH,Bahrain,-0.362 +1974,QAT,Qatar,-0.233 +1974,UAE,United Arab Emirates,-0.519 +1974,OMA,Oman,-0.159 +1974,AFG,Afghanistan,-0.375 +1974,CHN,China,-0.782 +1974,MON,Mongolia,-2.302 +1974,JPN,Japan,1.059 +1974,IND,India,-0.587 +1974,BHU,Bhutan,-0.198 +1974,PAK,Pakistan,-0.258 +1974,BNG,Bangladesh,-0.249 +1974,MYA,Myanmar,0.081 +1974,SRI,Sri Lanka,-0.171 +1974,NEP,Nepal,0.389 +1974,THI,Thailand,0.359 +1974,CAM,Cambodia,0.383 +1974,LAO,Laos,0.543 +1974,MAL,Malaysia,0.124 +1974,SIN,Singapore,0.272 +1974,PHI,Philippines,0.282 +1974,INS,Indonesia,0.05 +1974,AUL,Australia,0.982 +1974,NEW,New Zealand,0.919 +1974,FIJ,Fiji,0.506 +1975,USA,United States of America,2.145 +1975,CAN,Canada,1.457 +1975,BHM,Bahamas,0.933 +1975,CUB,Cuba,-1.873 +1975,HAI,Haiti,1.077 +1975,DOM,Dominican Republic,0.829 +1975,JAM,Jamaica,-0.021 +1975,TRI,Trinidad and Tobago,-0.054 +1975,BAR,Barbados,0.974 +1975,GRN,Grenada,0.386 +1975,MEX,Mexico,0.109 +1975,GUA,Guatemala,0.898 +1975,HON,Honduras,0.956 +1975,SAL,El Salvador,0.959 +1975,NIC,Nicaragua,1.687 +1975,COS,Costa Rica,1.295 +1975,PAN,Panama,0.241 +1975,COL,Colombia,0.612 +1975,VEN,Venezuela,0.486 +1975,GUY,Guyana,-0.545 +1975,SUR,Suriname,0.409 +1975,ECU,Ecuador,0.366 +1975,PER,Peru,0.011 +1975,BRA,Brazil,0.335 +1975,BOL,Bolivia,0.942 +1975,PAR,Paraguay,1.048 +1975,CHL,Chile,0.786 +1975,ARG,Argentina,0.096 +1975,URU,Uruguay,0.993 +1975,UKG,United Kingdom,1.859 +1975,IRE,Ireland,1.334 +1975,NTH,Netherlands,1.674 +1975,BEL,Belgium,1.669 +1975,LUX,Luxembourg,1.639 +1975,FRN,France,1.475 +1975,SPN,Spain,0.687 +1975,POR,Portugal,0.483 +1975,GFR,German Federal Republic,1.805 +1975,GDR,German Democratic Republic,-2.402 +1975,POL,Poland,-2.383 +1975,AUS,Austria,0.997 +1975,HUN,Hungary,-2.397 +1975,CZE,Czechoslovakia,-2.384 +1975,ITA,Italy,1.447 +1975,MLT,Malta,-0.369 +1975,ALB,Albania,-1.1 +1975,YUG,Yugoslavia,-0.643 +1975,GRC,Greece,0.447 +1975,CYP,Cyprus,-0.175 +1975,BUL,Bulgaria,-2.387 +1975,ROM,Romania,-1.326 +1975,RUS,Russia,-2.402 +1975,UKR,Ukraine,-2.388 +1975,BLR,Belarus,-2.359 +1975,FIN,Finland,0.654 +1975,SWD,Sweden,0.992 +1975,NOR,Norway,1.274 +1975,DEN,Denmark,1.476 +1975,ICE,Iceland,1.186 +1975,CAP,Cape Verde,-1.284 +1975,STP,Sao Tome and Principe,-0.989 +1975,GNB,Guinea-Bissau,-0.624 +1975,EQG,Equatorial Guinea,-0.715 +1975,GAM,Gambia,-0.169 +1975,MLI,Mali,-0.704 +1975,SEN,Senegal,-0.557 +1975,BEN,Benin,-0.907 +1975,MAA,Mauritania,-0.577 +1975,NIR,Niger,-0.247 +1975,CDI,Ivory Coast,0.404 +1975,GUI,Guinea,-0.819 +1975,BFO,Burkina Faso,-0.204 +1975,LBR,Liberia,0.716 +1975,SIE,Sierra Leone,-0.029 +1975,GHA,Ghana,-0.193 +1975,TOG,Togo,-0.169 +1975,CAO,Cameroon,-0.346 +1975,NIG,Nigeria,-0.345 +1975,GAB,Gabon,0.453 +1975,CEN,Central African Republic,0.767 +1975,CHA,Chad,-0.39 +1975,CON,Congo,-0.602 +1975,DRC,Democratic Republic of the Congo,-0.091 +1975,UGA,Uganda,-0.529 +1975,KEN,Kenya,0.108 +1975,TAZ,Tanzania,-0.676 +1975,BUI,Burundi,-0.695 +1975,RWA,Rwanda,-0.25 +1975,SOM,Somalia,-0.609 +1975,ETH,Ethiopia,-0.077 +1975,MZM,Mozambique,-0.754 +1975,ZAM,Zambia,-0.54 +1975,MAW,Malawi,1.167 +1975,LES,Lesotho,0.331 +1975,BOT,Botswana,-0.17 +1975,SWA,Swaziland,0.676 +1975,MAG,Madagascar,-0.61 +1975,COM,Comoros,-0.769 +1975,MAS,Mauritius,-0.145 +1975,MOR,Morocco,0.053 +1975,ALG,Algeria,-0.89 +1975,TUN,Tunisia,-0.15 +1975,LIB,Libya,-0.371 +1975,SUD,Sudan,-0.605 +1975,IRN,Iran,0.241 +1975,TUR,Turkey,0.312 +1975,IRQ,Iraq,-0.733 +1975,EGY,Egypt,-0.453 +1975,SYR,Syria,-0.811 +1975,LEB,Lebanon,-0.136 +1975,JOR,Jordan,0.021 +1975,ISR,Israel,2.326 +1975,SAU,Saudi Arabia,0.064 +1975,YAR,Yemen Arab Republic,-0.803 +1975,YPR,Yemen People's Republic,-1.019 +1975,KUW,Kuwait,-0.536 +1975,BAH,Bahrain,-0.242 +1975,QAT,Qatar,-0.159 +1975,UAE,United Arab Emirates,-0.294 +1975,OMA,Oman,0.005 +1975,AFG,Afghanistan,-0.248 +1975,CHN,China,-0.503 +1975,MON,Mongolia,-2.374 +1975,JPN,Japan,0.952 +1975,IND,India,-0.362 +1975,BHU,Bhutan,-0.111 +1975,PAK,Pakistan,-0.162 +1975,BNG,Bangladesh,-0.215 +1975,MYA,Myanmar,-0.002 +1975,SRI,Sri Lanka,-0.221 +1975,MAD,Maldives,0.017 +1975,NEP,Nepal,0.28 +1975,THI,Thailand,0.254 +1975,CAM,Cambodia,0.056 +1975,LAO,Laos,-0.082 +1975,MAL,Malaysia,-0.029 +1975,SIN,Singapore,0.224 +1975,PHI,Philippines,0.211 +1975,INS,Indonesia,-0.048 +1975,AUL,Australia,1.092 +1975,PNG,Papua New Guinea,0.494 +1975,NEW,New Zealand,0.924 +1975,FIJ,Fiji,0.396 +1976,USA,United States of America,2.393 +1976,CAN,Canada,1.501 +1976,BHM,Bahamas,0.711 +1976,CUB,Cuba,-1.763 +1976,HAI,Haiti,1.123 +1976,DOM,Dominican Republic,0.619 +1976,JAM,Jamaica,-0.089 +1976,TRI,Trinidad and Tobago,-0.206 +1976,BAR,Barbados,0.405 +1976,GRN,Grenada,0.547 +1976,MEX,Mexico,0.116 +1976,GUA,Guatemala,1.185 +1976,HON,Honduras,0.912 +1976,SAL,El Salvador,0.738 +1976,NIC,Nicaragua,1.273 +1976,COS,Costa Rica,1.119 +1976,PAN,Panama,-0.1 +1976,COL,Colombia,0.356 +1976,VEN,Venezuela,0.285 +1976,GUY,Guyana,-0.555 +1976,SUR,Suriname,0.414 +1976,ECU,Ecuador,0.203 +1976,PER,Peru,-0.175 +1976,BRA,Brazil,0.287 +1976,BOL,Bolivia,0.589 +1976,PAR,Paraguay,1.139 +1976,CHL,Chile,0.693 +1976,ARG,Argentina,0.174 +1976,URU,Uruguay,1.097 +1976,UKG,United Kingdom,2.071 +1976,IRE,Ireland,1.376 +1976,NTH,Netherlands,1.665 +1976,BEL,Belgium,1.781 +1976,LUX,Luxembourg,1.813 +1976,FRN,France,1.863 +1976,SPN,Spain,0.724 +1976,POR,Portugal,0.791 +1976,GFR,German Federal Republic,1.979 +1976,GDR,German Democratic Republic,-2.308 +1976,POL,Poland,-2.201 +1976,AUS,Austria,1.003 +1976,HUN,Hungary,-2.293 +1976,CZE,Czechoslovakia,-2.3 +1976,ITA,Italy,1.57 +1976,MLT,Malta,-0.376 +1976,ALB,Albania,-1.209 +1976,YUG,Yugoslavia,-0.568 +1976,GRC,Greece,0.361 +1976,CYP,Cyprus,-0.304 +1976,BUL,Bulgaria,-2.303 +1976,ROM,Romania,-1.606 +1976,RUS,Russia,-2.304 +1976,UKR,Ukraine,-2.293 +1976,BLR,Belarus,-2.283 +1976,FIN,Finland,0.788 +1976,SWD,Sweden,1.072 +1976,NOR,Norway,1.147 +1976,DEN,Denmark,1.41 +1976,ICE,Iceland,1.13 +1976,CAP,Cape Verde,-1.278 +1976,STP,Sao Tome and Principe,-0.979 +1976,GNB,Guinea-Bissau,-0.636 +1976,EQG,Equatorial Guinea,-0.641 +1976,GAM,Gambia,-0.232 +1976,MLI,Mali,-0.449 +1976,SEN,Senegal,-0.518 +1976,BEN,Benin,-0.791 +1976,MAA,Mauritania,-0.371 +1976,NIR,Niger,-0.221 +1976,CDI,Ivory Coast,0.263 +1976,GUI,Guinea,-0.849 +1976,BFO,Burkina Faso,-0.172 +1976,LBR,Liberia,0.42 +1976,SIE,Sierra Leone,-0.161 +1976,GHA,Ghana,-0.336 +1976,TOG,Togo,-0.33 +1976,CAO,Cameroon,-0.393 +1976,NIG,Nigeria,-0.565 +1976,GAB,Gabon,0.32 +1976,CEN,Central African Republic,0.566 +1976,CHA,Chad,-0.28 +1976,CON,Congo,-0.583 +1976,DRC,Democratic Republic of the Congo,-0.084 +1976,UGA,Uganda,-0.596 +1976,KEN,Kenya,-0.023 +1976,TAZ,Tanzania,-0.389 +1976,BUI,Burundi,-0.624 +1976,RWA,Rwanda,-0.38 +1976,SOM,Somalia,-0.553 +1976,ETH,Ethiopia,-0.272 +1976,ANG,Angola,-0.633 +1976,MZM,Mozambique,-0.749 +1976,ZAM,Zambia,-0.525 +1976,MAW,Malawi,1.076 +1976,LES,Lesotho,0.187 +1976,BOT,Botswana,-0.047 +1976,SWA,Swaziland,0.609 +1976,MAG,Madagascar,-0.579 +1976,COM,Comoros,-0.717 +1976,MAS,Mauritius,-0.316 +1976,MOR,Morocco,-0.078 +1976,ALG,Algeria,-0.765 +1976,TUN,Tunisia,-0.155 +1976,LIB,Libya,-0.35 +1976,SUD,Sudan,-0.532 +1976,IRN,Iran,0.419 +1976,TUR,Turkey,0.271 +1976,IRQ,Iraq,-0.62 +1976,EGY,Egypt,-0.467 +1976,SYR,Syria,-0.91 +1976,LEB,Lebanon,-0.229 +1976,JOR,Jordan,-0.073 +1976,ISR,Israel,2.395 +1976,SAU,Saudi Arabia,-0.048 +1976,YAR,Yemen Arab Republic,-0.757 +1976,YPR,Yemen People's Republic,-0.923 +1976,KUW,Kuwait,-0.38 +1976,BAH,Bahrain,-0.216 +1976,QAT,Qatar,-0.183 +1976,UAE,United Arab Emirates,-0.314 +1976,OMA,Oman,-0.091 +1976,AFG,Afghanistan,-0.321 +1976,CHN,China,-0.814 +1976,MON,Mongolia,-2.285 +1976,JPN,Japan,1.112 +1976,IND,India,-0.421 +1976,BHU,Bhutan,-0.159 +1976,PAK,Pakistan,-0.262 +1976,BNG,Bangladesh,-0.255 +1976,MYA,Myanmar,-0.159 +1976,SRI,Sri Lanka,-0.333 +1976,MAD,Maldives,-0.224 +1976,NEP,Nepal,0.154 +1976,THI,Thailand,-0.009 +1976,CAM,Cambodia,-0.188 +1976,LAO,Laos,-0.289 +1976,MAL,Malaysia,-0.094 +1976,SIN,Singapore,0.097 +1976,PHI,Philippines,-0.017 +1976,INS,Indonesia,-0.114 +1976,AUL,Australia,1.212 +1976,PNG,Papua New Guinea,0.673 +1976,NEW,New Zealand,1.101 +1976,FIJ,Fiji,0.538 +1977,USA,United States of America,2.206 +1977,CAN,Canada,1.687 +1977,BHM,Bahamas,0.537 +1977,CUB,Cuba,-1.793 +1977,HAI,Haiti,0.367 +1977,DOM,Dominican Republic,0.631 +1977,JAM,Jamaica,-0.184 +1977,TRI,Trinidad and Tobago,-0.276 +1977,BAR,Barbados,0.138 +1977,GRN,Grenada,0.382 +1977,MEX,Mexico,0.205 +1977,GUA,Guatemala,1.192 +1977,HON,Honduras,0.802 +1977,SAL,El Salvador,0.829 +1977,NIC,Nicaragua,1.062 +1977,COS,Costa Rica,0.796 +1977,PAN,Panama,0.351 +1977,COL,Colombia,0.316 +1977,VEN,Venezuela,0.123 +1977,GUY,Guyana,-0.635 +1977,SUR,Suriname,0.498 +1977,ECU,Ecuador,0.218 +1977,PER,Peru,0.021 +1977,BRA,Brazil,0.238 +1977,BOL,Bolivia,0.446 +1977,PAR,Paraguay,0.965 +1977,CHL,Chile,0.439 +1977,ARG,Argentina,0.187 +1977,URU,Uruguay,0.879 +1977,UKG,United Kingdom,1.957 +1977,IRE,Ireland,1.432 +1977,NTH,Netherlands,1.555 +1977,BEL,Belgium,1.766 +1977,LUX,Luxembourg,1.721 +1977,FRN,France,1.72 +1977,SPN,Spain,0.671 +1977,POR,Portugal,0.784 +1977,GFR,German Federal Republic,1.874 +1977,GDR,German Democratic Republic,-2.444 +1977,POL,Poland,-2.337 +1977,AUS,Austria,1.109 +1977,HUN,Hungary,-2.467 +1977,CZE,Czechoslovakia,-2.45 +1977,ITA,Italy,1.471 +1977,MLT,Malta,-0.349 +1977,ALB,Albania,-1.351 +1977,YUG,Yugoslavia,-0.474 +1977,GRC,Greece,0.384 +1977,CYP,Cyprus,-0.332 +1977,BUL,Bulgaria,-2.454 +1977,ROM,Romania,-1.227 +1977,RUS,Russia,-2.454 +1977,UKR,Ukraine,-2.44 +1977,BLR,Belarus,-2.454 +1977,FIN,Finland,0.902 +1977,SWD,Sweden,1.075 +1977,NOR,Norway,1.248 +1977,DEN,Denmark,1.396 +1977,ICE,Iceland,1.219 +1977,CAP,Cape Verde,-0.866 +1977,STP,Sao Tome and Principe,-0.799 +1977,GNB,Guinea-Bissau,-0.498 +1977,EQG,Equatorial Guinea,-0.642 +1977,GAM,Gambia,-0.297 +1977,MLI,Mali,-0.361 +1977,SEN,Senegal,-0.328 +1977,BEN,Benin,-0.646 +1977,MAA,Mauritania,-0.227 +1977,NIR,Niger,-0.167 +1977,CDI,Ivory Coast,0.549 +1977,GUI,Guinea,-0.64 +1977,BFO,Burkina Faso,-0.298 +1977,LBR,Liberia,0.367 +1977,SIE,Sierra Leone,-0.185 +1977,GHA,Ghana,-0.266 +1977,TOG,Togo,-0.346 +1977,CAO,Cameroon,-0.371 +1977,NIG,Nigeria,-0.367 +1977,GAB,Gabon,-0.063 +1977,CEN,Central African Republic,0.43 +1977,CHA,Chad,-0.189 +1977,CON,Congo,-0.656 +1977,DRC,Democratic Republic of the Congo,0.126 +1977,UGA,Uganda,-0.676 +1977,KEN,Kenya,-0.228 +1977,TAZ,Tanzania,-0.438 +1977,BUI,Burundi,-0.537 +1977,RWA,Rwanda,-0.215 +1977,SOM,Somalia,-0.388 +1977,DJI,Djibouti,-0.36 +1977,ETH,Ethiopia,-0.324 +1977,ANG,Angola,-0.621 +1977,MZM,Mozambique,-0.553 +1977,ZAM,Zambia,-0.439 +1977,MAW,Malawi,0.861 +1977,LES,Lesotho,0.179 +1977,BOT,Botswana,-0.068 +1977,SWA,Swaziland,0.48 +1977,MAG,Madagascar,-0.525 +1977,COM,Comoros,-0.578 +1977,MAS,Mauritius,-0.327 +1977,MOR,Morocco,-0.054 +1977,ALG,Algeria,-0.597 +1977,TUN,Tunisia,-0.259 +1977,LIB,Libya,-0.344 +1977,SUD,Sudan,-0.428 +1977,IRN,Iran,0.379 +1977,TUR,Turkey,0.262 +1977,IRQ,Iraq,-0.474 +1977,EGY,Egypt,-0.409 +1977,SYR,Syria,-0.835 +1977,LEB,Lebanon,-0.098 +1977,JOR,Jordan,-0.193 +1977,ISR,Israel,2.202 +1977,SAU,Saudi Arabia,-0.136 +1977,YAR,Yemen Arab Republic,-0.698 +1977,YPR,Yemen People's Republic,-0.679 +1977,KUW,Kuwait,-0.357 +1977,BAH,Bahrain,-0.29 +1977,QAT,Qatar,-0.271 +1977,UAE,United Arab Emirates,-0.338 +1977,OMA,Oman,-0.15 +1977,AFG,Afghanistan,-0.188 +1977,CHN,China,-0.797 +1977,MON,Mongolia,-2.432 +1977,JPN,Japan,1.09 +1977,IND,India,-0.386 +1977,BHU,Bhutan,-0.265 +1977,PAK,Pakistan,-0.136 +1977,BNG,Bangladesh,-0.234 +1977,MYA,Myanmar,-0.361 +1977,SRI,Sri Lanka,-0.323 +1977,MAD,Maldives,-0.156 +1977,NEP,Nepal,0.075 +1977,THI,Thailand,0.084 +1977,LAO,Laos,-0.367 +1977,DRV,Vietnam,-1.198 +1977,MAL,Malaysia,-0.061 +1977,SIN,Singapore,0.149 +1977,PHI,Philippines,0.024 +1977,INS,Indonesia,-0.108 +1977,AUL,Australia,1.371 +1977,PNG,Papua New Guinea,0.555 +1977,NEW,New Zealand,1.222 +1977,FIJ,Fiji,0.598 +1977,WSM,Samoa,0.572 +1978,USA,United States of America,2.228 +1978,CAN,Canada,1.768 +1978,BHM,Bahamas,0.525 +1978,CUB,Cuba,-1.643 +1978,HAI,Haiti,0.308 +1978,DOM,Dominican Republic,0.664 +1978,JAM,Jamaica,-0.188 +1978,TRI,Trinidad and Tobago,-0.126 +1978,BAR,Barbados,-0.118 +1978,GRN,Grenada,0.287 +1978,MEX,Mexico,0.309 +1978,GUA,Guatemala,1.14 +1978,HON,Honduras,0.742 +1978,SAL,El Salvador,0.84 +1978,NIC,Nicaragua,0.953 +1978,COS,Costa Rica,0.478 +1978,PAN,Panama,0.332 +1978,COL,Colombia,0.301 +1978,VEN,Venezuela,0.05 +1978,GUY,Guyana,-0.312 +1978,SUR,Suriname,0.413 +1978,ECU,Ecuador,0.26 +1978,PER,Peru,0.029 +1978,BRA,Brazil,0.25 +1978,BOL,Bolivia,0.352 +1978,PAR,Paraguay,0.722 +1978,CHL,Chile,0.45 +1978,ARG,Argentina,0.089 +1978,URU,Uruguay,0.64 +1978,UKG,United Kingdom,2.018 +1978,IRE,Ireland,1.442 +1978,NTH,Netherlands,1.628 +1978,BEL,Belgium,1.688 +1978,LUX,Luxembourg,1.789 +1978,FRN,France,1.685 +1978,SPN,Spain,0.728 +1978,POR,Portugal,0.977 +1978,GFR,German Federal Republic,1.886 +1978,GDR,German Democratic Republic,-2.377 +1978,POL,Poland,-2.057 +1978,AUS,Austria,1.243 +1978,HUN,Hungary,-2.441 +1978,CZE,Czechoslovakia,-2.461 +1978,ITA,Italy,1.641 +1978,MLT,Malta,-0.228 +1978,ALB,Albania,-1.645 +1978,YUG,Yugoslavia,-0.439 +1978,GRC,Greece,0.644 +1978,CYP,Cyprus,-0.224 +1978,BUL,Bulgaria,-2.486 +1978,ROM,Romania,-0.904 +1978,RUS,Russia,-2.494 +1978,UKR,Ukraine,-2.49 +1978,BLR,Belarus,-2.493 +1978,FIN,Finland,1.022 +1978,SWD,Sweden,1.119 +1978,NOR,Norway,1.285 +1978,DEN,Denmark,1.449 +1978,ICE,Iceland,1.257 +1978,CAP,Cape Verde,-0.631 +1978,STP,Sao Tome and Principe,-0.918 +1978,GNB,Guinea-Bissau,-0.675 +1978,EQG,Equatorial Guinea,-0.871 +1978,GAM,Gambia,-0.078 +1978,MLI,Mali,-0.278 +1978,SEN,Senegal,-0.101 +1978,BEN,Benin,-0.517 +1978,MAA,Mauritania,-0.036 +1978,NIR,Niger,-0.21 +1978,CDI,Ivory Coast,0.534 +1978,GUI,Guinea,-0.551 +1978,BFO,Burkina Faso,-0.007 +1978,LBR,Liberia,0.309 +1978,SIE,Sierra Leone,-0.059 +1978,GHA,Ghana,-0.11 +1978,TOG,Togo,0 +1978,CAO,Cameroon,-0.133 +1978,NIG,Nigeria,-0.242 +1978,GAB,Gabon,0.331 +1978,CEN,Central African Republic,0.298 +1978,CHA,Chad,0.036 +1978,CON,Congo,-0.957 +1978,DRC,Democratic Republic of the Congo,0.299 +1978,UGA,Uganda,-0.38 +1978,KEN,Kenya,-0.166 +1978,TAZ,Tanzania,-0.346 +1978,BUI,Burundi,-0.421 +1978,RWA,Rwanda,0.001 +1978,SOM,Somalia,-0.257 +1978,DJI,Djibouti,-0.364 +1978,ETH,Ethiopia,-0.514 +1978,ANG,Angola,-0.85 +1978,MZM,Mozambique,-0.815 +1978,ZAM,Zambia,-0.335 +1978,MAW,Malawi,0.628 +1978,LES,Lesotho,0.386 +1978,BOT,Botswana,0 +1978,SWA,Swaziland,0.645 +1978,MAG,Madagascar,-0.401 +1978,COM,Comoros,-0.314 +1978,MAS,Mauritius,-0.189 +1978,SEY,Seychelles,-1.322 +1978,MOR,Morocco,-0.127 +1978,ALG,Algeria,-0.635 +1978,TUN,Tunisia,-0.198 +1978,LIB,Libya,-0.251 +1978,SUD,Sudan,-0.411 +1978,IRN,Iran,0.134 +1978,TUR,Turkey,0.331 +1978,IRQ,Iraq,-0.989 +1978,EGY,Egypt,-0.271 +1978,SYR,Syria,-1.016 +1978,LEB,Lebanon,0.018 +1978,JOR,Jordan,-0.186 +1978,ISR,Israel,1.997 +1978,SAU,Saudi Arabia,-0.147 +1978,YAR,Yemen Arab Republic,-0.623 +1978,YPR,Yemen People's Republic,-0.972 +1978,KUW,Kuwait,-0.281 +1978,BAH,Bahrain,-0.234 +1978,QAT,Qatar,-0.203 +1978,UAE,United Arab Emirates,-0.292 +1978,OMA,Oman,-0.141 +1978,AFG,Afghanistan,-1.097 +1978,CHN,China,-0.51 +1978,MON,Mongolia,-2.465 +1978,JPN,Japan,1.029 +1978,IND,India,-0.204 +1978,BHU,Bhutan,-0.289 +1978,PAK,Pakistan,-0.281 +1978,BNG,Bangladesh,-0.179 +1978,MYA,Myanmar,-0.004 +1978,SRI,Sri Lanka,-0.265 +1978,MAD,Maldives,-0.181 +1978,NEP,Nepal,0.376 +1978,THI,Thailand,0.099 +1978,CAM,Cambodia,-0.128 +1978,LAO,Laos,-0.62 +1978,DRV,Vietnam,-1.15 +1978,MAL,Malaysia,-0.164 +1978,SIN,Singapore,0.235 +1978,PHI,Philippines,-0.002 +1978,INS,Indonesia,-0.162 +1978,AUL,Australia,1.516 +1978,PNG,Papua New Guinea,0.454 +1978,NEW,New Zealand,1.388 +1978,FIJ,Fiji,0.44 +1978,WSM,Samoa,0.464 +1979,USA,United States of America,2.277 +1979,CAN,Canada,1.81 +1979,BHM,Bahamas,0.188 +1979,CUB,Cuba,-1.39 +1979,HAI,Haiti,0.131 +1979,DOM,Dominican Republic,0.301 +1979,JAM,Jamaica,-0.204 +1979,TRI,Trinidad and Tobago,-0.202 +1979,BAR,Barbados,-0.049 +1979,GRN,Grenada,-0.201 +1979,SLU,St. Lucia,-0.016 +1979,MEX,Mexico,0.067 +1979,GUA,Guatemala,1.013 +1979,HON,Honduras,0.664 +1979,SAL,El Salvador,0.26 +1979,NIC,Nicaragua,-0.143 +1979,COS,Costa Rica,0.24 +1979,PAN,Panama,0.213 +1979,COL,Colombia,0.118 +1979,VEN,Venezuela,0.069 +1979,GUY,Guyana,-0.366 +1979,SUR,Suriname,0.162 +1979,ECU,Ecuador,0.012 +1979,PER,Peru,-0.065 +1979,BRA,Brazil,0.093 +1979,BOL,Bolivia,0.116 +1979,PAR,Paraguay,0.638 +1979,CHL,Chile,0.486 +1979,ARG,Argentina,0.045 +1979,URU,Uruguay,0.514 +1979,UKG,United Kingdom,2.028 +1979,IRE,Ireland,1.414 +1979,NTH,Netherlands,1.574 +1979,BEL,Belgium,1.868 +1979,LUX,Luxembourg,1.853 +1979,FRN,France,1.798 +1979,SPN,Spain,0.854 +1979,POR,Portugal,1.152 +1979,GFR,German Federal Republic,1.919 +1979,GDR,German Democratic Republic,-2.412 +1979,POL,Poland,-1.929 +1979,AUS,Austria,1.189 +1979,HUN,Hungary,-2.438 +1979,CZE,Czechoslovakia,-2.45 +1979,ITA,Italy,1.573 +1979,MLT,Malta,-0.198 +1979,ALB,Albania,-1.826 +1979,YUG,Yugoslavia,-0.351 +1979,GRC,Greece,0.751 +1979,CYP,Cyprus,-0.259 +1979,BUL,Bulgaria,-2.464 +1979,ROM,Romania,-0.862 +1979,RUS,Russia,-2.464 +1979,UKR,Ukraine,-2.461 +1979,BLR,Belarus,-2.459 +1979,FIN,Finland,1.076 +1979,SWD,Sweden,1.144 +1979,NOR,Norway,1.367 +1979,DEN,Denmark,1.541 +1979,ICE,Iceland,1.381 +1979,CAP,Cape Verde,-0.632 +1979,STP,Sao Tome and Principe,-0.891 +1979,GNB,Guinea-Bissau,-0.725 +1979,EQG,Equatorial Guinea,-0.183 +1979,GAM,Gambia,-0.058 +1979,MLI,Mali,-0.209 +1979,SEN,Senegal,0.172 +1979,BEN,Benin,-0.49 +1979,MAA,Mauritania,-0.6 +1979,NIR,Niger,-0.169 +1979,CDI,Ivory Coast,0.393 +1979,GUI,Guinea,-0.474 +1979,BFO,Burkina Faso,0.095 +1979,LBR,Liberia,0.204 +1979,SIE,Sierra Leone,-0.193 +1979,GHA,Ghana,-0.177 +1979,TOG,Togo,0.008 +1979,CAO,Cameroon,0.178 +1979,NIG,Nigeria,-0.177 +1979,GAB,Gabon,0.236 +1979,CEN,Central African Republic,0.434 +1979,CHA,Chad,0.049 +1979,CON,Congo,-0.88 +1979,DRC,Democratic Republic of the Congo,0.155 +1979,UGA,Uganda,-0.296 +1979,KEN,Kenya,-0.106 +1979,TAZ,Tanzania,-0.38 +1979,BUI,Burundi,-0.382 +1979,RWA,Rwanda,-0.046 +1979,SOM,Somalia,-0.223 +1979,DJI,Djibouti,-0.226 +1979,ETH,Ethiopia,-0.571 +1979,ANG,Angola,-0.907 +1979,MZM,Mozambique,-0.939 +1979,ZAM,Zambia,-0.256 +1979,MAW,Malawi,0.671 +1979,LES,Lesotho,0.193 +1979,BOT,Botswana,0.12 +1979,SWA,Swaziland,0.399 +1979,MAG,Madagascar,-0.494 +1979,COM,Comoros,-0.237 +1979,MAS,Mauritius,-0.12 +1979,SEY,Seychelles,-1.314 +1979,MOR,Morocco,0.203 +1979,ALG,Algeria,-0.803 +1979,TUN,Tunisia,-0.165 +1979,LIB,Libya,-0.354 +1979,SUD,Sudan,-0.302 +1979,IRN,Iran,-0.156 +1979,TUR,Turkey,0.403 +1979,IRQ,Iraq,-1.23 +1979,EGY,Egypt,-0.153 +1979,SYR,Syria,-1.351 +1979,LEB,Lebanon,0.133 +1979,JOR,Jordan,-0.197 +1979,ISR,Israel,2.044 +1979,SAU,Saudi Arabia,-0.089 +1979,YAR,Yemen Arab Republic,-0.754 +1979,YPR,Yemen People's Republic,-1.024 +1979,KUW,Kuwait,-0.283 +1979,BAH,Bahrain,-0.249 +1979,QAT,Qatar,-0.212 +1979,UAE,United Arab Emirates,-0.295 +1979,OMA,Oman,-0.079 +1979,AFG,Afghanistan,-1.207 +1979,CHN,China,-0.229 +1979,MON,Mongolia,-2.458 +1979,JPN,Japan,1.157 +1979,IND,India,-0.293 +1979,BHU,Bhutan,-0.241 +1979,PAK,Pakistan,-0.194 +1979,BNG,Bangladesh,-0.162 +1979,MYA,Myanmar,0.245 +1979,SRI,Sri Lanka,-0.246 +1979,MAD,Maldives,-0.096 +1979,NEP,Nepal,0.234 +1979,THI,Thailand,0.171 +1979,CAM,Cambodia,-0.162 +1979,LAO,Laos,-0.846 +1979,DRV,Vietnam,-1.288 +1979,MAL,Malaysia,-0.132 +1979,SIN,Singapore,0.313 +1979,PHI,Philippines,-0.044 +1979,INS,Indonesia,-0.149 +1979,AUL,Australia,1.472 +1979,PNG,Papua New Guinea,0.295 +1979,NEW,New Zealand,1.446 +1979,SOL,Solomon Islands,0.459 +1979,FIJ,Fiji,0.487 +1979,WSM,Samoa,0.513 +1980,USA,United States of America,2.318 +1980,CAN,Canada,1.824 +1980,BHM,Bahamas,0.179 +1980,CUB,Cuba,-1.478 +1980,HAI,Haiti,0.179 +1980,DOM,Dominican Republic,0.558 +1980,JAM,Jamaica,-0.2 +1980,TRI,Trinidad and Tobago,-0.1 +1980,BAR,Barbados,-0.095 +1980,GRN,Grenada,-0.929 +1980,SLU,St. Lucia,-0.006 +1980,MEX,Mexico,-0.143 +1980,GUA,Guatemala,1.05 +1980,HON,Honduras,0.418 +1980,SAL,El Salvador,0.231 +1980,NIC,Nicaragua,-0.555 +1980,COS,Costa Rica,0.3 +1980,PAN,Panama,0.015 +1980,COL,Colombia,0.306 +1980,VEN,Venezuela,0.042 +1980,GUY,Guyana,-0.332 +1980,SUR,Suriname,0.088 +1980,ECU,Ecuador,0.005 +1980,PER,Peru,0.063 +1980,BRA,Brazil,0.019 +1980,BOL,Bolivia,0.344 +1980,PAR,Paraguay,0.498 +1980,CHL,Chile,0.572 +1980,ARG,Argentina,0.102 +1980,URU,Uruguay,0.344 +1980,UKG,United Kingdom,1.976 +1980,IRE,Ireland,1.217 +1980,NTH,Netherlands,1.577 +1980,BEL,Belgium,1.826 +1980,LUX,Luxembourg,1.84 +1980,FRN,France,1.857 +1980,SPN,Spain,0.81 +1980,POR,Portugal,1.298 +1980,GFR,German Federal Republic,1.85 +1980,GDR,German Democratic Republic,-2.324 +1980,POL,Poland,-1.751 +1980,AUS,Austria,1.064 +1980,HUN,Hungary,-2.324 +1980,CZE,Czechoslovakia,-2.342 +1980,ITA,Italy,1.556 +1980,MLT,Malta,-0.191 +1980,ALB,Albania,-1.557 +1980,YUG,Yugoslavia,-0.304 +1980,GRC,Greece,1.032 +1980,CYP,Cyprus,-0.241 +1980,BUL,Bulgaria,-2.357 +1980,ROM,Romania,-0.895 +1980,RUS,Russia,-2.353 +1980,UKR,Ukraine,-2.351 +1980,BLR,Belarus,-2.35 +1980,FIN,Finland,0.805 +1980,SWD,Sweden,1.05 +1980,NOR,Norway,1.283 +1980,DEN,Denmark,1.351 +1980,ICE,Iceland,1.316 +1980,CAP,Cape Verde,-0.721 +1980,STP,Sao Tome and Principe,-0.956 +1980,GNB,Guinea-Bissau,-0.768 +1980,EQG,Equatorial Guinea,-0.047 +1980,GAM,Gambia,0.018 +1980,MLI,Mali,-0.334 +1980,SEN,Senegal,0.067 +1980,BEN,Benin,-0.856 +1980,MAA,Mauritania,-0.328 +1980,NIR,Niger,-0.056 +1980,CDI,Ivory Coast,0.359 +1980,GUI,Guinea,-0.604 +1980,BFO,Burkina Faso,0.11 +1980,LBR,Liberia,0.217 +1980,SIE,Sierra Leone,-0.21 +1980,GHA,Ghana,-0.124 +1980,TOG,Togo,0.028 +1980,CAO,Cameroon,0.007 +1980,NIG,Nigeria,-0.213 +1980,GAB,Gabon,0.225 +1980,CEN,Central African Republic,0.421 +1980,CHA,Chad,-0.156 +1980,CON,Congo,-0.887 +1980,DRC,Democratic Republic of the Congo,0.151 +1980,UGA,Uganda,-0.441 +1980,KEN,Kenya,-0.141 +1980,TAZ,Tanzania,-0.435 +1980,BUI,Burundi,-0.32 +1980,RWA,Rwanda,-0.073 +1980,SOM,Somalia,-0.191 +1980,DJI,Djibouti,-0.199 +1980,ETH,Ethiopia,-0.737 +1980,ANG,Angola,-1.184 +1980,MZM,Mozambique,-1.185 +1980,ZAM,Zambia,-0.241 +1980,ZIM,Zimbabwe,-0.17 +1980,MAW,Malawi,0.862 +1980,LES,Lesotho,0.224 +1980,BOT,Botswana,0.161 +1980,SWA,Swaziland,0.465 +1980,MAG,Madagascar,-0.627 +1980,COM,Comoros,-0.085 +1980,MAS,Mauritius,0.162 +1980,SEY,Seychelles,-1.417 +1980,MOR,Morocco,0.146 +1980,ALG,Algeria,-0.801 +1980,TUN,Tunisia,-0.258 +1980,LIB,Libya,-0.553 +1980,SUD,Sudan,-0.188 +1980,IRN,Iran,-0.329 +1980,TUR,Turkey,0.475 +1980,IRQ,Iraq,-1.138 +1980,EGY,Egypt,-0.077 +1980,SYR,Syria,-1.393 +1980,LEB,Lebanon,-0.105 +1980,JOR,Jordan,-0.315 +1980,ISR,Israel,2.012 +1980,SAU,Saudi Arabia,-0.129 +1980,YAR,Yemen Arab Republic,-0.678 +1980,YPR,Yemen People's Republic,-1.2 +1980,KUW,Kuwait,-0.303 +1980,BAH,Bahrain,-0.271 +1980,QAT,Qatar,-0.288 +1980,UAE,United Arab Emirates,-0.329 +1980,OMA,Oman,-0.181 +1980,AFG,Afghanistan,-1.57 +1980,CHN,China,-0.139 +1980,MON,Mongolia,-2.343 +1980,JPN,Japan,1.202 +1980,IND,India,-0.461 +1980,BHU,Bhutan,-0.269 +1980,PAK,Pakistan,-0.112 +1980,BNG,Bangladesh,-0.303 +1980,MYA,Myanmar,0.319 +1980,SRI,Sri Lanka,-0.217 +1980,MAD,Maldives,-0.357 +1980,NEP,Nepal,0.104 +1980,THI,Thailand,0.184 +1980,CAM,Cambodia,-0.062 +1980,LAO,Laos,-1.379 +1980,DRV,Vietnam,-1.499 +1980,MAL,Malaysia,-0.133 +1980,SIN,Singapore,0.265 +1980,PHI,Philippines,-0.039 +1980,INS,Indonesia,-0.226 +1980,AUL,Australia,1.395 +1980,PNG,Papua New Guinea,0.373 +1980,NEW,New Zealand,1.362 +1980,SOL,Solomon Islands,0.472 +1980,FIJ,Fiji,0.43 +1980,WSM,Samoa,0.43 +1981,USA,United States of America,2.658 +1981,CAN,Canada,1.773 +1981,BHM,Bahamas,0.131 +1981,CUB,Cuba,-1.605 +1981,HAI,Haiti,0.243 +1981,DOM,Dominican Republic,0.461 +1981,JAM,Jamaica,0.46 +1981,TRI,Trinidad and Tobago,-0.254 +1981,BAR,Barbados,-0.062 +1981,GRN,Grenada,-0.97 +1981,SLU,St. Lucia,-0.11 +1981,SVG,St. Vincent and the Grenadines,0.075 +1981,AAB,Antigua & Barbuda,0.013 +1981,MEX,Mexico,-0.339 +1981,BLZ,Belize,-0.165 +1981,GUA,Guatemala,1.081 +1981,HON,Honduras,0.38 +1981,SAL,El Salvador,0.093 +1981,NIC,Nicaragua,-0.74 +1981,COS,Costa Rica,0.221 +1981,PAN,Panama,-0.378 +1981,COL,Colombia,0.18 +1981,VEN,Venezuela,-0.035 +1981,GUY,Guyana,-0.336 +1981,SUR,Suriname,-0.153 +1981,ECU,Ecuador,-0.171 +1981,PER,Peru,-0.083 +1981,BRA,Brazil,-0.097 +1981,BOL,Bolivia,0.2 +1981,PAR,Paraguay,0.531 +1981,CHL,Chile,0.404 +1981,ARG,Argentina,0.029 +1981,URU,Uruguay,0.159 +1981,UKG,United Kingdom,1.925 +1981,IRE,Ireland,1.181 +1981,NTH,Netherlands,1.488 +1981,BEL,Belgium,1.689 +1981,LUX,Luxembourg,1.718 +1981,FRN,France,1.717 +1981,SPN,Spain,0.823 +1981,POR,Portugal,1.105 +1981,GFR,German Federal Republic,1.754 +1981,GDR,German Democratic Republic,-2.263 +1981,POL,Poland,-1.849 +1981,AUS,Austria,1.032 +1981,HUN,Hungary,-2.253 +1981,CZE,Czechoslovakia,-2.262 +1981,ITA,Italy,1.604 +1981,MLT,Malta,-0.364 +1981,ALB,Albania,-1.436 +1981,YUG,Yugoslavia,-0.35 +1981,GRC,Greece,0.757 +1981,CYP,Cyprus,-0.469 +1981,BUL,Bulgaria,-2.25 +1981,ROM,Romania,-0.944 +1981,RUS,Russia,-2.27 +1981,UKR,Ukraine,-2.268 +1981,BLR,Belarus,-2.273 +1981,FIN,Finland,0.813 +1981,SWD,Sweden,1.062 +1981,NOR,Norway,1.335 +1981,DEN,Denmark,1.335 +1981,ICE,Iceland,1.332 +1981,CAP,Cape Verde,-0.748 +1981,STP,Sao Tome and Principe,-0.889 +1981,GNB,Guinea-Bissau,-0.635 +1981,EQG,Equatorial Guinea,0.019 +1981,GAM,Gambia,-0.247 +1981,MLI,Mali,-0.551 +1981,SEN,Senegal,-0.062 +1981,BEN,Benin,-0.798 +1981,MAA,Mauritania,-0.242 +1981,NIR,Niger,-0.051 +1981,CDI,Ivory Coast,0.31 +1981,GUI,Guinea,-0.48 +1981,BFO,Burkina Faso,0.087 +1981,LBR,Liberia,0.225 +1981,SIE,Sierra Leone,-0.281 +1981,GHA,Ghana,-0.064 +1981,TOG,Togo,-0.14 +1981,CAO,Cameroon,-0.185 +1981,NIG,Nigeria,-0.217 +1981,GAB,Gabon,0.101 +1981,CEN,Central African Republic,0.301 +1981,CHA,Chad,-0.492 +1981,CON,Congo,-0.888 +1981,DRC,Democratic Republic of the Congo,0.16 +1981,UGA,Uganda,-0.56 +1981,KEN,Kenya,-0.104 +1981,TAZ,Tanzania,-0.48 +1981,BUI,Burundi,-0.362 +1981,RWA,Rwanda,-0.1 +1981,SOM,Somalia,-0.086 +1981,DJI,Djibouti,-0.219 +1981,ETH,Ethiopia,-0.905 +1981,ANG,Angola,-1.093 +1981,MZM,Mozambique,-1.202 +1981,ZAM,Zambia,-0.335 +1981,ZIM,Zimbabwe,-0.281 +1981,MAW,Malawi,0.701 +1981,LES,Lesotho,0.076 +1981,BOT,Botswana,0.176 +1981,SWA,Swaziland,0.374 +1981,MAG,Madagascar,-0.698 +1981,COM,Comoros,0.016 +1981,MAS,Mauritius,-0.214 +1981,SEY,Seychelles,-1.522 +1981,MOR,Morocco,0.057 +1981,ALG,Algeria,-0.837 +1981,TUN,Tunisia,-0.062 +1981,LIB,Libya,-0.793 +1981,SUD,Sudan,-0.132 +1981,IRN,Iran,-0.458 +1981,TUR,Turkey,0.5 +1981,IRQ,Iraq,-0.998 +1981,EGY,Egypt,-0.083 +1981,SYR,Syria,-1.162 +1981,LEB,Lebanon,-0.288 +1981,JOR,Jordan,-0.416 +1981,ISR,Israel,2.24 +1981,SAU,Saudi Arabia,-0.069 +1981,YAR,Yemen Arab Republic,-0.616 +1981,YPR,Yemen People's Republic,-1.235 +1981,KUW,Kuwait,-0.456 +1981,BAH,Bahrain,-0.376 +1981,QAT,Qatar,-0.455 +1981,UAE,United Arab Emirates,-0.4 +1981,OMA,Oman,-0.182 +1981,AFG,Afghanistan,-1.758 +1981,CHN,China,-0.108 +1981,MON,Mongolia,-2.302 +1981,JPN,Japan,1.256 +1981,IND,India,-0.438 +1981,BHU,Bhutan,-0.394 +1981,PAK,Pakistan,-0.188 +1981,BNG,Bangladesh,-0.19 +1981,MYA,Myanmar,0.22 +1981,SRI,Sri Lanka,-0.288 +1981,MAD,Maldives,-0.28 +1981,NEP,Nepal,0.096 +1981,THI,Thailand,-0.135 +1981,CAM,Cambodia,-0.09 +1981,LAO,Laos,-1.711 +1981,DRV,Vietnam,-1.774 +1981,MAL,Malaysia,-0.153 +1981,SIN,Singapore,0.204 +1981,PHI,Philippines,-0.196 +1981,INS,Indonesia,-0.357 +1981,AUL,Australia,1.449 +1981,PNG,Papua New Guinea,0.347 +1981,NEW,New Zealand,1.508 +1981,VAN,Vanuatu,-0.64 +1981,SOL,Solomon Islands,0.372 +1981,FIJ,Fiji,0.369 +1981,WSM,Samoa,0.285 +1982,USA,United States of America,2.568 +1982,CAN,Canada,1.656 +1982,BHM,Bahamas,0.128 +1982,CUB,Cuba,-1.546 +1982,HAI,Haiti,0.107 +1982,DOM,Dominican Republic,0.09 +1982,JAM,Jamaica,0.049 +1982,TRI,Trinidad and Tobago,-0.27 +1982,BAR,Barbados,0.028 +1982,DMA,Dominica,0.273 +1982,GRN,Grenada,-1.294 +1982,SLU,St. Lucia,-0.041 +1982,SVG,St. Vincent and the Grenadines,0.067 +1982,AAB,Antigua & Barbuda,-0.047 +1982,MEX,Mexico,-0.461 +1982,BLZ,Belize,-0.292 +1982,GUA,Guatemala,0.734 +1982,HON,Honduras,0.204 +1982,SAL,El Salvador,0.016 +1982,NIC,Nicaragua,-0.818 +1982,COS,Costa Rica,0.24 +1982,PAN,Panama,-0.524 +1982,COL,Colombia,0.029 +1982,VEN,Venezuela,-0.166 +1982,GUY,Guyana,-0.464 +1982,SUR,Suriname,-0.265 +1982,ECU,Ecuador,-0.213 +1982,PER,Peru,-0.201 +1982,BRA,Brazil,-0.151 +1982,BOL,Bolivia,-0.241 +1982,PAR,Paraguay,0.553 +1982,CHL,Chile,0.195 +1982,ARG,Argentina,-0.305 +1982,URU,Uruguay,0.318 +1982,UKG,United Kingdom,1.955 +1982,IRE,Ireland,1.014 +1982,NTH,Netherlands,1.553 +1982,BEL,Belgium,1.711 +1982,LUX,Luxembourg,1.717 +1982,FRN,France,1.678 +1982,SPN,Spain,0.942 +1982,POR,Portugal,1.182 +1982,GFR,German Federal Republic,1.519 +1982,GDR,German Democratic Republic,-0.996 +1982,POL,Poland,-1.864 +1982,AUS,Austria,0.876 +1982,HUN,Hungary,-2.184 +1982,CZE,Czechoslovakia,-2.182 +1982,ITA,Italy,1.558 +1982,MLT,Malta,-0.313 +1982,ALB,Albania,-1.496 +1982,YUG,Yugoslavia,-0.399 +1982,GRC,Greece,0.601 +1982,CYP,Cyprus,-0.479 +1982,BUL,Bulgaria,-2.136 +1982,ROM,Romania,-0.861 +1982,RUS,Russia,-2.197 +1982,UKR,Ukraine,-2.203 +1982,BLR,Belarus,-2.205 +1982,FIN,Finland,0.732 +1982,SWD,Sweden,0.914 +1982,NOR,Norway,1.305 +1982,DEN,Denmark,1.307 +1982,ICE,Iceland,1.286 +1982,CAP,Cape Verde,-0.768 +1982,STP,Sao Tome and Principe,-0.948 +1982,GNB,Guinea-Bissau,-0.585 +1982,EQG,Equatorial Guinea,-0.218 +1982,GAM,Gambia,-0.28 +1982,MLI,Mali,-0.522 +1982,SEN,Senegal,-0.202 +1982,BEN,Benin,-0.809 +1982,MAA,Mauritania,-0.252 +1982,NIR,Niger,-0.18 +1982,CDI,Ivory Coast,0.444 +1982,GUI,Guinea,-0.535 +1982,BFO,Burkina Faso,-0.112 +1982,LBR,Liberia,0.011 +1982,SIE,Sierra Leone,-0.352 +1982,GHA,Ghana,-0.369 +1982,TOG,Togo,-0.249 +1982,CAO,Cameroon,-0.221 +1982,NIG,Nigeria,-0.247 +1982,GAB,Gabon,-0.131 +1982,CEN,Central African Republic,-0.096 +1982,CHA,Chad,-0.262 +1982,CON,Congo,-0.909 +1982,DRC,Democratic Republic of the Congo,0.14 +1982,UGA,Uganda,-0.654 +1982,KEN,Kenya,-0.261 +1982,TAZ,Tanzania,-0.448 +1982,BUI,Burundi,-0.426 +1982,RWA,Rwanda,-0.203 +1982,SOM,Somalia,0.064 +1982,DJI,Djibouti,-0.158 +1982,ETH,Ethiopia,-1.146 +1982,ANG,Angola,-1.078 +1982,MZM,Mozambique,-1.32 +1982,ZAM,Zambia,-0.431 +1982,ZIM,Zimbabwe,-0.348 +1982,MAW,Malawi,0.699 +1982,LES,Lesotho,-0.001 +1982,BOT,Botswana,-0.025 +1982,SWA,Swaziland,0.055 +1982,MAG,Madagascar,-0.778 +1982,COM,Comoros,-0.128 +1982,MAS,Mauritius,-0.301 +1982,SEY,Seychelles,-1.525 +1982,MOR,Morocco,-0.022 +1982,ALG,Algeria,-0.792 +1982,TUN,Tunisia,-0.165 +1982,LIB,Libya,-0.987 +1982,SUD,Sudan,-0.14 +1982,IRN,Iran,-0.593 +1982,TUR,Turkey,0.641 +1982,IRQ,Iraq,-0.971 +1982,EGY,Egypt,-0.124 +1982,SYR,Syria,-1.324 +1982,LEB,Lebanon,0.099 +1982,JOR,Jordan,-0.42 +1982,ISR,Israel,2.058 +1982,SAU,Saudi Arabia,0.132 +1982,YAR,Yemen Arab Republic,-0.773 +1982,YPR,Yemen People's Republic,-1.272 +1982,KUW,Kuwait,-0.388 +1982,BAH,Bahrain,-0.438 +1982,QAT,Qatar,-0.448 +1982,UAE,United Arab Emirates,-0.494 +1982,OMA,Oman,-0.197 +1982,AFG,Afghanistan,-1.807 +1982,CHN,China,0.092 +1982,MON,Mongolia,-2.173 +1982,JPN,Japan,1.231 +1982,IND,India,-0.63 +1982,BHU,Bhutan,-0.356 +1982,PAK,Pakistan,-0.175 +1982,BNG,Bangladesh,-0.216 +1982,MYA,Myanmar,0.233 +1982,SRI,Sri Lanka,-0.265 +1982,MAD,Maldives,-0.307 +1982,NEP,Nepal,-0.092 +1982,THI,Thailand,-0.117 +1982,CAM,Cambodia,-0.08 +1982,LAO,Laos,-1.78 +1982,DRV,Vietnam,-1.799 +1982,MAL,Malaysia,-0.117 +1982,SIN,Singapore,0.201 +1982,PHI,Philippines,0.087 +1982,INS,Indonesia,-0.422 +1982,AUL,Australia,1.36 +1982,PNG,Papua New Guinea,0.07 +1982,NEW,New Zealand,1.403 +1982,VAN,Vanuatu,-0.631 +1982,SOL,Solomon Islands,0.093 +1982,FIJ,Fiji,0.18 +1982,WSM,Samoa,0.013 +1983,USA,United States of America,2.592 +1983,CAN,Canada,1.658 +1983,BHM,Bahamas,0.247 +1983,CUB,Cuba,-1.566 +1983,HAI,Haiti,0.265 +1983,DOM,Dominican Republic,0.158 +1983,JAM,Jamaica,-0.034 +1983,TRI,Trinidad and Tobago,-0.219 +1983,BAR,Barbados,0.036 +1983,DMA,Dominica,0.376 +1983,GRN,Grenada,-1.22 +1983,SLU,St. Lucia,0.367 +1983,SVG,St. Vincent and the Grenadines,0.233 +1983,AAB,Antigua & Barbuda,-0.23 +1983,SKN,St. Kitts and Nevis,0.505 +1983,MEX,Mexico,-0.473 +1983,BLZ,Belize,-0.031 +1983,GUA,Guatemala,0.479 +1983,HON,Honduras,0.259 +1983,SAL,El Salvador,-0.063 +1983,NIC,Nicaragua,-0.806 +1983,COS,Costa Rica,0.263 +1983,PAN,Panama,-0.341 +1983,COL,Colombia,0.023 +1983,VEN,Venezuela,-0.247 +1983,GUY,Guyana,-0.535 +1983,SUR,Suriname,-0.191 +1983,ECU,Ecuador,-0.263 +1983,PER,Peru,-0.198 +1983,BRA,Brazil,-0.059 +1983,BOL,Bolivia,-0.223 +1983,PAR,Paraguay,0.638 +1983,CHL,Chile,0.183 +1983,ARG,Argentina,-0.153 +1983,URU,Uruguay,0.148 +1983,UKG,United Kingdom,1.971 +1983,IRE,Ireland,0.91 +1983,NTH,Netherlands,1.497 +1983,BEL,Belgium,1.614 +1983,LUX,Luxembourg,1.607 +1983,FRN,France,1.624 +1983,SPN,Spain,0.883 +1983,POR,Portugal,1.196 +1983,GFR,German Federal Republic,1.696 +1983,GDR,German Democratic Republic,-1.685 +1983,POL,Poland,-1.874 +1983,AUS,Austria,0.763 +1983,HUN,Hungary,-2.143 +1983,CZE,Czechoslovakia,-2.144 +1983,ITA,Italy,1.54 +1983,MLT,Malta,-0.379 +1983,ALB,Albania,-1.543 +1983,YUG,Yugoslavia,-0.477 +1983,GRC,Greece,0.448 +1983,CYP,Cyprus,-0.566 +1983,BUL,Bulgaria,-2.13 +1983,ROM,Romania,-0.996 +1983,RUS,Russia,-2.137 +1983,UKR,Ukraine,-2.144 +1983,BLR,Belarus,-2.15 +1983,FIN,Finland,0.679 +1983,SWD,Sweden,0.861 +1983,NOR,Norway,1.293 +1983,DEN,Denmark,1.168 +1983,ICE,Iceland,1.227 +1983,CAP,Cape Verde,-0.789 +1983,STP,Sao Tome and Principe,-0.834 +1983,GNB,Guinea-Bissau,-0.675 +1983,EQG,Equatorial Guinea,-0.246 +1983,GAM,Gambia,-0.189 +1983,MLI,Mali,-0.513 +1983,SEN,Senegal,-0.124 +1983,BEN,Benin,-0.742 +1983,MAA,Mauritania,-0.394 +1983,NIR,Niger,-0.297 +1983,CDI,Ivory Coast,0.462 +1983,GUI,Guinea,-0.491 +1983,BFO,Burkina Faso,-0.511 +1983,LBR,Liberia,0.145 +1983,SIE,Sierra Leone,-0.416 +1983,GHA,Ghana,-0.466 +1983,TOG,Togo,-0.311 +1983,CAO,Cameroon,-0.366 +1983,NIG,Nigeria,-0.356 +1983,GAB,Gabon,-0.234 +1983,CEN,Central African Republic,-0.097 +1983,CHA,Chad,0.12 +1983,CON,Congo,-0.989 +1983,DRC,Democratic Republic of the Congo,0.225 +1983,UGA,Uganda,-0.648 +1983,KEN,Kenya,-0.319 +1983,TAZ,Tanzania,-0.639 +1983,BUI,Burundi,-0.529 +1983,RWA,Rwanda,-0.295 +1983,SOM,Somalia,-0.02 +1983,DJI,Djibouti,-0.198 +1983,ETH,Ethiopia,-1.023 +1983,ANG,Angola,-0.893 +1983,MZM,Mozambique,-1.37 +1983,ZAM,Zambia,-0.493 +1983,ZIM,Zimbabwe,-0.505 +1983,MAW,Malawi,0.454 +1983,LES,Lesotho,0.121 +1983,BOT,Botswana,-0.112 +1983,SWA,Swaziland,0.293 +1983,MAG,Madagascar,-0.739 +1983,COM,Comoros,-0.118 +1983,MAS,Mauritius,-0.351 +1983,SEY,Seychelles,-0.975 +1983,MOR,Morocco,-0.082 +1983,ALG,Algeria,-0.817 +1983,TUN,Tunisia,-0.336 +1983,LIB,Libya,-1.024 +1983,SUD,Sudan,-0.188 +1983,IRN,Iran,-0.616 +1983,TUR,Turkey,0.695 +1983,IRQ,Iraq,-0.89 +1983,EGY,Egypt,-0.204 +1983,SYR,Syria,-1.367 +1983,LEB,Lebanon,0.027 +1983,JOR,Jordan,-0.469 +1983,ISR,Israel,2.099 +1983,SAU,Saudi Arabia,-0.283 +1983,YAR,Yemen Arab Republic,-0.837 +1983,YPR,Yemen People's Republic,-1.307 +1983,KUW,Kuwait,-0.462 +1983,BAH,Bahrain,-0.477 +1983,QAT,Qatar,-0.48 +1983,UAE,United Arab Emirates,-0.496 +1983,OMA,Oman,-0.236 +1983,AFG,Afghanistan,-1.599 +1983,CHN,China,0.094 +1983,MON,Mongolia,-2.119 +1983,JPN,Japan,1.256 +1983,IND,India,-0.447 +1983,BHU,Bhutan,-0.322 +1983,PAK,Pakistan,-0.288 +1983,BNG,Bangladesh,-0.246 +1983,MYA,Myanmar,0.113 +1983,SRI,Sri Lanka,-0.252 +1983,MAD,Maldives,-0.349 +1983,NEP,Nepal,-0.141 +1983,THI,Thailand,-0.165 +1983,CAM,Cambodia,-0.104 +1983,LAO,Laos,-1.787 +1983,DRV,Vietnam,-1.812 +1983,MAL,Malaysia,-0.228 +1983,SIN,Singapore,0.039 +1983,PHI,Philippines,0.181 +1983,INS,Indonesia,-0.372 +1983,AUL,Australia,1.299 +1983,PNG,Papua New Guinea,-0.134 +1983,NEW,New Zealand,1.366 +1983,VAN,Vanuatu,-0.518 +1983,SOL,Solomon Islands,0.339 +1983,FIJ,Fiji,0.06 +1983,WSM,Samoa,0.116 +1984,USA,United States of America,2.737 +1984,CAN,Canada,1.703 +1984,BHM,Bahamas,0.228 +1984,CUB,Cuba,-1.702 +1984,HAI,Haiti,0.22 +1984,DOM,Dominican Republic,0.11 +1984,JAM,Jamaica,0.027 +1984,TRI,Trinidad and Tobago,-0.363 +1984,BAR,Barbados,-0.024 +1984,DMA,Dominica,0.352 +1984,GRN,Grenada,-0.357 +1984,SLU,St. Lucia,0.342 +1984,SVG,St. Vincent and the Grenadines,0.107 +1984,AAB,Antigua & Barbuda,-0.33 +1984,SKN,St. Kitts and Nevis,0.454 +1984,MEX,Mexico,-0.709 +1984,BLZ,Belize,0.076 +1984,GUA,Guatemala,0.185 +1984,HON,Honduras,0.158 +1984,SAL,El Salvador,-0.035 +1984,NIC,Nicaragua,-0.911 +1984,COS,Costa Rica,0.122 +1984,PAN,Panama,-0.148 +1984,COL,Colombia,0.023 +1984,VEN,Venezuela,-0.218 +1984,GUY,Guyana,-0.464 +1984,SUR,Suriname,-0.301 +1984,ECU,Ecuador,-0.222 +1984,PER,Peru,-0.245 +1984,BRA,Brazil,0.061 +1984,BOL,Bolivia,-0.245 +1984,PAR,Paraguay,0.442 +1984,CHL,Chile,0.064 +1984,ARG,Argentina,-0.292 +1984,URU,Uruguay,0.139 +1984,UKG,United Kingdom,2.047 +1984,IRE,Ireland,0.938 +1984,NTH,Netherlands,1.571 +1984,BEL,Belgium,1.671 +1984,LUX,Luxembourg,1.607 +1984,FRN,France,1.715 +1984,SPN,Spain,0.902 +1984,POR,Portugal,1.117 +1984,GFR,German Federal Republic,1.75 +1984,GDR,German Democratic Republic,-1.64 +1984,POL,Poland,-1.713 +1984,AUS,Austria,0.773 +1984,HUN,Hungary,-1.833 +1984,CZE,Czechoslovakia,-1.845 +1984,ITA,Italy,1.622 +1984,MLT,Malta,-0.45 +1984,ALB,Albania,-1.374 +1984,YUG,Yugoslavia,-0.673 +1984,GRC,Greece,0.356 +1984,CYP,Cyprus,-0.649 +1984,BUL,Bulgaria,-1.833 +1984,ROM,Romania,-0.871 +1984,RUS,Russia,-1.834 +1984,UKR,Ukraine,-1.84 +1984,BLR,Belarus,-1.843 +1984,FIN,Finland,0.684 +1984,SWD,Sweden,0.853 +1984,NOR,Norway,1.284 +1984,DEN,Denmark,1.23 +1984,ICE,Iceland,1.292 +1984,CAP,Cape Verde,-0.704 +1984,STP,Sao Tome and Principe,-0.735 +1984,GNB,Guinea-Bissau,-0.462 +1984,EQG,Equatorial Guinea,-0.352 +1984,GAM,Gambia,-0.223 +1984,MLI,Mali,-0.549 +1984,SEN,Senegal,-0.148 +1984,BEN,Benin,-0.91 +1984,MAA,Mauritania,-0.434 +1984,NIR,Niger,-0.222 +1984,CDI,Ivory Coast,0.416 +1984,GUI,Guinea,-0.507 +1984,BFO,Burkina Faso,-0.742 +1984,LBR,Liberia,0.204 +1984,SIE,Sierra Leone,-0.467 +1984,GHA,Ghana,-0.455 +1984,TOG,Togo,-0.454 +1984,CAO,Cameroon,-0.255 +1984,NIG,Nigeria,-0.475 +1984,GAB,Gabon,-0.231 +1984,CEN,Central African Republic,-0.359 +1984,CHA,Chad,-0.077 +1984,CON,Congo,-1.008 +1984,DRC,Democratic Republic of the Congo,0.253 +1984,UGA,Uganda,-0.733 +1984,KEN,Kenya,-0.451 +1984,TAZ,Tanzania,-0.625 +1984,BUI,Burundi,-0.524 +1984,RWA,Rwanda,-0.188 +1984,SOM,Somalia,-0.22 +1984,DJI,Djibouti,-0.229 +1984,ETH,Ethiopia,-0.945 +1984,ANG,Angola,-1.119 +1984,MZM,Mozambique,-1.158 +1984,ZAM,Zambia,-0.559 +1984,ZIM,Zimbabwe,-0.631 +1984,MAW,Malawi,0.28 +1984,LES,Lesotho,-0.182 +1984,BOT,Botswana,-0.312 +1984,SWA,Swaziland,0.153 +1984,MAG,Madagascar,-0.875 +1984,COM,Comoros,-0.334 +1984,MAS,Mauritius,-0.445 +1984,SEY,Seychelles,-0.795 +1984,MOR,Morocco,-0.159 +1984,ALG,Algeria,-0.926 +1984,TUN,Tunisia,-0.425 +1984,LIB,Libya,-1.269 +1984,SUD,Sudan,-0.267 +1984,IRN,Iran,-0.588 +1984,TUR,Turkey,0.702 +1984,IRQ,Iraq,-0.886 +1984,EGY,Egypt,-0.254 +1984,SYR,Syria,-1.506 +1984,LEB,Lebanon,-0.382 +1984,JOR,Jordan,-0.515 +1984,ISR,Israel,2.152 +1984,SAU,Saudi Arabia,-0.409 +1984,YAR,Yemen Arab Republic,-0.84 +1984,YPR,Yemen People's Republic,-1.391 +1984,KUW,Kuwait,-0.548 +1984,BAH,Bahrain,-0.562 +1984,QAT,Qatar,-0.568 +1984,UAE,United Arab Emirates,-0.533 +1984,OMA,Oman,-0.352 +1984,AFG,Afghanistan,-1.718 +1984,CHN,China,0.089 +1984,MON,Mongolia,-1.831 +1984,JPN,Japan,1.31 +1984,IND,India,-0.467 +1984,BHU,Bhutan,-0.358 +1984,PAK,Pakistan,-0.286 +1984,BNG,Bangladesh,-0.275 +1984,MYA,Myanmar,0.034 +1984,SRI,Sri Lanka,-0.288 +1984,MAD,Maldives,-0.47 +1984,NEP,Nepal,-0.165 +1984,THI,Thailand,-0.241 +1984,CAM,Cambodia,-0.178 +1984,LAO,Laos,-1.794 +1984,DRV,Vietnam,-1.734 +1984,MAL,Malaysia,-0.289 +1984,SIN,Singapore,-0.108 +1984,BRU,Brunei,-0.194 +1984,PHI,Philippines,-0.055 +1984,INS,Indonesia,-0.378 +1984,AUL,Australia,1.196 +1984,PNG,Papua New Guinea,-0.14 +1984,NEW,New Zealand,1.231 +1984,VAN,Vanuatu,-0.558 +1984,SOL,Solomon Islands,0.293 +1984,FIJ,Fiji,0.013 +1984,WSM,Samoa,0.16 +1985,USA,United States of America,2.742 +1985,CAN,Canada,1.645 +1985,BHM,Bahamas,0.219 +1985,CUB,Cuba,-1.803 +1985,HAI,Haiti,0.194 +1985,DOM,Dominican Republic,0.025 +1985,JAM,Jamaica,0.09 +1985,TRI,Trinidad and Tobago,-0.371 +1985,BAR,Barbados,0.007 +1985,DMA,Dominica,0.382 +1985,GRN,Grenada,1.039 +1985,SLU,St. Lucia,0.314 +1985,SVG,St. Vincent and the Grenadines,0.283 +1985,AAB,Antigua & Barbuda,0.042 +1985,SKN,St. Kitts and Nevis,0.578 +1985,MEX,Mexico,-0.631 +1985,BLZ,Belize,0.245 +1985,GUA,Guatemala,0.151 +1985,HON,Honduras,0.141 +1985,SAL,El Salvador,0.121 +1985,NIC,Nicaragua,-1.017 +1985,COS,Costa Rica,0.365 +1985,PAN,Panama,-0.024 +1985,COL,Colombia,0.1 +1985,VEN,Venezuela,-0.246 +1985,GUY,Guyana,-0.503 +1985,SUR,Suriname,-0.326 +1985,ECU,Ecuador,-0.149 +1985,PER,Peru,-0.241 +1985,BRA,Brazil,-0.056 +1985,BOL,Bolivia,-0.264 +1985,PAR,Paraguay,0.523 +1985,CHL,Chile,0.282 +1985,ARG,Argentina,-0.193 +1985,URU,Uruguay,0.001 +1985,UKG,United Kingdom,2.04 +1985,IRE,Ireland,0.975 +1985,NTH,Netherlands,1.566 +1985,BEL,Belgium,1.699 +1985,LUX,Luxembourg,1.619 +1985,FRN,France,1.832 +1985,SPN,Spain,1.022 +1985,POR,Portugal,1.438 +1985,GFR,German Federal Republic,1.77 +1985,GDR,German Democratic Republic,-1.726 +1985,POL,Poland,-1.431 +1985,AUS,Austria,0.829 +1985,HUN,Hungary,-1.788 +1985,CZE,Czechoslovakia,-1.792 +1985,ITA,Italy,1.613 +1985,MLT,Malta,-0.395 +1985,ALB,Albania,-1.468 +1985,YUG,Yugoslavia,-0.651 +1985,GRC,Greece,0.53 +1985,CYP,Cyprus,-0.672 +1985,BUL,Bulgaria,-1.791 +1985,ROM,Romania,-0.886 +1985,RUS,Russia,-1.746 +1985,UKR,Ukraine,-1.721 +1985,BLR,Belarus,-1.798 +1985,FIN,Finland,0.719 +1985,SWD,Sweden,0.88 +1985,NOR,Norway,1.337 +1985,DEN,Denmark,1.242 +1985,ICE,Iceland,1.352 +1985,CAP,Cape Verde,-0.686 +1985,STP,Sao Tome and Principe,-0.668 +1985,GNB,Guinea-Bissau,-0.52 +1985,EQG,Equatorial Guinea,-0.17 +1985,GAM,Gambia,-0.312 +1985,MLI,Mali,-0.596 +1985,SEN,Senegal,-0.244 +1985,BEN,Benin,-1.045 +1985,MAA,Mauritania,-0.398 +1985,NIR,Niger,-0.298 +1985,CDI,Ivory Coast,0.37 +1985,GUI,Guinea,-0.519 +1985,BFO,Burkina Faso,-0.665 +1985,LBR,Liberia,0.085 +1985,SIE,Sierra Leone,-0.129 +1985,GHA,Ghana,-0.585 +1985,TOG,Togo,-0.42 +1985,CAO,Cameroon,-0.055 +1985,NIG,Nigeria,-0.505 +1985,GAB,Gabon,-0.196 +1985,CEN,Central African Republic,-0.174 +1985,CHA,Chad,-0.193 +1985,CON,Congo,-0.919 +1985,DRC,Democratic Republic of the Congo,0.22 +1985,UGA,Uganda,-0.668 +1985,KEN,Kenya,-0.432 +1985,TAZ,Tanzania,-0.717 +1985,BUI,Burundi,-0.494 +1985,RWA,Rwanda,-0.25 +1985,SOM,Somalia,-0.323 +1985,DJI,Djibouti,-0.287 +1985,ETH,Ethiopia,-0.947 +1985,ANG,Angola,-1.153 +1985,MZM,Mozambique,-1.067 +1985,ZAM,Zambia,-0.485 +1985,ZIM,Zimbabwe,-0.611 +1985,MAW,Malawi,0.568 +1985,LES,Lesotho,-0.291 +1985,BOT,Botswana,-0.322 +1985,SWA,Swaziland,0.242 +1985,MAG,Madagascar,-0.857 +1985,COM,Comoros,-0.323 +1985,MAS,Mauritius,-0.435 +1985,SEY,Seychelles,-0.815 +1985,MOR,Morocco,-0.322 +1985,ALG,Algeria,-1.093 +1985,TUN,Tunisia,-0.521 +1985,LIB,Libya,-1.191 +1985,SUD,Sudan,-0.337 +1985,IRN,Iran,-0.633 +1985,TUR,Turkey,0.68 +1985,IRQ,Iraq,-1.003 +1985,EGY,Egypt,-0.304 +1985,SYR,Syria,-1.58 +1985,LEB,Lebanon,-0.56 +1985,JOR,Jordan,-0.486 +1985,ISR,Israel,2.114 +1985,SAU,Saudi Arabia,-0.524 +1985,YAR,Yemen Arab Republic,-1.012 +1985,YPR,Yemen People's Republic,-1.406 +1985,KUW,Kuwait,-0.575 +1985,BAH,Bahrain,-0.595 +1985,QAT,Qatar,-0.59 +1985,UAE,United Arab Emirates,-0.595 +1985,OMA,Oman,-0.316 +1985,AFG,Afghanistan,-1.821 +1985,CHN,China,0.062 +1985,MON,Mongolia,-1.829 +1985,JPN,Japan,1.252 +1985,IND,India,-0.608 +1985,BHU,Bhutan,-0.424 +1985,PAK,Pakistan,-0.337 +1985,BNG,Bangladesh,-0.357 +1985,MYA,Myanmar,-0.149 +1985,SRI,Sri Lanka,-0.35 +1985,MAD,Maldives,-0.561 +1985,NEP,Nepal,-0.135 +1985,THI,Thailand,-0.209 +1985,CAM,Cambodia,-0.122 +1985,LAO,Laos,-1.836 +1985,DRV,Vietnam,-1.783 +1985,MAL,Malaysia,-0.216 +1985,SIN,Singapore,-0.118 +1985,BRU,Brunei,-0.248 +1985,PHI,Philippines,-0.125 +1985,INS,Indonesia,-0.509 +1985,AUL,Australia,1.162 +1985,PNG,Papua New Guinea,-0.026 +1985,NEW,New Zealand,1.137 +1985,VAN,Vanuatu,-0.541 +1985,SOL,Solomon Islands,0.644 +1985,FIJ,Fiji,0.16 +1985,WSM,Samoa,0.205 +1986,USA,United States of America,2.851 +1986,CAN,Canada,1.555 +1986,BHM,Bahamas,0.236 +1986,CUB,Cuba,-1.701 +1986,HAI,Haiti,0.018 +1986,DOM,Dominican Republic,0.147 +1986,JAM,Jamaica,0.17 +1986,TRI,Trinidad and Tobago,-0.272 +1986,BAR,Barbados,0.101 +1986,DMA,Dominica,0.259 +1986,GRN,Grenada,0.352 +1986,SLU,St. Lucia,0.35 +1986,SVG,St. Vincent and the Grenadines,0.28 +1986,AAB,Antigua & Barbuda,0.224 +1986,SKN,St. Kitts and Nevis,0.349 +1986,MEX,Mexico,-0.524 +1986,BLZ,Belize,0.232 +1986,GUA,Guatemala,0.107 +1986,HON,Honduras,0.258 +1986,SAL,El Salvador,0.518 +1986,NIC,Nicaragua,-1.168 +1986,COS,Costa Rica,0.583 +1986,PAN,Panama,-0.036 +1986,COL,Colombia,0.077 +1986,VEN,Venezuela,-0.142 +1986,GUY,Guyana,-0.676 +1986,SUR,Suriname,-0.418 +1986,ECU,Ecuador,-0.136 +1986,PER,Peru,-0.299 +1986,BRA,Brazil,-0.045 +1986,BOL,Bolivia,-0.31 +1986,PAR,Paraguay,0.372 +1986,CHL,Chile,0.439 +1986,ARG,Argentina,-0.255 +1986,URU,Uruguay,0.085 +1986,UKG,United Kingdom,2.103 +1986,IRE,Ireland,1.02 +1986,NTH,Netherlands,1.621 +1986,BEL,Belgium,1.727 +1986,LUX,Luxembourg,1.656 +1986,FRN,France,1.927 +1986,SPN,Spain,1.037 +1986,POR,Portugal,1.514 +1986,GFR,German Federal Republic,1.819 +1986,GDR,German Democratic Republic,-1.558 +1986,POL,Poland,-1.421 +1986,AUS,Austria,0.851 +1986,HUN,Hungary,-1.58 +1986,CZE,Czechoslovakia,-1.588 +1986,ITA,Italy,1.624 +1986,MLT,Malta,-0.459 +1986,ALB,Albania,-1.389 +1986,YUG,Yugoslavia,-0.705 +1986,GRC,Greece,0.666 +1986,CYP,Cyprus,-0.602 +1986,BUL,Bulgaria,-1.531 +1986,ROM,Romania,-0.934 +1986,RUS,Russia,-1.234 +1986,UKR,Ukraine,-1.565 +1986,BLR,Belarus,-1.578 +1986,FIN,Finland,0.768 +1986,SWD,Sweden,0.882 +1986,NOR,Norway,1.191 +1986,DEN,Denmark,1.204 +1986,ICE,Iceland,1.315 +1986,CAP,Cape Verde,-0.673 +1986,STP,Sao Tome and Principe,-0.454 +1986,GNB,Guinea-Bissau,-0.518 +1986,EQG,Equatorial Guinea,0.221 +1986,GAM,Gambia,-0.221 +1986,MLI,Mali,-0.745 +1986,SEN,Senegal,-0.147 +1986,BEN,Benin,-1.137 +1986,MAA,Mauritania,-0.457 +1986,NIR,Niger,-0.351 +1986,CDI,Ivory Coast,0.423 +1986,GUI,Guinea,-0.438 +1986,BFO,Burkina Faso,-0.857 +1986,LBR,Liberia,0.26 +1986,SIE,Sierra Leone,-0.262 +1986,GHA,Ghana,-0.42 +1986,TOG,Togo,-0.295 +1986,CAO,Cameroon,0.271 +1986,NIG,Nigeria,-0.516 +1986,GAB,Gabon,-0.097 +1986,CEN,Central African Republic,-0.149 +1986,CHA,Chad,0.018 +1986,CON,Congo,-0.889 +1986,DRC,Democratic Republic of the Congo,0.154 +1986,UGA,Uganda,-0.701 +1986,KEN,Kenya,-0.361 +1986,TAZ,Tanzania,-0.733 +1986,BUI,Burundi,-0.572 +1986,RWA,Rwanda,-0.243 +1986,SOM,Somalia,-0.402 +1986,DJI,Djibouti,-0.285 +1986,ETH,Ethiopia,-1.06 +1986,ANG,Angola,-1.504 +1986,MZM,Mozambique,-0.821 +1986,ZAM,Zambia,-0.64 +1986,ZIM,Zimbabwe,-0.709 +1986,MAW,Malawi,0.473 +1986,LES,Lesotho,-0.106 +1986,BOT,Botswana,-0.259 +1986,SWA,Swaziland,0.103 +1986,MAG,Madagascar,-0.995 +1986,COM,Comoros,-0.48 +1986,MAS,Mauritius,-0.221 +1986,SEY,Seychelles,-0.999 +1986,MOR,Morocco,-0.248 +1986,ALG,Algeria,-1.255 +1986,TUN,Tunisia,-0.306 +1986,LIB,Libya,-1.48 +1986,SUD,Sudan,-0.424 +1986,IRN,Iran,-0.706 +1986,TUR,Turkey,0.685 +1986,IRQ,Iraq,-1.108 +1986,EGY,Egypt,-0.314 +1986,SYR,Syria,-1.714 +1986,LEB,Lebanon,-0.535 +1986,JOR,Jordan,-0.409 +1986,ISR,Israel,1.955 +1986,SAU,Saudi Arabia,-0.42 +1986,YAR,Yemen Arab Republic,-1.222 +1986,YPR,Yemen People's Republic,-1.418 +1986,KUW,Kuwait,-0.602 +1986,BAH,Bahrain,-0.474 +1986,QAT,Qatar,-0.556 +1986,UAE,United Arab Emirates,-0.535 +1986,OMA,Oman,-0.288 +1986,AFG,Afghanistan,-1.604 +1986,CHN,China,0.069 +1986,MON,Mongolia,-1.614 +1986,JPN,Japan,1.225 +1986,IND,India,-0.799 +1986,BHU,Bhutan,-0.493 +1986,PAK,Pakistan,-0.465 +1986,BNG,Bangladesh,-0.396 +1986,MYA,Myanmar,-0.06 +1986,SRI,Sri Lanka,-0.436 +1986,MAD,Maldives,-0.802 +1986,NEP,Nepal,-0.225 +1986,THI,Thailand,-0.279 +1986,CAM,Cambodia,-0.215 +1986,LAO,Laos,-1.754 +1986,DRV,Vietnam,-1.745 +1986,MAL,Malaysia,-0.366 +1986,SIN,Singapore,-0.067 +1986,BRU,Brunei,-0.273 +1986,PHI,Philippines,-0.244 +1986,INS,Indonesia,-0.632 +1986,AUL,Australia,1.204 +1986,PNG,Papua New Guinea,-0.037 +1986,NEW,New Zealand,1.123 +1986,VAN,Vanuatu,-0.576 +1986,SOL,Solomon Islands,0.062 +1986,FIJ,Fiji,0.381 +1986,WSM,Samoa,0.329 +1987,USA,United States of America,2.927 +1987,CAN,Canada,1.546 +1987,BHM,Bahamas,0.081 +1987,CUB,Cuba,-1.705 +1987,HAI,Haiti,-0.007 +1987,DOM,Dominican Republic,0.141 +1987,JAM,Jamaica,0.073 +1987,TRI,Trinidad and Tobago,-0.352 +1987,BAR,Barbados,0.004 +1987,DMA,Dominica,0.26 +1987,GRN,Grenada,0.245 +1987,SLU,St. Lucia,0.079 +1987,SVG,St. Vincent and the Grenadines,0.098 +1987,AAB,Antigua & Barbuda,0.03 +1987,SKN,St. Kitts and Nevis,0.094 +1987,MEX,Mexico,-0.588 +1987,BLZ,Belize,0.193 +1987,GUA,Guatemala,0.052 +1987,HON,Honduras,0.263 +1987,SAL,El Salvador,0.409 +1987,NIC,Nicaragua,-1.163 +1987,COS,Costa Rica,0.446 +1987,PAN,Panama,-0.162 +1987,COL,Colombia,-0.037 +1987,VEN,Venezuela,-0.138 +1987,GUY,Guyana,-0.749 +1987,SUR,Suriname,-0.53 +1987,ECU,Ecuador,-0.23 +1987,PER,Peru,-0.383 +1987,BRA,Brazil,-0.103 +1987,BOL,Bolivia,-0.403 +1987,PAR,Paraguay,0.134 +1987,CHL,Chile,0.424 +1987,ARG,Argentina,-0.28 +1987,URU,Uruguay,0.156 +1987,UKG,United Kingdom,2.03 +1987,IRE,Ireland,0.988 +1987,NTH,Netherlands,1.673 +1987,BEL,Belgium,1.693 +1987,LUX,Luxembourg,1.621 +1987,FRN,France,1.864 +1987,SPN,Spain,1.031 +1987,POR,Portugal,1.617 +1987,GFR,German Federal Republic,1.686 +1987,GDR,German Democratic Republic,-0.981 +1987,POL,Poland,-1.326 +1987,AUS,Austria,0.864 +1987,HUN,Hungary,-1.401 +1987,CZE,Czechoslovakia,-1.352 +1987,ITA,Italy,1.562 +1987,MLT,Malta,0.352 +1987,ALB,Albania,-1.476 +1987,YUG,Yugoslavia,-0.74 +1987,GRC,Greece,0.737 +1987,CYP,Cyprus,-0.789 +1987,BUL,Bulgaria,-1.297 +1987,ROM,Romania,-0.969 +1987,RUS,Russia,-1.185 +1987,UKR,Ukraine,-1.336 +1987,BLR,Belarus,-1.347 +1987,FIN,Finland,0.769 +1987,SWD,Sweden,0.905 +1987,NOR,Norway,1.253 +1987,DEN,Denmark,1.241 +1987,ICE,Iceland,1.146 +1987,CAP,Cape Verde,-0.621 +1987,STP,Sao Tome and Principe,-0.517 +1987,GNB,Guinea-Bissau,-0.591 +1987,EQG,Equatorial Guinea,0.237 +1987,GAM,Gambia,-0.306 +1987,MLI,Mali,-0.725 +1987,SEN,Senegal,-0.294 +1987,BEN,Benin,-1.079 +1987,MAA,Mauritania,-0.487 +1987,NIR,Niger,-0.377 +1987,CDI,Ivory Coast,0.48 +1987,GUI,Guinea,-0.416 +1987,BFO,Burkina Faso,-0.853 +1987,LBR,Liberia,0.231 +1987,SIE,Sierra Leone,-0.244 +1987,GHA,Ghana,-0.406 +1987,TOG,Togo,-0.184 +1987,CAO,Cameroon,0.145 +1987,NIG,Nigeria,-0.59 +1987,GAB,Gabon,-0.305 +1987,CEN,Central African Republic,0.12 +1987,CHA,Chad,-0.202 +1987,CON,Congo,-0.931 +1987,DRC,Democratic Republic of the Congo,0.202 +1987,UGA,Uganda,-0.822 +1987,KEN,Kenya,-0.353 +1987,TAZ,Tanzania,-0.721 +1987,BUI,Burundi,-0.489 +1987,RWA,Rwanda,-0.3 +1987,SOM,Somalia,-0.445 +1987,DJI,Djibouti,-0.383 +1987,ETH,Ethiopia,-1.165 +1987,ANG,Angola,-1.551 +1987,MZM,Mozambique,-0.841 +1987,ZAM,Zambia,-0.444 +1987,ZIM,Zimbabwe,-0.768 +1987,MAW,Malawi,0.269 +1987,LES,Lesotho,-0.031 +1987,BOT,Botswana,-0.404 +1987,SWA,Swaziland,0.1 +1987,MAG,Madagascar,-1.046 +1987,COM,Comoros,-0.272 +1987,MAS,Mauritius,-0.171 +1987,SEY,Seychelles,-0.922 +1987,MOR,Morocco,-0.355 +1987,ALG,Algeria,-1.365 +1987,TUN,Tunisia,-0.406 +1987,LIB,Libya,-1.672 +1987,SUD,Sudan,-0.464 +1987,IRN,Iran,-1.042 +1987,TUR,Turkey,0.778 +1987,IRQ,Iraq,-1.137 +1987,EGY,Egypt,-0.344 +1987,SYR,Syria,-1.922 +1987,LEB,Lebanon,-0.626 +1987,JOR,Jordan,-0.376 +1987,ISR,Israel,2.061 +1987,SAU,Saudi Arabia,-0.322 +1987,YAR,Yemen Arab Republic,-1.151 +1987,YPR,Yemen People's Republic,-1.549 +1987,KUW,Kuwait,-0.673 +1987,BAH,Bahrain,-0.445 +1987,QAT,Qatar,-0.535 +1987,UAE,United Arab Emirates,-0.542 +1987,OMA,Oman,-0.225 +1987,AFG,Afghanistan,-1.569 +1987,CHN,China,0.079 +1987,MON,Mongolia,-1.418 +1987,JPN,Japan,1.217 +1987,IND,India,-0.81 +1987,BHU,Bhutan,-0.594 +1987,PAK,Pakistan,-0.514 +1987,BNG,Bangladesh,-0.465 +1987,MYA,Myanmar,-0.213 +1987,SRI,Sri Lanka,-0.556 +1987,MAD,Maldives,-0.968 +1987,NEP,Nepal,-0.271 +1987,THI,Thailand,-0.342 +1987,CAM,Cambodia,-0.333 +1987,LAO,Laos,-1.598 +1987,DRV,Vietnam,-1.528 +1987,MAL,Malaysia,-0.384 +1987,SIN,Singapore,-0.044 +1987,BRU,Brunei,-0.347 +1987,PHI,Philippines,-0.292 +1987,INS,Indonesia,-0.69 +1987,AUL,Australia,1.163 +1987,PNG,Papua New Guinea,-0.195 +1987,NEW,New Zealand,1.079 +1987,VAN,Vanuatu,-0.684 +1987,SOL,Solomon Islands,-0.073 +1987,FIJ,Fiji,0.085 +1987,WSM,Samoa,0.197 +1988,USA,United States of America,2.902 +1988,CAN,Canada,1.403 +1988,BHM,Bahamas,0.073 +1988,CUB,Cuba,-1.593 +1988,HAI,Haiti,-0.155 +1988,DOM,Dominican Republic,0.141 +1988,JAM,Jamaica,-0.127 +1988,TRI,Trinidad and Tobago,-0.301 +1988,BAR,Barbados,-0.123 +1988,DMA,Dominica,0.46 +1988,GRN,Grenada,0.081 +1988,SLU,St. Lucia,-0.094 +1988,SVG,St. Vincent and the Grenadines,0.092 +1988,AAB,Antigua & Barbuda,0.041 +1988,SKN,St. Kitts and Nevis,0.035 +1988,MEX,Mexico,-0.628 +1988,BLZ,Belize,0.082 +1988,GUA,Guatemala,-0.211 +1988,HON,Honduras,0.213 +1988,SAL,El Salvador,0.241 +1988,NIC,Nicaragua,-0.552 +1988,COS,Costa Rica,0.359 +1988,PAN,Panama,-0.254 +1988,COL,Colombia,0.142 +1988,VEN,Venezuela,-0.157 +1988,GUY,Guyana,-0.832 +1988,SUR,Suriname,-0.504 +1988,ECU,Ecuador,-0.304 +1988,PER,Peru,-0.362 +1988,BRA,Brazil,-0.245 +1988,BOL,Bolivia,-0.277 +1988,PAR,Paraguay,0.128 +1988,CHL,Chile,0.346 +1988,ARG,Argentina,-0.352 +1988,URU,Uruguay,0.017 +1988,UKG,United Kingdom,2.052 +1988,IRE,Ireland,1.018 +1988,NTH,Netherlands,1.68 +1988,BEL,Belgium,1.682 +1988,LUX,Luxembourg,1.578 +1988,FRN,France,1.833 +1988,SPN,Spain,1.081 +1988,POR,Portugal,1.565 +1988,GFR,German Federal Republic,1.821 +1988,GDR,German Democratic Republic,-0.834 +1988,POL,Poland,-1.168 +1988,AUS,Austria,0.932 +1988,HUN,Hungary,-1.057 +1988,CZE,Czechoslovakia,-1.187 +1988,ITA,Italy,1.527 +1988,MLT,Malta,0.444 +1988,ALB,Albania,-1.422 +1988,YUG,Yugoslavia,-0.771 +1988,GRC,Greece,0.807 +1988,CYP,Cyprus,-0.663 +1988,BUL,Bulgaria,-0.855 +1988,ROM,Romania,-0.847 +1988,RUS,Russia,-1.097 +1988,UKR,Ukraine,-1.181 +1988,BLR,Belarus,-1.173 +1988,FIN,Finland,0.929 +1988,SWD,Sweden,0.942 +1988,NOR,Norway,1.182 +1988,DEN,Denmark,1.232 +1988,ICE,Iceland,1.174 +1988,CAP,Cape Verde,-0.56 +1988,STP,Sao Tome and Principe,-0.583 +1988,GNB,Guinea-Bissau,-0.588 +1988,EQG,Equatorial Guinea,0.308 +1988,GAM,Gambia,-0.385 +1988,MLI,Mali,-0.692 +1988,SEN,Senegal,-0.328 +1988,BEN,Benin,-0.865 +1988,MAA,Mauritania,-0.598 +1988,NIR,Niger,-0.427 +1988,CDI,Ivory Coast,0.272 +1988,GUI,Guinea,-0.487 +1988,BFO,Burkina Faso,-0.747 +1988,LBR,Liberia,0.128 +1988,SIE,Sierra Leone,-0.387 +1988,GHA,Ghana,-0.575 +1988,TOG,Togo,-0.358 +1988,CAO,Cameroon,-0.014 +1988,NIG,Nigeria,-0.451 +1988,GAB,Gabon,-0.403 +1988,CEN,Central African Republic,-0.017 +1988,CHA,Chad,-0.288 +1988,CON,Congo,-0.96 +1988,DRC,Democratic Republic of the Congo,0.186 +1988,UGA,Uganda,-0.858 +1988,KEN,Kenya,-0.384 +1988,TAZ,Tanzania,-0.929 +1988,BUI,Burundi,-0.604 +1988,RWA,Rwanda,-0.383 +1988,SOM,Somalia,-0.414 +1988,DJI,Djibouti,-0.375 +1988,ETH,Ethiopia,-1.239 +1988,ANG,Angola,-1.497 +1988,MZM,Mozambique,-0.87 +1988,ZAM,Zambia,-0.668 +1988,ZIM,Zimbabwe,-0.891 +1988,MAW,Malawi,0.312 +1988,LES,Lesotho,0.033 +1988,BOT,Botswana,-0.35 +1988,SWA,Swaziland,0.002 +1988,MAG,Madagascar,-1.073 +1988,COM,Comoros,-0.419 +1988,MAS,Mauritius,-0.245 +1988,SEY,Seychelles,-0.83 +1988,MOR,Morocco,-0.462 +1988,ALG,Algeria,-1.345 +1988,TUN,Tunisia,-0.54 +1988,LIB,Libya,-1.587 +1988,SUD,Sudan,-0.726 +1988,IRN,Iran,-1.109 +1988,TUR,Turkey,0.641 +1988,IRQ,Iraq,-1.142 +1988,EGY,Egypt,-0.48 +1988,SYR,Syria,-1.86 +1988,LEB,Lebanon,-0.638 +1988,JOR,Jordan,-0.349 +1988,ISR,Israel,2.069 +1988,SAU,Saudi Arabia,-0.477 +1988,YAR,Yemen Arab Republic,-0.938 +1988,YPR,Yemen People's Republic,-1.544 +1988,KUW,Kuwait,-0.755 +1988,BAH,Bahrain,-0.404 +1988,QAT,Qatar,-0.541 +1988,UAE,United Arab Emirates,-0.697 +1988,OMA,Oman,-0.471 +1988,AFG,Afghanistan,-1.514 +1988,CHN,China,-0.125 +1988,MON,Mongolia,-1.263 +1988,JPN,Japan,1.253 +1988,IND,India,-0.714 +1988,BHU,Bhutan,-0.418 +1988,PAK,Pakistan,-0.651 +1988,BNG,Bangladesh,-0.528 +1988,MYA,Myanmar,-0.326 +1988,SRI,Sri Lanka,-0.569 +1988,MAD,Maldives,-0.95 +1988,NEP,Nepal,-0.296 +1988,THI,Thailand,-0.392 +1988,CAM,Cambodia,-0.491 +1988,LAO,Laos,-1.364 +1988,DRV,Vietnam,-1.54 +1988,MAL,Malaysia,-0.43 +1988,SIN,Singapore,-0.112 +1988,BRU,Brunei,-0.449 +1988,PHI,Philippines,-0.194 +1988,INS,Indonesia,-0.755 +1988,AUL,Australia,1.081 +1988,PNG,Papua New Guinea,-0.17 +1988,NEW,New Zealand,0.95 +1988,VAN,Vanuatu,-0.727 +1988,SOL,Solomon Islands,0.015 +1988,FIJ,Fiji,0.117 +1988,WSM,Samoa,0.238 +1989,USA,United States of America,2.962 +1989,CAN,Canada,1.356 +1989,BHM,Bahamas,-0.048 +1989,CUB,Cuba,-1.542 +1989,HAI,Haiti,-0.345 +1989,DOM,Dominican Republic,-0.029 +1989,JAM,Jamaica,-0.135 +1989,TRI,Trinidad and Tobago,-0.345 +1989,BAR,Barbados,-0.223 +1989,DMA,Dominica,0.58 +1989,GRN,Grenada,0.085 +1989,SLU,St. Lucia,0.053 +1989,SVG,St. Vincent and the Grenadines,0.045 +1989,AAB,Antigua & Barbuda,0.056 +1989,SKN,St. Kitts and Nevis,0.052 +1989,MEX,Mexico,-0.556 +1989,BLZ,Belize,0.273 +1989,GUA,Guatemala,-0.269 +1989,HON,Honduras,0.101 +1989,SAL,El Salvador,0.296 +1989,NIC,Nicaragua,-0.748 +1989,COS,Costa Rica,0.186 +1989,PAN,Panama,-0.272 +1989,COL,Colombia,-0.193 +1989,VEN,Venezuela,-0.28 +1989,GUY,Guyana,-0.836 +1989,SUR,Suriname,-0.543 +1989,ECU,Ecuador,-0.405 +1989,PER,Peru,-0.442 +1989,BRA,Brazil,-0.276 +1989,BOL,Bolivia,-0.436 +1989,PAR,Paraguay,0.071 +1989,CHL,Chile,0.397 +1989,ARG,Argentina,-0.359 +1989,URU,Uruguay,0.02 +1989,UKG,United Kingdom,2.105 +1989,IRE,Ireland,0.954 +1989,NTH,Netherlands,1.631 +1989,BEL,Belgium,1.625 +1989,LUX,Luxembourg,1.63 +1989,FRN,France,1.873 +1989,SPN,Spain,1.008 +1989,POR,Portugal,1.56 +1989,GFR,German Federal Republic,1.735 +1989,GDR,German Democratic Republic,-0.869 +1989,POL,Poland,-0.782 +1989,AUS,Austria,0.777 +1989,HUN,Hungary,-0.151 +1989,CZE,Czechoslovakia,-1.094 +1989,ITA,Italy,1.583 +1989,MLT,Malta,0.541 +1989,ALB,Albania,-1.351 +1989,YUG,Yugoslavia,-0.802 +1989,GRC,Greece,0.775 +1989,CYP,Cyprus,-0.633 +1989,BUL,Bulgaria,-0.877 +1989,ROM,Romania,-0.796 +1989,RUS,Russia,-1.027 +1989,UKR,Ukraine,-1.1 +1989,BLR,Belarus,-1.085 +1989,FIN,Finland,0.853 +1989,SWD,Sweden,0.844 +1989,NOR,Norway,1.131 +1989,DEN,Denmark,1.201 +1989,ICE,Iceland,1.162 +1989,CAP,Cape Verde,-0.563 +1989,STP,Sao Tome and Principe,-0.621 +1989,GNB,Guinea-Bissau,-0.642 +1989,EQG,Equatorial Guinea,0.07 +1989,GAM,Gambia,-0.457 +1989,MLI,Mali,-0.76 +1989,SEN,Senegal,-0.442 +1989,BEN,Benin,-0.811 +1989,MAA,Mauritania,-0.679 +1989,NIR,Niger,-0.493 +1989,CDI,Ivory Coast,-0.001 +1989,GUI,Guinea,-0.589 +1989,BFO,Burkina Faso,-0.729 +1989,LBR,Liberia,-0.099 +1989,SIE,Sierra Leone,-0.38 +1989,GHA,Ghana,-0.678 +1989,TOG,Togo,-0.215 +1989,CAO,Cameroon,-0.201 +1989,NIG,Nigeria,-0.615 +1989,GAB,Gabon,-0.545 +1989,CEN,Central African Republic,-0.057 +1989,CHA,Chad,-0.402 +1989,CON,Congo,-0.947 +1989,DRC,Democratic Republic of the Congo,-0.086 +1989,UGA,Uganda,-0.951 +1989,KEN,Kenya,-0.092 +1989,TAZ,Tanzania,-1.003 +1989,BUI,Burundi,-0.563 +1989,RWA,Rwanda,-0.447 +1989,SOM,Somalia,-0.548 +1989,DJI,Djibouti,-0.483 +1989,ETH,Ethiopia,-1.087 +1989,ANG,Angola,-1.481 +1989,MZM,Mozambique,-0.83 +1989,ZAM,Zambia,-0.899 +1989,ZIM,Zimbabwe,-0.919 +1989,MAW,Malawi,0.192 +1989,LES,Lesotho,-0.113 +1989,BOT,Botswana,-0.316 +1989,SWA,Swaziland,-0.11 +1989,MAG,Madagascar,-0.983 +1989,COM,Comoros,-0.497 +1989,MAS,Mauritius,-0.306 +1989,SEY,Seychelles,-0.804 +1989,MOR,Morocco,-0.521 +1989,ALG,Algeria,-1.291 +1989,TUN,Tunisia,-0.601 +1989,LIB,Libya,-1.375 +1989,SUD,Sudan,-0.684 +1989,IRN,Iran,-1.124 +1989,TUR,Turkey,0.654 +1989,IRQ,Iraq,-1.193 +1989,EGY,Egypt,-0.411 +1989,SYR,Syria,-1.662 +1989,LEB,Lebanon,-0.635 +1989,JOR,Jordan,-0.554 +1989,ISR,Israel,2.076 +1989,SAU,Saudi Arabia,-0.56 +1989,YAR,Yemen Arab Republic,-0.827 +1989,YPR,Yemen People's Republic,-1.475 +1989,KUW,Kuwait,-0.799 +1989,BAH,Bahrain,-0.539 +1989,QAT,Qatar,-0.651 +1989,UAE,United Arab Emirates,-0.746 +1989,OMA,Oman,-0.519 +1989,AFG,Afghanistan,-1.462 +1989,CHN,China,-0.187 +1989,MON,Mongolia,-1.137 +1989,JPN,Japan,1.309 +1989,IND,India,-0.795 +1989,BHU,Bhutan,-0.571 +1989,PAK,Pakistan,-0.787 +1989,BNG,Bangladesh,-0.638 +1989,MYA,Myanmar,-0.413 +1989,SRI,Sri Lanka,-0.619 +1989,MAD,Maldives,-0.906 +1989,NEP,Nepal,-0.441 +1989,THI,Thailand,-0.401 +1989,CAM,Cambodia,-0.561 +1989,LAO,Laos,-1.222 +1989,DRV,Vietnam,-1.333 +1989,MAL,Malaysia,-0.571 +1989,SIN,Singapore,-0.228 +1989,BRU,Brunei,-0.469 +1989,PHI,Philippines,-0.244 +1989,INS,Indonesia,-0.825 +1989,AUL,Australia,0.963 +1989,PNG,Papua New Guinea,-0.076 +1989,NEW,New Zealand,0.852 +1989,VAN,Vanuatu,-0.694 +1989,SOL,Solomon Islands,-0.187 +1989,FIJ,Fiji,0.173 +1989,WSM,Samoa,0.164 +1990,USA,United States of America,2.893 +1990,CAN,Canada,1.286 +1990,BHM,Bahamas,-0.088 +1990,CUB,Cuba,-1.655 +1990,HAI,Haiti,-0.336 +1990,DOM,Dominican Republic,-0.121 +1990,JAM,Jamaica,-0.219 +1990,TRI,Trinidad and Tobago,-0.512 +1990,BAR,Barbados,-0.26 +1990,DMA,Dominica,0.256 +1990,GRN,Grenada,-0.067 +1990,SLU,St. Lucia,-0.171 +1990,SVG,St. Vincent and the Grenadines,-0.015 +1990,AAB,Antigua & Barbuda,-0.137 +1990,SKN,St. Kitts and Nevis,-0.001 +1990,MEX,Mexico,-0.733 +1990,BLZ,Belize,-0.086 +1990,GUA,Guatemala,-0.478 +1990,HON,Honduras,-0.042 +1990,SAL,El Salvador,-0.002 +1990,NIC,Nicaragua,-0.702 +1990,COS,Costa Rica,0.14 +1990,PAN,Panama,-0.082 +1990,COL,Colombia,-0.475 +1990,VEN,Venezuela,-0.39 +1990,GUY,Guyana,-0.85 +1990,SUR,Suriname,-0.581 +1990,ECU,Ecuador,-0.525 +1990,PER,Peru,-0.504 +1990,BRA,Brazil,-0.471 +1990,BOL,Bolivia,-0.567 +1990,PAR,Paraguay,-0.244 +1990,CHL,Chile,-0.174 +1990,ARG,Argentina,-0.498 +1990,URU,Uruguay,-0.097 +1990,UKG,United Kingdom,2.108 +1990,IRE,Ireland,0.853 +1990,NTH,Netherlands,1.625 +1990,BEL,Belgium,1.626 +1990,LUX,Luxembourg,1.629 +1990,FRN,France,1.929 +1990,LIE,Liechtenstein,0.901 +1990,SPN,Spain,0.892 +1990,POR,Portugal,1.419 +1990,GFR,German Federal Republic,1.654 +1990,POL,Poland,0.832 +1990,AUS,Austria,0.691 +1990,HUN,Hungary,0.736 +1990,CZE,Czechoslovakia,0.701 +1990,ITA,Italy,1.501 +1990,MLT,Malta,0.459 +1990,ALB,Albania,-1.236 +1990,YUG,Yugoslavia,-0.851 +1990,GRC,Greece,0.794 +1990,CYP,Cyprus,-0.469 +1990,BUL,Bulgaria,0.554 +1990,ROM,Romania,0.664 +1990,RUS,Russia,-0.527 +1990,UKR,Ukraine,-0.41 +1990,BLR,Belarus,-0.548 +1990,FIN,Finland,0.806 +1990,SWD,Sweden,0.775 +1990,NOR,Norway,1.083 +1990,DEN,Denmark,1.156 +1990,ICE,Iceland,1.113 +1990,CAP,Cape Verde,-0.614 +1990,GNB,Guinea-Bissau,-0.648 +1990,GAM,Gambia,-0.569 +1990,MLI,Mali,-0.769 +1990,SEN,Senegal,-0.558 +1990,BEN,Benin,-0.776 +1990,MAA,Mauritania,-0.759 +1990,NIR,Niger,-0.659 +1990,CDI,Ivory Coast,-0.046 +1990,GUI,Guinea,-0.632 +1990,BFO,Burkina Faso,-0.815 +1990,SIE,Sierra Leone,-0.585 +1990,GHA,Ghana,-0.801 +1990,TOG,Togo,-0.318 +1990,CAO,Cameroon,-0.278 +1990,NIG,Nigeria,-0.715 +1990,GAB,Gabon,-0.535 +1990,CEN,Central African Republic,-0.125 +1990,CHA,Chad,-0.546 +1990,CON,Congo,-0.765 +1990,DRC,Democratic Republic of the Congo,-0.233 +1990,UGA,Uganda,-0.912 +1990,KEN,Kenya,-0.283 +1990,TAZ,Tanzania,-0.973 +1990,BUI,Burundi,-0.723 +1990,RWA,Rwanda,-0.567 +1990,SOM,Somalia,-0.676 +1990,DJI,Djibouti,-0.58 +1990,ETH,Ethiopia,-0.956 +1990,ANG,Angola,-1.442 +1990,MZM,Mozambique,-0.851 +1990,ZAM,Zambia,-0.898 +1990,ZIM,Zimbabwe,-0.901 +1990,MAW,Malawi,0.199 +1990,NAM,Namibia,-0.987 +1990,LES,Lesotho,-0.207 +1990,BOT,Botswana,-0.232 +1990,SWA,Swaziland,-0.354 +1990,MAG,Madagascar,-0.993 +1990,COM,Comoros,-0.615 +1990,MAS,Mauritius,-0.384 +1990,SEY,Seychelles,-0.829 +1990,MOR,Morocco,-0.656 +1990,ALG,Algeria,-1.196 +1990,TUN,Tunisia,-0.708 +1990,LIB,Libya,-1.235 +1990,SUD,Sudan,-0.832 +1990,IRN,Iran,-1.122 +1990,TUR,Turkey,0.606 +1990,IRQ,Iraq,-1.19 +1990,EGY,Egypt,-0.514 +1990,SYR,Syria,-1.507 +1990,LEB,Lebanon,-0.662 +1990,JOR,Jordan,-0.676 +1990,ISR,Israel,2.02 +1990,SAU,Saudi Arabia,-0.617 +1990,YAR,Yemen Arab Republic,-0.871 +1990,KUW,Kuwait,-0.79 +1990,BAH,Bahrain,-0.604 +1990,QAT,Qatar,-0.656 +1990,UAE,United Arab Emirates,-0.731 +1990,OMA,Oman,-0.603 +1990,AFG,Afghanistan,-1.395 +1990,CHN,China,-0.251 +1990,MON,Mongolia,-1.028 +1990,JPN,Japan,1.268 +1990,IND,India,-0.874 +1990,BHU,Bhutan,-0.698 +1990,PAK,Pakistan,-0.664 +1990,BNG,Bangladesh,-0.723 +1990,MYA,Myanmar,-0.433 +1990,SRI,Sri Lanka,-0.654 +1990,MAD,Maldives,-0.89 +1990,NEP,Nepal,-0.369 +1990,THI,Thailand,-0.466 +1990,LAO,Laos,-1.138 +1990,DRV,Vietnam,-1.286 +1990,MAL,Malaysia,-0.696 +1990,SIN,Singapore,-0.314 +1990,BRU,Brunei,-0.579 +1990,PHI,Philippines,-0.531 +1990,INS,Indonesia,-0.857 +1990,AUL,Australia,0.829 +1990,PNG,Papua New Guinea,-0.216 +1990,NEW,New Zealand,0.803 +1990,VAN,Vanuatu,-0.549 +1990,SOL,Solomon Islands,-0.236 +1990,FIJ,Fiji,-0.059 +1990,WSM,Samoa,0.026 +1991,USA,United States of America,2.754 +1991,CAN,Canada,1.271 +1991,BHM,Bahamas,-0.271 +1991,CUB,Cuba,-1.781 +1991,HAI,Haiti,-0.524 +1991,DOM,Dominican Republic,-0.121 +1991,JAM,Jamaica,-0.148 +1991,TRI,Trinidad and Tobago,-0.646 +1991,BAR,Barbados,-0.323 +1991,DMA,Dominica,0.157 +1991,GRN,Grenada,-0.272 +1991,SLU,St. Lucia,-0.223 +1991,SVG,St. Vincent and the Grenadines,-0.104 +1991,AAB,Antigua & Barbuda,-0.209 +1991,SKN,St. Kitts and Nevis,-0.109 +1991,MEX,Mexico,-0.767 +1991,BLZ,Belize,-0.284 +1991,GUA,Guatemala,-0.491 +1991,HON,Honduras,-0.285 +1991,SAL,El Salvador,-0.272 +1991,NIC,Nicaragua,-0.696 +1991,COS,Costa Rica,-0.031 +1991,PAN,Panama,0.316 +1991,COL,Colombia,-0.563 +1991,VEN,Venezuela,-0.441 +1991,GUY,Guyana,-0.757 +1991,SUR,Suriname,-0.63 +1991,ECU,Ecuador,-0.497 +1991,PER,Peru,-0.489 +1991,BRA,Brazil,-0.508 +1991,BOL,Bolivia,-0.386 +1991,PAR,Paraguay,-0.189 +1991,CHL,Chile,-0.312 +1991,ARG,Argentina,0.56 +1991,URU,Uruguay,0.218 +1991,UKG,United Kingdom,1.992 +1991,IRE,Ireland,0.922 +1991,NTH,Netherlands,1.547 +1991,BEL,Belgium,1.565 +1991,LUX,Luxembourg,1.49 +1991,FRN,France,1.69 +1991,LIE,Liechtenstein,0.906 +1991,SPN,Spain,0.813 +1991,POR,Portugal,1.212 +1991,GFR,German Federal Republic,1.566 +1991,POL,Poland,1.091 +1991,AUS,Austria,0.845 +1991,HUN,Hungary,1.009 +1991,CZE,Czechoslovakia,1.079 +1991,ITA,Italy,1.411 +1991,SNM,San Marino,1.13 +1991,MLT,Malta,0.367 +1991,ALB,Albania,0.6 +1991,YUG,Yugoslavia,-0.83 +1991,BOS,Bosnia and Herzegovina,-0.304 +1991,GRC,Greece,0.75 +1991,CYP,Cyprus,-0.417 +1991,BUL,Bulgaria,1.087 +1991,ROM,Romania,1.182 +1991,RUS,Russia,0.405 +1991,EST,Estonia,1.024 +1991,LAT,Latvia,1.079 +1991,LIT,Lithuania,0.942 +1991,UKR,Ukraine,0.134 +1991,BLR,Belarus,0.202 +1991,ARM,Armenia,0.222 +1991,AZE,Azerbaijan,0.113 +1991,FIN,Finland,1.031 +1991,SWD,Sweden,0.972 +1991,NOR,Norway,1.115 +1991,DEN,Denmark,1.148 +1991,ICE,Iceland,1.105 +1991,CAP,Cape Verde,-0.621 +1991,STP,Sao Tome and Principe,-0.334 +1991,GNB,Guinea-Bissau,-0.681 +1991,GAM,Gambia,-0.624 +1991,MLI,Mali,-0.818 +1991,SEN,Senegal,-0.646 +1991,BEN,Benin,-0.405 +1991,MAA,Mauritania,-0.832 +1991,NIR,Niger,-0.706 +1991,CDI,Ivory Coast,0.172 +1991,GUI,Guinea,-0.692 +1991,BFO,Burkina Faso,-0.805 +1991,LBR,Liberia,-0.232 +1991,SIE,Sierra Leone,-0.611 +1991,GHA,Ghana,-0.897 +1991,TOG,Togo,-0.365 +1991,CAO,Cameroon,-0.322 +1991,NIG,Nigeria,-0.739 +1991,GAB,Gabon,-0.608 +1991,CEN,Central African Republic,-0.16 +1991,CHA,Chad,-0.648 +1991,CON,Congo,-0.397 +1991,DRC,Democratic Republic of the Congo,-0.282 +1991,UGA,Uganda,-0.986 +1991,KEN,Kenya,-0.47 +1991,TAZ,Tanzania,-0.94 +1991,BUI,Burundi,-0.702 +1991,RWA,Rwanda,-0.577 +1991,SOM,Somalia,-0.808 +1991,DJI,Djibouti,-0.662 +1991,ETH,Ethiopia,-0.701 +1991,ANG,Angola,-1.282 +1991,MZM,Mozambique,-0.767 +1991,ZAM,Zambia,-0.807 +1991,ZIM,Zimbabwe,-0.967 +1991,MAW,Malawi,0.033 +1991,NAM,Namibia,-1.056 +1991,LES,Lesotho,-0.312 +1991,BOT,Botswana,-0.42 +1991,SWA,Swaziland,-0.415 +1991,MAG,Madagascar,-0.902 +1991,COM,Comoros,-0.673 +1991,MAS,Mauritius,-0.206 +1991,SEY,Seychelles,-0.765 +1991,MOR,Morocco,-0.76 +1991,ALG,Algeria,-1.221 +1991,TUN,Tunisia,-0.729 +1991,LIB,Libya,-1.163 +1991,SUD,Sudan,-1.044 +1991,IRN,Iran,-1.077 +1991,TUR,Turkey,0.548 +1991,IRQ,Iraq,-1.453 +1991,EGY,Egypt,-0.627 +1991,SYR,Syria,-1.344 +1991,LEB,Lebanon,-0.617 +1991,JOR,Jordan,-0.882 +1991,ISR,Israel,2.098 +1991,SAU,Saudi Arabia,-0.755 +1991,YAR,Yemen Arab Republic,-1.016 +1991,KUW,Kuwait,-0.776 +1991,BAH,Bahrain,-0.665 +1991,QAT,Qatar,-0.769 +1991,UAE,United Arab Emirates,-0.795 +1991,OMA,Oman,-0.646 +1991,AFG,Afghanistan,-1.24 +1991,CHN,China,-0.36 +1991,MON,Mongolia,-0.538 +1991,PRK,North Korea,-1.449 +1991,ROK,South Korea,0.347 +1991,JPN,Japan,1.114 +1991,IND,India,-0.822 +1991,BHU,Bhutan,-0.774 +1991,PAK,Pakistan,-0.823 +1991,BNG,Bangladesh,-0.861 +1991,MYA,Myanmar,-0.474 +1991,SRI,Sri Lanka,-0.814 +1991,MAD,Maldives,-0.853 +1991,NEP,Nepal,-0.509 +1991,THI,Thailand,-0.573 +1991,CAM,Cambodia,-0.207 +1991,LAO,Laos,-1.047 +1991,DRV,Vietnam,-1.255 +1991,MAL,Malaysia,-1.001 +1991,SIN,Singapore,-0.44 +1991,BRU,Brunei,-0.789 +1991,PHI,Philippines,-0.661 +1991,INS,Indonesia,-1.026 +1991,AUL,Australia,0.956 +1991,PNG,Papua New Guinea,-0.117 +1991,NEW,New Zealand,0.867 +1991,VAN,Vanuatu,-0.629 +1991,SOL,Solomon Islands,-0.016 +1991,FIJ,Fiji,-0.001 +1991,MSI,Marshall Islands,0.496 +1991,FSM,Federated States of Micronesia,0.401 +1991,WSM,Samoa,0.205 +1992,USA,United States of America,2.766 +1992,CAN,Canada,1.234 +1992,BHM,Bahamas,-0.355 +1992,CUB,Cuba,-1.75 +1992,HAI,Haiti,-0.529 +1992,DOM,Dominican Republic,0.148 +1992,JAM,Jamaica,-0.235 +1992,TRI,Trinidad and Tobago,-0.613 +1992,BAR,Barbados,-0.404 +1992,DMA,Dominica,0.08 +1992,GRN,Grenada,-0.432 +1992,SLU,St. Lucia,-0.067 +1992,SVG,St. Vincent and the Grenadines,-0.011 +1992,AAB,Antigua & Barbuda,-0.281 +1992,SKN,St. Kitts and Nevis,-0.209 +1992,MEX,Mexico,-0.613 +1992,BLZ,Belize,-0.36 +1992,GUA,Guatemala,-0.433 +1992,HON,Honduras,-0.242 +1992,SAL,El Salvador,-0.284 +1992,NIC,Nicaragua,-0.543 +1992,COS,Costa Rica,0.022 +1992,PAN,Panama,0.183 +1992,COL,Colombia,-0.588 +1992,VEN,Venezuela,-0.403 +1992,GUY,Guyana,-0.711 +1992,SUR,Suriname,-0.5 +1992,ECU,Ecuador,-0.449 +1992,PER,Peru,-0.344 +1992,BRA,Brazil,-0.494 +1992,BOL,Bolivia,-0.07 +1992,PAR,Paraguay,-0.074 +1992,CHL,Chile,-0.299 +1992,ARG,Argentina,0.632 +1992,URU,Uruguay,0.213 +1992,UKG,United Kingdom,1.863 +1992,IRE,Ireland,0.899 +1992,NTH,Netherlands,1.409 +1992,BEL,Belgium,1.412 +1992,LUX,Luxembourg,1.396 +1992,FRN,France,1.578 +1992,LIE,Liechtenstein,0.945 +1992,SPN,Spain,0.788 +1992,POR,Portugal,1.123 +1992,GFR,German Federal Republic,1.408 +1992,POL,Poland,1.12 +1992,AUS,Austria,0.926 +1992,HUN,Hungary,1.128 +1992,CZE,Czechoslovakia,1.147 +1992,ITA,Italy,1.374 +1992,SNM,San Marino,1.124 +1992,MLT,Malta,0.569 +1992,ALB,Albania,0.738 +1992,CRO,Croatia,0.901 +1992,YUG,Yugoslavia,-0.828 +1992,BOS,Bosnia and Herzegovina,-0.306 +1992,SLV,Slovenia,1.063 +1992,GRC,Greece,0.742 +1992,CYP,Cyprus,-0.543 +1992,BUL,Bulgaria,1.201 +1992,MLD,Moldova,0.951 +1992,ROM,Romania,1.239 +1992,RUS,Russia,0.874 +1992,EST,Estonia,0.985 +1992,LAT,Latvia,1.048 +1992,LIT,Lithuania,0.934 +1992,UKR,Ukraine,0.276 +1992,BLR,Belarus,0.282 +1992,ARM,Armenia,0.213 +1992,AZE,Azerbaijan,0.11 +1992,FIN,Finland,1.08 +1992,SWD,Sweden,0.983 +1992,NOR,Norway,1.06 +1992,DEN,Denmark,1.109 +1992,ICE,Iceland,1.095 +1992,CAP,Cape Verde,-0.502 +1992,STP,Sao Tome and Principe,-0.491 +1992,GNB,Guinea-Bissau,-0.776 +1992,GAM,Gambia,-0.509 +1992,MLI,Mali,-0.596 +1992,SEN,Senegal,-0.718 +1992,BEN,Benin,-0.319 +1992,MAA,Mauritania,-0.914 +1992,NIR,Niger,-0.787 +1992,CDI,Ivory Coast,-0.103 +1992,GUI,Guinea,-0.723 +1992,BFO,Burkina Faso,-0.753 +1992,LBR,Liberia,-0.429 +1992,SIE,Sierra Leone,-0.659 +1992,GHA,Ghana,-0.901 +1992,TOG,Togo,-0.212 +1992,CAO,Cameroon,-0.406 +1992,NIG,Nigeria,-0.796 +1992,GAB,Gabon,-0.655 +1992,CEN,Central African Republic,-0.316 +1992,CHA,Chad,-0.663 +1992,CON,Congo,-0.22 +1992,DRC,Democratic Republic of the Congo,-0.194 +1992,UGA,Uganda,-1.065 +1992,KEN,Kenya,-0.433 +1992,TAZ,Tanzania,-1.088 +1992,BUI,Burundi,-0.536 +1992,RWA,Rwanda,-0.529 +1992,DJI,Djibouti,-0.708 +1992,ETH,Ethiopia,-0.538 +1992,ANG,Angola,-1.109 +1992,MZM,Mozambique,-0.738 +1992,ZAM,Zambia,-0.878 +1992,ZIM,Zimbabwe,-1.096 +1992,MAW,Malawi,0.029 +1992,NAM,Namibia,-1.096 +1992,LES,Lesotho,-0.433 +1992,BOT,Botswana,-0.494 +1992,SWA,Swaziland,-0.386 +1992,MAG,Madagascar,-0.882 +1992,COM,Comoros,-0.609 +1992,MAS,Mauritius,-0.3 +1992,SEY,Seychelles,-0.688 +1992,MOR,Morocco,-0.773 +1992,ALG,Algeria,-1.012 +1992,TUN,Tunisia,-0.749 +1992,LIB,Libya,-1.273 +1992,SUD,Sudan,-1.496 +1992,IRN,Iran,-1.149 +1992,TUR,Turkey,0.549 +1992,IRQ,Iraq,-1.512 +1992,EGY,Egypt,-0.664 +1992,SYR,Syria,-1.334 +1992,LEB,Lebanon,-0.779 +1992,JOR,Jordan,-0.842 +1992,ISR,Israel,2.126 +1992,SAU,Saudi Arabia,-0.631 +1992,YAR,Yemen Arab Republic,-1.127 +1992,KUW,Kuwait,-0.595 +1992,BAH,Bahrain,-0.687 +1992,QAT,Qatar,-0.634 +1992,UAE,United Arab Emirates,-0.733 +1992,OMA,Oman,-0.696 +1992,AFG,Afghanistan,-0.821 +1992,TKM,Turkmenistan,0.074 +1992,TAJ,Tajikistan,-0.032 +1992,KYR,Kyrgyzstan,0.407 +1992,KZK,Kazakhstan,0.409 +1992,CHN,China,-0.665 +1992,MON,Mongolia,-0.5 +1992,PRK,North Korea,-1.455 +1992,ROK,South Korea,0.374 +1992,JPN,Japan,0.877 +1992,IND,India,-0.812 +1992,BHU,Bhutan,-0.658 +1992,PAK,Pakistan,-0.965 +1992,BNG,Bangladesh,-0.933 +1992,MYA,Myanmar,-0.776 +1992,SRI,Sri Lanka,-0.954 +1992,MAD,Maldives,-0.74 +1992,NEP,Nepal,-0.472 +1992,THI,Thailand,-0.611 +1992,CAM,Cambodia,-0.217 +1992,LAO,Laos,-1.063 +1992,DRV,Vietnam,-1.331 +1992,MAL,Malaysia,-1.076 +1992,SIN,Singapore,-0.318 +1992,BRU,Brunei,-0.857 +1992,PHI,Philippines,-0.572 +1992,INS,Indonesia,-1.074 +1992,AUL,Australia,0.942 +1992,PNG,Papua New Guinea,-0.194 +1992,NEW,New Zealand,0.81 +1992,VAN,Vanuatu,-0.632 +1992,SOL,Solomon Islands,0.231 +1992,FIJ,Fiji,-0.028 +1992,MSI,Marshall Islands,0.767 +1992,FSM,Federated States of Micronesia,0.965 +1992,WSM,Samoa,0.526 +1993,USA,United States of America,2.734 +1993,CAN,Canada,1.138 +1993,BHM,Bahamas,-0.282 +1993,CUB,Cuba,-1.734 +1993,HAI,Haiti,-0.425 +1993,DOM,Dominican Republic,0.211 +1993,JAM,Jamaica,-0.167 +1993,TRI,Trinidad and Tobago,-0.576 +1993,BAR,Barbados,-0.298 +1993,DMA,Dominica,0.045 +1993,GRN,Grenada,-0.375 +1993,SLU,St. Lucia,-0.284 +1993,SVG,St. Vincent and the Grenadines,-0.188 +1993,AAB,Antigua & Barbuda,-0.241 +1993,SKN,St. Kitts and Nevis,-0.204 +1993,MEX,Mexico,-0.5 +1993,BLZ,Belize,-0.149 +1993,GUA,Guatemala,-0.449 +1993,HON,Honduras,-0.186 +1993,SAL,El Salvador,-0.255 +1993,NIC,Nicaragua,-0.229 +1993,COS,Costa Rica,-0.064 +1993,PAN,Panama,0.229 +1993,COL,Colombia,-0.597 +1993,VEN,Venezuela,-0.395 +1993,GUY,Guyana,-0.429 +1993,SUR,Suriname,-0.509 +1993,ECU,Ecuador,-0.382 +1993,PER,Peru,-0.413 +1993,BRA,Brazil,-0.366 +1993,BOL,Bolivia,-0.229 +1993,PAR,Paraguay,0.107 +1993,CHL,Chile,-0.267 +1993,ARG,Argentina,0.678 +1993,URU,Uruguay,0.118 +1993,UKG,United Kingdom,1.904 +1993,IRE,Ireland,0.95 +1993,NTH,Netherlands,1.43 +1993,BEL,Belgium,1.365 +1993,LUX,Luxembourg,1.381 +1993,FRN,France,1.646 +1993,MNC,Monaco,-0.076 +1993,LIE,Liechtenstein,1.013 +1993,SPN,Spain,0.846 +1993,AND,Andorra,1.185 +1993,POR,Portugal,1.167 +1993,GFR,German Federal Republic,1.452 +1993,POL,Poland,1.163 +1993,AUS,Austria,0.939 +1993,HUN,Hungary,1.147 +1993,CZR,Czech Republic,1.276 +1993,SLO,Slovakia,1.138 +1993,ITA,Italy,1.37 +1993,SNM,San Marino,1.038 +1993,MLT,Malta,0.694 +1993,ALB,Albania,0.727 +1993,MAC,Macedonia,0.468 +1993,CRO,Croatia,0.933 +1993,BOS,Bosnia and Herzegovina,-0.208 +1993,SLV,Slovenia,0.936 +1993,GRC,Greece,0.769 +1993,CYP,Cyprus,-0.269 +1993,BUL,Bulgaria,1.268 +1993,MLD,Moldova,0.964 +1993,ROM,Romania,1.246 +1993,RUS,Russia,1.067 +1993,EST,Estonia,0.883 +1993,LAT,Latvia,0.906 +1993,LIT,Lithuania,0.905 +1993,UKR,Ukraine,0.164 +1993,BLR,Belarus,0.284 +1993,ARM,Armenia,0.416 +1993,GRG,Georgia,1.037 +1993,AZE,Azerbaijan,0.094 +1993,FIN,Finland,1.137 +1993,SWD,Sweden,0.989 +1993,NOR,Norway,1.112 +1993,DEN,Denmark,1.087 +1993,ICE,Iceland,1.135 +1993,CAP,Cape Verde,-0.556 +1993,GNB,Guinea-Bissau,-0.727 +1993,GAM,Gambia,-0.379 +1993,MLI,Mali,-0.833 +1993,SEN,Senegal,-0.641 +1993,BEN,Benin,-0.438 +1993,MAA,Mauritania,-0.926 +1993,NIR,Niger,-0.814 +1993,CDI,Ivory Coast,-0.355 +1993,GUI,Guinea,-0.845 +1993,BFO,Burkina Faso,-0.834 +1993,SIE,Sierra Leone,-0.817 +1993,GHA,Ghana,-0.669 +1993,TOG,Togo,-0.486 +1993,CAO,Cameroon,-0.564 +1993,NIG,Nigeria,-0.572 +1993,GAB,Gabon,-0.396 +1993,CEN,Central African Republic,-0.199 +1993,CHA,Chad,-0.763 +1993,CON,Congo,-0.38 +1993,DRC,Democratic Republic of the Congo,-0.279 +1993,UGA,Uganda,-1.152 +1993,KEN,Kenya,-0.11 +1993,TAZ,Tanzania,-0.901 +1993,BUI,Burundi,-0.58 +1993,RWA,Rwanda,-0.462 +1993,DJI,Djibouti,-0.766 +1993,ETH,Ethiopia,-0.411 +1993,ERI,Eritrea,-0.448 +1993,ANG,Angola,-0.932 +1993,MZM,Mozambique,-0.75 +1993,ZAM,Zambia,-0.581 +1993,ZIM,Zimbabwe,-1.063 +1993,MAW,Malawi,-0.186 +1993,SAF,South Africa,-0.004 +1993,NAM,Namibia,-1.026 +1993,LES,Lesotho,-0.583 +1993,BOT,Botswana,-0.381 +1993,SWA,Swaziland,-0.326 +1993,MAG,Madagascar,-0.86 +1993,COM,Comoros,-0.747 +1993,MAS,Mauritius,-0.298 +1993,SEY,Seychelles,-0.695 +1993,MOR,Morocco,-0.885 +1993,ALG,Algeria,-0.888 +1993,TUN,Tunisia,-0.859 +1993,LIB,Libya,-1.439 +1993,SUD,Sudan,-1.591 +1993,IRN,Iran,-1.269 +1993,TUR,Turkey,0.607 +1993,IRQ,Iraq,-1.605 +1993,EGY,Egypt,-0.683 +1993,SYR,Syria,-1.415 +1993,LEB,Lebanon,-0.809 +1993,JOR,Jordan,-0.883 +1993,ISR,Israel,2.101 +1993,SAU,Saudi Arabia,-0.541 +1993,YAR,Yemen Arab Republic,-1.086 +1993,KUW,Kuwait,-0.503 +1993,BAH,Bahrain,-0.724 +1993,QAT,Qatar,-0.735 +1993,UAE,United Arab Emirates,-0.7 +1993,OMA,Oman,-0.756 +1993,AFG,Afghanistan,-0.85 +1993,TKM,Turkmenistan,0.168 +1993,TAJ,Tajikistan,0.266 +1993,KYR,Kyrgyzstan,0.241 +1993,KZK,Kazakhstan,0.366 +1993,CHN,China,-1.104 +1993,MON,Mongolia,0.993 +1993,PRK,North Korea,-1.586 +1993,ROK,South Korea,0.396 +1993,JPN,Japan,1.009 +1993,IND,India,-1.036 +1993,BHU,Bhutan,-0.696 +1993,PAK,Pakistan,-0.979 +1993,BNG,Bangladesh,-0.773 +1993,MYA,Myanmar,-0.996 +1993,SRI,Sri Lanka,-0.954 +1993,MAD,Maldives,-0.701 +1993,NEP,Nepal,-0.356 +1993,THI,Thailand,-0.698 +1993,CAM,Cambodia,-0.531 +1993,LAO,Laos,-1.11 +1993,DRV,Vietnam,-1.465 +1993,MAL,Malaysia,-1.107 +1993,SIN,Singapore,-0.317 +1993,BRU,Brunei,-0.912 +1993,PHI,Philippines,-0.72 +1993,INS,Indonesia,-1.216 +1993,AUL,Australia,0.697 +1993,PNG,Papua New Guinea,-0.104 +1993,NEW,New Zealand,0.634 +1993,VAN,Vanuatu,-0.632 +1993,SOL,Solomon Islands,0.228 +1993,FIJ,Fiji,0.1 +1993,MSI,Marshall Islands,0.641 +1993,FSM,Federated States of Micronesia,0.645 +1993,WSM,Samoa,0.315 +1994,USA,United States of America,2.688 +1994,CAN,Canada,1.145 +1994,BHM,Bahamas,-0.124 +1994,CUB,Cuba,-1.569 +1994,HAI,Haiti,-0.338 +1994,JAM,Jamaica,-0.227 +1994,TRI,Trinidad and Tobago,-0.45 +1994,BAR,Barbados,-0.304 +1994,DMA,Dominica,-0.07 +1994,GRN,Grenada,-0.328 +1994,SLU,St. Lucia,-0.349 +1994,SVG,St. Vincent and the Grenadines,-0.131 +1994,AAB,Antigua & Barbuda,-0.246 +1994,SKN,St. Kitts and Nevis,-0.219 +1994,MEX,Mexico,-0.637 +1994,BLZ,Belize,-0.089 +1994,GUA,Guatemala,-0.442 +1994,HON,Honduras,-0.307 +1994,SAL,El Salvador,-0.16 +1994,NIC,Nicaragua,-0.131 +1994,COS,Costa Rica,-0.1 +1994,PAN,Panama,-0.122 +1994,COL,Colombia,-0.656 +1994,VEN,Venezuela,-0.551 +1994,GUY,Guyana,-0.456 +1994,SUR,Suriname,-0.45 +1994,ECU,Ecuador,-0.495 +1994,PER,Peru,-0.279 +1994,BRA,Brazil,-0.333 +1994,BOL,Bolivia,-0.251 +1994,PAR,Paraguay,-0.069 +1994,CHL,Chile,-0.154 +1994,ARG,Argentina,0.713 +1994,URU,Uruguay,-0.005 +1994,UKG,United Kingdom,1.986 +1994,IRE,Ireland,0.883 +1994,NTH,Netherlands,1.347 +1994,BEL,Belgium,1.311 +1994,LUX,Luxembourg,1.313 +1994,FRN,France,1.717 +1994,MNC,Monaco,0.98 +1994,LIE,Liechtenstein,0.914 +1994,SPN,Spain,0.948 +1994,AND,Andorra,1.037 +1994,POR,Portugal,1.146 +1994,GFR,German Federal Republic,1.351 +1994,POL,Poland,1.193 +1994,AUS,Austria,0.935 +1994,HUN,Hungary,1.253 +1994,CZR,Czech Republic,1.22 +1994,SLO,Slovakia,1.178 +1994,ITA,Italy,1.328 +1994,MLT,Malta,0.796 +1994,ALB,Albania,0.825 +1994,MAC,Macedonia,0.785 +1994,CRO,Croatia,0.739 +1994,BOS,Bosnia and Herzegovina,-0.053 +1994,SLV,Slovenia,0.942 +1994,GRC,Greece,0.955 +1994,CYP,Cyprus,-0.255 +1994,BUL,Bulgaria,1.065 +1994,MLD,Moldova,0.96 +1994,ROM,Romania,1.176 +1994,RUS,Russia,0.909 +1994,EST,Estonia,0.932 +1994,LAT,Latvia,1.039 +1994,LIT,Lithuania,1.016 +1994,UKR,Ukraine,0.494 +1994,BLR,Belarus,0.383 +1994,ARM,Armenia,0.501 +1994,GRG,Georgia,0.984 +1994,AZE,Azerbaijan,0.141 +1994,FIN,Finland,1.213 +1994,SWD,Sweden,0.924 +1994,NOR,Norway,1.112 +1994,DEN,Denmark,1.15 +1994,ICE,Iceland,1.119 +1994,CAP,Cape Verde,-0.504 +1994,GAM,Gambia,-0.408 +1994,MLI,Mali,-0.832 +1994,SEN,Senegal,-0.605 +1994,BEN,Benin,-0.514 +1994,MAA,Mauritania,-0.797 +1994,NIR,Niger,-0.756 +1994,CDI,Ivory Coast,-0.164 +1994,GUI,Guinea,-0.75 +1994,BFO,Burkina Faso,-0.833 +1994,SIE,Sierra Leone,-0.75 +1994,GHA,Ghana,-0.782 +1994,TOG,Togo,-0.545 +1994,CAO,Cameroon,-0.486 +1994,NIG,Nigeria,-0.627 +1994,GAB,Gabon,-0.348 +1994,CEN,Central African Republic,-0.167 +1994,CON,Congo,-0.511 +1994,DRC,Democratic Republic of the Congo,-0.283 +1994,UGA,Uganda,-1.111 +1994,KEN,Kenya,-0.378 +1994,TAZ,Tanzania,-1.074 +1994,BUI,Burundi,-0.728 +1994,RWA,Rwanda,-0.422 +1994,DJI,Djibouti,-0.623 +1994,ETH,Ethiopia,-0.504 +1994,ERI,Eritrea,-0.354 +1994,ANG,Angola,-0.583 +1994,MZM,Mozambique,-0.795 +1994,ZAM,Zambia,-0.619 +1994,ZIM,Zimbabwe,-1.078 +1994,MAW,Malawi,-0.336 +1994,SAF,South Africa,-0.315 +1994,NAM,Namibia,-0.99 +1994,LES,Lesotho,-0.852 +1994,BOT,Botswana,-0.446 +1994,SWA,Swaziland,-0.226 +1994,MAG,Madagascar,-0.72 +1994,COM,Comoros,-0.612 +1994,MAS,Mauritius,-0.371 +1994,SEY,Seychelles,-0.713 +1994,MOR,Morocco,-0.473 +1994,ALG,Algeria,-0.911 +1994,TUN,Tunisia,-0.796 +1994,LIB,Libya,-1.592 +1994,SUD,Sudan,-1.76 +1994,IRN,Iran,-1.556 +1994,TUR,Turkey,0.668 +1994,IRQ,Iraq,-1.601 +1994,EGY,Egypt,-0.807 +1994,SYR,Syria,-1.445 +1994,LEB,Lebanon,-0.919 +1994,JOR,Jordan,-0.935 +1994,ISR,Israel,2.042 +1994,SAU,Saudi Arabia,-0.633 +1994,YAR,Yemen Arab Republic,-1.061 +1994,KUW,Kuwait,-0.491 +1994,BAH,Bahrain,-0.729 +1994,QAT,Qatar,-0.836 +1994,UAE,United Arab Emirates,-0.715 +1994,OMA,Oman,-0.815 +1994,AFG,Afghanistan,-1.019 +1994,TKM,Turkmenistan,0.101 +1994,TAJ,Tajikistan,0.574 +1994,KYR,Kyrgyzstan,-0.003 +1994,UZB,Uzbekistan,0.283 +1994,KZK,Kazakhstan,0.379 +1994,CHN,China,-1.363 +1994,MON,Mongolia,-0.072 +1994,PRK,North Korea,-1.725 +1994,ROK,South Korea,0.365 +1994,JPN,Japan,1.029 +1994,IND,India,-1.212 +1994,BHU,Bhutan,-0.704 +1994,PAK,Pakistan,-0.993 +1994,BNG,Bangladesh,-0.835 +1994,MYA,Myanmar,-0.999 +1994,SRI,Sri Lanka,-1.052 +1994,MAD,Maldives,-0.611 +1994,NEP,Nepal,-0.498 +1994,THI,Thailand,-0.714 +1994,CAM,Cambodia,-0.278 +1994,LAO,Laos,-1.224 +1994,DRV,Vietnam,-1.517 +1994,MAL,Malaysia,-0.933 +1994,SIN,Singapore,-0.364 +1994,BRU,Brunei,-0.874 +1994,PHI,Philippines,-0.607 +1994,INS,Indonesia,-1.281 +1994,AUL,Australia,0.772 +1994,PNG,Papua New Guinea,-0.107 +1994,NEW,New Zealand,0.655 +1994,VAN,Vanuatu,-0.052 +1994,SOL,Solomon Islands,0.261 +1994,FIJ,Fiji,0.04 +1994,MSI,Marshall Islands,0.632 +1994,WSM,Samoa,0.376 +1995,USA,United States of America,2.939 +1995,CAN,Canada,1.106 +1995,BHM,Bahamas,0.111 +1995,CUB,Cuba,-1.739 +1995,HAI,Haiti,-0.296 +1995,JAM,Jamaica,-0.169 +1995,TRI,Trinidad and Tobago,-0.371 +1995,BAR,Barbados,0.001 +1995,DMA,Dominica,0.193 +1995,GRN,Grenada,-0.014 +1995,SLU,St. Lucia,-0.316 +1995,SVG,St. Vincent and the Grenadines,-0.088 +1995,AAB,Antigua & Barbuda,0.095 +1995,SKN,St. Kitts and Nevis,-0.235 +1995,MEX,Mexico,-0.527 +1995,BLZ,Belize,-0.023 +1995,GUA,Guatemala,-0.384 +1995,HON,Honduras,-0.22 +1995,SAL,El Salvador,-0.077 +1995,NIC,Nicaragua,-0.114 +1995,COS,Costa Rica,-0.112 +1995,PAN,Panama,-0.128 +1995,COL,Colombia,-0.631 +1995,VEN,Venezuela,-0.403 +1995,GUY,Guyana,-0.428 +1995,SUR,Suriname,-0.256 +1995,ECU,Ecuador,-0.097 +1995,PER,Peru,-0.235 +1995,BRA,Brazil,-0.266 +1995,BOL,Bolivia,-0.232 +1995,PAR,Paraguay,0.061 +1995,CHL,Chile,-0.201 +1995,ARG,Argentina,1.241 +1995,URU,Uruguay,-0.146 +1995,UKG,United Kingdom,2.228 +1995,IRE,Ireland,0.864 +1995,NTH,Netherlands,1.226 +1995,BEL,Belgium,1.566 +1995,LUX,Luxembourg,1.132 +1995,FRN,France,1.694 +1995,MNC,Monaco,1.161 +1995,LIE,Liechtenstein,1.344 +1995,SPN,Spain,0.91 +1995,AND,Andorra,0.962 +1995,POR,Portugal,1.025 +1995,GFR,German Federal Republic,1.171 +1995,POL,Poland,1.116 +1995,AUS,Austria,0.94 +1995,HUN,Hungary,1.146 +1995,CZR,Czech Republic,1.08 +1995,SLO,Slovakia,1.084 +1995,ITA,Italy,1.154 +1995,SNM,San Marino,0.086 +1995,MLT,Malta,0.698 +1995,ALB,Albania,0.804 +1995,MAC,Macedonia,0.816 +1995,CRO,Croatia,0.816 +1995,BOS,Bosnia and Herzegovina,0.362 +1995,SLV,Slovenia,0.98 +1995,GRC,Greece,1.319 +1995,CYP,Cyprus,-0.118 +1995,BUL,Bulgaria,0.992 +1995,MLD,Moldova,0.946 +1995,ROM,Romania,1.055 +1995,RUS,Russia,0.98 +1995,EST,Estonia,0.983 +1995,LAT,Latvia,1.513 +1995,LIT,Lithuania,1.039 +1995,UKR,Ukraine,0.433 +1995,BLR,Belarus,0.41 +1995,ARM,Armenia,0.568 +1995,GRG,Georgia,1.656 +1995,AZE,Azerbaijan,0.189 +1995,FIN,Finland,1.104 +1995,SWD,Sweden,0.943 +1995,NOR,Norway,1.046 +1995,DEN,Denmark,1.063 +1995,ICE,Iceland,1.022 +1995,CAP,Cape Verde,-0.636 +1995,GNB,Guinea-Bissau,-0.296 +1995,EQG,Equatorial Guinea,-0.006 +1995,GAM,Gambia,-0.646 +1995,MLI,Mali,-0.69 +1995,SEN,Senegal,-0.649 +1995,BEN,Benin,-0.417 +1995,MAA,Mauritania,-0.787 +1995,NIR,Niger,-0.784 +1995,CDI,Ivory Coast,-0.278 +1995,GUI,Guinea,-0.606 +1995,BFO,Burkina Faso,-0.813 +1995,LBR,Liberia,0.002 +1995,SIE,Sierra Leone,-0.618 +1995,GHA,Ghana,-0.865 +1995,TOG,Togo,-0.753 +1995,CAO,Cameroon,-0.47 +1995,NIG,Nigeria,-1.109 +1995,GAB,Gabon,-0.33 +1995,CHA,Chad,-0.517 +1995,CON,Congo,-0.4 +1995,DRC,Democratic Republic of the Congo,-0.664 +1995,UGA,Uganda,-0.929 +1995,KEN,Kenya,-0.38 +1995,TAZ,Tanzania,-1.214 +1995,BUI,Burundi,-0.799 +1995,RWA,Rwanda,-0.446 +1995,DJI,Djibouti,-0.733 +1995,ETH,Ethiopia,-0.317 +1995,ERI,Eritrea,-0.297 +1995,ANG,Angola,-0.667 +1995,MZM,Mozambique,-0.703 +1995,ZAM,Zambia,-0.482 +1995,ZIM,Zimbabwe,-0.952 +1995,MAW,Malawi,-0.351 +1995,SAF,South Africa,-0.319 +1995,NAM,Namibia,-0.892 +1995,LES,Lesotho,-0.418 +1995,BOT,Botswana,-0.411 +1995,SWA,Swaziland,-0.056 +1995,MAG,Madagascar,-0.682 +1995,COM,Comoros,-0.613 +1995,MAS,Mauritius,-0.461 +1995,SEY,Seychelles,-0.719 +1995,MOR,Morocco,-0.375 +1995,ALG,Algeria,-0.897 +1995,TUN,Tunisia,-0.746 +1995,LIB,Libya,-1.845 +1995,SUD,Sudan,-1.818 +1995,IRN,Iran,-1.529 +1995,TUR,Turkey,0.662 +1995,EGY,Egypt,-0.787 +1995,SYR,Syria,-1.497 +1995,LEB,Lebanon,-1.046 +1995,JOR,Jordan,-0.837 +1995,ISR,Israel,2.529 +1995,SAU,Saudi Arabia,-0.707 +1995,YAR,Yemen Arab Republic,-0.81 +1995,KUW,Kuwait,-0.516 +1995,BAH,Bahrain,-0.763 +1995,QAT,Qatar,-0.863 +1995,UAE,United Arab Emirates,-0.778 +1995,OMA,Oman,-0.792 +1995,AFG,Afghanistan,-0.851 +1995,TKM,Turkmenistan,0.005 +1995,TAJ,Tajikistan,0.54 +1995,KYR,Kyrgyzstan,-0.011 +1995,UZB,Uzbekistan,0.587 +1995,KZK,Kazakhstan,0.417 +1995,CHN,China,-1.443 +1995,MON,Mongolia,-0.137 +1995,PRK,North Korea,-1.69 +1995,ROK,South Korea,0.39 +1995,JPN,Japan,0.901 +1995,IND,India,-1.431 +1995,BHU,Bhutan,-0.654 +1995,PAK,Pakistan,-1.101 +1995,BNG,Bangladesh,-0.844 +1995,MYA,Myanmar,-1.369 +1995,SRI,Sri Lanka,-1.082 +1995,MAD,Maldives,-0.583 +1995,NEP,Nepal,-0.492 +1995,THI,Thailand,-0.763 +1995,CAM,Cambodia,-0.191 +1995,LAO,Laos,-1.188 +1995,DRV,Vietnam,-1.516 +1995,MAL,Malaysia,-0.812 +1995,SIN,Singapore,-0.382 +1995,BRU,Brunei,-0.937 +1995,PHI,Philippines,-0.581 +1995,INS,Indonesia,-1.317 +1995,AUL,Australia,1.091 +1995,PNG,Papua New Guinea,-0.144 +1995,NEW,New Zealand,0.572 +1995,VAN,Vanuatu,-0.27 +1995,SOL,Solomon Islands,0.211 +1995,FIJ,Fiji,-0.048 +1995,MSI,Marshall Islands,0.48 +1995,PAL,Palau,0.826 +1995,FSM,Federated States of Micronesia,0.333 +1995,WSM,Samoa,0.229 +1996,USA,United States of America,3.014 +1996,CAN,Canada,1.196 +1996,BHM,Bahamas,-0.012 +1996,CUB,Cuba,-1.857 +1996,HAI,Haiti,-0.246 +1996,DOM,Dominican Republic,-0.087 +1996,JAM,Jamaica,-0.205 +1996,TRI,Trinidad and Tobago,-0.264 +1996,BAR,Barbados,-0.027 +1996,DMA,Dominica,-0.127 +1996,GRN,Grenada,-0.048 +1996,SLU,St. Lucia,-0.316 +1996,SVG,St. Vincent and the Grenadines,-0.082 +1996,AAB,Antigua & Barbuda,-0.137 +1996,SKN,St. Kitts and Nevis,-0.209 +1996,MEX,Mexico,-0.487 +1996,BLZ,Belize,-0.066 +1996,GUA,Guatemala,-0.093 +1996,HON,Honduras,-0.188 +1996,SAL,El Salvador,-0.141 +1996,NIC,Nicaragua,-0.148 +1996,COS,Costa Rica,-0.189 +1996,PAN,Panama,-0.27 +1996,COL,Colombia,-0.661 +1996,VEN,Venezuela,-0.364 +1996,GUY,Guyana,-0.425 +1996,SUR,Suriname,-0.132 +1996,ECU,Ecuador,-0.266 +1996,PER,Peru,-0.217 +1996,BRA,Brazil,-0.211 +1996,BOL,Bolivia,-0.205 +1996,PAR,Paraguay,0.054 +1996,CHL,Chile,-0.095 +1996,ARG,Argentina,0.693 +1996,URU,Uruguay,-0.016 +1996,UKG,United Kingdom,2.034 +1996,IRE,Ireland,0.905 +1996,NTH,Netherlands,1.403 +1996,BEL,Belgium,1.485 +1996,LUX,Luxembourg,1.355 +1996,FRN,France,1.727 +1996,MNC,Monaco,1.251 +1996,LIE,Liechtenstein,1.049 +1996,SPN,Spain,1.154 +1996,AND,Andorra,1.146 +1996,POR,Portugal,1.248 +1996,GFR,German Federal Republic,1.252 +1996,POL,Poland,1.221 +1996,AUS,Austria,0.992 +1996,HUN,Hungary,1.327 +1996,CZR,Czech Republic,1.232 +1996,SLO,Slovakia,1.208 +1996,ITA,Italy,1.284 +1996,SNM,San Marino,0.634 +1996,MLT,Malta,0.342 +1996,ALB,Albania,1.03 +1996,MAC,Macedonia,0.973 +1996,CRO,Croatia,0.917 +1996,BOS,Bosnia and Herzegovina,0.458 +1996,SLV,Slovenia,1.184 +1996,GRC,Greece,1.297 +1996,CYP,Cyprus,0.479 +1996,BUL,Bulgaria,1.173 +1996,MLD,Moldova,0.948 +1996,ROM,Romania,1.233 +1996,RUS,Russia,0.708 +1996,EST,Estonia,1.141 +1996,LAT,Latvia,1.304 +1996,LIT,Lithuania,1.238 +1996,UKR,Ukraine,0.531 +1996,BLR,Belarus,0.477 +1996,ARM,Armenia,0.592 +1996,GRG,Georgia,0.932 +1996,AZE,Azerbaijan,0.223 +1996,FIN,Finland,1.332 +1996,SWD,Sweden,0.981 +1996,NOR,Norway,1.206 +1996,DEN,Denmark,1.266 +1996,ICE,Iceland,1.209 +1996,CAP,Cape Verde,-0.62 +1996,GNB,Guinea-Bissau,-0.536 +1996,EQG,Equatorial Guinea,0.009 +1996,GAM,Gambia,-0.781 +1996,MLI,Mali,-0.668 +1996,SEN,Senegal,-0.509 +1996,BEN,Benin,-0.606 +1996,MAA,Mauritania,-0.65 +1996,NIR,Niger,-0.743 +1996,CDI,Ivory Coast,-0.412 +1996,GUI,Guinea,-0.74 +1996,BFO,Burkina Faso,-0.556 +1996,LBR,Liberia,-0.487 +1996,SIE,Sierra Leone,-0.485 +1996,GHA,Ghana,-1.046 +1996,TOG,Togo,-0.717 +1996,CAO,Cameroon,-0.544 +1996,NIG,Nigeria,-1.322 +1996,GAB,Gabon,-0.512 +1996,CHA,Chad,-0.714 +1996,CON,Congo,-0.473 +1996,DRC,Democratic Republic of the Congo,-0.399 +1996,UGA,Uganda,-0.973 +1996,KEN,Kenya,-0.351 +1996,TAZ,Tanzania,-1.098 +1996,BUI,Burundi,-0.659 +1996,RWA,Rwanda,-0.454 +1996,DJI,Djibouti,-0.825 +1996,ETH,Ethiopia,-0.346 +1996,ERI,Eritrea,-0.477 +1996,ANG,Angola,-0.69 +1996,MZM,Mozambique,-0.625 +1996,ZAM,Zambia,-0.485 +1996,ZIM,Zimbabwe,-0.831 +1996,MAW,Malawi,-0.358 +1996,SAF,South Africa,-0.213 +1996,NAM,Namibia,-0.796 +1996,LES,Lesotho,-0.467 +1996,BOT,Botswana,-0.443 +1996,SWA,Swaziland,-0.137 +1996,MAG,Madagascar,-0.638 +1996,COM,Comoros,-0.361 +1996,MAS,Mauritius,-0.242 +1996,SEY,Seychelles,-0.654 +1996,MOR,Morocco,-0.583 +1996,ALG,Algeria,-0.923 +1996,TUN,Tunisia,-0.769 +1996,LIB,Libya,-1.799 +1996,SUD,Sudan,-1.727 +1996,IRN,Iran,-1.685 +1996,TUR,Turkey,0.665 +1996,EGY,Egypt,-0.844 +1996,SYR,Syria,-1.69 +1996,LEB,Lebanon,-1.192 +1996,JOR,Jordan,-0.729 +1996,ISR,Israel,2.439 +1996,SAU,Saudi Arabia,-0.784 +1996,YAR,Yemen Arab Republic,-0.841 +1996,KUW,Kuwait,-0.476 +1996,BAH,Bahrain,-0.736 +1996,QAT,Qatar,-0.912 +1996,UAE,United Arab Emirates,-0.662 +1996,OMA,Oman,-0.798 +1996,AFG,Afghanistan,-1.023 +1996,TKM,Turkmenistan,-0.2 +1996,TAJ,Tajikistan,0.682 +1996,KYR,Kyrgyzstan,0.215 +1996,UZB,Uzbekistan,0.698 +1996,KZK,Kazakhstan,0.466 +1996,CHN,China,-1.337 +1996,MON,Mongolia,-0.088 +1996,PRK,North Korea,-1.779 +1996,ROK,South Korea,0.47 +1996,JPN,Japan,0.976 +1996,IND,India,-1.506 +1996,BHU,Bhutan,-0.509 +1996,PAK,Pakistan,-1.068 +1996,BNG,Bangladesh,-0.843 +1996,MYA,Myanmar,-1.507 +1996,SRI,Sri Lanka,-0.971 +1996,MAD,Maldives,-0.556 +1996,NEP,Nepal,-0.603 +1996,THI,Thailand,-0.64 +1996,CAM,Cambodia,-0.193 +1996,LAO,Laos,-1.142 +1996,DRV,Vietnam,-1.449 +1996,MAL,Malaysia,-0.768 +1996,SIN,Singapore,-0.439 +1996,BRU,Brunei,-0.832 +1996,PHI,Philippines,-0.625 +1996,INS,Indonesia,-1.386 +1996,AUL,Australia,0.824 +1996,PNG,Papua New Guinea,-0.544 +1996,NEW,New Zealand,0.61 +1996,VAN,Vanuatu,-0.2 +1996,SOL,Solomon Islands,0.109 +1996,FIJ,Fiji,0.026 +1996,MSI,Marshall Islands,0.778 +1996,PAL,Palau,0.822 +1996,FSM,Federated States of Micronesia,0.693 +1996,WSM,Samoa,0.235 +1997,USA,United States of America,2.923 +1997,CAN,Canada,1.116 +1997,BHM,Bahamas,-0.14 +1997,CUB,Cuba,-1.903 +1997,HAI,Haiti,-0.273 +1997,DOM,Dominican Republic,-0.121 +1997,JAM,Jamaica,-0.279 +1997,TRI,Trinidad and Tobago,-0.285 +1997,BAR,Barbados,-0.197 +1997,DMA,Dominica,-0.295 +1997,GRN,Grenada,-0.301 +1997,SLU,St. Lucia,-0.583 +1997,SVG,St. Vincent and the Grenadines,-0.197 +1997,AAB,Antigua & Barbuda,-0.303 +1997,SKN,St. Kitts and Nevis,-0.458 +1997,MEX,Mexico,-0.474 +1997,BLZ,Belize,-0.202 +1997,GUA,Guatemala,-0.108 +1997,HON,Honduras,-0.196 +1997,SAL,El Salvador,-0.216 +1997,NIC,Nicaragua,-0.093 +1997,COS,Costa Rica,-0.186 +1997,PAN,Panama,-0.373 +1997,COL,Colombia,-0.724 +1997,VEN,Venezuela,-0.332 +1997,GUY,Guyana,-0.431 +1997,SUR,Suriname,-0.475 +1997,ECU,Ecuador,-0.137 +1997,PER,Peru,-0.23 +1997,BRA,Brazil,-0.194 +1997,BOL,Bolivia,-0.111 +1997,PAR,Paraguay,-0.084 +1997,CHL,Chile,-0.059 +1997,ARG,Argentina,0.533 +1997,URU,Uruguay,-0.035 +1997,UKG,United Kingdom,1.977 +1997,IRE,Ireland,1.044 +1997,NTH,Netherlands,1.471 +1997,BEL,Belgium,1.447 +1997,LUX,Luxembourg,1.433 +1997,FRN,France,1.723 +1997,MNC,Monaco,1.22 +1997,LIE,Liechtenstein,1.124 +1997,SPN,Spain,1.271 +1997,AND,Andorra,1.27 +1997,POR,Portugal,1.302 +1997,GFR,German Federal Republic,1.373 +1997,POL,Poland,1.289 +1997,AUS,Austria,1.132 +1997,HUN,Hungary,1.293 +1997,CZR,Czech Republic,1.318 +1997,SLO,Slovakia,1.242 +1997,ITA,Italy,1.337 +1997,SNM,San Marino,0.887 +1997,MLT,Malta,0.341 +1997,ALB,Albania,1.045 +1997,MAC,Macedonia,1.026 +1997,CRO,Croatia,1.019 +1997,SLV,Slovenia,1.203 +1997,GRC,Greece,1.277 +1997,CYP,Cyprus,0.622 +1997,BUL,Bulgaria,1.291 +1997,MLD,Moldova,0.99 +1997,ROM,Romania,1.22 +1997,RUS,Russia,0.524 +1997,EST,Estonia,1.201 +1997,LAT,Latvia,1.311 +1997,LIT,Lithuania,1.263 +1997,UKR,Ukraine,0.483 +1997,BLR,Belarus,0.355 +1997,ARM,Armenia,0.68 +1997,GRG,Georgia,0.804 +1997,AZE,Azerbaijan,0.229 +1997,FIN,Finland,1.367 +1997,SWD,Sweden,1.141 +1997,NOR,Norway,1.305 +1997,DEN,Denmark,1.296 +1997,ICE,Iceland,1.326 +1997,CAP,Cape Verde,-0.571 +1997,GNB,Guinea-Bissau,-0.666 +1997,EQG,Equatorial Guinea,-0.239 +1997,GAM,Gambia,-0.783 +1997,MLI,Mali,-0.706 +1997,SEN,Senegal,-0.396 +1997,BEN,Benin,-0.71 +1997,MAA,Mauritania,-0.548 +1997,NIR,Niger,-0.911 +1997,CDI,Ivory Coast,-0.629 +1997,GUI,Guinea,-0.751 +1997,BFO,Burkina Faso,-0.694 +1997,LBR,Liberia,-0.503 +1997,SIE,Sierra Leone,-0.499 +1997,GHA,Ghana,-1.098 +1997,TOG,Togo,-0.838 +1997,CAO,Cameroon,-0.613 +1997,NIG,Nigeria,-1.451 +1997,GAB,Gabon,-0.65 +1997,CHA,Chad,-0.782 +1997,CON,Congo,-0.611 +1997,DRC,Democratic Republic of the Congo,-0.522 +1997,UGA,Uganda,-0.932 +1997,KEN,Kenya,-0.585 +1997,TAZ,Tanzania,-1.087 +1997,BUI,Burundi,-0.588 +1997,RWA,Rwanda,0.132 +1997,DJI,Djibouti,-0.791 +1997,ETH,Ethiopia,-0.195 +1997,ERI,Eritrea,-0.497 +1997,ANG,Angola,-0.659 +1997,MZM,Mozambique,-0.668 +1997,ZAM,Zambia,-0.366 +1997,ZIM,Zimbabwe,-0.879 +1997,MAW,Malawi,-0.287 +1997,SAF,South Africa,-0.133 +1997,NAM,Namibia,-0.861 +1997,LES,Lesotho,-0.654 +1997,BOT,Botswana,-0.476 +1997,SWA,Swaziland,-0.039 +1997,MAG,Madagascar,-0.541 +1997,COM,Comoros,-0.716 +1997,MAS,Mauritius,-0.161 +1997,MOR,Morocco,-0.668 +1997,ALG,Algeria,-0.888 +1997,TUN,Tunisia,-0.747 +1997,LIB,Libya,-1.866 +1997,SUD,Sudan,-1.641 +1997,IRN,Iran,-1.72 +1997,TUR,Turkey,0.602 +1997,EGY,Egypt,-0.842 +1997,SYR,Syria,-1.649 +1997,LEB,Lebanon,-1.091 +1997,JOR,Jordan,-0.63 +1997,ISR,Israel,2.42 +1997,SAU,Saudi Arabia,-0.729 +1997,YAR,Yemen Arab Republic,-0.826 +1997,KUW,Kuwait,-0.446 +1997,BAH,Bahrain,-0.66 +1997,QAT,Qatar,-0.942 +1997,UAE,United Arab Emirates,-0.699 +1997,OMA,Oman,-0.778 +1997,AFG,Afghanistan,-0.859 +1997,TKM,Turkmenistan,0.08 +1997,TAJ,Tajikistan,0.298 +1997,KYR,Kyrgyzstan,0.303 +1997,UZB,Uzbekistan,0.593 +1997,KZK,Kazakhstan,0.378 +1997,CHN,China,-1.302 +1997,MON,Mongolia,-0.135 +1997,PRK,North Korea,-1.893 +1997,ROK,South Korea,0.521 +1997,JPN,Japan,0.854 +1997,IND,India,-1.297 +1997,BHU,Bhutan,-0.588 +1997,PAK,Pakistan,-0.914 +1997,BNG,Bangladesh,-0.811 +1997,MYA,Myanmar,-1.485 +1997,SRI,Sri Lanka,-0.894 +1997,MAD,Maldives,-0.549 +1997,NEP,Nepal,-0.673 +1997,THI,Thailand,-0.627 +1997,LAO,Laos,-1.226 +1997,DRV,Vietnam,-1.492 +1997,MAL,Malaysia,-0.723 +1997,SIN,Singapore,-0.505 +1997,BRU,Brunei,-0.684 +1997,PHI,Philippines,-0.768 +1997,INS,Indonesia,-1.29 +1997,AUL,Australia,0.889 +1997,PNG,Papua New Guinea,-0.659 +1997,NEW,New Zealand,0.788 +1997,VAN,Vanuatu,-0.142 +1997,SOL,Solomon Islands,0.183 +1997,FIJ,Fiji,-0.323 +1997,MSI,Marshall Islands,0.783 +1997,FSM,Federated States of Micronesia,1.202 +1997,WSM,Samoa,0.248 +1998,USA,United States of America,2.854 +1998,CAN,Canada,1.178 +1998,BHM,Bahamas,-0.194 +1998,CUB,Cuba,-1.742 +1998,HAI,Haiti,-0.381 +1998,DOM,Dominican Republic,-0.278 +1998,JAM,Jamaica,-0.271 +1998,TRI,Trinidad and Tobago,-0.263 +1998,BAR,Barbados,-0.184 +1998,DMA,Dominica,-0.295 +1998,GRN,Grenada,-0.254 +1998,SLU,St. Lucia,-0.591 +1998,SVG,St. Vincent and the Grenadines,-0.318 +1998,AAB,Antigua & Barbuda,-0.382 +1998,SKN,St. Kitts and Nevis,-0.484 +1998,MEX,Mexico,-0.588 +1998,BLZ,Belize,-0.376 +1998,GUA,Guatemala,-0.047 +1998,HON,Honduras,-0.02 +1998,SAL,El Salvador,-0.249 +1998,NIC,Nicaragua,0.098 +1998,COS,Costa Rica,-0.166 +1998,PAN,Panama,-0.359 +1998,COL,Colombia,-0.714 +1998,VEN,Venezuela,-0.426 +1998,GUY,Guyana,-0.461 +1998,SUR,Suriname,-0.62 +1998,ECU,Ecuador,-0.099 +1998,PER,Peru,-0.166 +1998,BRA,Brazil,-0.133 +1998,BOL,Bolivia,-0.215 +1998,PAR,Paraguay,-0.037 +1998,CHL,Chile,-0.134 +1998,ARG,Argentina,0.4 +1998,URU,Uruguay,-0.084 +1998,UKG,United Kingdom,1.759 +1998,IRE,Ireland,0.993 +1998,NTH,Netherlands,1.317 +1998,BEL,Belgium,1.316 +1998,LUX,Luxembourg,1.302 +1998,FRN,France,1.591 +1998,MNC,Monaco,1.338 +1998,LIE,Liechtenstein,1.057 +1998,SPN,Spain,1.17 +1998,AND,Andorra,1.174 +1998,POR,Portugal,1.178 +1998,GFR,German Federal Republic,1.289 +1998,POL,Poland,1.201 +1998,AUS,Austria,1.116 +1998,HUN,Hungary,1.286 +1998,CZR,Czech Republic,1.208 +1998,SLO,Slovakia,1.189 +1998,ITA,Italy,1.243 +1998,SNM,San Marino,0.756 +1998,MLT,Malta,0.374 +1998,ALB,Albania,1.121 +1998,MAC,Macedonia,0.961 +1998,CRO,Croatia,0.992 +1998,SLV,Slovenia,1.147 +1998,GRC,Greece,1.183 +1998,CYP,Cyprus,0.529 +1998,BUL,Bulgaria,1.206 +1998,MLD,Moldova,0.949 +1998,ROM,Romania,1.174 +1998,RUS,Russia,0.543 +1998,EST,Estonia,1.191 +1998,LAT,Latvia,1.221 +1998,LIT,Lithuania,1.203 +1998,UKR,Ukraine,0.399 +1998,BLR,Belarus,0.153 +1998,ARM,Armenia,0.482 +1998,GRG,Georgia,0.601 +1998,AZE,Azerbaijan,0.092 +1998,FIN,Finland,1.241 +1998,SWD,Sweden,1.067 +1998,NOR,Norway,1.193 +1998,DEN,Denmark,1.183 +1998,ICE,Iceland,1.197 +1998,CAP,Cape Verde,-0.687 +1998,GNB,Guinea-Bissau,-0.758 +1998,EQG,Equatorial Guinea,-0.269 +1998,GAM,Gambia,-0.439 +1998,MLI,Mali,-0.755 +1998,SEN,Senegal,-0.382 +1998,BEN,Benin,-0.803 +1998,MAA,Mauritania,-0.642 +1998,NIR,Niger,-0.846 +1998,CDI,Ivory Coast,-0.693 +1998,GUI,Guinea,-0.815 +1998,BFO,Burkina Faso,-0.719 +1998,SIE,Sierra Leone,-0.543 +1998,GHA,Ghana,-1.005 +1998,TOG,Togo,-0.74 +1998,CAO,Cameroon,-0.475 +1998,NIG,Nigeria,-1.375 +1998,GAB,Gabon,-0.418 +1998,CEN,Central African Republic,-0.376 +1998,CHA,Chad,-0.678 +1998,CON,Congo,-0.579 +1998,DRC,Democratic Republic of the Congo,-0.524 +1998,UGA,Uganda,-0.895 +1998,KEN,Kenya,-0.555 +1998,TAZ,Tanzania,-1.03 +1998,BUI,Burundi,-0.485 +1998,RWA,Rwanda,0.053 +1998,DJI,Djibouti,-0.749 +1998,ETH,Ethiopia,-0.333 +1998,ERI,Eritrea,-0.708 +1998,ANG,Angola,-0.441 +1998,MZM,Mozambique,-0.61 +1998,ZAM,Zambia,-0.028 +1998,ZIM,Zimbabwe,-1.024 +1998,MAW,Malawi,-0.425 +1998,SAF,South Africa,-0.099 +1998,NAM,Namibia,-0.723 +1998,LES,Lesotho,-0.521 +1998,BOT,Botswana,-0.53 +1998,SWA,Swaziland,-0.049 +1998,MAG,Madagascar,-0.614 +1998,COM,Comoros,-0.353 +1998,MAS,Mauritius,-0.269 +1998,SEY,Seychelles,-0.19 +1998,MOR,Morocco,-0.717 +1998,ALG,Algeria,-0.838 +1998,TUN,Tunisia,-0.818 +1998,LIB,Libya,-1.777 +1998,SUD,Sudan,-1.556 +1998,IRN,Iran,-1.594 +1998,TUR,Turkey,0.588 +1998,EGY,Egypt,-0.882 +1998,SYR,Syria,-1.647 +1998,LEB,Lebanon,-1.23 +1998,JOR,Jordan,-0.809 +1998,ISR,Israel,2.334 +1998,SAU,Saudi Arabia,-0.765 +1998,YAR,Yemen Arab Republic,-0.856 +1998,KUW,Kuwait,-0.529 +1998,BAH,Bahrain,-0.757 +1998,QAT,Qatar,-0.926 +1998,UAE,United Arab Emirates,-0.744 +1998,OMA,Oman,-0.822 +1998,AFG,Afghanistan,-0.88 +1998,TKM,Turkmenistan,0.067 +1998,TAJ,Tajikistan,0.159 +1998,KYR,Kyrgyzstan,0.339 +1998,UZB,Uzbekistan,0.722 +1998,KZK,Kazakhstan,0.337 +1998,CHN,China,-0.76 +1998,MON,Mongolia,-0.217 +1998,PRK,North Korea,-1.882 +1998,ROK,South Korea,0.632 +1998,JPN,Japan,0.737 +1998,IND,India,-0.985 +1998,BHU,Bhutan,-0.656 +1998,PAK,Pakistan,-0.851 +1998,BNG,Bangladesh,-0.792 +1998,MYA,Myanmar,-1.306 +1998,SRI,Sri Lanka,-0.869 +1998,MAD,Maldives,-0.477 +1998,NEP,Nepal,-0.607 +1998,THI,Thailand,-0.557 +1998,LAO,Laos,-1.199 +1998,DRV,Vietnam,-1.443 +1998,MAL,Malaysia,-0.702 +1998,SIN,Singapore,-0.347 +1998,BRU,Brunei,-0.779 +1998,PHI,Philippines,-0.843 +1998,INS,Indonesia,-1.154 +1998,AUL,Australia,0.953 +1998,PNG,Papua New Guinea,-0.707 +1998,NEW,New Zealand,0.865 +1998,VAN,Vanuatu,-0.064 +1998,SOL,Solomon Islands,-0.001 +1998,FIJ,Fiji,-0.45 +1998,MSI,Marshall Islands,1.136 +1998,FSM,Federated States of Micronesia,1.832 +1998,WSM,Samoa,0.166 +1999,USA,United States of America,2.678 +1999,CAN,Canada,1.173 +1999,BHM,Bahamas,-0.229 +1999,CUB,Cuba,-1.609 +1999,HAI,Haiti,-0.4 +1999,DOM,Dominican Republic,-0.326 +1999,JAM,Jamaica,-0.35 +1999,TRI,Trinidad and Tobago,-0.35 +1999,BAR,Barbados,-0.251 +1999,DMA,Dominica,-0.422 +1999,GRN,Grenada,-0.33 +1999,SLU,St. Lucia,-0.752 +1999,SVG,St. Vincent and the Grenadines,-0.101 +1999,AAB,Antigua & Barbuda,-0.471 +1999,SKN,St. Kitts and Nevis,-0.537 +1999,MEX,Mexico,-0.532 +1999,BLZ,Belize,-0.408 +1999,GUA,Guatemala,0.048 +1999,HON,Honduras,-0.349 +1999,SAL,El Salvador,-0.33 +1999,NIC,Nicaragua,-0.05 +1999,COS,Costa Rica,-0.235 +1999,PAN,Panama,-0.33 +1999,COL,Colombia,-0.531 +1999,VEN,Venezuela,-0.505 +1999,GUY,Guyana,-0.462 +1999,SUR,Suriname,-0.788 +1999,ECU,Ecuador,-0.331 +1999,PER,Peru,-0.206 +1999,BRA,Brazil,-0.047 +1999,BOL,Bolivia,-0.198 +1999,PAR,Paraguay,-0.004 +1999,CHL,Chile,-0.099 +1999,ARG,Argentina,0.362 +1999,URU,Uruguay,-0.016 +1999,UKG,United Kingdom,1.687 +1999,IRE,Ireland,0.876 +1999,NTH,Netherlands,1.289 +1999,BEL,Belgium,1.237 +1999,LUX,Luxembourg,1.238 +1999,FRN,France,1.511 +1999,MNC,Monaco,1.361 +1999,LIE,Liechtenstein,1.06 +1999,SPN,Spain,1.111 +1999,AND,Andorra,1.111 +1999,POR,Portugal,1.106 +1999,GFR,German Federal Republic,1.358 +1999,POL,Poland,1.134 +1999,AUS,Austria,1.023 +1999,HUN,Hungary,1.306 +1999,CZR,Czech Republic,1.112 +1999,SLO,Slovakia,1.115 +1999,ITA,Italy,1.124 +1999,SNM,San Marino,0.735 +1999,MLT,Malta,0.594 +1999,ALB,Albania,1.038 +1999,MAC,Macedonia,0.889 +1999,CRO,Croatia,0.898 +1999,BOS,Bosnia and Herzegovina,0.57 +1999,SLV,Slovenia,1.102 +1999,GRC,Greece,1.101 +1999,CYP,Cyprus,0.605 +1999,BUL,Bulgaria,1.134 +1999,MLD,Moldova,0.942 +1999,ROM,Romania,1.127 +1999,RUS,Russia,0.401 +1999,EST,Estonia,1.199 +1999,LAT,Latvia,1.136 +1999,LIT,Lithuania,1.158 +1999,UKR,Ukraine,0.387 +1999,BLR,Belarus,-0.029 +1999,ARM,Armenia,0.357 +1999,GRG,Georgia,0.796 +1999,AZE,Azerbaijan,0.165 +1999,FIN,Finland,1.118 +1999,SWD,Sweden,1.014 +1999,NOR,Norway,1.123 +1999,DEN,Denmark,1.209 +1999,ICE,Iceland,1.215 +1999,CAP,Cape Verde,-0.744 +1999,GNB,Guinea-Bissau,-0.776 +1999,EQG,Equatorial Guinea,-0.271 +1999,GAM,Gambia,-0.447 +1999,MLI,Mali,-0.818 +1999,SEN,Senegal,-0.38 +1999,BEN,Benin,-0.856 +1999,CDI,Ivory Coast,-0.75 +1999,GUI,Guinea,-0.788 +1999,BFO,Burkina Faso,-0.889 +1999,SIE,Sierra Leone,-0.388 +1999,GHA,Ghana,-0.862 +1999,TOG,Togo,-0.546 +1999,CAO,Cameroon,-0.56 +1999,NIG,Nigeria,-0.778 +1999,GAB,Gabon,-0.626 +1999,CHA,Chad,-0.976 +1999,CON,Congo,-0.752 +1999,DRC,Democratic Republic of the Congo,-1.06 +1999,UGA,Uganda,-0.821 +1999,KEN,Kenya,-0.601 +1999,TAZ,Tanzania,-1.117 +1999,RWA,Rwanda,-0.081 +1999,DJI,Djibouti,-0.799 +1999,ETH,Ethiopia,-0.426 +1999,ERI,Eritrea,-0.627 +1999,ANG,Angola,-0.656 +1999,MZM,Mozambique,-0.678 +1999,ZAM,Zambia,-0.344 +1999,ZIM,Zimbabwe,-0.831 +1999,MAW,Malawi,-0.313 +1999,SAF,South Africa,-0.013 +1999,NAM,Namibia,-0.772 +1999,LES,Lesotho,-0.514 +1999,BOT,Botswana,-0.543 +1999,SWA,Swaziland,-0.199 +1999,MAG,Madagascar,-0.527 +1999,COM,Comoros,-0.51 +1999,MAS,Mauritius,-0.34 +1999,SEY,Seychelles,-0.408 +1999,MOR,Morocco,-0.778 +1999,ALG,Algeria,-0.92 +1999,TUN,Tunisia,-0.841 +1999,LIB,Libya,-1.613 +1999,SUD,Sudan,-1.56 +1999,IRN,Iran,-1.645 +1999,TUR,Turkey,0.615 +1999,EGY,Egypt,-0.987 +1999,SYR,Syria,-1.611 +1999,LEB,Lebanon,-1.206 +1999,JOR,Jordan,-0.828 +1999,ISR,Israel,2.172 +1999,SAU,Saudi Arabia,-0.721 +1999,YAR,Yemen Arab Republic,-0.758 +1999,KUW,Kuwait,-0.528 +1999,BAH,Bahrain,-0.713 +1999,QAT,Qatar,-0.917 +1999,UAE,United Arab Emirates,-0.691 +1999,OMA,Oman,-0.855 +1999,AFG,Afghanistan,-0.936 +1999,TKM,Turkmenistan,0.001 +1999,TAJ,Tajikistan,0.026 +1999,UZB,Uzbekistan,0.727 +1999,KZK,Kazakhstan,0.401 +1999,CHN,China,-0.717 +1999,MON,Mongolia,-0.259 +1999,PRK,North Korea,-1.752 +1999,ROK,South Korea,0.556 +1999,JPN,Japan,0.712 +1999,IND,India,-0.791 +1999,BHU,Bhutan,-0.725 +1999,PAK,Pakistan,-0.715 +1999,BNG,Bangladesh,-0.835 +1999,MYA,Myanmar,-1.358 +1999,SRI,Sri Lanka,-0.86 +1999,MAD,Maldives,-0.454 +1999,NEP,Nepal,-0.768 +1999,THI,Thailand,-0.545 +1999,CAM,Cambodia,-0.568 +1999,LAO,Laos,-1.205 +1999,DRV,Vietnam,-1.478 +1999,MAL,Malaysia,-0.707 +1999,SIN,Singapore,-0.39 +1999,BRU,Brunei,-0.842 +1999,PHI,Philippines,-0.846 +1999,INS,Indonesia,-1.038 +1999,AUL,Australia,0.912 +1999,PNG,Papua New Guinea,-0.751 +1999,NEW,New Zealand,0.767 +1999,SOL,Solomon Islands,0.033 +1999,FIJ,Fiji,-0.609 +1999,TON,Tonga,0.367 +1999,MSI,Marshall Islands,1.236 +1999,FSM,Federated States of Micronesia,1.871 +1999,WSM,Samoa,0.26 +2000,USA,United States of America,2.611 +2000,CAN,Canada,1.112 +2000,BHM,Bahamas,-0.319 +2000,CUB,Cuba,-1.418 +2000,HAI,Haiti,-0.423 +2000,DOM,Dominican Republic,-0.324 +2000,JAM,Jamaica,-0.345 +2000,TRI,Trinidad and Tobago,-0.297 +2000,BAR,Barbados,-0.351 +2000,DMA,Dominica,-0.346 +2000,GRN,Grenada,-0.372 +2000,SLU,St. Lucia,-0.75 +2000,SVG,St. Vincent and the Grenadines,-0.274 +2000,AAB,Antigua & Barbuda,-0.582 +2000,SKN,St. Kitts and Nevis,-0.593 +2000,MEX,Mexico,-0.503 +2000,BLZ,Belize,-0.391 +2000,GUA,Guatemala,0.014 +2000,HON,Honduras,-0.311 +2000,SAL,El Salvador,-0.299 +2000,NIC,Nicaragua,-0.12 +2000,COS,Costa Rica,-0.127 +2000,PAN,Panama,-0.4 +2000,COL,Colombia,-0.352 +2000,VEN,Venezuela,-0.521 +2000,GUY,Guyana,-0.482 +2000,SUR,Suriname,-0.581 +2000,ECU,Ecuador,-0.377 +2000,PER,Peru,-0.054 +2000,BRA,Brazil,-0.009 +2000,BOL,Bolivia,-0.183 +2000,PAR,Paraguay,0.064 +2000,CHL,Chile,-0.056 +2000,ARG,Argentina,0.291 +2000,URU,Uruguay,0.008 +2000,UKG,United Kingdom,1.689 +2000,IRE,Ireland,0.831 +2000,NTH,Netherlands,1.236 +2000,BEL,Belgium,1.22 +2000,LUX,Luxembourg,1.224 +2000,FRN,France,1.454 +2000,MNC,Monaco,1.207 +2000,LIE,Liechtenstein,0.975 +2000,SPN,Spain,1.048 +2000,AND,Andorra,1.053 +2000,POR,Portugal,1.026 +2000,GFR,German Federal Republic,1.264 +2000,POL,Poland,1.154 +2000,AUS,Austria,1.013 +2000,HUN,Hungary,1.243 +2000,CZR,Czech Republic,1.142 +2000,SLO,Slovakia,1.089 +2000,ITA,Italy,1.085 +2000,SNM,San Marino,0.823 +2000,MLT,Malta,0.61 +2000,ALB,Albania,1.188 +2000,MAC,Macedonia,0.948 +2000,CRO,Croatia,0.999 +2000,YUG,Yugoslavia,0.567 +2000,BOS,Bosnia and Herzegovina,0.623 +2000,SLV,Slovenia,1.088 +2000,GRC,Greece,1.083 +2000,CYP,Cyprus,0.547 +2000,BUL,Bulgaria,1.033 +2000,MLD,Moldova,0.88 +2000,ROM,Romania,1.092 +2000,RUS,Russia,0.196 +2000,EST,Estonia,1.122 +2000,LAT,Latvia,1.172 +2000,LIT,Lithuania,1.156 +2000,UKR,Ukraine,0.386 +2000,BLR,Belarus,-0.412 +2000,ARM,Armenia,0.235 +2000,GRG,Georgia,0.825 +2000,AZE,Azerbaijan,0.027 +2000,FIN,Finland,1.138 +2000,SWD,Sweden,0.985 +2000,NOR,Norway,1.112 +2000,DEN,Denmark,1.157 +2000,ICE,Iceland,1.165 +2000,CAP,Cape Verde,-0.556 +2000,STP,Sao Tome and Principe,-0.045 +2000,EQG,Equatorial Guinea,-0.387 +2000,GAM,Gambia,-0.722 +2000,MLI,Mali,-0.764 +2000,SEN,Senegal,-0.41 +2000,BEN,Benin,-0.767 +2000,MAA,Mauritania,-0.469 +2000,NIR,Niger,-0.001 +2000,CDI,Ivory Coast,-0.624 +2000,GUI,Guinea,-0.629 +2000,BFO,Burkina Faso,-0.819 +2000,SIE,Sierra Leone,-0.514 +2000,GHA,Ghana,-0.808 +2000,TOG,Togo,-0.732 +2000,CAO,Cameroon,-0.689 +2000,NIG,Nigeria,-0.76 +2000,GAB,Gabon,-0.688 +2000,CHA,Chad,-0.998 +2000,CON,Congo,-0.784 +2000,DRC,Democratic Republic of the Congo,-1.166 +2000,UGA,Uganda,-0.72 +2000,KEN,Kenya,-0.529 +2000,TAZ,Tanzania,-1.054 +2000,BUI,Burundi,-0.454 +2000,RWA,Rwanda,-0.436 +2000,DJI,Djibouti,-0.658 +2000,ETH,Ethiopia,-0.409 +2000,ERI,Eritrea,-0.552 +2000,ANG,Angola,-0.452 +2000,MZM,Mozambique,-0.714 +2000,ZAM,Zambia,-0.517 +2000,ZIM,Zimbabwe,-0.793 +2000,MAW,Malawi,-0.485 +2000,SAF,South Africa,0.013 +2000,NAM,Namibia,-0.719 +2000,LES,Lesotho,-0.63 +2000,BOT,Botswana,-0.573 +2000,SWA,Swaziland,-0.485 +2000,MAG,Madagascar,-0.669 +2000,COM,Comoros,-0.702 +2000,MAS,Mauritius,-0.375 +2000,MOR,Morocco,-0.597 +2000,ALG,Algeria,-1.073 +2000,TUN,Tunisia,-0.963 +2000,LIB,Libya,-1.702 +2000,SUD,Sudan,-1.541 +2000,IRN,Iran,-1.533 +2000,TUR,Turkey,0.642 +2000,EGY,Egypt,-1.127 +2000,SYR,Syria,-1.67 +2000,LEB,Lebanon,-1.123 +2000,JOR,Jordan,-1.022 +2000,ISR,Israel,2.184 +2000,SAU,Saudi Arabia,-0.913 +2000,YAR,Yemen Arab Republic,-0.758 +2000,KUW,Kuwait,-0.622 +2000,BAH,Bahrain,-0.847 +2000,QAT,Qatar,-1.055 +2000,UAE,United Arab Emirates,-0.643 +2000,OMA,Oman,-1.038 +2000,AFG,Afghanistan,-0.79 +2000,TKM,Turkmenistan,0.039 +2000,TAJ,Tajikistan,0.089 +2000,KYR,Kyrgyzstan,0.028 +2000,UZB,Uzbekistan,0.526 +2000,KZK,Kazakhstan,0.358 +2000,CHN,China,-0.738 +2000,MON,Mongolia,-0.259 +2000,PRK,North Korea,-1.636 +2000,ROK,South Korea,0.58 +2000,JPN,Japan,0.705 +2000,IND,India,-0.702 +2000,BHU,Bhutan,-0.848 +2000,PAK,Pakistan,-0.841 +2000,BNG,Bangladesh,-0.839 +2000,MYA,Myanmar,-1.392 +2000,SRI,Sri Lanka,-0.857 +2000,MAD,Maldives,-0.542 +2000,NEP,Nepal,-0.709 +2000,THI,Thailand,-0.374 +2000,CAM,Cambodia,-0.687 +2000,LAO,Laos,-1.21 +2000,DRV,Vietnam,-1.401 +2000,MAL,Malaysia,-0.724 +2000,SIN,Singapore,-0.252 +2000,BRU,Brunei,-0.866 +2000,PHI,Philippines,-0.606 +2000,INS,Indonesia,-1.011 +2000,AUL,Australia,0.892 +2000,PNG,Papua New Guinea,-0.521 +2000,NEW,New Zealand,0.753 +2000,VAN,Vanuatu,-0.053 +2000,SOL,Solomon Islands,-0.002 +2000,NAU,Nauru,0.207 +2000,FIJ,Fiji,-0.262 +2000,TON,Tonga,0.369 +2000,NAU,Nauru,0.202 +2000,MSI,Marshall Islands,1.291 +2000,PAL,Palau,0.56 +2000,FSM,Federated States of Micronesia,1.849 +2000,WSM,Samoa,0.307 +2001,USA,United States of America,2.576 +2001,CAN,Canada,1.184 +2001,BHM,Bahamas,-0.257 +2001,CUB,Cuba,-1.336 +2001,HAI,Haiti,-0.433 +2001,DOM,Dominican Republic,-0.361 +2001,JAM,Jamaica,-0.364 +2001,TRI,Trinidad and Tobago,-0.293 +2001,BAR,Barbados,-0.377 +2001,DMA,Dominica,-0.387 +2001,GRN,Grenada,-0.308 +2001,SLU,St. Lucia,-0.752 +2001,SVG,St. Vincent and the Grenadines,-0.279 +2001,AAB,Antigua & Barbuda,-0.65 +2001,SKN,St. Kitts and Nevis,-0.565 +2001,MEX,Mexico,-0.529 +2001,BLZ,Belize,-0.336 +2001,GUA,Guatemala,-0.039 +2001,HON,Honduras,-0.316 +2001,SAL,El Salvador,-0.323 +2001,NIC,Nicaragua,0.187 +2001,COS,Costa Rica,-0.281 +2001,PAN,Panama,-0.312 +2001,COL,Colombia,-0.347 +2001,VEN,Venezuela,-0.52 +2001,GUY,Guyana,-0.493 +2001,SUR,Suriname,-0.453 +2001,ECU,Ecuador,-0.394 +2001,PER,Peru,-0.024 +2001,BRA,Brazil,-0.021 +2001,BOL,Bolivia,-0.208 +2001,PAR,Paraguay,0.111 +2001,CHL,Chile,0.122 +2001,ARG,Argentina,0.3 +2001,URU,Uruguay,0.006 +2001,UKG,United Kingdom,1.626 +2001,IRE,Ireland,0.853 +2001,NTH,Netherlands,1.201 +2001,BEL,Belgium,1.173 +2001,LUX,Luxembourg,1.176 +2001,FRN,France,1.471 +2001,MNC,Monaco,1.129 +2001,LIE,Liechtenstein,0.995 +2001,SPN,Spain,1.051 +2001,AND,Andorra,1.038 +2001,POR,Portugal,1.03 +2001,GFR,German Federal Republic,1.2 +2001,POL,Poland,1.135 +2001,AUS,Austria,0.988 +2001,HUN,Hungary,1.202 +2001,CZR,Czech Republic,1.126 +2001,SLO,Slovakia,0.999 +2001,ITA,Italy,1.082 +2001,SNM,San Marino,0.913 +2001,MLT,Malta,0.674 +2001,ALB,Albania,1.258 +2001,MAC,Macedonia,0.959 +2001,CRO,Croatia,0.849 +2001,YUG,Yugoslavia,0.847 +2001,BOS,Bosnia and Herzegovina,0.925 +2001,SLV,Slovenia,1.109 +2001,GRC,Greece,1.085 +2001,CYP,Cyprus,0.624 +2001,BUL,Bulgaria,1.077 +2001,MLD,Moldova,0.87 +2001,ROM,Romania,1.087 +2001,RUS,Russia,0.167 +2001,EST,Estonia,1.104 +2001,LAT,Latvia,1.151 +2001,LIT,Lithuania,1.097 +2001,UKR,Ukraine,0.433 +2001,BLR,Belarus,-0.181 +2001,ARM,Armenia,0.181 +2001,GRG,Georgia,0.82 +2001,AZE,Azerbaijan,-0.038 +2001,FIN,Finland,1.112 +2001,SWD,Sweden,0.997 +2001,NOR,Norway,1.159 +2001,DEN,Denmark,1.219 +2001,ICE,Iceland,1.133 +2001,CAP,Cape Verde,-0.658 +2001,EQG,Equatorial Guinea,-0.6 +2001,GAM,Gambia,-0.702 +2001,MLI,Mali,-0.811 +2001,SEN,Senegal,-0.518 +2001,BEN,Benin,-0.586 +2001,MAA,Mauritania,-0.839 +2001,CDI,Ivory Coast,-0.666 +2001,GUI,Guinea,-0.479 +2001,BFO,Burkina Faso,-0.838 +2001,SIE,Sierra Leone,-0.554 +2001,GHA,Ghana,-0.709 +2001,TOG,Togo,-0.791 +2001,CAO,Cameroon,-0.672 +2001,NIG,Nigeria,-0.676 +2001,GAB,Gabon,-0.62 +2001,CHA,Chad,-1.038 +2001,CON,Congo,-0.855 +2001,DRC,Democratic Republic of the Congo,-1.176 +2001,UGA,Uganda,-0.698 +2001,KEN,Kenya,-0.527 +2001,TAZ,Tanzania,-0.973 +2001,BUI,Burundi,-0.595 +2001,RWA,Rwanda,-0.644 +2001,DJI,Djibouti,-0.895 +2001,ETH,Ethiopia,-0.499 +2001,ERI,Eritrea,-0.599 +2001,ANG,Angola,-0.352 +2001,MZM,Mozambique,-0.736 +2001,ZAM,Zambia,-0.579 +2001,ZIM,Zimbabwe,-0.764 +2001,MAW,Malawi,-0.335 +2001,SAF,South Africa,0.031 +2001,NAM,Namibia,-0.685 +2001,LES,Lesotho,-0.651 +2001,BOT,Botswana,-0.551 +2001,SWA,Swaziland,-0.549 +2001,MAG,Madagascar,-0.528 +2001,COM,Comoros,-0.832 +2001,MAS,Mauritius,-0.279 +2001,SEY,Seychelles,-0.208 +2001,MOR,Morocco,-0.795 +2001,ALG,Algeria,-1.13 +2001,TUN,Tunisia,-1.064 +2001,LIB,Libya,-1.703 +2001,SUD,Sudan,-1.517 +2001,IRN,Iran,-1.537 +2001,TUR,Turkey,0.617 +2001,EGY,Egypt,-1.161 +2001,SYR,Syria,-1.44 +2001,LEB,Lebanon,-1.166 +2001,JOR,Jordan,-1.103 +2001,ISR,Israel,2.288 +2001,SAU,Saudi Arabia,-0.949 +2001,YAR,Yemen Arab Republic,-0.876 +2001,KUW,Kuwait,-0.764 +2001,BAH,Bahrain,-0.924 +2001,QAT,Qatar,-1.106 +2001,UAE,United Arab Emirates,-0.77 +2001,OMA,Oman,-1.066 +2001,AFG,Afghanistan,-0.839 +2001,TKM,Turkmenistan,-0.009 +2001,KZK,Kazakhstan,0.19 +2001,CHN,China,-0.674 +2001,MON,Mongolia,-0.309 +2001,PRK,North Korea,-1.621 +2001,ROK,South Korea,0.589 +2001,JPN,Japan,0.736 +2001,IND,India,-0.656 +2001,BHU,Bhutan,-0.793 +2001,PAK,Pakistan,-0.839 +2001,BNG,Bangladesh,-0.781 +2001,MYA,Myanmar,-1.411 +2001,SRI,Sri Lanka,-0.86 +2001,MAD,Maldives,-0.536 +2001,NEP,Nepal,-0.731 +2001,THI,Thailand,-0.453 +2001,CAM,Cambodia,-0.745 +2001,LAO,Laos,-1.258 +2001,DRV,Vietnam,-1.429 +2001,MAL,Malaysia,-0.846 +2001,SIN,Singapore,-0.297 +2001,BRU,Brunei,-0.954 +2001,PHI,Philippines,-0.479 +2001,INS,Indonesia,-0.996 +2001,AUL,Australia,1.016 +2001,PNG,Papua New Guinea,-0.106 +2001,NEW,New Zealand,0.817 +2001,VAN,Vanuatu,0.088 +2001,SOL,Solomon Islands,-0.027 +2001,NAU,Nauru,0.256 +2001,TUV,Tuvalu,1.275 +2001,FIJ,Fiji,-0.231 +2001,TON,Tonga,0.27 +2001,NAU,Nauru,0.296 +2001,MSI,Marshall Islands,2.073 +2001,PAL,Palau,0.519 +2001,FSM,Federated States of Micronesia,1.981 +2001,WSM,Samoa,0.268 +2002,USA,United States of America,2.628 +2002,CAN,Canada,1.129 +2002,BHM,Bahamas,-0.328 +2002,CUB,Cuba,-1.159 +2002,HAI,Haiti,-0.662 +2002,DOM,Dominican Republic,-0.369 +2002,JAM,Jamaica,-0.443 +2002,TRI,Trinidad and Tobago,-0.388 +2002,BAR,Barbados,-0.336 +2002,DMA,Dominica,-0.559 +2002,GRN,Grenada,-0.42 +2002,SLU,St. Lucia,-0.839 +2002,SVG,St. Vincent and the Grenadines,0.078 +2002,AAB,Antigua & Barbuda,-0.511 +2002,SKN,St. Kitts and Nevis,-0.59 +2002,MEX,Mexico,-0.383 +2002,BLZ,Belize,-0.404 +2002,GUA,Guatemala,0.004 +2002,HON,Honduras,-0.222 +2002,SAL,El Salvador,-0.341 +2002,NIC,Nicaragua,-0.166 +2002,COS,Costa Rica,-0.216 +2002,PAN,Panama,-0.263 +2002,COL,Colombia,-0.271 +2002,VEN,Venezuela,-0.484 +2002,GUY,Guyana,-0.488 +2002,SUR,Suriname,-0.609 +2002,ECU,Ecuador,-0.319 +2002,PER,Peru,0.01 +2002,BRA,Brazil,-0.04 +2002,BOL,Bolivia,-0.207 +2002,PAR,Paraguay,-0.063 +2002,CHL,Chile,-0.073 +2002,ARG,Argentina,0.289 +2002,URU,Uruguay,0.028 +2002,UKG,United Kingdom,1.674 +2002,IRE,Ireland,0.81 +2002,NTH,Netherlands,1.236 +2002,BEL,Belgium,1.136 +2002,LUX,Luxembourg,1.093 +2002,FRN,France,1.473 +2002,MNC,Monaco,1.081 +2002,LIE,Liechtenstein,0.881 +2002,SWZ,Switzerland,0.966 +2002,SPN,Spain,1.062 +2002,AND,Andorra,0.905 +2002,POR,Portugal,1.077 +2002,GFR,German Federal Republic,1.152 +2002,POL,Poland,1.076 +2002,AUS,Austria,0.89 +2002,HUN,Hungary,1.144 +2002,CZR,Czech Republic,1.045 +2002,SLO,Slovakia,0.962 +2002,ITA,Italy,1.138 +2002,SNM,San Marino,0.858 +2002,MLT,Malta,0.59 +2002,ALB,Albania,1.096 +2002,MAC,Macedonia,0.92 +2002,CRO,Croatia,0.886 +2002,YUG,Yugoslavia,0.899 +2002,BOS,Bosnia and Herzegovina,0.974 +2002,SLV,Slovenia,1.072 +2002,GRC,Greece,0.987 +2002,CYP,Cyprus,0.577 +2002,BUL,Bulgaria,1.112 +2002,MLD,Moldova,0.847 +2002,ROM,Romania,1.085 +2002,RUS,Russia,0.173 +2002,EST,Estonia,1.04 +2002,LAT,Latvia,1.075 +2002,LIT,Lithuania,1.062 +2002,UKR,Ukraine,0.387 +2002,BLR,Belarus,-0.159 +2002,ARM,Armenia,0.195 +2002,GRG,Georgia,0.783 +2002,AZE,Azerbaijan,-0.082 +2002,FIN,Finland,1.042 +2002,SWD,Sweden,0.887 +2002,NOR,Norway,1.1 +2002,DEN,Denmark,1.124 +2002,ICE,Iceland,1.091 +2002,CAP,Cape Verde,-0.649 +2002,STP,Sao Tome and Principe,-0.491 +2002,GNB,Guinea-Bissau,-0.033 +2002,EQG,Equatorial Guinea,-0.687 +2002,GAM,Gambia,-0.848 +2002,MLI,Mali,-0.876 +2002,SEN,Senegal,-0.508 +2002,BEN,Benin,-0.663 +2002,MAA,Mauritania,-0.901 +2002,CDI,Ivory Coast,-0.628 +2002,GUI,Guinea,-0.676 +2002,BFO,Burkina Faso,-0.865 +2002,SIE,Sierra Leone,-0.73 +2002,GHA,Ghana,-0.7 +2002,TOG,Togo,-0.888 +2002,CAO,Cameroon,-0.513 +2002,NIG,Nigeria,-0.754 +2002,GAB,Gabon,-0.63 +2002,CHA,Chad,-1.033 +2002,CON,Congo,-0.853 +2002,DRC,Democratic Republic of the Congo,-1.155 +2002,UGA,Uganda,-0.773 +2002,KEN,Kenya,-0.57 +2002,TAZ,Tanzania,-0.851 +2002,BUI,Burundi,-0.723 +2002,RWA,Rwanda,-0.433 +2002,SOM,Somalia,-0.413 +2002,DJI,Djibouti,-0.924 +2002,ETH,Ethiopia,-0.37 +2002,ERI,Eritrea,-0.643 +2002,ANG,Angola,-0.575 +2002,MZM,Mozambique,-0.688 +2002,ZAM,Zambia,-0.618 +2002,ZIM,Zimbabwe,-0.875 +2002,MAW,Malawi,-0.444 +2002,SAF,South Africa,-0.278 +2002,NAM,Namibia,-0.646 +2002,LES,Lesotho,-0.577 +2002,BOT,Botswana,-0.531 +2002,SWA,Swaziland,-0.607 +2002,MAG,Madagascar,-0.284 +2002,COM,Comoros,-0.904 +2002,MAS,Mauritius,-0.283 +2002,SEY,Seychelles,-0.354 +2002,MOR,Morocco,-0.931 +2002,ALG,Algeria,-1.13 +2002,TUN,Tunisia,-1.087 +2002,LIB,Libya,-1.685 +2002,SUD,Sudan,-1.566 +2002,IRN,Iran,-1.461 +2002,TUR,Turkey,0.686 +2002,EGY,Egypt,-1.212 +2002,SYR,Syria,-1.461 +2002,LEB,Lebanon,-1.121 +2002,JOR,Jordan,-1.138 +2002,ISR,Israel,2.289 +2002,SAU,Saudi Arabia,-1.074 +2002,YAR,Yemen Arab Republic,-0.995 +2002,KUW,Kuwait,-0.756 +2002,BAH,Bahrain,-1.031 +2002,QAT,Qatar,-1.168 +2002,UAE,United Arab Emirates,-0.949 +2002,OMA,Oman,-1.144 +2002,AFG,Afghanistan,-0.761 +2002,TKM,Turkmenistan,0.057 +2002,TAJ,Tajikistan,-0.006 +2002,KYR,Kyrgyzstan,0.027 +2002,UZB,Uzbekistan,0.393 +2002,KZK,Kazakhstan,0.141 +2002,CHN,China,-0.727 +2002,MON,Mongolia,-0.398 +2002,PRK,North Korea,-1.565 +2002,ROK,South Korea,0.733 +2002,JPN,Japan,0.736 +2002,IND,India,-0.305 +2002,BHU,Bhutan,-0.655 +2002,PAK,Pakistan,-0.581 +2002,BNG,Bangladesh,-0.878 +2002,MYA,Myanmar,-1.368 +2002,SRI,Sri Lanka,-0.815 +2002,MAD,Maldives,-0.521 +2002,NEP,Nepal,-0.766 +2002,THI,Thailand,-0.405 +2002,CAM,Cambodia,-0.75 +2002,LAO,Laos,-1.202 +2002,DRV,Vietnam,-1.416 +2002,MAL,Malaysia,-0.804 +2002,SIN,Singapore,-0.209 +2002,BRU,Brunei,-0.865 +2002,PHI,Philippines,-0.487 +2002,INS,Indonesia,-0.992 +2002,ETM,East Timor,-0.23 +2002,AUL,Australia,1.123 +2002,PNG,Papua New Guinea,0.006 +2002,NEW,New Zealand,0.727 +2002,VAN,Vanuatu,0.275 +2002,SOL,Solomon Islands,0.197 +2002,NAU,Nauru,0.142 +2002,TUV,Tuvalu,0.498 +2002,FIJ,Fiji,0.058 +2002,TON,Tonga,0.219 +2002,NAU,Nauru,0.374 +2002,MSI,Marshall Islands,2.447 +2002,PAL,Palau,1.897 +2002,FSM,Federated States of Micronesia,2.224 +2002,WSM,Samoa,0.23 +2003,USA,United States of America,2.796 +2003,CAN,Canada,1.127 +2003,BHM,Bahamas,-0.32 +2003,CUB,Cuba,-1.306 +2003,HAI,Haiti,-0.723 +2003,DOM,Dominican Republic,-0.091 +2003,JAM,Jamaica,-0.525 +2003,TRI,Trinidad and Tobago,-0.511 +2003,BAR,Barbados,-0.451 +2003,DMA,Dominica,-0.603 +2003,GRN,Grenada,-0.556 +2003,SLU,St. Lucia,-0.817 +2003,SVG,St. Vincent and the Grenadines,-0.016 +2003,AAB,Antigua & Barbuda,-0.562 +2003,SKN,St. Kitts and Nevis,-0.573 +2003,MEX,Mexico,-0.355 +2003,BLZ,Belize,-0.529 +2003,GUA,Guatemala,0.075 +2003,HON,Honduras,0.149 +2003,SAL,El Salvador,-0.095 +2003,NIC,Nicaragua,-0.082 +2003,COS,Costa Rica,-0.021 +2003,PAN,Panama,-0.351 +2003,COL,Colombia,-0.341 +2003,VEN,Venezuela,-0.535 +2003,GUY,Guyana,-0.596 +2003,SUR,Suriname,-0.577 +2003,ECU,Ecuador,-0.42 +2003,PER,Peru,-0.005 +2003,BRA,Brazil,-0.078 +2003,BOL,Bolivia,-0.219 +2003,PAR,Paraguay,-0.103 +2003,CHL,Chile,-0.06 +2003,ARG,Argentina,0.254 +2003,URU,Uruguay,0.012 +2003,UKG,United Kingdom,1.67 +2003,IRE,Ireland,0.74 +2003,NTH,Netherlands,1.112 +2003,BEL,Belgium,1.162 +2003,LUX,Luxembourg,1.157 +2003,FRN,France,1.434 +2003,MNC,Monaco,1.049 +2003,LIE,Liechtenstein,0.903 +2003,SWZ,Switzerland,1.001 +2003,SPN,Spain,1.083 +2003,AND,Andorra,0.884 +2003,POR,Portugal,1.047 +2003,GFR,German Federal Republic,1.225 +2003,POL,Poland,1.181 +2003,AUS,Austria,0.895 +2003,HUN,Hungary,1.111 +2003,CZR,Czech Republic,1.129 +2003,SLO,Slovakia,1.005 +2003,ITA,Italy,1.096 +2003,SNM,San Marino,0.858 +2003,MLT,Malta,0.671 +2003,ALB,Albania,1.214 +2003,MAC,Macedonia,0.956 +2003,CRO,Croatia,0.964 +2003,YUG,Yugoslavia,0.928 +2003,BOS,Bosnia and Herzegovina,0.887 +2003,SLV,Slovenia,1.006 +2003,GRC,Greece,0.994 +2003,CYP,Cyprus,0.647 +2003,BUL,Bulgaria,1.156 +2003,MLD,Moldova,0.7 +2003,ROM,Romania,0.979 +2003,RUS,Russia,0.224 +2003,EST,Estonia,1.08 +2003,LAT,Latvia,1.083 +2003,LIT,Lithuania,1.146 +2003,UKR,Ukraine,0.37 +2003,BLR,Belarus,-0.123 +2003,ARM,Armenia,0.24 +2003,GRG,Georgia,0.799 +2003,AZE,Azerbaijan,-0.114 +2003,FIN,Finland,1.057 +2003,SWD,Sweden,0.914 +2003,NOR,Norway,1.124 +2003,DEN,Denmark,1.086 +2003,ICE,Iceland,1.118 +2003,CAP,Cape Verde,-0.676 +2003,STP,Sao Tome and Principe,-0.496 +2003,GNB,Guinea-Bissau,-0.528 +2003,EQG,Equatorial Guinea,-0.475 +2003,GAM,Gambia,-0.84 +2003,MLI,Mali,-0.798 +2003,SEN,Senegal,-0.698 +2003,BEN,Benin,-0.659 +2003,MAA,Mauritania,-1.071 +2003,NIR,Niger,-0.644 +2003,CDI,Ivory Coast,-0.717 +2003,GUI,Guinea,-0.703 +2003,BFO,Burkina Faso,-0.816 +2003,SIE,Sierra Leone,-0.542 +2003,GHA,Ghana,-0.636 +2003,TOG,Togo,-0.871 +2003,CAO,Cameroon,-0.204 +2003,NIG,Nigeria,-0.669 +2003,GAB,Gabon,-0.746 +2003,CEN,Central African Republic,-0.356 +2003,CHA,Chad,-1.033 +2003,CON,Congo,-0.781 +2003,DRC,Democratic Republic of the Congo,-1.094 +2003,UGA,Uganda,-0.49 +2003,KEN,Kenya,-0.677 +2003,TAZ,Tanzania,-0.709 +2003,BUI,Burundi,-0.544 +2003,RWA,Rwanda,0.015 +2003,SOM,Somalia,-0.736 +2003,DJI,Djibouti,-0.998 +2003,ETH,Ethiopia,-0.419 +2003,ERI,Eritrea,-0.677 +2003,ANG,Angola,-0.417 +2003,MZM,Mozambique,-0.702 +2003,ZAM,Zambia,-0.678 +2003,ZIM,Zimbabwe,-0.918 +2003,MAW,Malawi,-0.463 +2003,SAF,South Africa,-0.358 +2003,NAM,Namibia,-0.666 +2003,LES,Lesotho,-0.661 +2003,BOT,Botswana,-0.511 +2003,SWA,Swaziland,-0.594 +2003,MAG,Madagascar,-0.492 +2003,COM,Comoros,-1.021 +2003,MAS,Mauritius,-0.323 +2003,SEY,Seychelles,-0.502 +2003,MOR,Morocco,-1.008 +2003,ALG,Algeria,-1.076 +2003,TUN,Tunisia,-1.176 +2003,LIB,Libya,-1.633 +2003,SUD,Sudan,-1.246 +2003,IRN,Iran,-1.357 +2003,TUR,Turkey,0.589 +2003,EGY,Egypt,-1.202 +2003,SYR,Syria,-1.273 +2003,LEB,Lebanon,-1.21 +2003,JOR,Jordan,-1.22 +2003,ISR,Israel,2.31 +2003,SAU,Saudi Arabia,-1.198 +2003,YAR,Yemen Arab Republic,-1.13 +2003,KUW,Kuwait,-0.99 +2003,BAH,Bahrain,-1.148 +2003,QAT,Qatar,-1.236 +2003,UAE,United Arab Emirates,-1.037 +2003,OMA,Oman,-1.223 +2003,AFG,Afghanistan,-0.833 +2003,TKM,Turkmenistan,-0.567 +2003,TAJ,Tajikistan,0.035 +2003,KYR,Kyrgyzstan,0.031 +2003,UZB,Uzbekistan,0.4 +2003,KZK,Kazakhstan,0.121 +2003,CHN,China,-0.876 +2003,MON,Mongolia,-0.409 +2003,PRK,North Korea,-1.404 +2003,ROK,South Korea,0.722 +2003,JPN,Japan,0.713 +2003,IND,India,-0.198 +2003,BHU,Bhutan,-0.346 +2003,PAK,Pakistan,-0.484 +2003,BNG,Bangladesh,-0.917 +2003,MYA,Myanmar,-1.446 +2003,SRI,Sri Lanka,-0.697 +2003,MAD,Maldives,-0.627 +2003,NEP,Nepal,-0.605 +2003,THI,Thailand,-0.299 +2003,CAM,Cambodia,-0.701 +2003,LAO,Laos,-0.949 +2003,DRV,Vietnam,-1.463 +2003,MAL,Malaysia,-0.916 +2003,SIN,Singapore,-0.209 +2003,BRU,Brunei,-1.04 +2003,PHI,Philippines,-0.514 +2003,INS,Indonesia,-0.941 +2003,ETM,East Timor,-0.208 +2003,AUL,Australia,1.201 +2003,PNG,Papua New Guinea,0.091 +2003,NEW,New Zealand,0.711 +2003,VAN,Vanuatu,0.017 +2003,SOL,Solomon Islands,0.197 +2003,NAU,Nauru,0.133 +2003,TUV,Tuvalu,0.245 +2003,FIJ,Fiji,-0.091 +2003,TON,Tonga,0.233 +2003,NAU,Nauru,0.459 +2003,MSI,Marshall Islands,1.945 +2003,PAL,Palau,2.284 +2003,FSM,Federated States of Micronesia,2.192 +2003,WSM,Samoa,0.215 +2004,USA,United States of America,2.771 +2004,CAN,Canada,1.236 +2004,BHM,Bahamas,-0.46 +2004,CUB,Cuba,-1.283 +2004,HAI,Haiti,0.235 +2004,DOM,Dominican Republic,-0.062 +2004,JAM,Jamaica,-0.594 +2004,TRI,Trinidad and Tobago,-0.553 +2004,BAR,Barbados,-0.553 +2004,DMA,Dominica,-0.631 +2004,GRN,Grenada,0.078 +2004,SLU,St. Lucia,-0.733 +2004,SVG,St. Vincent and the Grenadines,-0.26 +2004,AAB,Antigua & Barbuda,-0.528 +2004,SKN,St. Kitts and Nevis,-0.585 +2004,MEX,Mexico,-0.235 +2004,BLZ,Belize,-0.549 +2004,GUA,Guatemala,-0.047 +2004,HON,Honduras,0.005 +2004,SAL,El Salvador,-0.166 +2004,NIC,Nicaragua,-0.092 +2004,COS,Costa Rica,-0.079 +2004,PAN,Panama,-0.326 +2004,COL,Colombia,-0.455 +2004,VEN,Venezuela,-0.795 +2004,GUY,Guyana,-0.632 +2004,SUR,Suriname,-0.62 +2004,ECU,Ecuador,-0.445 +2004,PER,Peru,0.02 +2004,BRA,Brazil,-0.115 +2004,BOL,Bolivia,-0.224 +2004,PAR,Paraguay,-0.062 +2004,CHL,Chile,0.057 +2004,ARG,Argentina,0.155 +2004,URU,Uruguay,-0.02 +2004,UKG,United Kingdom,1.635 +2004,IRE,Ireland,0.829 +2004,NTH,Netherlands,1.011 +2004,BEL,Belgium,1.072 +2004,LUX,Luxembourg,1.021 +2004,FRN,France,1.455 +2004,MNC,Monaco,0.99 +2004,LIE,Liechtenstein,0.88 +2004,SWZ,Switzerland,0.898 +2004,SPN,Spain,1.018 +2004,AND,Andorra,0.902 +2004,POR,Portugal,0.994 +2004,GFR,German Federal Republic,1.084 +2004,POL,Poland,1.125 +2004,AUS,Austria,0.923 +2004,HUN,Hungary,1.035 +2004,CZR,Czech Republic,1.052 +2004,SLO,Slovakia,0.976 +2004,ITA,Italy,1.001 +2004,SNM,San Marino,0.845 +2004,MLT,Malta,0.703 +2004,ALB,Albania,1.231 +2004,MAC,Macedonia,0.943 +2004,CRO,Croatia,0.939 +2004,YUG,Yugoslavia,0.929 +2004,BOS,Bosnia and Herzegovina,0.925 +2004,SLV,Slovenia,1.011 +2004,GRC,Greece,0.91 +2004,CYP,Cyprus,0.751 +2004,BUL,Bulgaria,1.05 +2004,MLD,Moldova,0.723 +2004,ROM,Romania,1.009 +2004,RUS,Russia,0.104 +2004,EST,Estonia,0.998 +2004,LAT,Latvia,1.16 +2004,LIT,Lithuania,1.021 +2004,UKR,Ukraine,0.405 +2004,BLR,Belarus,-0.239 +2004,ARM,Armenia,0.222 +2004,GRG,Georgia,0.83 +2004,AZE,Azerbaijan,-0.112 +2004,FIN,Finland,0.997 +2004,SWD,Sweden,0.924 +2004,NOR,Norway,0.949 +2004,DEN,Denmark,1.054 +2004,ICE,Iceland,1.051 +2004,CAP,Cape Verde,-0.649 +2004,STP,Sao Tome and Principe,-0.564 +2004,GNB,Guinea-Bissau,-0.468 +2004,EQG,Equatorial Guinea,-0.232 +2004,GAM,Gambia,-0.858 +2004,MLI,Mali,-0.739 +2004,SEN,Senegal,-0.762 +2004,BEN,Benin,-0.509 +2004,MAA,Mauritania,-1.052 +2004,NIR,Niger,-0.734 +2004,CDI,Ivory Coast,-0.343 +2004,GUI,Guinea,-0.708 +2004,BFO,Burkina Faso,-0.693 +2004,LBR,Liberia,-0.31 +2004,SIE,Sierra Leone,-0.579 +2004,GHA,Ghana,-0.621 +2004,TOG,Togo,-0.792 +2004,CAO,Cameroon,0.006 +2004,NIG,Nigeria,-0.781 +2004,GAB,Gabon,-0.722 +2004,CEN,Central African Republic,-0.448 +2004,CHA,Chad,-1.067 +2004,CON,Congo,-0.793 +2004,DRC,Democratic Republic of the Congo,-0.889 +2004,UGA,Uganda,-0.306 +2004,KEN,Kenya,-0.324 +2004,TAZ,Tanzania,-0.737 +2004,BUI,Burundi,-0.295 +2004,RWA,Rwanda,-0.435 +2004,SOM,Somalia,-0.802 +2004,DJI,Djibouti,-1.004 +2004,ETH,Ethiopia,-0.502 +2004,ERI,Eritrea,-0.652 +2004,ANG,Angola,-0.51 +2004,MZM,Mozambique,-0.669 +2004,ZAM,Zambia,-0.66 +2004,ZIM,Zimbabwe,-1.074 +2004,MAW,Malawi,-0.107 +2004,SAF,South Africa,-0.444 +2004,NAM,Namibia,-0.654 +2004,LES,Lesotho,-0.657 +2004,BOT,Botswana,-0.582 +2004,SWA,Swaziland,-0.577 +2004,MAG,Madagascar,-0.572 +2004,COM,Comoros,-1.021 +2004,MAS,Mauritius,-0.447 +2004,SEY,Seychelles,-0.565 +2004,MOR,Morocco,-1.011 +2004,ALG,Algeria,-1.08 +2004,TUN,Tunisia,-1.142 +2004,LIB,Libya,-1.523 +2004,SUD,Sudan,-1.187 +2004,IRN,Iran,-1.356 +2004,TUR,Turkey,0.608 +2004,IRQ,Iraq,-0.465 +2004,EGY,Egypt,-1.297 +2004,SYR,Syria,-1.011 +2004,LEB,Lebanon,-1.19 +2004,JOR,Jordan,-0.912 +2004,ISR,Israel,2.402 +2004,SAU,Saudi Arabia,-1.234 +2004,YAR,Yemen Arab Republic,-1.148 +2004,KUW,Kuwait,-1.003 +2004,BAH,Bahrain,-1.16 +2004,QAT,Qatar,-1.142 +2004,UAE,United Arab Emirates,-1.08 +2004,OMA,Oman,-1.166 +2004,AFG,Afghanistan,-0.799 +2004,TKM,Turkmenistan,-0.871 +2004,TAJ,Tajikistan,-0.07 +2004,KYR,Kyrgyzstan,-0.14 +2004,UZB,Uzbekistan,0.148 +2004,KZK,Kazakhstan,-0.045 +2004,CHN,China,-0.831 +2004,MON,Mongolia,-0.464 +2004,PRK,North Korea,-1.446 +2004,ROK,South Korea,0.721 +2004,JPN,Japan,0.751 +2004,IND,India,-0.354 +2004,BHU,Bhutan,-0.518 +2004,PAK,Pakistan,-0.593 +2004,BNG,Bangladesh,-1.025 +2004,MYA,Myanmar,-1.386 +2004,SRI,Sri Lanka,-0.703 +2004,MAD,Maldives,-0.683 +2004,NEP,Nepal,-0.667 +2004,THI,Thailand,-0.194 +2004,CAM,Cambodia,-0.68 +2004,LAO,Laos,-0.922 +2004,DRV,Vietnam,-1.497 +2004,MAL,Malaysia,-0.861 +2004,SIN,Singapore,-0.204 +2004,BRU,Brunei,-0.866 +2004,PHI,Philippines,-0.508 +2004,INS,Indonesia,-1.038 +2004,ETM,East Timor,-0.288 +2004,AUL,Australia,1.346 +2004,PNG,Papua New Guinea,0.071 +2004,NEW,New Zealand,0.728 +2004,VAN,Vanuatu,0.262 +2004,SOL,Solomon Islands,0.146 +2004,NAU,Nauru,0.221 +2004,TUV,Tuvalu,0.11 +2004,FIJ,Fiji,-0.072 +2004,TON,Tonga,0.255 +2004,NAU,Nauru,0.448 +2004,MSI,Marshall Islands,1.194 +2004,PAL,Palau,2.658 +2004,FSM,Federated States of Micronesia,2.022 +2004,WSM,Samoa,0.249 +2005,USA,United States of America,2.894 +2005,CAN,Canada,1.264 +2005,BHM,Bahamas,-0.539 +2005,CUB,Cuba,-1.37 +2005,HAI,Haiti,-0.119 +2005,DOM,Dominican Republic,-0.024 +2005,JAM,Jamaica,-0.656 +2005,TRI,Trinidad and Tobago,-0.577 +2005,BAR,Barbados,-0.641 +2005,DMA,Dominica,-0.615 +2005,GRN,Grenada,0.008 +2005,SLU,St. Lucia,-0.758 +2005,SVG,St. Vincent and the Grenadines,-0.313 +2005,AAB,Antigua & Barbuda,-0.613 +2005,SKN,St. Kitts and Nevis,-0.493 +2005,MEX,Mexico,-0.142 +2005,BLZ,Belize,-0.531 +2005,GUA,Guatemala,-0.03 +2005,HON,Honduras,0.012 +2005,SAL,El Salvador,-0.123 +2005,NIC,Nicaragua,-0.09 +2005,COS,Costa Rica,-0.067 +2005,PAN,Panama,-0.274 +2005,COL,Colombia,-0.511 +2005,VEN,Venezuela,-1.003 +2005,GUY,Guyana,-0.644 +2005,SUR,Suriname,-0.655 +2005,ECU,Ecuador,-0.306 +2005,PER,Peru,-0.083 +2005,BRA,Brazil,-0.159 +2005,BOL,Bolivia,-0.197 +2005,PAR,Paraguay,-0.118 +2005,CHL,Chile,-0.051 +2005,ARG,Argentina,0.16 +2005,URU,Uruguay,-0.09 +2005,UKG,United Kingdom,1.671 +2005,IRE,Ireland,0.811 +2005,NTH,Netherlands,1.044 +2005,BEL,Belgium,1.071 +2005,LUX,Luxembourg,1.002 +2005,FRN,France,1.535 +2005,MNC,Monaco,0.994 +2005,LIE,Liechtenstein,0.939 +2005,SWZ,Switzerland,0.937 +2005,SPN,Spain,0.939 +2005,AND,Andorra,0.848 +2005,POR,Portugal,0.917 +2005,GFR,German Federal Republic,1.013 +2005,POL,Poland,1.045 +2005,AUS,Austria,0.952 +2005,HUN,Hungary,1.021 +2005,CZR,Czech Republic,1.012 +2005,SLO,Slovakia,0.95 +2005,ITA,Italy,0.994 +2005,SNM,San Marino,0.82 +2005,MLT,Malta,0.651 +2005,ALB,Albania,1.483 +2005,MAC,Macedonia,0.935 +2005,CRO,Croatia,0.95 +2005,YUG,Yugoslavia,0.918 +2005,BOS,Bosnia and Herzegovina,0.952 +2005,SLV,Slovenia,1.024 +2005,GRC,Greece,0.948 +2005,CYP,Cyprus,0.712 +2005,BUL,Bulgaria,0.92 +2005,MLD,Moldova,0.753 +2005,ROM,Romania,0.974 +2005,RUS,Russia,0.075 +2005,EST,Estonia,0.979 +2005,LAT,Latvia,1.133 +2005,LIT,Lithuania,1.007 +2005,UKR,Ukraine,0.558 +2005,BLR,Belarus,-0.223 +2005,ARM,Armenia,0.143 +2005,GRG,Georgia,0.976 +2005,AZE,Azerbaijan,-0.203 +2005,FIN,Finland,1.002 +2005,SWD,Sweden,0.904 +2005,NOR,Norway,0.984 +2005,DEN,Denmark,1.053 +2005,ICE,Iceland,1.02 +2005,CAP,Cape Verde,-0.578 +2005,STP,Sao Tome and Principe,-0.604 +2005,GNB,Guinea-Bissau,-0.495 +2005,EQG,Equatorial Guinea,-0.24 +2005,GAM,Gambia,-1.048 +2005,MLI,Mali,-0.672 +2005,SEN,Senegal,-0.774 +2005,BEN,Benin,-0.599 +2005,MAA,Mauritania,-0.489 +2005,NIR,Niger,-0.585 +2005,CDI,Ivory Coast,-0.373 +2005,GUI,Guinea,-0.731 +2005,BFO,Burkina Faso,-0.558 +2005,LBR,Liberia,-0.392 +2005,SIE,Sierra Leone,-0.633 +2005,GHA,Ghana,-0.576 +2005,TOG,Togo,-0.762 +2005,CAO,Cameroon,-0.037 +2005,NIG,Nigeria,-0.577 +2005,GAB,Gabon,-0.772 +2005,CEN,Central African Republic,-0.326 +2005,CHA,Chad,-1.075 +2005,CON,Congo,-0.793 +2005,DRC,Democratic Republic of the Congo,-0.589 +2005,UGA,Uganda,-0.162 +2005,KEN,Kenya,-0.488 +2005,TAZ,Tanzania,-0.573 +2005,BUI,Burundi,-0.428 +2005,RWA,Rwanda,-0.551 +2005,SOM,Somalia,-0.786 +2005,DJI,Djibouti,-0.905 +2005,ETH,Ethiopia,-0.415 +2005,ERI,Eritrea,-0.648 +2005,ANG,Angola,-0.513 +2005,MZM,Mozambique,-0.674 +2005,ZAM,Zambia,-0.548 +2005,ZIM,Zimbabwe,-1.12 +2005,MAW,Malawi,-0.359 +2005,SAF,South Africa,-0.459 +2005,NAM,Namibia,-0.545 +2005,LES,Lesotho,-0.611 +2005,BOT,Botswana,-0.544 +2005,SWA,Swaziland,-0.595 +2005,MAG,Madagascar,-0.496 +2005,COM,Comoros,-1.063 +2005,MAS,Mauritius,-0.513 +2005,SEY,Seychelles,-0.561 +2005,MOR,Morocco,-1.037 +2005,ALG,Algeria,-0.985 +2005,TUN,Tunisia,-0.968 +2005,LIB,Libya,-1.433 +2005,SUD,Sudan,-1.25 +2005,IRN,Iran,-1.467 +2005,TUR,Turkey,0.647 +2005,IRQ,Iraq,-0.4 +2005,EGY,Egypt,-1.5 +2005,SYR,Syria,-1.122 +2005,LEB,Lebanon,-0.956 +2005,JOR,Jordan,-0.98 +2005,ISR,Israel,2.435 +2005,SAU,Saudi Arabia,-1.112 +2005,YAR,Yemen Arab Republic,-1.167 +2005,KUW,Kuwait,-1.093 +2005,BAH,Bahrain,-1.147 +2005,QAT,Qatar,-1.177 +2005,UAE,United Arab Emirates,-1.036 +2005,OMA,Oman,-1.213 +2005,AFG,Afghanistan,-0.826 +2005,TKM,Turkmenistan,-1.063 +2005,TAJ,Tajikistan,-0.271 +2005,KYR,Kyrgyzstan,-0.205 +2005,UZB,Uzbekistan,-0.268 +2005,KZK,Kazakhstan,-0.162 +2005,CHN,China,-0.783 +2005,MON,Mongolia,-0.48 +2005,PRK,North Korea,-1.444 +2005,ROK,South Korea,0.539 +2005,JPN,Japan,0.699 +2005,IND,India,-0.278 +2005,BHU,Bhutan,-0.518 +2005,PAK,Pakistan,-0.626 +2005,BNG,Bangladesh,-1.031 +2005,MYA,Myanmar,-1.265 +2005,SRI,Sri Lanka,-0.582 +2005,MAD,Maldives,-0.822 +2005,NEP,Nepal,-0.529 +2005,THI,Thailand,-0.331 +2005,CAM,Cambodia,-0.726 +2005,LAO,Laos,-0.813 +2005,DRV,Vietnam,-1.49 +2005,MAL,Malaysia,-1.065 +2005,SIN,Singapore,-0.316 +2005,BRU,Brunei,-0.951 +2005,PHI,Philippines,-0.503 +2005,INS,Indonesia,-1.137 +2005,ETM,East Timor,-0.235 +2005,AUL,Australia,1.425 +2005,PNG,Papua New Guinea,0.317 +2005,NEW,New Zealand,0.707 +2005,VAN,Vanuatu,0.255 +2005,SOL,Solomon Islands,0.06 +2005,NAU,Nauru,0.226 +2005,TUV,Tuvalu,0.152 +2005,FIJ,Fiji,-0.164 +2005,TON,Tonga,0.077 +2005,NAU,Nauru,0.705 +2005,MSI,Marshall Islands,1.732 +2005,PAL,Palau,2.007 +2005,FSM,Federated States of Micronesia,1.892 +2005,WSM,Samoa,0.24 +2006,USA,United States of America,2.879 +2006,CAN,Canada,1.412 +2006,BHM,Bahamas,-0.358 +2006,CUB,Cuba,-1.256 +2006,HAI,Haiti,-0.16 +2006,DOM,Dominican Republic,-0.003 +2006,JAM,Jamaica,-0.608 +2006,TRI,Trinidad and Tobago,-0.619 +2006,BAR,Barbados,-0.604 +2006,DMA,Dominica,-0.623 +2006,GRN,Grenada,-0.455 +2006,SLU,St. Lucia,-0.788 +2006,SVG,St. Vincent and the Grenadines,-0.557 +2006,AAB,Antigua & Barbuda,-0.596 +2006,SKN,St. Kitts and Nevis,-0.589 +2006,MEX,Mexico,-0.16 +2006,BLZ,Belize,-0.402 +2006,GUA,Guatemala,-0.124 +2006,HON,Honduras,-0.101 +2006,SAL,El Salvador,-0.269 +2006,NIC,Nicaragua,-0.137 +2006,COS,Costa Rica,-0.313 +2006,PAN,Panama,-0.257 +2006,COL,Colombia,-0.342 +2006,VEN,Venezuela,-1.155 +2006,GUY,Guyana,-0.603 +2006,SUR,Suriname,-0.67 +2006,ECU,Ecuador,-0.411 +2006,PER,Peru,-0.088 +2006,BRA,Brazil,-0.192 +2006,BOL,Bolivia,-0.333 +2006,PAR,Paraguay,-0.239 +2006,CHL,Chile,-0.131 +2006,ARG,Argentina,0.046 +2006,URU,Uruguay,-0.152 +2006,UKG,United Kingdom,1.533 +2006,IRE,Ireland,0.795 +2006,NTH,Netherlands,0.986 +2006,BEL,Belgium,0.973 +2006,LUX,Luxembourg,0.982 +2006,FRN,France,1.49 +2006,MNC,Monaco,0.977 +2006,LIE,Liechtenstein,0.832 +2006,SWZ,Switzerland,0.831 +2006,SPN,Spain,0.989 +2006,AND,Andorra,1.016 +2006,POR,Portugal,0.967 +2006,GFR,German Federal Republic,0.983 +2006,POL,Poland,1.005 +2006,AUS,Austria,0.835 +2006,HUN,Hungary,0.999 +2006,CZR,Czech Republic,1.082 +2006,SLO,Slovakia,0.973 +2006,ITA,Italy,0.862 +2006,SNM,San Marino,0.896 +2006,MLT,Malta,0.675 +2006,ALB,Albania,1.129 +2006,MNG,Montenegro,0.922 +2006,MAC,Macedonia,0.946 +2006,CRO,Croatia,0.943 +2006,YUG,Yugoslavia,0.937 +2006,BOS,Bosnia and Herzegovina,0.94 +2006,SLV,Slovenia,1 +2006,GRC,Greece,0.976 +2006,CYP,Cyprus,0.732 +2006,BUL,Bulgaria,0.966 +2006,MLD,Moldova,0.967 +2006,ROM,Romania,0.959 +2006,RUS,Russia,-0.071 +2006,EST,Estonia,0.952 +2006,LAT,Latvia,1.023 +2006,LIT,Lithuania,0.981 +2006,UKR,Ukraine,0.827 +2006,BLR,Belarus,-0.342 +2006,ARM,Armenia,0.098 +2006,GRG,Georgia,0.85 +2006,AZE,Azerbaijan,-0.117 +2006,FIN,Finland,0.958 +2006,SWD,Sweden,0.825 +2006,NOR,Norway,0.975 +2006,DEN,Denmark,1.001 +2006,ICE,Iceland,0.987 +2006,CAP,Cape Verde,-0.351 +2006,STP,Sao Tome and Principe,-0.648 +2006,GNB,Guinea-Bissau,-0.459 +2006,EQG,Equatorial Guinea,0.315 +2006,GAM,Gambia,-1.036 +2006,MLI,Mali,-0.693 +2006,SEN,Senegal,-0.771 +2006,BEN,Benin,-0.64 +2006,MAA,Mauritania,-0.744 +2006,NIR,Niger,-0.723 +2006,CDI,Ivory Coast,-0.177 +2006,GUI,Guinea,-0.896 +2006,BFO,Burkina Faso,-0.613 +2006,LBR,Liberia,-0.463 +2006,SIE,Sierra Leone,-0.676 +2006,GHA,Ghana,-0.538 +2006,TOG,Togo,-0.791 +2006,CAO,Cameroon,-0.026 +2006,NIG,Nigeria,-0.451 +2006,GAB,Gabon,-0.798 +2006,CEN,Central African Republic,-0.352 +2006,CHA,Chad,-0.544 +2006,CON,Congo,-0.741 +2006,DRC,Democratic Republic of the Congo,-0.914 +2006,UGA,Uganda,-0.009 +2006,KEN,Kenya,-0.42 +2006,TAZ,Tanzania,-0.294 +2006,BUI,Burundi,-0.096 +2006,RWA,Rwanda,-0.621 +2006,SOM,Somalia,-0.725 +2006,DJI,Djibouti,-0.846 +2006,ETH,Ethiopia,-0.419 +2006,ERI,Eritrea,-0.625 +2006,ANG,Angola,-0.446 +2006,MZM,Mozambique,-0.686 +2006,ZAM,Zambia,-0.668 +2006,ZIM,Zimbabwe,-1.187 +2006,MAW,Malawi,-0.065 +2006,SAF,South Africa,-0.503 +2006,NAM,Namibia,-0.644 +2006,LES,Lesotho,-0.594 +2006,BOT,Botswana,-0.43 +2006,SWA,Swaziland,-0.476 +2006,MAG,Madagascar,-0.412 +2006,COM,Comoros,-0.936 +2006,MAS,Mauritius,-0.457 +2006,SEY,Seychelles,-0.624 +2006,MOR,Morocco,-0.94 +2006,ALG,Algeria,-1.198 +2006,TUN,Tunisia,-1.074 +2006,LIB,Libya,-1.528 +2006,SUD,Sudan,-1.397 +2006,IRN,Iran,-1.523 +2006,TUR,Turkey,0.546 +2006,IRQ,Iraq,-0.665 +2006,EGY,Egypt,-1.553 +2006,SYR,Syria,-1.312 +2006,LEB,Lebanon,-0.932 +2006,JOR,Jordan,-0.735 +2006,ISR,Israel,2.454 +2006,SAU,Saudi Arabia,-0.921 +2006,YAR,Yemen Arab Republic,-1.082 +2006,KUW,Kuwait,-0.98 +2006,BAH,Bahrain,-1.07 +2006,QAT,Qatar,-1.11 +2006,UAE,United Arab Emirates,-0.932 +2006,OMA,Oman,-1.183 +2006,AFG,Afghanistan,-0.618 +2006,TKM,Turkmenistan,-0.941 +2006,TAJ,Tajikistan,-0.262 +2006,KYR,Kyrgyzstan,-0.252 +2006,UZB,Uzbekistan,-0.354 +2006,KZK,Kazakhstan,-0.21 +2006,CHN,China,-0.785 +2006,MON,Mongolia,-0.482 +2006,PRK,North Korea,-1.346 +2006,ROK,South Korea,0.629 +2006,JPN,Japan,0.793 +2006,IND,India,-0.434 +2006,BHU,Bhutan,-0.516 +2006,PAK,Pakistan,-0.581 +2006,BNG,Bangladesh,-0.973 +2006,MYA,Myanmar,-1.301 +2006,SRI,Sri Lanka,-0.697 +2006,MAD,Maldives,-0.646 +2006,NEP,Nepal,-0.452 +2006,THI,Thailand,-0.278 +2006,CAM,Cambodia,-0.816 +2006,LAO,Laos,-0.852 +2006,DRV,Vietnam,-1.523 +2006,MAL,Malaysia,-0.852 +2006,SIN,Singapore,-0.265 +2006,BRU,Brunei,-0.951 +2006,PHI,Philippines,-0.482 +2006,INS,Indonesia,-1.197 +2006,ETM,East Timor,-0.359 +2006,AUL,Australia,1.569 +2006,PNG,Papua New Guinea,0.272 +2006,NEW,New Zealand,0.677 +2006,VAN,Vanuatu,0.335 +2006,SOL,Solomon Islands,-0.053 +2006,NAU,Nauru,0.232 +2006,TUV,Tuvalu,0.369 +2006,FIJ,Fiji,0.131 +2006,TON,Tonga,0.234 +2006,NAU,Nauru,0.53 +2006,MSI,Marshall Islands,1.915 +2006,PAL,Palau,1.984 +2006,FSM,Federated States of Micronesia,1.772 +2006,WSM,Samoa,0.301 +2007,USA,United States of America,2.771 +2007,CAN,Canada,1.56 +2007,BHM,Bahamas,-0.321 +2007,CUB,Cuba,-1.322 +2007,HAI,Haiti,-0.475 +2007,DOM,Dominican Republic,-0.424 +2007,JAM,Jamaica,-0.663 +2007,TRI,Trinidad and Tobago,-0.658 +2007,BAR,Barbados,-0.665 +2007,DMA,Dominica,-0.649 +2007,GRN,Grenada,-0.412 +2007,SLU,St. Lucia,-0.731 +2007,SVG,St. Vincent and the Grenadines,-0.632 +2007,AAB,Antigua & Barbuda,-0.663 +2007,SKN,St. Kitts and Nevis,-0.662 +2007,MEX,Mexico,-0.181 +2007,BLZ,Belize,-0.45 +2007,GUA,Guatemala,-0.169 +2007,HON,Honduras,-0.222 +2007,SAL,El Salvador,-0.296 +2007,NIC,Nicaragua,-0.555 +2007,COS,Costa Rica,-0.26 +2007,PAN,Panama,-0.193 +2007,COL,Colombia,-0.242 +2007,VEN,Venezuela,-1.186 +2007,GUY,Guyana,-0.6 +2007,SUR,Suriname,-0.685 +2007,ECU,Ecuador,-0.477 +2007,PER,Peru,-0.065 +2007,BRA,Brazil,-0.22 +2007,BOL,Bolivia,-0.429 +2007,PAR,Paraguay,-0.217 +2007,CHL,Chile,-0.082 +2007,ARG,Argentina,-0.016 +2007,URU,Uruguay,-0.2 +2007,UKG,United Kingdom,1.625 +2007,IRE,Ireland,0.797 +2007,NTH,Netherlands,1.027 +2007,BEL,Belgium,0.978 +2007,LUX,Luxembourg,0.989 +2007,FRN,France,1.503 +2007,MNC,Monaco,0.96 +2007,LIE,Liechtenstein,0.775 +2007,SWZ,Switzerland,0.77 +2007,SPN,Spain,0.919 +2007,AND,Andorra,0.895 +2007,POR,Portugal,0.952 +2007,GFR,German Federal Republic,0.925 +2007,POL,Poland,1.019 +2007,AUS,Austria,0.744 +2007,HUN,Hungary,1.05 +2007,CZR,Czech Republic,1.094 +2007,SLO,Slovakia,1.002 +2007,ITA,Italy,0.893 +2007,SNM,San Marino,0.811 +2007,MLT,Malta,0.688 +2007,ALB,Albania,0.888 +2007,MNG,Montenegro,0.906 +2007,MAC,Macedonia,0.952 +2007,CRO,Croatia,0.95 +2007,YUG,Yugoslavia,0.813 +2007,BOS,Bosnia and Herzegovina,0.931 +2007,SLV,Slovenia,0.996 +2007,GRC,Greece,0.997 +2007,CYP,Cyprus,0.727 +2007,BUL,Bulgaria,0.933 +2007,MLD,Moldova,0.889 +2007,ROM,Romania,0.97 +2007,RUS,Russia,-0.013 +2007,EST,Estonia,0.962 +2007,LAT,Latvia,1.027 +2007,LIT,Lithuania,1.004 +2007,UKR,Ukraine,0.926 +2007,BLR,Belarus,-0.432 +2007,ARM,Armenia,0.091 +2007,GRG,Georgia,0.776 +2007,AZE,Azerbaijan,-0.103 +2007,FIN,Finland,0.918 +2007,SWD,Sweden,0.834 +2007,NOR,Norway,0.924 +2007,DEN,Denmark,0.988 +2007,ICE,Iceland,0.963 +2007,CAP,Cape Verde,-0.52 +2007,STP,Sao Tome and Principe,-0.634 +2007,GNB,Guinea-Bissau,-0.514 +2007,EQG,Equatorial Guinea,-0.045 +2007,GAM,Gambia,-1.095 +2007,MLI,Mali,-0.72 +2007,SEN,Senegal,-0.793 +2007,BEN,Benin,-0.594 +2007,MAA,Mauritania,-0.646 +2007,NIR,Niger,-0.765 +2007,CDI,Ivory Coast,-0.017 +2007,GUI,Guinea,-0.88 +2007,BFO,Burkina Faso,-0.657 +2007,LBR,Liberia,-0.412 +2007,SIE,Sierra Leone,-0.664 +2007,GHA,Ghana,-0.442 +2007,TOG,Togo,-0.778 +2007,CAO,Cameroon,0.041 +2007,NIG,Nigeria,-0.489 +2007,GAB,Gabon,-0.755 +2007,CEN,Central African Republic,-0.528 +2007,CHA,Chad,-0.59 +2007,CON,Congo,-0.676 +2007,DRC,Democratic Republic of the Congo,-0.517 +2007,UGA,Uganda,-0.423 +2007,KEN,Kenya,-0.443 +2007,TAZ,Tanzania,-0.421 +2007,BUI,Burundi,-0.185 +2007,RWA,Rwanda,-0.42 +2007,SOM,Somalia,-1.013 +2007,DJI,Djibouti,-0.884 +2007,ETH,Ethiopia,-0.527 +2007,ERI,Eritrea,-0.6 +2007,ANG,Angola,-0.32 +2007,MZM,Mozambique,-0.652 +2007,ZAM,Zambia,-0.711 +2007,ZIM,Zimbabwe,-1.331 +2007,MAW,Malawi,-0.267 +2007,SAF,South Africa,-0.551 +2007,NAM,Namibia,-0.579 +2007,LES,Lesotho,-0.662 +2007,BOT,Botswana,-0.513 +2007,SWA,Swaziland,-0.664 +2007,MAG,Madagascar,-0.348 +2007,COM,Comoros,-0.744 +2007,MAS,Mauritius,-0.442 +2007,SEY,Seychelles,-0.523 +2007,MOR,Morocco,-0.803 +2007,ALG,Algeria,-1.247 +2007,TUN,Tunisia,-0.763 +2007,LIB,Libya,-1.584 +2007,SUD,Sudan,-1.491 +2007,IRN,Iran,-1.559 +2007,TUR,Turkey,0.516 +2007,IRQ,Iraq,-0.68 +2007,EGY,Egypt,-1.541 +2007,SYR,Syria,-1.452 +2007,LEB,Lebanon,-0.861 +2007,JOR,Jordan,-0.773 +2007,ISR,Israel,2.306 +2007,SAU,Saudi Arabia,-0.891 +2007,YAR,Yemen Arab Republic,-1.028 +2007,KUW,Kuwait,-1.049 +2007,BAH,Bahrain,-0.959 +2007,QAT,Qatar,-1.111 +2007,UAE,United Arab Emirates,-0.855 +2007,OMA,Oman,-1.343 +2007,AFG,Afghanistan,-0.588 +2007,TKM,Turkmenistan,-0.966 +2007,TAJ,Tajikistan,-0.256 +2007,KYR,Kyrgyzstan,-0.372 +2007,UZB,Uzbekistan,-0.403 +2007,KZK,Kazakhstan,-0.121 +2007,CHN,China,-0.609 +2007,MON,Mongolia,-0.406 +2007,PRK,North Korea,-1.362 +2007,ROK,South Korea,0.58 +2007,JPN,Japan,0.605 +2007,IND,India,-0.432 +2007,BHU,Bhutan,-0.453 +2007,PAK,Pakistan,-0.553 +2007,BNG,Bangladesh,-0.989 +2007,MYA,Myanmar,-1.261 +2007,SRI,Sri Lanka,-0.659 +2007,MAD,Maldives,-0.722 +2007,NEP,Nepal,-0.483 +2007,THI,Thailand,-0.259 +2007,CAM,Cambodia,-0.702 +2007,LAO,Laos,-0.868 +2007,DRV,Vietnam,-1.398 +2007,MAL,Malaysia,-1.037 +2007,SIN,Singapore,-0.268 +2007,BRU,Brunei,-0.766 +2007,PHI,Philippines,-0.47 +2007,INS,Indonesia,-1.144 +2007,ETM,East Timor,-0.282 +2007,AUL,Australia,1.424 +2007,PNG,Papua New Guinea,-0.033 +2007,NEW,New Zealand,0.614 +2007,VAN,Vanuatu,0.31 +2007,SOL,Solomon Islands,-0.189 +2007,NAU,Nauru,0.314 +2007,TUV,Tuvalu,-0.09 +2007,FIJ,Fiji,-0.051 +2007,TON,Tonga,0.178 +2007,NAU,Nauru,0.624 +2007,MSI,Marshall Islands,1.737 +2007,PAL,Palau,1.827 +2007,FSM,Federated States of Micronesia,1.71 +2007,WSM,Samoa,0.145 +2008,USA,United States of America,2.752 +2008,CAN,Canada,1.611 +2008,BHM,Bahamas,-0.383 +2008,CUB,Cuba,-1.333 +2008,HAI,Haiti,-0.346 +2008,DOM,Dominican Republic,-0.461 +2008,JAM,Jamaica,-0.7 +2008,TRI,Trinidad and Tobago,-0.611 +2008,BAR,Barbados,-0.665 +2008,DMA,Dominica,-0.697 +2008,GRN,Grenada,-0.512 +2008,SLU,St. Lucia,-0.527 +2008,SVG,St. Vincent and the Grenadines,-0.623 +2008,AAB,Antigua & Barbuda,-0.687 +2008,SKN,St. Kitts and Nevis,-0.666 +2008,MEX,Mexico,-0.184 +2008,BLZ,Belize,-0.446 +2008,GUA,Guatemala,-0.231 +2008,HON,Honduras,-0.226 +2008,SAL,El Salvador,-0.153 +2008,NIC,Nicaragua,-0.779 +2008,COS,Costa Rica,-0.221 +2008,PAN,Panama,-0.125 +2008,COL,Colombia,-0.239 +2008,VEN,Venezuela,-1.248 +2008,GUY,Guyana,-0.672 +2008,SUR,Suriname,-0.598 +2008,ECU,Ecuador,-0.556 +2008,PER,Peru,-0.073 +2008,BRA,Brazil,-0.204 +2008,BOL,Bolivia,-0.458 +2008,PAR,Paraguay,-0.299 +2008,CHL,Chile,-0.067 +2008,ARG,Argentina,0.008 +2008,URU,Uruguay,-0.191 +2008,UKG,United Kingdom,1.588 +2008,IRE,Ireland,0.766 +2008,NTH,Netherlands,0.992 +2008,BEL,Belgium,0.93 +2008,LUX,Luxembourg,0.958 +2008,FRN,France,1.437 +2008,MNC,Monaco,0.937 +2008,LIE,Liechtenstein,0.74 +2008,SWZ,Switzerland,0.69 +2008,SPN,Spain,0.898 +2008,AND,Andorra,0.942 +2008,POR,Portugal,0.928 +2008,GFR,German Federal Republic,0.872 +2008,POL,Poland,1.028 +2008,AUS,Austria,0.756 +2008,HUN,Hungary,0.971 +2008,CZR,Czech Republic,1.04 +2008,SLO,Slovakia,0.948 +2008,ITA,Italy,0.875 +2008,SNM,San Marino,0.849 +2008,MLT,Malta,0.641 +2008,ALB,Albania,0.955 +2008,MNG,Montenegro,0.883 +2008,MAC,Macedonia,0.954 +2008,CRO,Croatia,0.948 +2008,YUG,Yugoslavia,0.597 +2008,BOS,Bosnia and Herzegovina,0.943 +2008,SLV,Slovenia,0.964 +2008,GRC,Greece,0.948 +2008,CYP,Cyprus,0.619 +2008,BUL,Bulgaria,0.942 +2008,MLD,Moldova,0.89 +2008,ROM,Romania,1.003 +2008,RUS,Russia,-0.084 +2008,EST,Estonia,0.958 +2008,LAT,Latvia,0.985 +2008,LIT,Lithuania,0.964 +2008,UKR,Ukraine,0.959 +2008,BLR,Belarus,-0.457 +2008,ARM,Armenia,0.13 +2008,GRG,Georgia,0.816 +2008,AZE,Azerbaijan,-0.275 +2008,FIN,Finland,0.88 +2008,SWD,Sweden,0.805 +2008,NOR,Norway,0.759 +2008,DEN,Denmark,1.015 +2008,ICE,Iceland,0.82 +2008,CAP,Cape Verde,-0.364 +2008,STP,Sao Tome and Principe,-0.625 +2008,GNB,Guinea-Bissau,-0.46 +2008,EQG,Equatorial Guinea,-0.244 +2008,GAM,Gambia,-1.039 +2008,MLI,Mali,-0.664 +2008,SEN,Senegal,-0.787 +2008,BEN,Benin,-0.536 +2008,MAA,Mauritania,-0.789 +2008,NIR,Niger,-0.789 +2008,CDI,Ivory Coast,-0.12 +2008,GUI,Guinea,-0.91 +2008,BFO,Burkina Faso,-0.561 +2008,LBR,Liberia,-0.309 +2008,SIE,Sierra Leone,-0.667 +2008,GHA,Ghana,-0.459 +2008,TOG,Togo,-0.637 +2008,CAO,Cameroon,0.122 +2008,NIG,Nigeria,-0.619 +2008,GAB,Gabon,-0.761 +2008,CEN,Central African Republic,-0.553 +2008,CHA,Chad,-0.644 +2008,CON,Congo,-0.638 +2008,DRC,Democratic Republic of the Congo,-0.54 +2008,UGA,Uganda,-0.598 +2008,KEN,Kenya,-0.539 +2008,TAZ,Tanzania,-0.469 +2008,BUI,Burundi,-0.268 +2008,RWA,Rwanda,-0.468 +2008,SOM,Somalia,-1.045 +2008,DJI,Djibouti,-0.939 +2008,ETH,Ethiopia,-0.487 +2008,ERI,Eritrea,-0.6 +2008,ANG,Angola,-0.53 +2008,MZM,Mozambique,-0.646 +2008,ZAM,Zambia,-0.633 +2008,ZIM,Zimbabwe,-1.353 +2008,MAW,Malawi,-0.453 +2008,SAF,South Africa,-0.56 +2008,NAM,Namibia,-0.631 +2008,LES,Lesotho,-0.665 +2008,BOT,Botswana,-0.309 +2008,SWA,Swaziland,-0.714 +2008,MAG,Madagascar,-0.408 +2008,COM,Comoros,-0.805 +2008,MAS,Mauritius,-0.443 +2008,SEY,Seychelles,-0.532 +2008,MOR,Morocco,-0.731 +2008,ALG,Algeria,-1.276 +2008,TUN,Tunisia,-0.888 +2008,LIB,Libya,-1.597 +2008,SUD,Sudan,-1.523 +2008,IRN,Iran,-1.734 +2008,TUR,Turkey,0.447 +2008,IRQ,Iraq,-0.705 +2008,EGY,Egypt,-1.634 +2008,SYR,Syria,-1.577 +2008,LEB,Lebanon,-0.837 +2008,JOR,Jordan,-0.757 +2008,ISR,Israel,2.303 +2008,SAU,Saudi Arabia,-0.946 +2008,YAR,Yemen Arab Republic,-1.126 +2008,KUW,Kuwait,-1.098 +2008,BAH,Bahrain,-1 +2008,QAT,Qatar,-1.163 +2008,UAE,United Arab Emirates,-0.956 +2008,OMA,Oman,-1.377 +2008,AFG,Afghanistan,-0.61 +2008,TKM,Turkmenistan,-0.871 +2008,TAJ,Tajikistan,-0.336 +2008,KYR,Kyrgyzstan,-0.256 +2008,UZB,Uzbekistan,-0.374 +2008,KZK,Kazakhstan,-0.098 +2008,CHN,China,-0.557 +2008,MON,Mongolia,-0.377 +2008,PRK,North Korea,-1.372 +2008,ROK,South Korea,0.609 +2008,JPN,Japan,0.508 +2008,IND,India,-0.536 +2008,BHU,Bhutan,-0.494 +2008,PAK,Pakistan,-0.669 +2008,BNG,Bangladesh,-0.883 +2008,MYA,Myanmar,-1.321 +2008,SRI,Sri Lanka,-0.836 +2008,MAD,Maldives,-0.617 +2008,NEP,Nepal,-0.504 +2008,THI,Thailand,-0.264 +2008,CAM,Cambodia,-0.711 +2008,LAO,Laos,-0.862 +2008,DRV,Vietnam,-1.377 +2008,MAL,Malaysia,-0.965 +2008,SIN,Singapore,-0.364 +2008,BRU,Brunei,-0.698 +2008,PHI,Philippines,-0.504 +2008,INS,Indonesia,-1.128 +2008,ETM,East Timor,-0.165 +2008,AUL,Australia,1.433 +2008,PNG,Papua New Guinea,-0.137 +2008,NEW,New Zealand,0.663 +2008,VAN,Vanuatu,0.129 +2008,SOL,Solomon Islands,-0.497 +2008,NAU,Nauru,0.383 +2008,TUV,Tuvalu,-0.189 +2008,FIJ,Fiji,0.137 +2008,TON,Tonga,0.189 +2008,NAU,Nauru,0.78 +2008,MSI,Marshall Islands,1.312 +2008,PAL,Palau,2.062 +2008,FSM,Federated States of Micronesia,1.873 +2008,WSM,Samoa,0.175 +2009,USA,United States of America,2.564 +2009,CAN,Canada,1.582 +2009,BHM,Bahamas,-0.446 +2009,CUB,Cuba,-1.496 +2009,HAI,Haiti,-0.445 +2009,DOM,Dominican Republic,-0.541 +2009,JAM,Jamaica,-0.542 +2009,TRI,Trinidad and Tobago,-0.547 +2009,BAR,Barbados,-0.673 +2009,DMA,Dominica,-0.687 +2009,GRN,Grenada,-0.525 +2009,SLU,St. Lucia,-0.384 +2009,SVG,St. Vincent and the Grenadines,-0.653 +2009,AAB,Antigua & Barbuda,-0.579 +2009,SKN,St. Kitts and Nevis,-0.547 +2009,MEX,Mexico,-0.15 +2009,BLZ,Belize,-0.435 +2009,GUA,Guatemala,-0.243 +2009,HON,Honduras,-0.255 +2009,SAL,El Salvador,-0.245 +2009,NIC,Nicaragua,-1.006 +2009,COS,Costa Rica,-0.221 +2009,PAN,Panama,0.154 +2009,COL,Colombia,-0.178 +2009,VEN,Venezuela,-1.33 +2009,GUY,Guyana,-0.602 +2009,SUR,Suriname,-0.639 +2009,ECU,Ecuador,-0.68 +2009,PER,Peru,-0.095 +2009,BRA,Brazil,-0.359 +2009,BOL,Bolivia,-0.71 +2009,PAR,Paraguay,-0.377 +2009,CHL,Chile,-0.123 +2009,ARG,Argentina,-0.083 +2009,URU,Uruguay,-0.205 +2009,UKG,United Kingdom,1.479 +2009,IRE,Ireland,0.779 +2009,NTH,Netherlands,1.084 +2009,BEL,Belgium,1.003 +2009,LUX,Luxembourg,0.921 +2009,FRN,France,1.312 +2009,MNC,Monaco,0.886 +2009,LIE,Liechtenstein,0.834 +2009,SWZ,Switzerland,0.755 +2009,SPN,Spain,0.888 +2009,AND,Andorra,0.872 +2009,POR,Portugal,0.863 +2009,GFR,German Federal Republic,1.041 +2009,POL,Poland,1.117 +2009,AUS,Austria,0.797 +2009,HUN,Hungary,0.998 +2009,CZR,Czech Republic,1.095 +2009,SLO,Slovakia,1.011 +2009,ITA,Italy,0.979 +2009,SNM,San Marino,0.855 +2009,MLT,Malta,0.663 +2009,ALB,Albania,0.731 +2009,MNG,Montenegro,0.904 +2009,MAC,Macedonia,0.983 +2009,CRO,Croatia,0.909 +2009,YUG,Yugoslavia,0.429 +2009,BOS,Bosnia and Herzegovina,0.716 +2009,SLV,Slovenia,0.874 +2009,GRC,Greece,0.916 +2009,CYP,Cyprus,0.633 +2009,BUL,Bulgaria,0.915 +2009,MLD,Moldova,0.901 +2009,ROM,Romania,0.976 +2009,RUS,Russia,-0.059 +2009,EST,Estonia,0.971 +2009,LAT,Latvia,0.938 +2009,LIT,Lithuania,1.013 +2009,UKR,Ukraine,0.935 +2009,BLR,Belarus,-0.418 +2009,ARM,Armenia,0.078 +2009,GRG,Georgia,0.881 +2009,AZE,Azerbaijan,-0.265 +2009,FIN,Finland,0.864 +2009,SWD,Sweden,0.855 +2009,NOR,Norway,0.805 +2009,DEN,Denmark,1.047 +2009,ICE,Iceland,0.887 +2009,CAP,Cape Verde,-0.475 +2009,STP,Sao Tome and Principe,-0.624 +2009,GNB,Guinea-Bissau,-0.539 +2009,EQG,Equatorial Guinea,-0.541 +2009,GAM,Gambia,-0.909 +2009,MLI,Mali,-0.753 +2009,SEN,Senegal,-0.787 +2009,BEN,Benin,-0.361 +2009,MAA,Mauritania,-0.955 +2009,NIR,Niger,-0.795 +2009,CDI,Ivory Coast,-0.128 +2009,GUI,Guinea,-0.849 +2009,BFO,Burkina Faso,-0.469 +2009,LBR,Liberia,-0.212 +2009,SIE,Sierra Leone,-0.54 +2009,GHA,Ghana,-0.458 +2009,TOG,Togo,-0.579 +2009,CAO,Cameroon,0.13 +2009,NIG,Nigeria,-0.687 +2009,GAB,Gabon,-0.717 +2009,CEN,Central African Republic,-0.566 +2009,CHA,Chad,-0.658 +2009,CON,Congo,-0.671 +2009,DRC,Democratic Republic of the Congo,-0.507 +2009,UGA,Uganda,-0.381 +2009,KEN,Kenya,-0.474 +2009,TAZ,Tanzania,-0.438 +2009,BUI,Burundi,-0.289 +2009,RWA,Rwanda,-0.473 +2009,SOM,Somalia,-1.163 +2009,DJI,Djibouti,-1.027 +2009,ETH,Ethiopia,-0.437 +2009,ERI,Eritrea,-0.663 +2009,ANG,Angola,-0.617 +2009,MZM,Mozambique,-0.661 +2009,ZAM,Zambia,-0.553 +2009,ZIM,Zimbabwe,-1.338 +2009,MAW,Malawi,-0.405 +2009,SAF,South Africa,-0.574 +2009,NAM,Namibia,-0.817 +2009,LES,Lesotho,-0.567 +2009,BOT,Botswana,-0.298 +2009,SWA,Swaziland,-0.693 +2009,MAG,Madagascar,-0.423 +2009,COM,Comoros,-0.559 +2009,MAS,Mauritius,-0.461 +2009,SEY,Seychelles,-0.552 +2009,MOR,Morocco,-0.758 +2009,ALG,Algeria,-1.242 +2009,TUN,Tunisia,-1.028 +2009,LIB,Libya,-1.505 +2009,SUD,Sudan,-1.579 +2009,IRN,Iran,-1.699 +2009,TUR,Turkey,0.447 +2009,IRQ,Iraq,-0.82 +2009,EGY,Egypt,-1.585 +2009,SYR,Syria,-1.652 +2009,LEB,Lebanon,-0.881 +2009,JOR,Jordan,-0.736 +2009,ISR,Israel,2.289 +2009,SAU,Saudi Arabia,-0.88 +2009,YAR,Yemen Arab Republic,-1.159 +2009,KUW,Kuwait,-1.155 +2009,BAH,Bahrain,-1.02 +2009,QAT,Qatar,-1.181 +2009,UAE,United Arab Emirates,-1.013 +2009,OMA,Oman,-1.363 +2009,AFG,Afghanistan,-0.699 +2009,TKM,Turkmenistan,-0.881 +2009,TAJ,Tajikistan,-0.393 +2009,KYR,Kyrgyzstan,-0.322 +2009,UZB,Uzbekistan,-0.282 +2009,KZK,Kazakhstan,-0.186 +2009,CHN,China,-0.592 +2009,MON,Mongolia,-0.398 +2009,PRK,North Korea,-1.492 +2009,ROK,South Korea,0.619 +2009,JPN,Japan,0.57 +2009,IND,India,-0.486 +2009,BHU,Bhutan,-0.55 +2009,PAK,Pakistan,-0.593 +2009,BNG,Bangladesh,-0.892 +2009,MYA,Myanmar,-1.317 +2009,SRI,Sri Lanka,-0.896 +2009,MAD,Maldives,-0.441 +2009,NEP,Nepal,-0.555 +2009,THI,Thailand,-0.463 +2009,CAM,Cambodia,-0.682 +2009,LAO,Laos,-0.892 +2009,DRV,Vietnam,-1.335 +2009,MAL,Malaysia,-1.063 +2009,SIN,Singapore,-0.434 +2009,BRU,Brunei,-0.877 +2009,PHI,Philippines,-0.527 +2009,INS,Indonesia,-1.108 +2009,ETM,East Timor,0.007 +2009,AUL,Australia,1.268 +2009,PNG,Papua New Guinea,-0.024 +2009,NEW,New Zealand,0.812 +2009,VAN,Vanuatu,0.343 +2009,SOL,Solomon Islands,-0.491 +2009,NAU,Nauru,0.437 +2009,TUV,Tuvalu,-0.21 +2009,FIJ,Fiji,0.22 +2009,TON,Tonga,0.222 +2009,NAU,Nauru,1.6 +2009,MSI,Marshall Islands,1.192 +2009,PAL,Palau,1.874 +2009,FSM,Federated States of Micronesia,1.953 +2009,WSM,Samoa,0.198 +2010,USA,United States of America,2.519 +2010,CAN,Canada,1.529 +2010,BHM,Bahamas,-0.355 +2010,CUB,Cuba,-1.511 +2010,HAI,Haiti,-0.599 +2010,DOM,Dominican Republic,-0.569 +2010,JAM,Jamaica,-0.548 +2010,TRI,Trinidad and Tobago,-0.61 +2010,BAR,Barbados,-0.607 +2010,DMA,Dominica,-0.648 +2010,GRN,Grenada,0.556 +2010,SLU,St. Lucia,-0.383 +2010,SVG,St. Vincent and the Grenadines,-0.676 +2010,AAB,Antigua & Barbuda,-0.567 +2010,SKN,St. Kitts and Nevis,-0.575 +2010,MEX,Mexico,-0.1 +2010,BLZ,Belize,-0.511 +2010,GUA,Guatemala,-0.22 +2010,HON,Honduras,-0.219 +2010,SAL,El Salvador,-0.218 +2010,NIC,Nicaragua,-1.078 +2010,COS,Costa Rica,-0.274 +2010,PAN,Panama,0.21 +2010,COL,Colombia,-0.167 +2010,VEN,Venezuela,-1.365 +2010,GUY,Guyana,-0.703 +2010,SUR,Suriname,-0.685 +2010,ECU,Ecuador,-0.691 +2010,PER,Peru,-0.111 +2010,BRA,Brazil,-0.463 +2010,BOL,Bolivia,-0.845 +2010,PAR,Paraguay,-0.392 +2010,CHL,Chile,-0.166 +2010,ARG,Argentina,-0.019 +2010,URU,Uruguay,-0.19 +2010,UKG,United Kingdom,1.611 +2010,IRE,Ireland,0.719 +2010,NTH,Netherlands,1.039 +2010,BEL,Belgium,1.049 +2010,LUX,Luxembourg,0.873 +2010,FRN,France,1.366 +2010,MNC,Monaco,0.873 +2010,LIE,Liechtenstein,0.796 +2010,SWZ,Switzerland,0.73 +2010,SPN,Spain,0.795 +2010,AND,Andorra,0.894 +2010,POR,Portugal,0.882 +2010,GFR,German Federal Republic,0.99 +2010,POL,Poland,1.044 +2010,AUS,Austria,0.73 +2010,HUN,Hungary,1.003 +2010,CZR,Czech Republic,1.069 +2010,SLO,Slovakia,0.99 +2010,ITA,Italy,0.883 +2010,SNM,San Marino,0.805 +2010,MLT,Malta,0.601 +2010,ALB,Albania,0.867 +2010,MNG,Montenegro,0.865 +2010,MAC,Macedonia,0.837 +2010,CRO,Croatia,0.94 +2010,YUG,Yugoslavia,0.438 +2010,BOS,Bosnia and Herzegovina,0.62 +2010,SLV,Slovenia,0.862 +2010,GRC,Greece,-0.116 +2010,CYP,Cyprus,0.574 +2010,BUL,Bulgaria,0.993 +2010,MLD,Moldova,0.868 +2010,ROM,Romania,0.961 +2010,RUS,Russia,-0.033 +2010,EST,Estonia,1.036 +2010,LAT,Latvia,1.036 +2010,LIT,Lithuania,1.046 +2010,UKR,Ukraine,0.837 +2010,BLR,Belarus,-0.374 +2010,ARM,Armenia,0.038 +2010,GRG,Georgia,0.857 +2010,AZE,Azerbaijan,-0.277 +2010,FIN,Finland,0.833 +2010,SWD,Sweden,0.85 +2010,NOR,Norway,0.816 +2010,DEN,Denmark,1.028 +2010,ICE,Iceland,0.839 +2010,CAP,Cape Verde,-0.418 +2010,STP,Sao Tome and Principe,-0.333 +2010,GNB,Guinea-Bissau,-0.56 +2010,EQG,Equatorial Guinea,-0.54 +2010,GAM,Gambia,-0.736 +2010,MLI,Mali,-0.742 +2010,SEN,Senegal,-0.783 +2010,BEN,Benin,-0.232 +2010,MAA,Mauritania,-0.958 +2010,NIR,Niger,-0.715 +2010,CDI,Ivory Coast,0.024 +2010,GUI,Guinea,-0.986 +2010,BFO,Burkina Faso,-0.607 +2010,LBR,Liberia,-0.29 +2010,SIE,Sierra Leone,-0.537 +2010,GHA,Ghana,-0.516 +2010,TOG,Togo,-0.531 +2010,CAO,Cameroon,0.192 +2010,NIG,Nigeria,-0.555 +2010,GAB,Gabon,-0.641 +2010,CEN,Central African Republic,-0.584 +2010,CHA,Chad,-0.655 +2010,CON,Congo,-0.592 +2010,DRC,Democratic Republic of the Congo,-0.374 +2010,UGA,Uganda,-0.591 +2010,KEN,Kenya,-0.569 +2010,TAZ,Tanzania,-0.503 +2010,BUI,Burundi,-0.312 +2010,RWA,Rwanda,-0.442 +2010,SOM,Somalia,-1.109 +2010,DJI,Djibouti,-0.698 +2010,ETH,Ethiopia,-0.511 +2010,ERI,Eritrea,-0.71 +2010,ANG,Angola,-0.683 +2010,MZM,Mozambique,-0.683 +2010,ZAM,Zambia,-0.554 +2010,ZIM,Zimbabwe,-1.389 +2010,MAW,Malawi,-0.448 +2010,SAF,South Africa,-0.55 +2010,NAM,Namibia,-0.789 +2010,LES,Lesotho,-0.612 +2010,BOT,Botswana,-0.362 +2010,SWA,Swaziland,-0.772 +2010,MAG,Madagascar,-0.447 +2010,COM,Comoros,-0.752 +2010,MAS,Mauritius,-0.506 +2010,SEY,Seychelles,-0.583 +2010,MOR,Morocco,-0.71 +2010,ALG,Algeria,-1.252 +2010,TUN,Tunisia,-0.992 +2010,LIB,Libya,-1.444 +2010,SUD,Sudan,-1.491 +2010,IRN,Iran,-1.87 +2010,TUR,Turkey,0.417 +2010,IRQ,Iraq,-0.793 +2010,EGY,Egypt,-1.544 +2010,SYR,Syria,-1.84 +2010,LEB,Lebanon,-1.006 +2010,JOR,Jordan,-0.694 +2010,ISR,Israel,2.35 +2010,SAU,Saudi Arabia,-0.904 +2010,YAR,Yemen Arab Republic,-1.064 +2010,KUW,Kuwait,-1.081 +2010,BAH,Bahrain,-0.976 +2010,QAT,Qatar,-1.187 +2010,UAE,United Arab Emirates,-0.988 +2010,OMA,Oman,-1.356 +2010,AFG,Afghanistan,-0.779 +2010,TKM,Turkmenistan,-0.869 +2010,TAJ,Tajikistan,-0.377 +2010,KYR,Kyrgyzstan,-0.258 +2010,UZB,Uzbekistan,-0.408 +2010,KZK,Kazakhstan,-0.311 +2010,CHN,China,-0.77 +2010,MON,Mongolia,-0.332 +2010,PRK,North Korea,-1.796 +2010,ROK,South Korea,0.582 +2010,JPN,Japan,0.63 +2010,IND,India,-0.518 +2010,BHU,Bhutan,-0.503 +2010,PAK,Pakistan,-0.746 +2010,BNG,Bangladesh,-0.947 +2010,MYA,Myanmar,-1.161 +2010,SRI,Sri Lanka,-0.953 +2010,MAD,Maldives,-0.447 +2010,NEP,Nepal,-0.574 +2010,THI,Thailand,-0.532 +2010,CAM,Cambodia,-0.773 +2010,LAO,Laos,-0.883 +2010,DRV,Vietnam,-1.351 +2010,MAL,Malaysia,-1.123 +2010,SIN,Singapore,-0.477 +2010,BRU,Brunei,-0.935 +2010,PHI,Philippines,-0.536 +2010,INS,Indonesia,-1.141 +2010,ETM,East Timor,-0.201 +2010,AUL,Australia,1.278 +2010,PNG,Papua New Guinea,-0.098 +2010,NEW,New Zealand,0.808 +2010,VAN,Vanuatu,-0.1 +2010,SOL,Solomon Islands,-0.418 +2010,NAU,Nauru,0.474 +2010,TUV,Tuvalu,-0.275 +2010,FIJ,Fiji,-0.003 +2010,TON,Tonga,0.223 +2010,NAU,Nauru,2.077 +2010,MSI,Marshall Islands,1.268 +2010,PAL,Palau,2.012 +2010,FSM,Federated States of Micronesia,1.93 +2010,WSM,Samoa,0.207 +2011,USA,United States of America,2.522 +2011,CAN,Canada,1.856 +2011,BHM,Bahamas,-0.368 +2011,CUB,Cuba,-1.713 +2011,HAI,Haiti,-0.276 +2011,DOM,Dominican Republic,-0.595 +2011,JAM,Jamaica,-0.491 +2011,TRI,Trinidad and Tobago,-0.645 +2011,BAR,Barbados,-0.495 +2011,DMA,Dominica,-0.699 +2011,GRN,Grenada,-0.237 +2011,SLU,St. Lucia,-0.347 +2011,SVG,St. Vincent and the Grenadines,-0.761 +2011,AAB,Antigua & Barbuda,-0.626 +2011,SKN,St. Kitts and Nevis,-0.645 +2011,MEX,Mexico,-0.1 +2011,BLZ,Belize,-0.458 +2011,GUA,Guatemala,-0.26 +2011,HON,Honduras,-0.136 +2011,SAL,El Salvador,-0.104 +2011,NIC,Nicaragua,-1.365 +2011,COS,Costa Rica,-0.217 +2011,PAN,Panama,0.218 +2011,COL,Colombia,-0.117 +2011,VEN,Venezuela,-1.662 +2011,GUY,Guyana,-0.673 +2011,SUR,Suriname,-0.735 +2011,ECU,Ecuador,-1.258 +2011,PER,Peru,-0.086 +2011,BRA,Brazil,-0.547 +2011,BOL,Bolivia,-1.183 +2011,PAR,Paraguay,-0.428 +2011,CHL,Chile,-0.16 +2011,ARG,Argentina,-0.088 +2011,URU,Uruguay,-0.363 +2011,UKG,United Kingdom,1.497 +2011,IRE,Ireland,0.79 +2011,NTH,Netherlands,1.08 +2011,BEL,Belgium,1.087 +2011,LUX,Luxembourg,0.882 +2011,FRN,France,1.267 +2011,MNC,Monaco,0.896 +2011,LIE,Liechtenstein,0.755 +2011,SWZ,Switzerland,0.652 +2011,SPN,Spain,0.898 +2011,AND,Andorra,0.867 +2011,POR,Portugal,0.883 +2011,GFR,German Federal Republic,0.955 +2011,POL,Poland,1.016 +2011,AUS,Austria,0.763 +2011,HUN,Hungary,0.929 +2011,CZR,Czech Republic,1.018 +2011,SLO,Slovakia,0.998 +2011,ITA,Italy,0.931 +2011,SNM,San Marino,0.866 +2011,MLT,Malta,0.633 +2011,ALB,Albania,0.963 +2011,MNG,Montenegro,0.849 +2011,MAC,Macedonia,0.899 +2011,CRO,Croatia,0.942 +2011,YUG,Yugoslavia,0.463 +2011,BOS,Bosnia and Herzegovina,0.774 +2011,SLV,Slovenia,0.882 +2011,GRC,Greece,0.676 +2011,CYP,Cyprus,0.615 +2011,BUL,Bulgaria,1.001 +2011,MLD,Moldova,0.905 +2011,ROM,Romania,0.964 +2011,RUS,Russia,-0.113 +2011,EST,Estonia,1.012 +2011,LAT,Latvia,1.01 +2011,LIT,Lithuania,1.017 +2011,UKR,Ukraine,0.705 +2011,BLR,Belarus,-0.48 +2011,ARM,Armenia,0.061 +2011,GRG,Georgia,0.826 +2011,AZE,Azerbaijan,-0.477 +2011,FIN,Finland,0.897 +2011,SWD,Sweden,0.873 +2011,NOR,Norway,0.828 +2011,DEN,Denmark,1.018 +2011,ICE,Iceland,0.83 +2011,CAP,Cape Verde,-0.431 +2011,STP,Sao Tome and Principe,-0.395 +2011,GNB,Guinea-Bissau,-0.563 +2011,EQG,Equatorial Guinea,-0.316 +2011,GAM,Gambia,-0.672 +2011,MLI,Mali,-0.753 +2011,SEN,Senegal,-0.624 +2011,BEN,Benin,-0.407 +2011,MAA,Mauritania,-0.861 +2011,NIR,Niger,-0.784 +2011,CDI,Ivory Coast,-0.106 +2011,GUI,Guinea,-0.797 +2011,BFO,Burkina Faso,-0.543 +2011,LBR,Liberia,-0.363 +2011,SIE,Sierra Leone,-0.551 +2011,GHA,Ghana,-0.545 +2011,TOG,Togo,-0.534 +2011,CAO,Cameroon,0.143 +2011,NIG,Nigeria,-0.604 +2011,GAB,Gabon,-0.578 +2011,CEN,Central African Republic,-0.425 +2011,CHA,Chad,-0.666 +2011,CON,Congo,-0.62 +2011,DRC,Democratic Republic of the Congo,-0.511 +2011,UGA,Uganda,-0.725 +2011,KEN,Kenya,-0.706 +2011,TAZ,Tanzania,-0.571 +2011,BUI,Burundi,-0.298 +2011,RWA,Rwanda,-0.368 +2011,SOM,Somalia,-1.041 +2011,DJI,Djibouti,-0.794 +2011,ETH,Ethiopia,-0.494 +2011,ERI,Eritrea,-0.63 +2011,ANG,Angola,-0.688 +2011,MZM,Mozambique,-0.712 +2011,ZAM,Zambia,-0.733 +2011,ZIM,Zimbabwe,-1.333 +2011,MAW,Malawi,-0.475 +2011,SAF,South Africa,-0.727 +2011,NAM,Namibia,-0.747 +2011,LES,Lesotho,-0.717 +2011,BOT,Botswana,-0.365 +2011,SWA,Swaziland,-0.875 +2011,MAG,Madagascar,-0.492 +2011,COM,Comoros,-0.817 +2011,MAS,Mauritius,-0.459 +2011,SEY,Seychelles,-0.476 +2011,MOR,Morocco,-0.718 +2011,ALG,Algeria,-1.306 +2011,TUN,Tunisia,-0.752 +2011,LIB,Libya,-1.052 +2011,SUD,Sudan,-1.388 +2011,SSUD,South Sudan,-0.054 +2011,IRN,Iran,-1.801 +2011,TUR,Turkey,0.477 +2011,IRQ,Iraq,-0.739 +2011,EGY,Egypt,-1.348 +2011,SYR,Syria,-1.738 +2011,LEB,Lebanon,-1.083 +2011,JOR,Jordan,-0.744 +2011,ISR,Israel,2.34 +2011,SAU,Saudi Arabia,-0.92 +2011,YAR,Yemen Arab Republic,-1.11 +2011,KUW,Kuwait,-1.012 +2011,BAH,Bahrain,-0.919 +2011,QAT,Qatar,-1.116 +2011,UAE,United Arab Emirates,-0.828 +2011,OMA,Oman,-1.335 +2011,AFG,Afghanistan,-0.691 +2011,TKM,Turkmenistan,-0.908 +2011,TAJ,Tajikistan,-0.3 +2011,KYR,Kyrgyzstan,-0.286 +2011,UZB,Uzbekistan,-0.46 +2011,KZK,Kazakhstan,-0.383 +2011,CHN,China,-0.72 +2011,MON,Mongolia,-0.307 +2011,PRK,North Korea,-1.78 +2011,ROK,South Korea,0.649 +2011,JPN,Japan,0.646 +2011,IND,India,-0.49 +2011,BHU,Bhutan,-0.57 +2011,PAK,Pakistan,-0.763 +2011,BNG,Bangladesh,-1.011 +2011,MYA,Myanmar,-1.277 +2011,SRI,Sri Lanka,-0.969 +2011,MAD,Maldives,-0.414 +2011,NEP,Nepal,-0.741 +2011,THI,Thailand,-0.488 +2011,CAM,Cambodia,-0.797 +2011,LAO,Laos,-0.916 +2011,DRV,Vietnam,-1.284 +2011,MAL,Malaysia,-0.922 +2011,SIN,Singapore,-0.63 +2011,BRU,Brunei,-0.988 +2011,PHI,Philippines,-0.418 +2011,INS,Indonesia,-0.967 +2011,ETM,East Timor,-0.235 +2011,AUL,Australia,1.266 +2011,PNG,Papua New Guinea,-0.076 +2011,NEW,New Zealand,0.797 +2011,VAN,Vanuatu,0.042 +2011,SOL,Solomon Islands,-0.406 +2011,NAU,Nauru,0.503 +2011,TUV,Tuvalu,-0.355 +2011,FIJ,Fiji,-0.146 +2011,TON,Tonga,0.227 +2011,NAU,Nauru,2.403 +2011,MSI,Marshall Islands,1.344 +2011,PAL,Palau,2.138 +2011,FSM,Federated States of Micronesia,2.11 +2011,WSM,Samoa,0.203 +2012,USA,United States of America,2.681 +2012,CAN,Canada,2.059 +2012,BHM,Bahamas,-0.384 +2012,CUB,Cuba,-1.682 +2012,HAI,Haiti,-0.383 +2012,DOM,Dominican Republic,-0.544 +2012,JAM,Jamaica,-0.556 +2012,TRI,Trinidad and Tobago,-0.638 +2012,BAR,Barbados,-0.479 +2012,DMA,Dominica,-0.75 +2012,GRN,Grenada,-0.478 +2012,SLU,St. Lucia,-0.581 +2012,SVG,St. Vincent and the Grenadines,-0.76 +2012,AAB,Antigua & Barbuda,-0.626 +2012,SKN,St. Kitts and Nevis,-0.617 +2012,MEX,Mexico,-0.107 +2012,BLZ,Belize,-0.496 +2012,GUA,Guatemala,-0.181 +2012,HON,Honduras,0.077 +2012,SAL,El Salvador,-0.053 +2012,NIC,Nicaragua,-1.516 +2012,COS,Costa Rica,-0.252 +2012,PAN,Panama,0.233 +2012,COL,Colombia,-0.07 +2012,VEN,Venezuela,-1.564 +2012,GUY,Guyana,-0.738 +2012,SUR,Suriname,-0.704 +2012,ECU,Ecuador,-1.216 +2012,PER,Peru,-0.112 +2012,BRA,Brazil,-0.602 +2012,BOL,Bolivia,-1.422 +2012,PAR,Paraguay,-0.281 +2012,CHL,Chile,-0.282 +2012,ARG,Argentina,-0.14 +2012,URU,Uruguay,-0.418 +2012,UKG,United Kingdom,1.53 +2012,IRE,Ireland,0.755 +2012,NTH,Netherlands,1.037 +2012,BEL,Belgium,1.034 +2012,LUX,Luxembourg,0.895 +2012,FRN,France,1.42 +2012,MNC,Monaco,0.955 +2012,LIE,Liechtenstein,0.804 +2012,SWZ,Switzerland,0.708 +2012,SPN,Spain,0.941 +2012,AND,Andorra,0.952 +2012,POR,Portugal,0.927 +2012,GFR,German Federal Republic,0.991 +2012,POL,Poland,1.042 +2012,AUS,Austria,0.748 +2012,HUN,Hungary,1.038 +2012,CZR,Czech Republic,1.173 +2012,SLO,Slovakia,1.052 +2012,ITA,Italy,0.923 +2012,SNM,San Marino,0.919 +2012,MLT,Malta,0.608 +2012,ALB,Albania,1 +2012,MNG,Montenegro,0.847 +2012,MAC,Macedonia,0.944 +2012,CRO,Croatia,1.011 +2012,YUG,Yugoslavia,0.527 +2012,BOS,Bosnia and Herzegovina,0.853 +2012,SLV,Slovenia,0.92 +2012,GRC,Greece,0.853 +2012,CYP,Cyprus,0.595 +2012,BUL,Bulgaria,0.979 +2012,MLD,Moldova,0.959 +2012,ROM,Romania,1.028 +2012,RUS,Russia,0.067 +2012,EST,Estonia,1.052 +2012,LAT,Latvia,1.061 +2012,LIT,Lithuania,1.061 +2012,UKR,Ukraine,0.81 +2012,BLR,Belarus,-0.406 +2012,ARM,Armenia,0.065 +2012,GRG,Georgia,0.862 +2012,AZE,Azerbaijan,-0.528 +2012,FIN,Finland,0.916 +2012,SWD,Sweden,0.846 +2012,NOR,Norway,0.898 +2012,DEN,Denmark,1.005 +2012,ICE,Iceland,0.836 +2012,CAP,Cape Verde,-0.459 +2012,STP,Sao Tome and Principe,-0.45 +2012,GNB,Guinea-Bissau,-0.547 +2012,EQG,Equatorial Guinea,-0.359 +2012,GAM,Gambia,-0.482 +2012,MLI,Mali,-0.681 +2012,SEN,Senegal,-0.573 +2012,BEN,Benin,-0.507 +2012,MAA,Mauritania,-0.852 +2012,NIR,Niger,-0.749 +2012,CDI,Ivory Coast,-0.36 +2012,GUI,Guinea,-0.75 +2012,BFO,Burkina Faso,-0.467 +2012,LBR,Liberia,-0.241 +2012,SIE,Sierra Leone,-0.553 +2012,GHA,Ghana,-0.569 +2012,TOG,Togo,-0.1 +2012,CAO,Cameroon,0.285 +2012,NIG,Nigeria,-0.653 +2012,GAB,Gabon,-0.402 +2012,CEN,Central African Republic,-0.541 +2012,CHA,Chad,-0.445 +2012,CON,Congo,-0.616 +2012,DRC,Democratic Republic of the Congo,-0.62 +2012,UGA,Uganda,-0.722 +2012,KEN,Kenya,-0.676 +2012,TAZ,Tanzania,-0.646 +2012,BUI,Burundi,-0.179 +2012,RWA,Rwanda,-0.224 +2012,SOM,Somalia,-0.885 +2012,DJI,Djibouti,-0.827 +2012,ETH,Ethiopia,-0.503 +2012,ERI,Eritrea,-0.731 +2012,ANG,Angola,-0.749 +2012,MZM,Mozambique,-0.501 +2012,ZAM,Zambia,-0.524 +2012,ZIM,Zimbabwe,-1.348 +2012,MAW,Malawi,-0.34 +2012,SAF,South Africa,-0.551 +2012,NAM,Namibia,-0.792 +2012,LES,Lesotho,-0.604 +2012,BOT,Botswana,-0.458 +2012,SWA,Swaziland,-0.871 +2012,MAG,Madagascar,-0.499 +2012,COM,Comoros,-0.882 +2012,MAS,Mauritius,-0.597 +2012,SEY,Seychelles,-0.355 +2012,MOR,Morocco,-0.735 +2012,ALG,Algeria,-1.165 +2012,TUN,Tunisia,-0.788 +2012,LIB,Libya,-0.918 +2012,SUD,Sudan,-1.328 +2012,SSUD,South Sudan,0.215 +2012,IRN,Iran,-1.955 +2012,TUR,Turkey,0.405 +2012,IRQ,Iraq,-0.827 +2012,EGY,Egypt,-1.441 +2012,SYR,Syria,-1.855 +2012,LEB,Lebanon,-1.162 +2012,JOR,Jordan,-0.766 +2012,ISR,Israel,2.456 +2012,SAU,Saudi Arabia,-1.104 +2012,YAR,Yemen Arab Republic,-1.188 +2012,KUW,Kuwait,-1.218 +2012,BAH,Bahrain,-1.001 +2012,QAT,Qatar,-1.267 +2012,UAE,United Arab Emirates,-1.004 +2012,OMA,Oman,-1.386 +2012,AFG,Afghanistan,-0.801 +2012,TKM,Turkmenistan,-0.914 +2012,TAJ,Tajikistan,-0.427 +2012,KYR,Kyrgyzstan,-0.22 +2012,UZB,Uzbekistan,-0.35 +2012,KZK,Kazakhstan,-0.401 +2012,CHN,China,-0.852 +2012,MON,Mongolia,-0.278 +2012,PRK,North Korea,-1.965 +2012,ROK,South Korea,0.726 +2012,JPN,Japan,0.644 +2012,IND,India,-0.645 +2012,BHU,Bhutan,-0.588 +2012,PAK,Pakistan,-0.914 +2012,BNG,Bangladesh,-0.946 +2012,MYA,Myanmar,-1.124 +2012,SRI,Sri Lanka,-0.95 +2012,MAD,Maldives,-0.567 +2012,NEP,Nepal,-0.661 +2012,THI,Thailand,-0.499 +2012,CAM,Cambodia,-0.743 +2012,LAO,Laos,-0.85 +2012,DRV,Vietnam,-1.266 +2012,MAL,Malaysia,-0.912 +2012,SIN,Singapore,-0.521 +2012,BRU,Brunei,-0.957 +2012,PHI,Philippines,-0.486 +2012,INS,Indonesia,-0.999 +2012,ETM,East Timor,-0.26 +2012,AUL,Australia,1.36 +2012,PNG,Papua New Guinea,0.214 +2012,NEW,New Zealand,0.739 +2012,VAN,Vanuatu,0.125 +2012,SOL,Solomon Islands,-0.463 +2012,NAU,Nauru,0.5 +2012,TUV,Tuvalu,-0.506 +2012,FIJ,Fiji,-0.117 +2012,TON,Tonga,0.29 +2012,NAU,Nauru,1.529 +2012,MSI,Marshall Islands,1.45 +2012,PAL,Palau,2.192 +2012,FSM,Federated States of Micronesia,2.033 +2012,WSM,Samoa,0.222 \ No newline at end of file diff --git a/inst/examples/UN_Advanced/global.R b/inst/examples/UN_Advanced/global.R new file mode 100644 index 0000000000..9107282501 --- /dev/null +++ b/inst/examples/UN_Advanced/global.R @@ -0,0 +1 @@ +ideal <- read.csv("Data/UN_IdealPoints.csv", stringsAsFactors = F) diff --git a/inst/examples/UN_Advanced/server.R b/inst/examples/UN_Advanced/server.R new file mode 100644 index 0000000000..8e255b8054 --- /dev/null +++ b/inst/examples/UN_Advanced/server.R @@ -0,0 +1,76 @@ +#server script for United Nations Advanced Example +library(shiny) +library(plotly) +library(dplyr) + +shinyServer(function(input, output, session) { + + output$trendPlot <- renderPlotly({ + if (length(input$name) == 0) { + print("Please select at least one country") + } else { + df_trend <- ideal[ideal$Name == input$name, ] + + # Graph title + if (length(input$name) > 2) { + j_names_comma <- paste(input$name[-length(input$name)], collapse = ', ') + j_names <- paste0(j_names_comma, ", and ", input$name[length(input$name)]) + } else { + j_names <- paste(input$name, collapse = ' and ') + } + + graph_title <- paste("Ideal Points for ", j_names, sep="") + + ggideal_point <- ggplot(df_trend) + + geom_line(aes(x = Year, y = Ideal.point, by = Name, color = Name)) + + labs(x = "Year", y = "Ideology", title = graph_title) + + scale_colour_hue("clarity", l = 70, c = 150) + ggthemes::theme_few() + + theme(legend.direction = "horizontal", legend.position = "bottom") + + # Convert ggplot object to plotly + gg <- plotly_build(ggideal_point) + + # Use Plotly syntax to further edit the plot: + gg$layout$annotations <- NULL # Remove the existing annotations (the legend label) + gg$layout$annotations <- list() + + # Add colored text annotations next to the end of each line + # More about plotly annotations: https://plot.ly/r/reference/#annotation + # Each key that we update is documented in that link above. + for (i in 1:length(gg$data)) { # data is a list of the lines in the graph + gg$layout$annotations[[i]] <- list( + text = gg$data[[i]]$name, # The text label of the annotation, e.g. "Canada" + font = list(color = gg$data[[i]]$line$color), # Match the font color to the line color + showarrow = FALSE, # Don't show the annotation arrow + y = gg$data[[i]]$y[[length(gg$data[[i]]$y)]], # set the y position of the annotation to the last point of the line + yref = "y1", # the "y" coordinates above are with respect to the yaxis + x = 1, # set the x position of the graph to the right hand side of the graph + xref = "paper", # the x coordinates are with respect to the "paper", where 1 means the right hand side of the graph and 0 means the left hand side + xanchor = "left" # position the x coordinate with respect to the left of the text + ); + } + + gg$layout$showlegend <- FALSE # remove the legend + gg$layout$margin$r <- 170 # increase the size of the right margin to accommodate more room for the annotation labels + gg + + } + }) + + output$termPlot <- renderPlot({ + df_term <- ideal %>% filter(Name %in% input$name) %>% + group_by(Name) %>% summarise(terms = n()) + + trans_theme <- theme( + panel.grid.minor = element_blank(), + panel.grid.major = element_blank(), + panel.background = element_rect(fill = NA), + plot.background = element_rect(fill = NA) + ) + + ggplot(df_term, aes(x = reorder(Name, terms), y = terms))+ + geom_bar(stat = "identity", fill = "#2980b9") + coord_flip() + + theme_bw() + trans_theme + labs(y = "Terms (in years)", x = "") + + }, bg="transparent") +}) diff --git a/inst/examples/UN_Advanced/ui.R b/inst/examples/UN_Advanced/ui.R new file mode 100644 index 0000000000..aa3feba206 --- /dev/null +++ b/inst/examples/UN_Advanced/ui.R @@ -0,0 +1,26 @@ +#user interface for United Nations Advanced Example +shinyUI(fluidPage( + + # Application title + titlePanel("Ideal Points"), + + # Sidebar with a slider input for number of bins + + sidebarPanel( + h3("Ideal Points Estimation"), + # Select Justices name here + selectizeInput("name", label = "Country Name(s) of Interest", + choices = unique(ideal$Name), multiple = T, + options = list(maxItems = 5, placeholder = 'Select a name'), + selected = "United States of America"), + # Term plot + plotOutput("termPlot", height = 200), + + helpText("Data: Bailey, Michael, Anton Strezhnev and Erik Voeten. Forthcoming. “Estimating Dynamic State Preferences from United Nations Voting Data.” Journal of Conflict Resolution. ") + ), + + # Show a plot of the generated distribution + mainPanel( + plotlyOutput("trendPlot") + ) +)) diff --git a/inst/examples/UN_Simple/.Rapp.history b/inst/examples/UN_Simple/.Rapp.history new file mode 100644 index 0000000000..e69de29bb2 diff --git a/inst/examples/UN_Simple/Data/UN_IdealPoints.csv b/inst/examples/UN_Simple/Data/UN_IdealPoints.csv new file mode 100644 index 0000000000..206a0f0bf1 --- /dev/null +++ b/inst/examples/UN_Simple/Data/UN_IdealPoints.csv @@ -0,0 +1 @@ +Year,ID,Name,Ideal.point 1946,UKG,United Kingdom,2.158 1947,UKG,United Kingdom,2.119 1948,UKG,United Kingdom,2.074 1949,UKG,United Kingdom,2.039 1950,UKG,United Kingdom,1.574 1951,UKG,United Kingdom,1.832 1952,UKG,United Kingdom,2.106 1953,UKG,United Kingdom,2.193 1954,UKG,United Kingdom,2.391 1955,UKG,United Kingdom,2.209 1956,UKG,United Kingdom,2.247 1957,UKG,United Kingdom,2.225 1958,UKG,United Kingdom,2.389 1959,UKG,United Kingdom,2.067 1960,UKG,United Kingdom,1.899 1961,UKG,United Kingdom,1.844 1962,UKG,United Kingdom,2.002 1963,UKG,United Kingdom,2.072 1965,UKG,United Kingdom,2.006 1966,UKG,United Kingdom,2.108 1967,UKG,United Kingdom,2.192 1968,UKG,United Kingdom,2.108 1969,UKG,United Kingdom,2.024 1970,UKG,United Kingdom,1.85 1971,UKG,United Kingdom,1.599 1972,UKG,United Kingdom,1.965 1973,UKG,United Kingdom,2.118 1974,UKG,United Kingdom,1.777 1975,UKG,United Kingdom,1.859 1976,UKG,United Kingdom,2.071 1977,UKG,United Kingdom,1.957 1978,UKG,United Kingdom,2.018 1979,UKG,United Kingdom,2.028 1980,UKG,United Kingdom,1.976 1981,UKG,United Kingdom,1.925 1982,UKG,United Kingdom,1.955 1983,UKG,United Kingdom,1.971 1984,UKG,United Kingdom,2.047 1985,UKG,United Kingdom,2.04 1986,UKG,United Kingdom,2.103 1987,UKG,United Kingdom,2.03 1988,UKG,United Kingdom,2.052 1989,UKG,United Kingdom,2.105 1990,UKG,United Kingdom,2.108 1991,UKG,United Kingdom,1.992 1992,UKG,United Kingdom,1.863 1993,UKG,United Kingdom,1.904 1994,UKG,United Kingdom,1.986 1995,UKG,United Kingdom,2.228 1996,UKG,United Kingdom,2.034 1997,UKG,United Kingdom,1.977 1998,UKG,United Kingdom,1.759 1999,UKG,United Kingdom,1.687 2000,UKG,United Kingdom,1.689 2001,UKG,United Kingdom,1.626 2002,UKG,United Kingdom,1.674 2003,UKG,United Kingdom,1.67 2004,UKG,United Kingdom,1.635 2005,UKG,United Kingdom,1.671 2006,UKG,United Kingdom,1.533 2007,UKG,United Kingdom,1.625 2008,UKG,United Kingdom,1.588 2009,UKG,United Kingdom,1.479 2010,UKG,United Kingdom,1.611 2011,UKG,United Kingdom,1.497 2012,UKG,United Kingdom,1.53 1946,USA,United States of America,1.714 1947,USA,United States of America,1.813 1948,USA,United States of America,1.936 1949,USA,United States of America,1.877 1950,USA,United States of America,1.811 1951,USA,United States of America,1.828 1952,USA,United States of America,1.905 1953,USA,United States of America,1.693 1954,USA,United States of America,1.482 1955,USA,United States of America,1.719 1956,USA,United States of America,1.285 1957,USA,United States of America,1.247 1958,USA,United States of America,1.266 1959,USA,United States of America,1.547 1960,USA,United States of America,1.532 1961,USA,United States of America,1.698 1962,USA,United States of America,1.889 1963,USA,United States of America,1.852 1965,USA,United States of America,2.011 1966,USA,United States of America,2.069 1967,USA,United States of America,2.259 1968,USA,United States of America,2.213 1969,USA,United States of America,2.093 1970,USA,United States of America,2.132 1971,USA,United States of America,1.805 1972,USA,United States of America,2.04 1973,USA,United States of America,2.209 1974,USA,United States of America,2.031 1975,USA,United States of America,2.145 1976,USA,United States of America,2.393 1977,USA,United States of America,2.206 1978,USA,United States of America,2.228 1979,USA,United States of America,2.277 1980,USA,United States of America,2.318 1981,USA,United States of America,2.658 1982,USA,United States of America,2.568 1983,USA,United States of America,2.592 1984,USA,United States of America,2.737 1985,USA,United States of America,2.742 1986,USA,United States of America,2.851 1987,USA,United States of America,2.927 1988,USA,United States of America,2.902 1989,USA,United States of America,2.962 1990,USA,United States of America,2.893 1991,USA,United States of America,2.754 1992,USA,United States of America,2.766 1993,USA,United States of America,2.734 1994,USA,United States of America,2.688 1995,USA,United States of America,2.939 1996,USA,United States of America,3.014 1997,USA,United States of America,2.923 1998,USA,United States of America,2.854 1999,USA,United States of America,2.678 2000,USA,United States of America,2.611 2001,USA,United States of America,2.576 2002,USA,United States of America,2.628 2003,USA,United States of America,2.796 2004,USA,United States of America,2.771 2005,USA,United States of America,2.894 2006,USA,United States of America,2.879 2007,USA,United States of America,2.771 2008,USA,United States of America,2.752 2009,USA,United States of America,2.564 2010,USA,United States of America,2.519 2011,USA,United States of America,2.522 2012,USA,United States of America,2.681 1946,CAN,Canada,1.849 1947,CAN,Canada,1.987 1948,CAN,Canada,1.911 1949,CAN,Canada,1.672 1950,CAN,Canada,1.812 1951,CAN,Canada,1.916 1952,CAN,Canada,1.989 1953,CAN,Canada,1.745 1954,CAN,Canada,1.746 1955,CAN,Canada,1.714 1956,CAN,Canada,1.554 1957,CAN,Canada,1.608 1958,CAN,Canada,1.579 1959,CAN,Canada,1.096 1960,CAN,Canada,1.106 1961,CAN,Canada,1.467 1962,CAN,Canada,1.555 1963,CAN,Canada,1.61 1965,CAN,Canada,1.685 1966,CAN,Canada,1.774 1967,CAN,Canada,1.769 1968,CAN,Canada,1.577 1969,CAN,Canada,1.615 1970,CAN,Canada,1.577 1971,CAN,Canada,1.391 1972,CAN,Canada,1.549 1973,CAN,Canada,1.479 1974,CAN,Canada,1.471 1975,CAN,Canada,1.457 1976,CAN,Canada,1.501 1977,CAN,Canada,1.687 1978,CAN,Canada,1.768 1979,CAN,Canada,1.81 1980,CAN,Canada,1.824 1981,CAN,Canada,1.773 1982,CAN,Canada,1.656 1983,CAN,Canada,1.658 1984,CAN,Canada,1.703 1985,CAN,Canada,1.645 1986,CAN,Canada,1.555 1987,CAN,Canada,1.546 1988,CAN,Canada,1.403 1989,CAN,Canada,1.356 1990,CAN,Canada,1.286 1991,CAN,Canada,1.271 1992,CAN,Canada,1.234 1993,CAN,Canada,1.138 1994,CAN,Canada,1.145 1995,CAN,Canada,1.106 1996,CAN,Canada,1.196 1997,CAN,Canada,1.116 1998,CAN,Canada,1.178 1999,CAN,Canada,1.173 2000,CAN,Canada,1.112 2001,CAN,Canada,1.184 2002,CAN,Canada,1.129 2003,CAN,Canada,1.127 2004,CAN,Canada,1.236 2005,CAN,Canada,1.264 2006,CAN,Canada,1.412 2007,CAN,Canada,1.56 2008,CAN,Canada,1.611 2009,CAN,Canada,1.582 2010,CAN,Canada,1.529 2011,CAN,Canada,1.856 2012,CAN,Canada,2.059 \ No newline at end of file diff --git a/inst/examples/UN_Simple/global.R b/inst/examples/UN_Simple/global.R new file mode 100644 index 0000000000..9107282501 --- /dev/null +++ b/inst/examples/UN_Simple/global.R @@ -0,0 +1 @@ +ideal <- read.csv("Data/UN_IdealPoints.csv", stringsAsFactors = F) diff --git a/inst/examples/UN_Simple/server.R b/inst/examples/UN_Simple/server.R new file mode 100644 index 0000000000..3c99f90ca4 --- /dev/null +++ b/inst/examples/UN_Simple/server.R @@ -0,0 +1,19 @@ +library(shiny) +library(plotly) + +shinyServer(function(input, output, session) { + + output$trendPlot <- renderPlotly({ + + if (length(input$name) == 0) { + print("Please select at least one country") + } else { + df_trend <- ideal[ideal$Name == input$name, ] + ggplot(df_trend) + + geom_line(aes(x = Year, y = Ideal.point, by = Name, color = Name)) + + labs(x = "Year", y = "Ideology", title = "Ideal Points for Countries") + + scale_colour_hue("clarity", l = 70, c = 150) + ggthemes::theme_few() + } + + }) +}) diff --git a/inst/examples/UN_Simple/ui.R b/inst/examples/UN_Simple/ui.R new file mode 100644 index 0000000000..ed7fa268c1 --- /dev/null +++ b/inst/examples/UN_Simple/ui.R @@ -0,0 +1,27 @@ +library(shiny) + +shinyUI(fluidPage( + + # Application title + titlePanel("Ideal Points"), + + sidebarPanel( + h3("Ideal Points Estimation"), + # Select Justices name here + selectizeInput("name", + label = "Country Name(s) of Interest", + choices = unique(ideal$Name), + multiple = T, + options = list(maxItems = 5, placeholder = 'Select a name'), + selected = "United States of America"), + # Term plot + plotOutput("termPlot", height = 200), + helpText("Data: Bailey, Michael, Anton Strezhnev and Erik Voeten. Forthcoming. 'Estimating Dynamic State Preferences from United Nations Voting Data.' Journal of Conflict Resolution. ") + ), + + # Show a plot of the generated distribution + mainPanel( + plotlyOutput("trendPlot") + ) +) +) diff --git a/inst/shiny/plotly_shiny.js b/inst/shiny/plotly_shiny.js new file mode 100644 index 0000000000..a197ee7118 --- /dev/null +++ b/inst/shiny/plotly_shiny.js @@ -0,0 +1,63 @@ +// Immediately Invoked Function Expression (IIFE). +// recommended by Joe -> https://github.com/jcheng5/shiny-js-examples/blob/master/output/www/linechart-binding.js +(function() { + +var binding = new Shiny.OutputBinding(); + +binding.find = function(scope) { + return $(scope).find('.plotly_shiny'); +}; + +binding.renderValue = function(el, dat) { + + // $el is the jQuery representation of this shiny output + // for offline plots, this element is a div; otherwise, an iframe + var $el = $(el); + + // use Plotly Offline? + var offline = dat[0].offline; + // data attached to this element (none is attached at startup) + // provides a nifty mechanism to distinguish between initiating & modifying + // the element -> https://github.com/jcheng5/shiny-js-examples/blob/master/output/www/linechart-binding.js + var plotlyDat = $el.data("plotly"); + + if (offline) { + + if (!plotlyDat) { + $el.data("plotly", {plotly: 'rules'}); + } + // Have to give newPlot a DOM representation of the
+ // (instead of the id string) + var gd = document.getElementById($el.attr('id')); + Plotly.newPlot(gd, dat[0].data, dat[0].layout); + + } else { + // see https://github.com/plotly/postMessage-API#newPlot + var msg = {task: 'newPlot', data: dat[0].data, layout: dat[0].layout}; + var plot = $el[0].contentWindow; + // If we haven't attached any data to this binding, ping plotly to + // make sure it's ready to receive message(s). This will prevent posting + // n >= 1 messages everytime shiny inputs change. + if (!plotlyDat) { + // see https://github.com/plotly/postMessage-API#ping + var pinger = setInterval(function() { + plot.postMessage({task: 'ping'}, 'https://plot.ly'); + }, 500); + window.addEventListener('message', function(e) { + if (e.origin !== "https://plot.ly") return; + if (e.data.pong) { + console.log('Initial pong, frame is ready to receive'); + clearInterval(pinger); + plot.postMessage(msg, 'https://plot.ly'); + } + }); + // now attach some arbitrary data + $el.data("plotly", {plotly: 'rules'}); + } + plot.postMessage(msg, 'https://plot.ly'); + } +}; + +Shiny.outputBindings.register(binding, "plotlyEmbed"); + +})(); diff --git a/inst/testscripts/.push_test_table.sh b/inst/testscripts/.push_test_table.sh deleted file mode 100644 index b6ef2e1976..0000000000 --- a/inst/testscripts/.push_test_table.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# exit on error -set -e - -# ----------------------------------------------------------------------- -# Travis does two types of builds: -# -# (1) A so-called "push". This essentially does a checkout on the most -# recent commit of the pull request, but *doesn't* merge with master. -# In this case, $TRAVIS_PULL_REQUEST = "false" -# (2) A so-called "pr" (pull request). This *does* merge with master. -# In this case, $TRAVIS_PULL_REQUEST contains the pull request number. -# ----------------------------------------------------------------------- - -# We need the pull request number to talk to the GitHub API, make comments, etc. -[ "${TRAVIS_PULL_REQUEST}" = "false" ] && exit 0 - -git config --global user.name "cpsievert" -git config --global user.email "cpsievert1@gmail.com" - -cd .. -git clone https://github.com/ropensci/plotly-test-table.git -cd plotly-test-table -git checkout gh-pages - -# Read more about Travis environment variables -- -# http://docs.travis-ci.com/user/ci-environment/ -Rscript ../plotly/inst/testscripts/comment.R $TRAVIS_PULL_REQUEST $TRAVIS_BUILD_ID $TRAVIS_COMMIT $GH_TOKEN diff --git a/inst/testscripts/comment.R b/inst/testscripts/comment.R deleted file mode 100644 index 31786439ec..0000000000 --- a/inst/testscripts/comment.R +++ /dev/null @@ -1,74 +0,0 @@ -# first argument is the pull request number (TRAVIS_PULL_REQUEST) -# second is travis build ID (TRAVIS_BUILD_ID) -# third is the commit SHA1 currently being tested (TRAVIS_COMMIT) -# fourth is the github authentication token -a <- commandArgs(TRUE) -# gistr is a good reference for talking to the github API via httr -# https://github.com/ropensci/gistr/blob/master/R/zzz.R -library("httr") -base <- 'https://api.github.com/repos/ropensci/plotly/' -pr <- sprintf(paste0(base, 'pulls/%s'), a[1]) -header <- add_headers(`User-Agent` = "plotly", - `Accept` = 'application/vnd.github.v3+json', - `Authorization` = paste0("token ", a[4])) -# Must be successful since we grab the branch name for this pull request -# and SHA1 info from the request content -res <- GET(url = pr, header) -stop_for_status(res) -info <- content(res) -# find the branch name for this pull request -# http://stackoverflow.com/questions/15096331/github-api-how-to-find-the-branches-of-a-pull-request -branch <- strsplit(info$head$label, ":")[[1]][2] - -# plotly-test-table build script assumes we've checkout the dev branch. -# Note that travis does something like this for "pr" build: -#$ git fetch origin +refs/pull/number/merge: -#$ git checkout -qf FETCH_HEAD -# this leaves HEAD in a detached state, but we should be able to do: -# git checkout -b new_branch_name -setwd("../plotly") -if (system(paste("git checkout -b", branch)) != 0L) - stop(paste("Failed to 'git checkout -b'", branch, "branch")) -devtools::install() -setwd("../plotly-test-table") -cat("user,SHA1,label", file = "code_commits.csv") -row1 <- paste0("\nropensci,", info$base$sha, ",master") -cat(row1, file = "code_commits.csv", append = TRUE) -row2 <- paste0("\nropensci,", a[3], ",", branch) -cat(row2, file = "code_commits.csv", append = TRUE) - -# copy over file (created during Rscript) -# with sha/branch info for building test table -system("touch table.R") -if (system("make") != 0L) stop("Failed to 'make' test table") - -# add, commit, push to gh-pages branch of plotly-test-table -system("git add index.html") -system("git add tables/*/*.html") -system("git add data/*/*.png") -system("git add data/*/*.log") -build_link <- paste0('https://travis-ci.org/ropensci/plotly/builds/', a[2]) -commit_msg <- paste0('"Pushed from ', build_link, '"') -system(paste('git commit -m', commit_msg)) -# This post explains how this works -- http://rmflight.github.io/posts/2014/11/travis_ci_gh_pages.html -repo <- sprintf("https://%s@github.com/ropensci/plotly-test-table.git", a[4]) -system(paste("git pull -q", repo, "gh-pages")) -system(paste("git push -q", repo, "gh-pages")) - -# post comment if a link to this SHA doesn't exist -# (needed since Travis randomly re-builds stuff) -tbl_link <- sprintf("http://ropensci.github.io/plotly-test-table/tables/%s/index.html", a[3]) -msg <- sprintf("On TravisCI, commit %s was successfully merged with %s (master) to create %s. A visual testing table comparing %s with %s can be found here:\n %s", - info$head$sha, info$base$sha, a[3], info$base$sha, a[3], tbl_link) -msg <- paste("> The message below was automatically generated after build", build_link, "\n\n", msg) -commentz <- sprintf(paste0(base, 'issues/%s/comments'), a[1]) -res <- GET(commentz, header) -warn_for_status(res) -info <- content(res) -old_body <- unlist(lapply(info, "[", "body")) -if (!any(grepl(tbl_link, old_body))) { - json <- jsonlite::toJSON(list(body = msg), auto_unbox = TRUE) - httr::POST(url = commentz, header, body = json, encode = "json") -} else { - message("Link already posted") -} diff --git a/man/add_trace.Rd b/man/add_trace.Rd new file mode 100644 index 0000000000..976d7fdc11 --- /dev/null +++ b/man/add_trace.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/plotly.R +\name{add_trace} +\alias{add_trace} +\title{Add a trace to a plotly visualization} +\usage{ +add_trace(p = last_plot(), ..., group, color, colors, symbol, symbols, size, + data = NULL, evaluate = FALSE) +} +\arguments{ +\item{p}{A plotly object.} + +\item{...}{These arguments are documented in the references section below. +Note that acceptable arguments depend on the trace type.} + +\item{group}{Either a variable name or a vector to use for grouping. If used, +a different trace will be created for each unique value.} + +\item{color}{Either a variable name or a vector to use for color mapping.} + +\item{colors}{Either a colorbrewer2.org palette name (e.g. "YlOrRd" or "Blues"), +or a vector of colors to interpolate in hexadecimal "#RRGGBB" format, +or a color interpolation function like \link{grDevices::colorRamp}.} + +\item{symbol}{Either a variable name or a (discrete) vector to use for symbol encoding.} + +\item{symbols}{A character vector of symbol types. Possible values: +'dot', 'cross', 'diamond', 'square', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-up'} + +\item{size}{A variable name or numeric vector to encode the size of markers.} + +\item{data}{A data frame to associate with this trace (optional). If not +provided, arguments are evaluated using the data frame in \code{\link{plot_ly}()}.} + +\item{evaluate}{logical. Evaluate arguments when this function is called?} +} +\description{ +Add a trace to a plotly visualization +} +\author{ +Carson Sievert +} +\references{ +\url{https://plot.ly/r/reference/} +} +\seealso{ +\code{\link{plot_ly}()} +} + diff --git a/man/embed_notebook.Rd b/man/embed_notebook.Rd new file mode 100644 index 0000000000..1bc4f5bc0e --- /dev/null +++ b/man/embed_notebook.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/print.R +\name{embed_notebook} +\alias{embed_notebook} +\title{Embed a plotly iframe into a IPython Notebook} +\usage{ +embed_notebook(x, width = "100\%", height = "525") +} +\arguments{ +\item{x}{a plotly object} + +\item{width}{attribute of the iframe} + +\item{height}{attribute of the iframe} +} +\description{ +Embed a plotly iframe into a IPython Notebook +} + diff --git a/man/ensure_file_exist.Rd b/man/ensure_file_exist.Rd deleted file mode 100644 index 4b1586acbe..0000000000 --- a/man/ensure_file_exist.Rd +++ /dev/null @@ -1,15 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/tools.R -\name{ensure_file_exist} -\alias{ensure_file_exist} -\title{Create file if nonexistent} -\usage{ -ensure_file_exist(abspath) -} -\arguments{ -\item{abspath}{Character vector of file path} -} -\description{ -Create file if nonexistent -} - diff --git a/man/get_config_file.Rd b/man/get_config_file.Rd deleted file mode 100644 index 1af0d1dcb1..0000000000 --- a/man/get_config_file.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/tools.R -\name{get_config_file} -\alias{get_config_file} -\title{Read Plotly config file (which is a JSON) and create one if nonexistent} -\usage{ -get_config_file(args = c()) -} -\arguments{ -\item{args}{Character vector of keys you are looking up} -} -\value{ -List of keyword-value pairs (config) -} -\description{ -Read Plotly config file (which is a JSON) and create one if nonexistent -} -\examples{ -\dontrun{ -get_config_file(c("plotly_domain", "plotly_streaming_domain")) -} -} - diff --git a/man/get_credentials_file.Rd b/man/get_credentials_file.Rd deleted file mode 100644 index b45712ccb4..0000000000 --- a/man/get_credentials_file.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/tools.R -\name{get_credentials_file} -\alias{get_credentials_file} -\title{Read Plotly credentials file (which is a JSON)} -\usage{ -get_credentials_file(args = c()) -} -\arguments{ -\item{args}{Character vector of keys you are looking up} -} -\value{ -List of keyword-value pairs (credentials) -} -\description{ -Read Plotly credentials file (which is a JSON) -} -\examples{ -\dontrun{ -get_credentials_file(c("username", "api_key")) -} -} - diff --git a/man/get_figure.Rd b/man/get_figure.Rd new file mode 100644 index 0000000000..015c9ca929 --- /dev/null +++ b/man/get_figure.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/figure.R +\name{get_figure} +\alias{get_figure} +\title{Request a figure object} +\usage{ +get_figure(username, id) +} +\arguments{ +\item{username}{corresponding username for the figure.} + +\item{id}{of the Plotly figure.} +} +\description{ +Figure objects work in the same way as plotly objects, but when printed, +they overwrite the already existing plotly object +(instead of creating a new plotly). +} +\examples{ +\dontrun{ + # Anyone can obtain the information for a particular plot + fig <- get_figure("cpsievert", "559") + # If you have proper credentials, you can easily modify + layout(fig, title = paste("Modified on ", Sys.time())) +} +} +\references{ +https://plot.ly/rest/ +} + diff --git a/man/get_plot.Rd b/man/get_plot.Rd new file mode 100644 index 0000000000..f75cf3cdd2 --- /dev/null +++ b/man/get_plot.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/utils.R +\name{get_plot} +\alias{get_plot} +\title{Obtain underlying data of plotly object} +\usage{ +get_plot(data = NULL, last = FALSE) +} +\arguments{ +\item{data}{a data frame with a class of plotly (and a plotly_hash attribute).} + +\item{last}{if no plotly attribute is found, return the last plot or NULL?} +} +\description{ +Given a data frame with a class of plotly, this function returns the arguments +and/or data used to create the plotly. If no data frame is provided, +the last plotly object created in this R session is returned (if it exists). +} + diff --git a/man/ggplotly.Rd b/man/ggplotly.Rd new file mode 100644 index 0000000000..9895c619a5 --- /dev/null +++ b/man/ggplotly.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/ggplotly.R +\name{ggplotly} +\alias{ggplotly} +\title{Create plotly graphs using ggplot2 syntax} +\usage{ +ggplotly(p = last_plot()) +} +\arguments{ +\item{p}{a ggplot object.} +} +\description{ +See up-to-date documentation and examples at +\url{https://plot.ly/ggplot2} +} +\examples{ +\dontrun{ +# simple example +ggiris <- qplot(Petal.Width, Sepal.Length, data = iris, color = Species) +ggplotly(ggiris) + +# maps!! +data(canada.cities, package = "maps") +viz <- ggplot(canada.cities, aes(long, lat)) + + borders(regions = "canada", name = "borders") + + coord_equal() + + geom_point(aes(text = name, size = pop), colour = "red", + alpha = 1/2, name = "cities") + ggplotly(viz) +} +} +\author{ +Carson Sievert +} +\seealso{ +\link{signup}, \link{plot_ly} +} + diff --git a/man/hobbs.Rd b/man/hobbs.Rd new file mode 100644 index 0000000000..fb303b7d37 --- /dev/null +++ b/man/hobbs.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{hobbs} +\alias{hobbs} +\title{Hobbs data} +\format{A data frame with three variables: \code{r}, \code{t}, + \code{nms}.} +\usage{ +hobbs +} +\description{ +Description TBD. +} +\keyword{datasets} + diff --git a/man/knit_print.offline.Rd b/man/knit_print.offline.Rd new file mode 100644 index 0000000000..d410aa63fc --- /dev/null +++ b/man/knit_print.offline.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/print.R +\name{knit_print.offline} +\alias{knit_print.offline} +\title{Embed a plotly iframe into an R markdown document via \code{knit_print}} +\usage{ +knit_print.offline(x, options, ...) +} +\arguments{ +\item{x}{named list of ggplots and option lists to pass to \code{animint2dir}.} + +\item{options}{knitr options.} + +\item{...}{placeholder.} +} +\description{ +Embed a plotly iframe into an R markdown document via \code{knit_print} +} +\references{ +https://github.com/yihui/knitr/blob/master/vignettes/knit_print.Rmd +} + diff --git a/man/knit_print.plotly.Rd b/man/knit_print.plotly.Rd new file mode 100644 index 0000000000..a8cc3b72e3 --- /dev/null +++ b/man/knit_print.plotly.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/print.R +\name{knit_print.plotly} +\alias{knit_print.plotly} +\title{Embed a plotly iframe into an R markdown document via \code{knit_print}} +\usage{ +knit_print.plotly(x, options, ...) +} +\arguments{ +\item{x}{named list of ggplots and option lists to pass to \code{animint2dir}.} + +\item{options}{knitr options.} + +\item{...}{placeholder.} +} +\description{ +Embed a plotly iframe into an R markdown document via \code{knit_print} +} +\references{ +https://github.com/yihui/knitr/blob/master/vignettes/knit_print.Rmd +} + diff --git a/man/last_plot.Rd b/man/last_plot.Rd new file mode 100644 index 0000000000..e9118c356f --- /dev/null +++ b/man/last_plot.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/utils.R +\name{last_plot} +\alias{last_plot} +\title{Retrive last plotly to be modified or created} +\usage{ +last_plot(...) +} +\description{ +Retrive last plotly to be modified or created +} +\seealso{ +\link{plotly_build} +} + diff --git a/man/layout.Rd b/man/layout.Rd new file mode 100644 index 0000000000..d0fa97c014 --- /dev/null +++ b/man/layout.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/plotly.R +\name{layout} +\alias{layout} +\title{Add and/or modify layout of a plotly} +\usage{ +layout(p = last_plot(), ..., data = NULL, evaluate = FALSE) +} +\arguments{ +\item{p}{A plotly object.} + +\item{...}{Arguments to the layout object. For documentation, +see \url{https://plot.ly/r/reference/#Layout_and_layout_style_objects}} + +\item{data}{A data frame to associate with this layout (optional). If not +provided, arguments are evaluated using the data frame in \code{\link{plot_ly}()}.} + +\item{evaluate}{logical. Evaluate arguments when this function is called?} +} +\description{ +Add and/or modify layout of a plotly +} +\author{ +Carson Sievert +} + diff --git a/man/mic.Rd b/man/mic.Rd new file mode 100644 index 0000000000..e3e68a71b5 --- /dev/null +++ b/man/mic.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{mic} +\alias{mic} +\title{Mic data} +\format{A data frame with three variables: \code{r}, \code{t}, + \code{nms}.} +\usage{ +mic +} +\description{ +Description TBD. +} +\keyword{datasets} + diff --git a/man/offline.Rd b/man/offline.Rd new file mode 100644 index 0000000000..feb6dcb3a6 --- /dev/null +++ b/man/offline.Rd @@ -0,0 +1,61 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/offline.R +\name{offline} +\alias{offline} +\title{Plotly Offline} +\usage{ +offline(p = last_plot(), height = 400, width = "100\%", out_dir = NULL, + open_browser = interactive()) +} +\arguments{ +\item{p}{a plotly object} + +\item{height}{A valid CSS unit. (like "100\%", "600px", "auto") or a number, +which will be coerced to a string and have "px" appended.} + +\item{width}{A valid CSS unit. (like "100\%", "600px", "auto") or a number, +which will be coerced to a string and have "px" appended.} + +\item{out_dir}{a directory to place the visualization. +If \code{NULL}, a temporary directory is used when the offline object is printed.} + +\item{open_browser}{open the visualization after creating it?} +} +\value{ +a plotly object of class "offline" +} +\description{ +Create a plotly visualization that doesn't require an external plotly server. +} +\examples{ +\dontrun{ +# If you purchased plotly offline, you should've received a private link +# to the source files. You may use this code to install them +link <- "private link" # put the link you received here +tmp <- tempfile(fileext = ".zip") +js_dir <- "~/.plotly/plotlyjs" +download.file(link, tmp) +if (!dir.exists(js_dir)) dir.create(js_dir, recursive = TRUE) +unzip(tmp, exdir = js_dir) +unlink(tmp) + +# now start making offline plots! +p <- plot_ly(data = iris, x = Sepal.Width, y = Sepal.Length, color = Species, + mode = "markers") +offline(p) + +# works with ggplot2 +gg <- qplot(data = iris, x = Sepal.Width, y = Sepal.Length, color = Species) +offline(gg) + +# also works with shiny/rmarkdown +shiny::runApp(system.file("examples/UN_Simple", package = "plotly")) +} +} +\author{ +Carson Sievert +} +\references{ +\url{http://purchasing.plot.ly/} +} + diff --git a/man/pipe.Rd b/man/pipe.Rd new file mode 100644 index 0000000000..1e4f82891b --- /dev/null +++ b/man/pipe.Rd @@ -0,0 +1,13 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/pipe.R +\name{\%>\%} +\alias{\%>\%} +\title{Pipe operator} +\usage{ +lhs \%>\% rhs +} +\description{ +See \code{\link[magrittr]{\%>\%}} for more details. +} +\keyword{internal} + diff --git a/man/plot_ly.Rd b/man/plot_ly.Rd new file mode 100644 index 0000000000..329ff89300 --- /dev/null +++ b/man/plot_ly.Rd @@ -0,0 +1,72 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/plotly.R +\name{plot_ly} +\alias{plot_ly} +\title{Initiate a plotly visualization} +\usage{ +plot_ly(data = data.frame(), ..., type = "scatter", group, color, colors, + symbol, symbols, size, inherit = TRUE, evaluate = FALSE) +} +\arguments{ +\item{data}{A data frame (optional).} + +\item{...}{These arguments are documented in the references section below. +Note that acceptable arguments depend on the trace type.} + +\item{type}{A charater string describing the type of trace.} + +\item{group}{Either a variable name or a vector to use for grouping. If used, +a different trace will be created for each unique value.} + +\item{color}{Either a variable name or a vector to use for color mapping.} + +\item{colors}{Either a colorbrewer2.org palette name (e.g. "YlOrRd" or "Blues"), +or a vector of colors to interpolate in hexadecimal "#RRGGBB" format, +or a color interpolation function like \link{grDevices::colorRamp}.} + +\item{symbol}{Either a variable name or a (discrete) vector to use for symbol encoding.} + +\item{symbols}{A character vector of symbol types. Possible values: +'dot', 'cross', 'diamond', 'square', 'triangle-down', 'triangle-left', 'triangle-right', 'triangle-up'} + +\item{size}{A variable name or numeric vector to encode the size of markers.} + +\item{inherit}{should future traces inherit properties from this initial trace?} + +\item{evaluate}{logical. Evaluate arguments when this function is called?} +} +\description{ +Transform data into a plotly visualization. +} +\details{ +There are a number of "visual properties" that aren't included in the officical +Reference section (see below). +} +\examples{ +\dontrun{ +data(economics, package = "ggplot2") +# basic time-series plot +p <- plot_ly(economics, x = date, y = uempmed, type = "scatter", + showlegend = FALSE) +# add a loess smoother +p2 <- add_trace(p, y = fitted(loess(uempmed ~ as.numeric(date)))) +# add a title +p3 <- layout(p2, title = "Median duration of unemployment (in weeks)") +# change the font +layout(p3, font = list(family = "Courier New, monospace")) + +# sometimes, a data frame isn't fit for the use case... +# for 3D surface plots, a numeric matrix is more natural +plot_ly(z = volcano, type = "surface") +} +} +\author{ +Carson Sievert +} +\references{ +\url{https://plot.ly/r/reference/} +} +\seealso{ +\code{\link{layout}()}, \code{\link{add_trace}()}, \code{\link{style}()} +} + diff --git a/man/plotly-package.Rd b/man/plotly-package.Rd deleted file mode 100644 index b7b513975e..0000000000 --- a/man/plotly-package.Rd +++ /dev/null @@ -1,42 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/plotly-package.r -\docType{package} -\name{plotly-package} -\alias{plotly-package} -\title{A R API for plot.ly} -\description{ -plot.ly is a browser-based data visualization tool that creates interactive and publication -quality figures. This API allows R users to generate plot.ly graphs from their desktop -R environment. -} -\details{ -An example of an interactive graph made from the R API: https://plot.ly/~chris/407/ - -\itemize{ - \item Package: plotly - \item Type: Package - \item Version: 0.6.3 - \item Date: 2014-03-07 - \item License: MIT -} -} -\section{Authentication}{ - - -There are a few different options. First, you can pass in your username and key -to the \code{plotly} function as parameters, like \code{plotly(, -)}. Second, you can set your username and key as options temporarily -within each R session by executing \code{options(plotlyUsername='')} -and \code{options(plotlyKey='')}. Third, you set your username and key -permanently (until removed) in your .Rprofile file. Put entries in for each of -username and password: \code{options(plotlyUsername='')} and -\code{options(plotlyKey='')}. -} -\author{ -Chris Parmer chris@plot.ly -} -\references{ -Documentation and examples at https://plot.ly/API -} -\keyword{package} - diff --git a/man/plotly.Rd b/man/plotly.Rd index 055b425439..6839b1285b 100644 --- a/man/plotly.Rd +++ b/man/plotly.Rd @@ -4,71 +4,15 @@ \alias{plotly} \title{Main interface to plotly} \usage{ -plotly(username = NULL, key = NULL, base_url = NULL) +plotly(username, key) } \arguments{ \item{username}{plotly username} \item{key}{plotly API key} - -\item{base_url}{plotly server} -} -\value{ -An object of class PlotlyClass, except for the final object after -adding layers becomes a list class. } \description{ -A call to \code{plotly(username, key)} creates an object of class -'PlotlyClass', which has methods: -\itemize{ - \item Plotting: py$plotly(x1, y1[, x2, y2, ...], kwargs=kwargs) or - py$plotly({data1[, data2, ...]}, kwargs=kwargs), py$ggplotly() - \item Styling Data: py$style(data1,data2,..., kwargs=kwargs) - \item Styling Layout: py$layout(layout, kwargs=kwargs) - \item Utilities: py$get_figure(file_owner, file_id) -} -} -\details{ -Plotly interface object. See up-to-date documentation and examples at -https://plot.ly/API - -See documentation and examples at https://plot.ly/API -} -\examples{ -\dontrun{ -## View https://plot.ly/API for more examples -## Generate a simple plot -username <- 'anna.lyst' # fill in with your plotly username -api_key <- 'y37zkd' # fill in with your plotly API key -py <- plotly(username, api_key) -## generate some data -x <- c(0, 1, 2) -y <- c(10, 11, 12) - -## Send data to Plotly. Plotly will render an interactive graph and will -## return a URL where you can view your plot -## This call sends data to Plotly, Plotly renders an interactive -## graph, and returns a URL where you can view your plot -response <- py$plot(x, y) -response$url # view your plot at this URL -browseURL(response$url) # use browseURL to go to the URL in your browser - -## Export ggplots directly to plot.ly -ggiris <- qplot(Petal.Width, Sepal.Length, data=iris, color=Species) -py$ggplotly(ggiris) -data(canada.cities, package="maps") -viz <- ggplot(canada.cities, aes(long, lat)) + - borders(regions="canada", name="borders") + - coord_equal() + - geom_point(aes(text=name, size=pop), colour="red", - alpha=1/2, name="cities") - py$ggplotly(viz) -} -} -\author{ -Chris Parmer chris@plot.ly -} -\references{ -https://plot.ly/API +Deprecated: see \link{signup} for credentials/configuration storage details. +See \link{ggplotly} for the new ggplot2 interface. } diff --git a/man/plotlyOutput.Rd b/man/plotlyOutput.Rd new file mode 100644 index 0000000000..3a782259b1 --- /dev/null +++ b/man/plotlyOutput.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/shiny.R +\name{plotlyOutput} +\alias{plotlyOutput} +\title{Shiny ui output function} +\usage{ +plotlyOutput(outputId, width = "100\%", height = "550px", offline = TRUE) +} +\arguments{ +\item{outputId}{output variable to read the plot from} + +\item{width}{width of the output.} + +\item{height}{height of the output.} + +\item{offline}{Use plotly offline, if available?} +} +\description{ +Shiny ui output function +} +\seealso{ +http://shiny.rstudio.com/articles/building-outputs.html +} + diff --git a/man/plotly_POST.Rd b/man/plotly_POST.Rd new file mode 100644 index 0000000000..ccb44db3c3 --- /dev/null +++ b/man/plotly_POST.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/plotly_POST.R +\name{plotly_POST} +\alias{plotly_POST} +\title{Create/Modify plotly graphs} +\usage{ +plotly_POST(x) +} +\arguments{ +\item{x}{either a plotly object or a list.} +} +\value{ +An R object created by mapping the JSON content of the plotly API +response to its R equivalent. +} +\description{ +POST messages to the clientresp resource of plotly's REST API. Unlike \link{ggplotly}, +this function does not translate ggplot objects. +} +\examples{ +\dontrun{ +# If you want, you can still construct lists by hand... +trace1 <- list( + x = c(1, 2, 3, 4), + y = c(10, 15, 13, 17), + type = "scatter" +) +trace2 <- list( + x = c(1, 2, 3, 4), + y = c(16, 5, 11, 9), + type = "scatter" +) +plotly_POST(list(trace1, trace2)) +} +} +\author{ +Carson Sievert +} +\references{ +https://plot.ly/rest/ +} +\seealso{ +\link{signup} +} + diff --git a/man/plotly_build.Rd b/man/plotly_build.Rd new file mode 100644 index 0000000000..76f2bad857 --- /dev/null +++ b/man/plotly_build.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/plotly.R +\name{plotly_build} +\alias{plotly_build} +\title{Build a plotly object before viewing it} +\usage{ +plotly_build(l = last_plot()) +} +\arguments{ +\item{l}{a ggplot object, or a plotly object, or a list.} +} +\description{ +For convenience and efficiency purposes, plotly objects are subject to lazy +evaluation. That is, the actual content behind a plotly object is not +created until it is absolutely necessary. In some instances, you may want +to perform this evaluation yourself, and work directly with the resulting +list. +} + diff --git a/man/plotly_empty.Rd b/man/plotly_empty.Rd new file mode 100644 index 0000000000..e4e55de5ff --- /dev/null +++ b/man/plotly_empty.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/plotly.R +\name{plotly_empty} +\alias{plotly_empty} +\title{Create a complete empty plotly graph.} +\usage{ +plotly_empty() +} +\description{ +Useful when used with \link{subplot} +} + diff --git a/man/print.offline.Rd b/man/print.offline.Rd new file mode 100644 index 0000000000..f9942eeb61 --- /dev/null +++ b/man/print.offline.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/print.R +\name{print.offline} +\alias{print.offline} +\title{Print an "offline" (local) plotly object} +\usage{ +\method{print}{offline}(x, ...) +} +\arguments{ +\item{x}{an object with class 'offline'} + +\item{...}{other arguments} +} +\description{ +Print an "offline" (local) plotly object +} + diff --git a/man/print.plotly.Rd b/man/print.plotly.Rd new file mode 100644 index 0000000000..05f1045abd --- /dev/null +++ b/man/print.plotly.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/print.R +\name{print.plotly} +\alias{print.plotly} +\title{Print a plotly object} +\usage{ +\method{print}{plotly}(x, ...) +} +\arguments{ +\item{x}{an object with class 'plotly'} + +\item{...}{other arguments} +} +\description{ +Print a plotly object +} + diff --git a/man/renderPlotly.Rd b/man/renderPlotly.Rd new file mode 100644 index 0000000000..e3cb8defb5 --- /dev/null +++ b/man/renderPlotly.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/shiny.R +\name{renderPlotly} +\alias{renderPlotly} +\title{Render a plotly graph in shiny} +\usage{ +renderPlotly(expr, envir = parent.frame(), quoted = FALSE, offline = TRUE) +} +\arguments{ +\item{expr}{An expression that creates a ggplot or plotly object} + +\item{envir}{The environment in which to evaluate \code{expr}.} + +\item{quoted}{Is expr a quoted expression (with \code{quote()})?} + +\item{offline}{Use plotly offline, if available? +This is useful if you want to save an expression in a variable.} +} +\description{ +Shiny server output function customized for plotly. +} + diff --git a/man/set_config_file.Rd b/man/set_config_file.Rd deleted file mode 100644 index 7fef7dc742..0000000000 --- a/man/set_config_file.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/tools.R -\name{set_config_file} -\alias{set_config_file} -\title{Set keyword-value pairs in Plotly config file} -\usage{ -set_config_file(plotly_domain = "", plotly_streaming_domain = "") -} -\arguments{ -\item{plotly_domain}{plotly domain} - -\item{plotly_streaming_domain}{plotly streaming domain} -} -\value{ -List of keyword-value pairs (config) -} -\description{ -Set keyword-value pairs in Plotly config file -} -\examples{ -\dontrun{ -set_config_file("https://kitty.plot.ly", "stream.kitty.plot.ly") -} -} - diff --git a/man/set_credentials_file.Rd b/man/set_credentials_file.Rd deleted file mode 100644 index 2830ee586c..0000000000 --- a/man/set_credentials_file.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/tools.R -\name{set_credentials_file} -\alias{set_credentials_file} -\title{Set the keyword-value pairs in Plotly credentials file} -\usage{ -set_credentials_file(username = "", api_key = "", stream_ids = list("", - "")) -} -\arguments{ -\item{username}{plotly username} - -\item{api_key}{plotly API key} - -\item{stream_ids}{stream ids} -} -\value{ -List of keyword-value pairs (credentials) -} -\description{ -Set the keyword-value pairs in Plotly credentials file -} -\examples{ -\dontrun{ -set_credentials_file("username", "api_key", list("foo", "bar)) -} -} - diff --git a/man/show_config_file.Rd b/man/show_config_file.Rd deleted file mode 100644 index 5b7f337b81..0000000000 --- a/man/show_config_file.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/tools.R -\name{show_config_file} -\alias{show_config_file} -\title{Read and print Plotly config file, wrapping get_credentials_file()} -\usage{ -show_config_file(args = c()) -} -\arguments{ -\item{args}{Character vector of keys you are looking up} -} -\value{ -List of keyword-value pairs (credentials) -} -\description{ -Read and print Plotly config file, wrapping get_credentials_file() -} - diff --git a/man/show_credentials_file.Rd b/man/show_credentials_file.Rd deleted file mode 100644 index 467be630f9..0000000000 --- a/man/show_credentials_file.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand -% Please edit documentation in R/tools.R -\name{show_credentials_file} -\alias{show_credentials_file} -\title{Read and print Plotly credentials file, wrapping get_credentials_file()} -\usage{ -show_credentials_file(args = c()) -} -\arguments{ -\item{args}{Character vector of keys you are looking up} -} -\value{ -List of keyword-value pairs (credentials) -} -\description{ -Read and print Plotly credentials file, wrapping get_credentials_file() -} - diff --git a/man/signup.Rd b/man/signup.Rd index aec5165512..414200126c 100644 --- a/man/signup.Rd +++ b/man/signup.Rd @@ -2,14 +2,17 @@ % Please edit documentation in R/signup.R \name{signup} \alias{signup} -\title{Sign up to plotly.} +\title{Create a new plotly account.} \usage{ -signup(username = NULL, email = NULL) +signup(username, email, save = TRUE) } \arguments{ -\item{username}{Desired username} +\item{username}{Desired username.} -\item{email}{Desired email} +\item{email}{Desired email.} + +\item{save}{If request is successful, should the username & API key be +automatically stored as an environment variable in a .Rprofile?} } \value{ \itemize{ @@ -18,28 +21,30 @@ signup(username = NULL, email = NULL) } } \description{ -A sign up interface to Plotly through the R Console. See documentation and -examples at https://plot.ly/API -} -\details{ -See documentation and examples at https://plot.ly/API -} -\note{ -https://plot.ly/API +A sign up interface to plotly through the R Console. } \examples{ \dontrun{ -username <- 'anna.lyst' -email <- 'anna.lyst@plot.ly' -response <- signup(username, email) -response$api_key # key to access plotly with -response$tmp_pw # temporary password to access your plotly account -} +# You need a plotly username and API key to communicate with the plotly API. + +# If you don't already have an API key, you can obtain one with a valid +# username and email via signup(). +s <- signup('anna.lyst', 'anna.lyst@plot.ly') + +# If you already have a username and API key, please create the following +# environment variables: +Sys.setenv("plotly_username" = "me") +Sys.setenv("plotly_api_key" = "mykey") +# You can also change the default domain if you have a plotly server. +Sys.setenv("plotly_domain" = "http://mydomain.com") + +# If you want to automatically load these environment variables when you +# start R, you can put them inside your ~/.Rprofile +# (see help(.Rprofile) for more details) + } -\author{ -Chris Parmer chris@plot.ly } \references{ -https://plot.ly/API +https://plot.ly/rest/ } diff --git a/man/stream.Rd b/man/stream.Rd new file mode 100644 index 0000000000..d28838cf51 --- /dev/null +++ b/man/stream.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/stream.R +\name{stream} +\alias{stream} +\title{Stream objects} +\usage{ +stream(x) +} +\arguments{ +\item{p}{a plotly or figure object.} +} +\description{ +Stream objects +} +\examples{ +# generate 100 random observations +n <- 100 +x <- rnorm(n) + +# start a plotly stream +s <- stream() +# write to the stream +for (i in seq_len(50)) { + s$write(x = x) + x <- x[-n] + x[1] <- rnorm(1) +} +# close the stream +s$close() +} + diff --git a/man/style.Rd b/man/style.Rd new file mode 100644 index 0000000000..244816e2fe --- /dev/null +++ b/man/style.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/plotly.R +\name{style} +\alias{style} +\title{Modify trace(s)} +\usage{ +style(p = last_plot(), ..., traces = 1, evaluate = FALSE) +} +\arguments{ +\item{p}{A plotly visualization.} + +\item{...}{Visual properties.} + +\item{traces}{numeric vector. Which traces should be modified?} + +\item{evaluate}{logical. Evaluate arguments when this function is called?} +} +\description{ +Modify trace(s) of an existing plotly visualization. Useful when used in +conjunction with \code{\link{get_figure}()}. +} +\author{ +Carson Sievert +} +\seealso{ +\code{\link{get_figure}()} +} + diff --git a/man/subplot.Rd b/man/subplot.Rd new file mode 100644 index 0000000000..adf0e64570 --- /dev/null +++ b/man/subplot.Rd @@ -0,0 +1,41 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/subplots.R +\name{subplot} +\alias{subplot} +\title{View multiple plots in a single view} +\usage{ +subplot(..., nrows = 1, which_layout = "merge", margin = 0.02) +} +\arguments{ +\item{...}{any number of plotly objects} + +\item{nrows}{number of rows for laying out plots in a grid-like structure. +Only used if no domain is already specified.} + +\item{which_layout}{adopt the layout of which plot? If the default value of +"merge" is used, all plot level layout options will be included in the final +layout. This argument also accepts a numeric vector which will restric} + +\item{margin}{either a single value or four values (all between 0 and 1). +If four values are provided, the first is used as the left margin, the second +is used as the right margin, the third is used as the top margin, and the +fourth is used as the bottom margin. +If a single value is provided, it will be used as all four margins.} +} +\value{ +A plotly object +} +\description{ +View multiple plots in a single view +} +\examples{ +\dontrun{ +p1 <- plot_ly(economics, x = date, y = uempmed, showlegend = F) +p2 <- plot_ly(economics, x = date, y = unemploy, showlegend = F) +offline(subplot(p1, p2, p1, p2, nrows = 2)) +} +} +\author{ +Carson Sievert +} + diff --git a/man/wind.Rd b/man/wind.Rd new file mode 100644 index 0000000000..310fd80ef8 --- /dev/null +++ b/man/wind.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{wind} +\alias{wind} +\title{Wind data} +\format{A data frame with three variables: \code{r}, \code{t}, + \code{nms}.} +\usage{ +wind +} +\description{ +Description TBD. +} +\keyword{datasets} + diff --git a/run_tests_with_outputs.R b/run_tests_with_outputs.R deleted file mode 100644 index 372a72f529..0000000000 --- a/run_tests_with_outputs.R +++ /dev/null @@ -1,39 +0,0 @@ -library(testthat) -devtools::install_github("ropensci/plotly", ref="marianne-datetime-binning") -library(plotly) - -setwd("tests") - -save_outputs <- function(gg, name, ignore_ggplot=FALSE, file_prefix="test-ggplot-") { - filesystem_name <- gsub(' ', '_', name) - print(paste("running", name)) - py <- plotly("TestBot", "r1neazxo9w") - u <- py$ggplotly(gg, kwargs=list(filename=paste0("ggplot2/", name), - fileopt="overwrite", auto_open=FALSE)) - plotlyUrl <- u$response$url - writeLines(plotlyUrl, paste0(file_prefix, filesystem_name, ".url")) - pngdata <- getURLContent(paste0(u$response$url, ".png")) - writeBin(as.raw(pngdata), paste0(file_prefix, filesystem_name, "-plotly.png")) - if (!ignore_ggplot) { - ggsave(paste0(file_prefix, filesystem_name, "-ggplot2.png"), plot=gg, w=7, h=5) - } - - # Save the json - writeLines(getURL(paste0(plotlyUrl, ".json")), paste0("test-ggplot-", name, - ".json")) -} - -test_check("plotly") -setwd("cookbook-test-suite") - -source('axes.R') -source('bars_and_lines.R') -source('distributions.R') -source('legends.R') -source('lines.R') -source('means_and_error_bars.R') -source('scatterplots.R') -source('titles.R') - -setwd("../..") - diff --git a/tests/testthat.R b/tests/testthat.R index c5273050e9..b7bd4cf4b5 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,5 +1,103 @@ -library(testthat) -save_outputs <- function(gg, name, ignore_ggplot=FALSE) { - print(paste("running", name)) +library("testthat") +library("plotly") + +# find the hash of the currently installed plotly package +pkg_info <- devtools::session_info()$packages +src <- subset(pkg_info, package == "plotly")$source +hash <- if (src == "local") { + # you could also do `git rev-parse HEAD`, but this is cleaner for Travis + substr(Sys.getenv("TRAVIS_COMMIT"), 1, 7) +} else { + # thankfully devtools includes hash for packages installed off GitHub + sub("\\)", "", strsplit(src, "@")[[1]][2]) } +# setup directory for placing files during tests +# (note the working directory should be /path/to/plotly/tests) +table_dir <- normalizePath("../../plotly-test-table") +plotly_dir <- file.path(table_dir, "R", hash) +plotly_thumb_dir <- file.path(plotly_dir, "thumbs") +dir.create(plotly_thumb_dir, showWarnings = FALSE, recursive = TRUE) + +# in case we need save ggplot2 output +ggversion <- as.character(packageVersion("ggplot2")) +gg_dir <- file.path(table_dir, "R", paste0("ggplot2-", ggversion)) +gg_thumb_dir <- file.path(gg_dir, "thumbs") +dir.create(gg_thumb_dir, showWarnings = FALSE, recursive = TRUE) +gg_names <- sub("\\.png$", "", dir(gg_dir, pattern = "\\.png$")) + +# text file that tracks figure hashes +hash_file <- file.path(table_dir, "R", "hashes.csv") +if (!file.exists(hash_file)) { + file.create(hash_file) + cat("commit,test,hash,url\n", file = hash_file, append = TRUE) +} + +# This function is called within testthat/test-*.R files. +# It takes a ggplot or plotly object as input, and it returns a figure +# object (aka the data behind the plot). +# Along the way, if this is a pull request build on Travis, +# it will POST figures to plotly and save pngs +save_outputs <- function(gg, name) { + print(paste("Running test:", name)) + p <- if (is.ggplot(gg)) gg2list(gg) else plotly_build(gg) + tpr <- Sys.getenv("TRAVIS_PULL_REQUEST") + # only render/save pngs if this is a Travis pull request + if (tpr != "false" && tpr != "") { + # POST data to plotly and return the url + u <- if (packageVersion("plotly") < 1) { + py <- plotly(Sys.getenv("plotly_username"), Sys.getenv("plotly_api_key")) + tryWhile({ + resp <- py$ggplotly(gg, kwargs = list(auto_open = FALSE)) + resp$response$url + }) + } else { + tryWhile({ + resp <- plotly_POST(p) + resp$url + }) + } + # save a hash of the R object sent to the plotly server + # (eventually use this to prevent redundant POSTs?!) + info <- paste(hash, name, digest::digest(p), u, sep = ",") + cat(paste(info, "\n"), file = hash_file, append = TRUE) + # download png under a directory specific to this installed version of plotly + filename <- file.path(plotly_dir, paste0(name, ".png")) + if (!file.exists(filename)) { + tryWhile({ + curl::curl_download(paste0(u, ".png"), filename) + }) + # now convert png to a smaller size + args <- c(filename, "-density", "36x36", "-write", + file.path(plotly_thumb_dir, paste0(name, ".png")), "+delete") + system2("convert", args) + } else { + stop(shQuote(name), " has already been used to save_outputs() in another test.") + } + + # if missing, save the ggplot2 + # do an else if to take advantage of both builds? + if (!name %in% gg_names) { + gg_file <- file.path(gg_dir, paste0(name, ".png")) + png(gg_file, width = 700, height = 500) + try(print(gg)) + dev.off() + # now convert png to a smaller size + args <- c(gg_file, "-density", "72x72", "-write", + file.path(gg_thumb_dir, paste0(name, ".png")), "+delete") + system2("convert", args) + } + } + p +} + +tryWhile <- function(expr, times = 20) { + e <- try(expr) + while (inherits(e, "try-error") && times > 0) { + Sys.sleep(0.5) + times <- times - 1 + e <- try(expr) + } + e +} + test_check("plotly") diff --git a/tests/testthat/test-cookbook-axes.R b/tests/testthat/test-cookbook-axes.R index 44937fe422..d45270be28 100644 --- a/tests/testthat/test-cookbook-axes.R +++ b/tests/testthat/test-cookbook-axes.R @@ -6,8 +6,7 @@ bp <- ggplot(PlantGrowth, aes(x=group, y=weight)) + expect_traces <- function(gg, n.traces, name) { stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("cookbook-axes-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("cookbook-axes-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-cookbook-lines.R b/tests/testthat/test-cookbook-lines.R index 6fd5eb35d8..272ebfe544 100644 --- a/tests/testthat/test-cookbook-lines.R +++ b/tests/testthat/test-cookbook-lines.R @@ -4,8 +4,7 @@ expect_traces_shapes <- function(gg, n.traces, n.shapes, name) { stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) stopifnot(is.numeric(n.shapes)) - save_outputs(gg, paste0("cookbook-lines-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("cookbook-lines-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-ggplot-abline.R b/tests/testthat/test-ggplot-abline.R index ef2e059832..95b6d0130a 100644 --- a/tests/testthat/test-ggplot-abline.R +++ b/tests/testthat/test-ggplot-abline.R @@ -10,7 +10,7 @@ test_that("Second trace be the a-b line", { gg <- ggplot(df) + geom_point(aes(x=x1, y=x2)) + geom_abline(intercept=1.1, slope=0.9, colour="red", size=4) - L <- gg2list(gg) + L <- save_outputs(gg, "abline") expect_equal(length(L$data), 2) expect_true(L$data[[2]]$x[1] <= 0) @@ -21,6 +21,4 @@ test_that("Second trace be the a-b line", { expect_identical(L$data[[1]]$showlegend, FALSE) expect_identical(L$data[[2]]$showlegend, FALSE) - - save_outputs(gg, "abline") }) diff --git a/tests/testthat/test-ggplot-area.R b/tests/testthat/test-ggplot-area.R index 1c13496f0e..728346458e 100644 --- a/tests/testthat/test-ggplot-area.R +++ b/tests/testthat/test-ggplot-area.R @@ -4,7 +4,7 @@ huron <- data.frame(year=1875:1972, level=as.vector(LakeHuron)) huron$decade <- plyr::round_any(huron$year, 10, floor) ar <- ggplot(huron) + geom_area(aes(x=year, y=level)) -L <- gg2list(ar) +L <- save_outputs(ar, "area") test_that("sanity check for geom_area", { expect_equal(length(L$data), 1) @@ -14,15 +14,11 @@ test_that("sanity check for geom_area", { expect_identical(L$data[[1]]$line$color, "transparent") }) -save_outputs(ar, "area") - # Test alpha transparency in fill color gg <- ggplot(huron) + geom_area(aes(x=year, y=level), alpha=0.4) -L <- gg2list(gg) +L <- save_outputs(gg, "area-fillcolor") test_that("transparency alpha in geom_area is converted", { expect_identical(L$data[[1]]$line$color, "transparent") expect_identical(L$data[[1]]$fillcolor, "rgba(51,51,51,0.4)") }) - -save_outputs(gg, "area-fillcolor") diff --git a/tests/testthat/test-ggplot-bar.R b/tests/testthat/test-ggplot-bar.R index 7c308375d0..6584d43183 100644 --- a/tests/testthat/test-ggplot-bar.R +++ b/tests/testthat/test-ggplot-bar.R @@ -3,8 +3,7 @@ context("bar") expect_traces <- function(gg, n.traces, name) { stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("bar-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("bar-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) @@ -74,9 +73,8 @@ test_that("Very basic bar graph", { geom_bar(stat="identity") info <- expect_traces(gg, 1, "nocolor") for(tr in info$traces){ - expect_null(tr$marker$color) - expect_null(tr$marker$line$color) - expect_null(tr$marker$line$width) + expect_true(is.na(tr$marker$color)) + expect_null(tr$marker$line) expect_false(tr$showlegend) } expect_null(info$layout$annotations) diff --git a/tests/testthat/test-ggplot-boxplot.R b/tests/testthat/test-ggplot-boxplot.R index ef9ac283f7..295a8176d0 100644 --- a/tests/testthat/test-ggplot-boxplot.R +++ b/tests/testthat/test-ggplot-boxplot.R @@ -3,7 +3,7 @@ context("Boxplot") test_that("geom_boxplot gives a boxplot", { gg <- ggplot(mtcars, aes(factor(cyl), mpg)) + geom_boxplot() - L <- gg2list(gg) + L <- save_outputs(gg, "boxplot") # right nb. traces expect_equal(length(L$data), 3) @@ -12,14 +12,12 @@ test_that("geom_boxplot gives a boxplot", { # right data for 1st trace expect_identical(sort(L$data[[1]]$y), sort(mtcars$mpg[mtcars$cyl == 4])) - - save_outputs(gg, "boxplot") }) test_that("geom_violin is equated to geom_boxplot for now", { gg <- ggplot(mtcars, aes(factor(cyl), mpg)) + geom_violin() - L <- gg2list(gg) + L <- save_outputs(gg, "violin") # right nb. traces expect_equal(length(L$data), 3) @@ -28,8 +26,6 @@ test_that("geom_violin is equated to geom_boxplot for now", { # right data for 1st trace expect_identical(sort(L$data[[1]]$y), sort(mtcars$mpg[mtcars$cyl == 4])) - - save_outputs(gg, "violin") }) test_that("you can make a boxplot for a distribution of datetimes", { @@ -40,11 +36,9 @@ test_that("you can make a boxplot for a distribution of datetimes", { bp <- ggplot(df) + geom_boxplot(aes(x, y)) - L <- gg2list(bp) + L <- save_outputs(bp, "boxplot-datetime") expect_equal(length(L$data), 1) # 1 trace expect_identical(L$data[[1]]$type, "box") expect_identical(L$data[[1]]$y, as.character(df$y)) - - save_outputs(bp, "boxplot-datetime") }) diff --git a/tests/testthat/test-ggplot-categorical.R b/tests/testthat/test-ggplot-categorical.R index 1f1dae0e07..144057732a 100644 --- a/tests/testthat/test-ggplot-categorical.R +++ b/tests/testthat/test-ggplot-categorical.R @@ -4,10 +4,8 @@ d <- head(diamonds, 50) test_that("axis type=category when we plot factors", { gg <- qplot(cut, price, data=d) - info <- gg2list(gg) + info <- save_outputs(gg, "bar-factor-category") l <- info$layout expect_identical(l$xaxis$type, "category") expect_identical(l$yaxis$type, "linear") - - save_outputs(gg, "bar-factor-category") }) diff --git a/tests/testthat/test-ggplot-contour.R b/tests/testthat/test-ggplot-contour.R index e0865a9524..5697fac769 100644 --- a/tests/testthat/test-ggplot-contour.R +++ b/tests/testthat/test-ggplot-contour.R @@ -4,7 +4,7 @@ volcano3d <- reshape2::melt(volcano) names(volcano3d) <- c("x", "y", "z") # Draw a contour plot using geom_contour gg <- ggplot(volcano3d) + geom_contour(aes(x=x, y=y, z=z)) -L <- gg2list(gg) +L <- save_outputs(gg, "contour") test_that("geom_contour is translated to type=contour", { expect_equal(length(L$data), 1) @@ -15,4 +15,4 @@ test_that("geom_contour uses line contours by default", { expect_identical(L$data[[1]]$contours$coloring, "lines") }) -save_outputs(gg, "contour") + diff --git a/tests/testthat/test-ggplot-date.R b/tests/testthat/test-ggplot-date.R index c806d96ed9..84c1e454b1 100644 --- a/tests/testthat/test-ggplot-date.R +++ b/tests/testthat/test-ggplot-date.R @@ -8,14 +8,12 @@ test_that("datetimes are converted to e.g. 2013-01-02 05:00:00", { df <- rbind(data.frame(who="me", time.obj, dollars=c(1.1, 5.6)), data.frame(who="you", time.obj, dollars=c(10.2, 0))) gg <- qplot(time.obj, dollars, data=df, color=who, geom="line") - info <- gg2list(gg) + info <- save_outputs(gg, "date-strings") expect_equal(length(info$data), 2) expect_identical(info$layout$xaxis$type, "date") for(trace in info$data[1:2]){ expect_identical(trace$x, out.str) } - - save_outputs(gg, "date-strings") }) test_that("class Date is supported", { @@ -23,12 +21,10 @@ test_that("class Date is supported", { y=c(2, 3, 2.5)) df$x <- as.Date(df$x) gg <- ggplot(df) + geom_line(aes(x=x, y=y)) - info <- gg2list(gg) + info <- save_outputs(gg, "date-class-Date") expect_equal(length(info$data), 1) expect_identical(info$layout$xaxis$type, "date") expect_identical(info$data[[1]]$x[1], "2013-01-01 00:00:00") - - save_outputs(gg, "date-class-Date") }) test_that("scale_x_date and irregular time series work", { @@ -43,9 +39,9 @@ test_that("scale_x_date and irregular time series work", { # minor_breaks=date_breaks("1 day"), # labels = date_format("%b/%W")) - info <- gg2list(dt) + info <- save_outputs(dt, "date-irregular-time-series") info_w_scale <- gg2list(g) - + expect_equal(length(info$data), 1) # one trace expect_identical(info$data[[1]]$x[31], "2122-02-09 00:00:00") expect_equal(length(info_w_scale$data), 1) # one trace @@ -53,6 +49,4 @@ test_that("scale_x_date and irregular time series work", { expect_identical(info$layout$xaxis$type, "date") expect_identical(info_w_scale$layout$xaxis$type, "date") expect_equal(length(info_w_scale$layout), length(info$layout)) # similar layout - - save_outputs(dt, "date-irregular-time-series") }) diff --git a/tests/testthat/test-ggplot-density.R b/tests/testthat/test-ggplot-density.R index 93a1752ea8..1fb88f0a2d 100644 --- a/tests/testthat/test-ggplot-density.R +++ b/tests/testthat/test-ggplot-density.R @@ -3,8 +3,7 @@ context("Probability density") expect_traces <- function(gg, n.traces, name) { stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("density-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("density-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) @@ -49,7 +48,7 @@ g <- base + geom_density(fill = "lightblue", alpha = 0.1) test_that("geom_histogram(aes(y = ..density..)) + geom_density() works", { - info <- expect_traces(g, 2, "color") + info <- expect_traces(g, 2, "histogram") trs <- info$traces type <- unique(sapply(trs, "[[", "type")) expect_identical(sort(type), c("bar", "scatter")) diff --git a/tests/testthat/test-ggplot-density2d.R b/tests/testthat/test-ggplot-density2d.R index 8747fb5a71..b149b3f481 100644 --- a/tests/testthat/test-ggplot-density2d.R +++ b/tests/testthat/test-ggplot-density2d.R @@ -2,7 +2,7 @@ context("Density2d") # Draw a 2d density estimation using geom_density2d m <- ggplot(MASS::geyser) + geom_density2d(aes(x=duration, y=waiting)) -L <- gg2list(m) +L <- save_outputs(m, "density2d") test_that("geom_density2d is translated to type=histogram2dcontour", { expect_equal(length(L$data), 1) @@ -12,5 +12,3 @@ test_that("geom_density2d is translated to type=histogram2dcontour", { test_that("geom_density2d uses line contours by default", { expect_identical(L$data[[1]]$contours$coloring, "lines") }) - -save_outputs(m, "density2d") diff --git a/tests/testthat/test-ggplot-errorbar-horizontal.R b/tests/testthat/test-ggplot-errorbar-horizontal.R index 5f97289f8a..bf38ed3d72 100644 --- a/tests/testthat/test-ggplot-errorbar-horizontal.R +++ b/tests/testthat/test-ggplot-errorbar-horizontal.R @@ -12,7 +12,7 @@ test_that("geom_errorbarh gives horizontal errorbars", { # Define the limits of the horizontal errorbars g <- g + geom_errorbarh(aes(xmax = resp + se, xmin = resp - se)) - L <- gg2list(g) + L <- save_outputs(g, "errorbar-horizontal") # Expect 2 traces expect_equal(length(L$data), 2) @@ -22,6 +22,4 @@ test_that("geom_errorbarh gives horizontal errorbars", { # Expect given errorbar values expect_equal(L$data[[1]]$error_x$array, c(0.1, 0.3)) expect_true(L$data[[1]]$error_x$symmetric) - - save_outputs(g, "errorbar-horizontal") }) diff --git a/tests/testthat/test-ggplot-errorbar.R b/tests/testthat/test-ggplot-errorbar.R index 24a61fbfc5..9e75789055 100644 --- a/tests/testthat/test-ggplot-errorbar.R +++ b/tests/testthat/test-ggplot-errorbar.R @@ -7,7 +7,7 @@ test_that("geom_errorbar gives errorbars", { g <- ggplot(df, aes(x=cyl, y=mpg[,'Mean'])) + geom_line() + geom_errorbar(aes(ymin=mpg[,'1st Qu.'], ymax=mpg[,'3rd Qu.'])) - L <- gg2list(g) + L <- save_outputs(g, "errorbar") # right nb. traces (1) expect_equal(length(L$data), 1) @@ -15,6 +15,4 @@ test_that("geom_errorbar gives errorbars", { expect_more_than(length(L$data[[1]]$error_y), 1) # right data for errorbar ymax expect_equal(L$data[[1]]$error_y$array, c(3.74, 1.26, 1.15)) - - save_outputs(g, "errorbar") }) diff --git a/tests/testthat/test-ggplot-facets.R b/tests/testthat/test-ggplot-facets.R index e5c0919686..08605a2523 100644 --- a/tests/testthat/test-ggplot-facets.R +++ b/tests/testthat/test-ggplot-facets.R @@ -61,40 +61,34 @@ no_panels <- ggplot(mtcars, aes(mpg, wt)) + geom_point() test_that("facet_wrap(..., scales = 'free') creates interior scales", { free_both <- no_panels + facet_wrap(~am+vs, scales = "free") - save_outputs(free_both, "facet_wrap_free") - info <- gg2list(free_both) + info <- save_outputs(free_both, "facet_wrap_free") expect_axes(info, 4L) expect_axes(info, 4L, "y") free_y <- no_panels + facet_wrap(~am+vs, scales = "free_y") - save_outputs(free_y, "facet_wrap_free_y") - info <- gg2list(free_y) + info <- save_outputs(free_y, "facet_wrap_free_y") expect_axes(info, 1L) expect_axes(info, 4L, "y") free_x <- no_panels + facet_wrap(~am+vs, scales = "free_x") - save_outputs(free_x, "facet_wrap_free_x") - info <- gg2list(free_x) + info <- save_outputs(free_x, "facet_wrap_free_x") expect_axes(info, 4L) expect_axes(info, 1L, "y") }) test_that("facet_grid(..., scales = 'free') doesnt create interior scales.", { free_both <- no_panels + facet_grid(vs~am, scales = "free") - save_outputs(free_both, "facet_grid_free") - info <- gg2list(free_both) + info <- save_outputs(free_both, "facet_grid_free") expect_axes(info, 2L) expect_axes(info, 2L, "y") free_y <- no_panels + facet_grid(vs~am, scales = "free_y") - save_outputs(free_y, "facet_grid_free_y") - info <- gg2list(free_y) + info <- save_outputs(free_y, "facet_grid_free_y") expect_axes(info, 1L) expect_axes(info, 2L, "y") free_x <- no_panels + facet_grid(vs~am, scales = "free_x") - save_outputs(free_x, "facet_grid_free_x") - info <- gg2list(free_x) + info <- save_outputs(free_x, "facet_grid_free_x") expect_axes(info, 2L) expect_axes(info, 1L, "y") }) diff --git a/tests/testthat/test-ggplot-heatmap.R b/tests/testthat/test-ggplot-heatmap.R index 5b8f277340..1a1757148e 100644 --- a/tests/testthat/test-ggplot-heatmap.R +++ b/tests/testthat/test-ggplot-heatmap.R @@ -12,11 +12,9 @@ ww$time <- factor(ww$time, dtimes) hm <- ggplot(ww) + geom_tile(aes(x=day, y=time, fill=value)) test_that("geom_tile is translated to type=heatmap", { - L <- gg2list(hm) + L <- save_outputs(hm, "heatmap") expect_equal(length(L$data), 1) expect_identical(L$data[[1]]$type, "heatmap") expect_identical(as.character(L$data[[1]]$x), wdays) expect_identical(as.character(L$data[[1]]$y), dtimes) }) - -save_outputs(hm, "heatmap") diff --git a/tests/testthat/test-ggplot-histogram.R b/tests/testthat/test-ggplot-histogram.R index d576038b8c..56212f6586 100644 --- a/tests/testthat/test-ggplot-histogram.R +++ b/tests/testthat/test-ggplot-histogram.R @@ -3,8 +3,7 @@ context("Histogram") expect_traces <- function(gg, n.traces, name) { stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("histogram-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("histogram-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-ggplot-hline.R b/tests/testthat/test-ggplot-hline.R index de8701f54b..0e3ea8c3c9 100644 --- a/tests/testthat/test-ggplot-hline.R +++ b/tests/testthat/test-ggplot-hline.R @@ -9,8 +9,8 @@ gg <- ggplot(df) + geom_point(aes(x=x1, y=x2)) test_that("second trace be the hline", { gg <- gg + geom_hline(yintercept=1.1, colour="green", size=3) - L <- gg2list(gg) - + L <- save_outputs(gg, "hline") + expect_equal(length(L$data), 2) expect_equal(L$data[[2]]$y[1], 1.1) expect_true(L$data[[2]]$x[1] <= 0) @@ -19,14 +19,12 @@ test_that("second trace be the hline", { expect_identical(L$data[[2]]$line$shape, "linear") expect_equal(L$data[[2]]$line$width, 6) expect_identical(L$data[[2]]$line$color, "rgb(0,255,0)") - - save_outputs(gg, "hline") }) test_that("vector yintercept results in multiple horizontal lines", { gg <- gg + geom_hline(yintercept=1:3, colour="red", size=3) - L <- gg2list(gg) + L <- save_outputs(gg, "hline-multiple") expect_equal(length(L$data), 4) expect_equal(L$data[[2]]$y[1], 1) @@ -39,7 +37,6 @@ test_that("vector yintercept results in multiple horizontal lines", { expect_equal(L$data[[3]]$line$width, 6) expect_identical(L$data[[3]]$line$color, "rgb(255,0,0)") - save_outputs(gg, "hline-multiple") }) test_that("hline can be drawn over range of factors", { @@ -47,9 +44,7 @@ test_that("hline can be drawn over range of factors", { gg <- ggplot(df, aes(x=cond, y=result)) + geom_bar(position="dodge", stat="identity") + geom_hline(aes(yintercept=12)) - L <- gg2list(gg) + L <- save_outputs(gg, "hline-factor") expect_equal(length(L$data), 2) # 1 trace for bar chart, 1 trace for hline expect_true(all(c("control", "treatment") %in% L$data[[2]]$x)) - - save_outputs(gg, "hline-factor") }) diff --git a/tests/testthat/test-ggplot-labels.R b/tests/testthat/test-ggplot-labels.R index 3fce947a3f..a8da62cd73 100644 --- a/tests/testthat/test-ggplot-labels.R +++ b/tests/testthat/test-ggplot-labels.R @@ -4,42 +4,34 @@ test_that("ggtitle is translated correctly", { ggiris <- ggplot(iris) + geom_point(aes(Petal.Width, Sepal.Width)) + ggtitle("My amazing plot!") - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "labels-ggtitle") expect_identical(info$layout$title, "My amazing plot!") - - save_outputs(ggiris, "labels-ggtitle") }) test_that("ylab is translated correctly", { ggiris <- ggplot(iris) + geom_point(aes(Petal.Width, Sepal.Width)) + ylab("sepal width") - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "labels-ylab") expect_identical(info$layout$xaxis$title, "Petal.Width") expect_identical(info$layout$yaxis$title, "sepal width") - - save_outputs(ggiris, "labels-ylab") }) test_that("scale_x_continuous(name) is translated correctly", { ggiris <- ggplot(iris) + geom_point(aes(Petal.Width, Sepal.Width)) + scale_x_continuous("petal width") - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "labels-scale_x_continuous_name") expect_identical(info$layout$xaxis$title, "petal width") expect_identical(info$layout$yaxis$title, "Sepal.Width") - - save_outputs(ggiris, "labels-scale_x_continuous_name") }) test_that("angled ticks are translated correctly", { ggiris <- ggplot(iris) + geom_point(aes(Petal.Width, Sepal.Width)) + theme(axis.text.x=element_text(angle=45)) - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "labels-angles") expect_identical(info$layout$xaxis$tickangle, -45) - - save_outputs(ggiris, "labels-angles") }) # TODO: test label colors. diff --git a/tests/testthat/test-ggplot-legend.R b/tests/testthat/test-ggplot-legend.R index c38b3de4cc..6455f27eb0 100644 --- a/tests/testthat/test-ggplot-legend.R +++ b/tests/testthat/test-ggplot-legend.R @@ -3,8 +3,7 @@ context("legends") expect_traces <- function(gg, n.traces, name){ stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("legend-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("legend-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-ggplot-linetype.R b/tests/testthat/test-ggplot-linetype.R index 88813ea427..0aa7f3223e 100644 --- a/tests/testthat/test-ggplot-linetype.R +++ b/tests/testthat/test-ggplot-linetype.R @@ -11,12 +11,10 @@ test_that("6 different automatic lty converted to plotly's 6 types", { "dashdot", "longdash", "longdashdot") - info <- gg2list(gg) + info <- save_outputs(gg, "linetype-types") generated <- sapply(info$data[1:6], function(L) L$line$dash) expect_true(all(generated %in% expected)) expect_true(all(expected %in% generated)) - - save_outputs(gg, "linetype-types") }) test_that("different colored lines become different colored traces", { @@ -32,7 +30,7 @@ test_that("different colored lines become different colored traces", { gg <- ggplot(data = df, aes(x = x, y = value, colour = variable))+ geom_line()+ scale_color_manual(values=c(y1="blue", y2="red")) - info <- gg2list(gg) + info <- save_outputs(gg, "linetype-colors") expect_equal(length(info$data), 2) expect_identical(info$data[[1]]$line$color, toRGB("blue")) n <- length(x) @@ -41,6 +39,4 @@ test_that("different colored lines become different colored traces", { expect_identical(info$data[[2]]$line$color, toRGB("red")) expect_identical(info$data[[2]]$y[1:n], y2) expect_identical(info$data[[2]]$x[1:n], x) - - save_outputs(gg, "linetype-colors") }) diff --git a/tests/testthat/test-ggplot-names.R b/tests/testthat/test-ggplot-names.R index 391e1a7a2e..c17205577c 100644 --- a/tests/testthat/test-ggplot-names.R +++ b/tests/testthat/test-ggplot-names.R @@ -7,9 +7,7 @@ test_that("name param is passed to plotly", { borders(regions="canada", name="borders") + geom_point(aes(text=name, size=pop), colour="red", alpha=1/2, pch=1, name="cities") - info <- gg2list(gg) + info <- save_outputs(gg, "names") expect_identical(info$data[[1]]$name, "borders") expect_identical(info$data[[2]]$name, "cities") - - save_outputs(gg, "names") }) diff --git a/tests/testthat/test-ggplot-path.R b/tests/testthat/test-ggplot-path.R index 16e9729518..d58d68fb67 100644 --- a/tests/testthat/test-ggplot-path.R +++ b/tests/testthat/test-ggplot-path.R @@ -4,15 +4,13 @@ test_that("lines are different from paths", { df <- data.frame(x=c(1, 3, 2), y=c(0, 0, 1)) p <- qplot(x, y, data=df, geom="path") - info <- gg2list(p) + info <- save_outputs(p, "path-lines-diff-from-paths") expect_identical(info$data[[1]]$x[1:3], c(1, 3, 2)) expect_identical(info$data[[1]]$y[1:3], c(0, 0, 1)) - l <- qplot(x, y, data=df, geom="line") - l.tr <- gg2list(l)$data + p2 <- qplot(x, y, data=df, geom="line") + l.tr <- gg2list(p2)$data expect_identical(l.tr[[1]]$x[1:3], c(1, 2, 3)) expect_identical(l.tr[[1]]$y[1:3], c(0, 1, 0)) - - save_outputs(p, "path-lines-diff-from-paths") }) two.paths <- data.frame(x=c(1, 2, 1, 2), @@ -33,7 +31,7 @@ test_that("paths with different colors become different traces", { ## Categorical color. gg <- ggplot()+ geom_path(aes(x, y, group=y, color=paste0("FOO", y)), data=two.paths) - info <- gg2list(gg) + info <- save_outputs(gg, "path-colors") expect_equal(length(info$data), 2) trace.names <- sapply(info$data[1:2], "[[", "name") expect_identical(as.character(trace.names), c("FOO1", "FOO2")) @@ -41,8 +39,6 @@ test_that("paths with different colors become different traces", { expect_identical(info$data[[2]]$x[1:2], c(1,2)) expect_identical(info$data[[1]]$y[1:2], c(1,1)) expect_identical(info$data[[2]]$y[1:2], c(2,2)) - - save_outputs(gg, "path-colors") }) four.paths <- rbind(data.frame(two.paths, g="positive"), @@ -51,7 +47,7 @@ four.paths <- rbind(data.frame(two.paths, g="positive"), test_that("paths with the same color but different groups stay together", { gg <- ggplot()+ geom_path(aes(x, y, group=y, color=g), data=four.paths) - info <- gg2list(gg) + info <- save_outputs(gg, "path-colored-groups-stay-together") expect_equal(length(info$data), 2) expect_identical(info$data[[1]]$name, "positive") expect_identical(info$data[[2]]$name, "negative") @@ -59,8 +55,6 @@ test_that("paths with the same color but different groups stay together", { expect_true(any(is.na(info$data[[1]]$y))) expect_true(any(is.na(info$data[[2]]$x))) expect_true(any(is.na(info$data[[2]]$y))) - - save_outputs(gg, "path-colored-groups-stay-together") }) test_that("lines work with aesthetic shape", { @@ -71,7 +65,7 @@ test_that("lines work with aesthetic shape", { gg <- ggplot(data=df1, aes(x=time, y=total_bill, group=sex, shape=sex)) + geom_line() + geom_point() - info <- gg2list(gg) + info <- save_outputs(gg, "path-line-symbols") expect_equal(length(info$data), 2) # 2 traces expect_identical(info$data[[1]]$name, "Female") expect_identical(info$data[[1]]$marker$symbol, "circle") @@ -80,6 +74,4 @@ test_that("lines work with aesthetic shape", { # Layout expect_identical(info$layout$xaxis$title, "time") expect_identical(info$layout$xaxis$type, "category") - - save_outputs(gg, "path-line-symbols") }) diff --git a/tests/testthat/test-ggplot-polygons.R b/tests/testthat/test-ggplot-polygons.R index ddd17f6a99..fa01686918 100644 --- a/tests/testthat/test-ggplot-polygons.R +++ b/tests/testthat/test-ggplot-polygons.R @@ -3,8 +3,7 @@ context("polygon") expect_traces <- function(gg, n.traces, name){ stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("polygon-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("polygon-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) @@ -121,7 +120,7 @@ test_that("geom_polygon(aes(size), fill, colour)", { gg <- ggplot(poly.df)+ geom_polygon(aes(x, y, size=lab), fill="orange", colour="black")+ scale_size_manual(values=c(left=2, right=3)) - info <- expect_traces(gg, 2, "color-fill-aes-linetype") + info <- expect_traces(gg, 2, "color-fill-aes-size") traces.by.name <- list() for(tr in info$traces){ expect_equal(tr$fillcolor, toRGB("orange")) @@ -142,12 +141,10 @@ test_that("borders become one trace with NA", { data(canada.cities) gg <- ggplot(canada.cities, aes(long, lat))+ borders(regions="canada", name="borders") - info <- gg2list(gg) + info <- save_outputs(gg, "polygons-canada-borders") expect_equal(length(info$data), 1) tr <- info$data[[1]] expect_true(any(is.na(tr$x))) - - save_outputs(gg, "polygons-canada-borders") }) x <- c(0, -1, 2, -2, 1) diff --git a/tests/testthat/test-ggplot-rect.R b/tests/testthat/test-ggplot-rect.R index d5ea9a9923..88edf7dacd 100644 --- a/tests/testthat/test-ggplot-rect.R +++ b/tests/testthat/test-ggplot-rect.R @@ -3,8 +3,7 @@ context("geom_rect") expect_traces <- function(gg, n.traces, name) { stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("rect-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("rect-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-ggplot-ribbon.R b/tests/testthat/test-ggplot-ribbon.R index 40c7f0a489..a2bb636b22 100644 --- a/tests/testthat/test-ggplot-ribbon.R +++ b/tests/testthat/test-ggplot-ribbon.R @@ -3,8 +3,7 @@ context("ribbon") expect_traces <- function(gg, n.traces, name){ stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("ribbon-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("ribbon-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-ggplot-segment.R b/tests/testthat/test-ggplot-segment.R index d1ec1dfaed..665e3887cb 100644 --- a/tests/testthat/test-ggplot-segment.R +++ b/tests/testthat/test-ggplot-segment.R @@ -7,10 +7,8 @@ test_that("segments become one path", { yend=c(0, 1)) gg <- ggplot() + geom_segment(aes(x, y, xend=xend, yend=yend), data=seg.df) - info <- gg2list(gg) + info <- save_outputs(gg, "segment") tr <- info$data[[1]] expect_true(any(is.na(tr$x))) expect_true(any(is.na(tr$y))) - - save_outputs(gg, "segment") }) diff --git a/tests/testthat/test-ggplot-size.R b/tests/testthat/test-ggplot-size.R index 66274dad0c..ece693c29a 100644 --- a/tests/testthat/test-ggplot-size.R +++ b/tests/testthat/test-ggplot-size.R @@ -3,25 +3,20 @@ context("size") test_that("size is not a vector if it is not specified", { iplot <- ggplot(iris) + geom_point(aes(Petal.Width, Sepal.Width)) - L <- gg2list(iplot) + L <- save_outputs(iplot, "size-not-a-vector") m <- L$data[[1]]$marker expect_that(m, is_a("list")) expect_true(length(m$size) <= 1) - - save_outputs(iplot, "size-not-a-vector") }) test_that("size is a vector if it is specified", { iplot <- ggplot(iris) + geom_point(aes(Petal.Width, Sepal.Width, size=Petal.Length)) - L <- gg2list(iplot) + L <- save_outputs(iplot, "size-is-a-vector") m <- L$data[[1]]$marker expect_that(m, is_a("list")) expect_true(length(m$size) > 1) - expect_identical(L$data[[1]]$showlegend, FALSE) - - save_outputs(iplot, "size-is-a-vector") }) countrypop <- data.frame(country=c("Paraguay", "Peru", "Philippines"), @@ -33,12 +28,10 @@ gg <- ggplot(countrypop, aes(edu, illn, colour=country, size=population)) + geom_point() test_that("global scaling works for sizes over different traces", { - L <- gg2list(gg) + L <- save_outputs(gg, "size-global-scaling") expect_equal(length(L$data), 3) # 1 trace per country (3) expect_true(as.numeric(L$data[[1]]$marker$size) < as.numeric(L$data[[2]]$marker$size)) expect_true(as.numeric(L$data[[2]]$marker$size) < as.numeric(L$data[[3]]$marker$size)) }) - -save_outputs(gg, "size-global-scaling") diff --git a/tests/testthat/test-ggplot-smooth.R b/tests/testthat/test-ggplot-smooth.R index 4326a0e39c..619e40a9fd 100644 --- a/tests/testthat/test-ggplot-smooth.R +++ b/tests/testthat/test-ggplot-smooth.R @@ -3,8 +3,7 @@ context("smooth") expect_traces <- function(gg, n.traces, name){ stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("smooth-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("smooth-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-ggplot-stack.R b/tests/testthat/test-ggplot-stack.R index fc47cc23b5..9b1792fbfc 100644 --- a/tests/testthat/test-ggplot-stack.R +++ b/tests/testthat/test-ggplot-stack.R @@ -11,7 +11,7 @@ instructors <- test_that("y value is non-cumulative in stacked bar charts", { gg <- ggplot(instructors, aes(x=topic, y=number, fill=level)) + geom_bar(stat="identity") - L <- gg2list(gg) + L <- save_outputs(gg, "stack") expect_equal(length(L$data), 3) expect_identical(L$layout$barmode, "stack") trace.names <- sapply(L$data[1:3], "[[", "name") @@ -20,6 +20,4 @@ test_that("y value is non-cumulative in stacked bar charts", { expect_equal(L$data[[3]]$y[1], instructors$number[3]) expect_equal(L$data[[2]]$y[2], instructors$number[5]) expect_equal(L$data[[3]]$y[2], instructors$number[6]) - - save_outputs(gg, "stack") }) diff --git a/tests/testthat/test-ggplot-step.R b/tests/testthat/test-ggplot-step.R index 0aa8bb837d..4ed069d6f9 100644 --- a/tests/testthat/test-ggplot-step.R +++ b/tests/testthat/test-ggplot-step.R @@ -9,54 +9,42 @@ gg <- ggplot(oranges, aes(x=age, y=circumference, test_that("direction of geom_line is translated to shape=linear", { gg.linear <- gg + geom_line() - L <- gg2list(gg.linear) + L <- save_outputs(gg.linear, "step-gg.linear-geom_line") expect_equal(length(L$data), 2) expect_identical(L$data[[1]]$line$shape, "linear") - - save_outputs(gg.linear, "step-gg.linear-geom_line") }) test_that("direction of geom_path is translated to shape=linear", { gg.lin <- gg + geom_path() - L <- gg2list(gg.lin) + L <- save_outputs(gg.lin, "step-gg.linear-geom_path") expect_equal(length(L$data), 2) expect_identical(L$data[[1]]$line$shape, "linear") - - save_outputs(gg.lin, "step-gg.linear-geom_path") }) test_that("direction hv is translated to shape=hv", { gg.hv <- gg + geom_step() - L <- gg2list(gg.hv) + L <- save_outputs(gg.hv, "step-gg.hv") expect_equal(length(L$data), 2) expect_identical(L$data[[1]]$line$shape, "hv") - - save_outputs(gg.hv, "step-gg.hv") }) test_that("direction vh is translated to shape=vh", { gg.vh <- gg + geom_step(direction="vh") - L <- gg2list(gg.vh) + L <- save_outputs(gg.vh, "step-gg.vh") expect_equal(length(L$data), 2) expect_identical(L$data[[1]]$line$shape, "vh") - - save_outputs(gg.vh, "step-gg.vh") }) test_that("direction hvh is translated to shape=hvh", { gg.hvh <- gg + geom_step(direction="hvh") - L <- gg2list(gg.hvh) + L <- save_outputs(gg.hvh, "step-gg.hvh") expect_equal(length(L$data), 2) expect_identical(L$data[[1]]$line$shape, "hvh") - - save_outputs(gg.hvh, "step-gg.hvh", TRUE) }) test_that("direction vhv is translated to shape=vhv", { gg.vhv <- gg + geom_step(direction="vhv") - L <- gg2list(gg.vhv) + L <- save_outputs(gg.vhv, "step-gg.vhv") expect_equal(length(L$data), 2) expect_identical(L$data[[1]]$line$shape, "vhv") - - save_outputs(gg.vhv, "step-gg.vhv", TRUE) }) diff --git a/tests/testthat/test-ggplot-text.R b/tests/testthat/test-ggplot-text.R index c2c8658270..77f1846345 100644 --- a/tests/testthat/test-ggplot-text.R +++ b/tests/testthat/test-ggplot-text.R @@ -2,7 +2,7 @@ context("Text") gg <- ggplot(mtcars, aes(x=wt, y=mpg, label=rownames(mtcars))) + geom_text(size=18) -info <- gg2list(gg) +info <- save_outputs(gg, "text") test_that("label is translated correctly", { expect_identical(as.character(info$data[[1]]$text), rownames(mtcars)) @@ -17,8 +17,6 @@ test_that("textsize is translated correctly", { expect_identical(info$data[[1]]$textfont$size, 18) }) -save_outputs(gg, "text") - test_that("geom_text splits along colour", { mds <- data.frame(State=c("Alabama", "Alabama", "Alabama", "Alabama", "Arizona", "Arizona"), @@ -34,7 +32,7 @@ test_that("geom_text splits along colour", { gg <- ggplot(mds) + geom_text(aes(x=coord.1, y=coord.2, label=City, colour=Division)) - L <- gg2list(gg) + L <- save_outputs(gg, "text-colour") expect_equal(length(L$data), 2) # 2 traces # Proper type and mode conversion @@ -45,6 +43,4 @@ test_that("geom_text splits along colour", { # Right colour for each trace expect_identical(L$data[[1]]$textfont$color, "#F8766D") expect_identical(L$data[[2]]$textfont$color, "#00BFC4") - - save_outputs(gg, "text-colour") }) diff --git a/tests/testthat/test-ggplot-theme.R b/tests/testthat/test-ggplot-theme.R index 64fe04ca18..94c9f2c4c7 100644 --- a/tests/testthat/test-ggplot-theme.R +++ b/tests/testthat/test-ggplot-theme.R @@ -7,58 +7,48 @@ iris.base <- ggplot(iris) + test_that("background translated correctly",{ ggiris <- iris.base + theme(panel.background=element_rect(fill="blue")) + theme(plot.background=element_rect(fill="green")) - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "theme-background") L <- info$layout expect_identical(L$plot_bgcolor, toRGB("blue")) expect_identical(L$paper_bgcolor, toRGB("green")) - - save_outputs(ggiris, "theme-background") }) test_that("grid/ticks translated correctly",{ ggiris <- iris.base + theme(axis.ticks=element_line(colour="red")) + theme(panel.grid.major=element_line(colour="violet")) - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "theme-ticks-and-grids") for (xy in c("x", "y")) { ax.list <- info$layout[[paste0(xy, "axis")]] expect_identical(ax.list$tickcolor, toRGB("red")) expect_identical(ax.list$gridcolor, toRGB("violet")) } - - save_outputs(ggiris, "theme-ticks-and-grids") }) test_that("show ticks as 'outside' by default", { ggiris <- iris.base - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "theme-ticks-default") for (xy in c("x", "y")) { ax.list <- info$layout[[paste0(xy, "axis")]] expect_identical(ax.list$ticks, "outside") } - - save_outputs(ggiris, "theme-ticks-default") }) test_that("do not show zeroline by default", { ggiris <- iris.base - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "theme-zeroline-default") for (xy in c("x", "y")) { ax.list <- info$layout[[paste0(xy, "axis")]] expect_identical(ax.list$zeroline, FALSE) } - - save_outputs(ggiris, "theme-zeroline-default") }) test_that("dotted/dashed grid translated as line with alpha=0.1",{ ggiris <- iris.base + theme(panel.grid.major=element_line(linetype="dashed")) - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "theme-dashed-grid-lines") for (xy in c("x", "y")) { ax.list <- info$layout[[paste0(xy, "axis")]] expect_identical(ax.list$gridcolor, toRGB("white", 0.1)) } - - save_outputs(ggiris, "theme-dashed-grid-lines") }) countrypop <- data.frame(country=c("Paraguay", "Peru", "Philippines"), @@ -69,35 +59,29 @@ gg <- ggplot(countrypop) + geom_point(aes(edu, illn, colour=country, size=population)) test_that("marker default shape is a circle", { - info <- gg2list(gg) + info <- save_outputs(gg, "theme-marker-default") for (i in c(1:3)) { expect_identical(info$data[[i]]$marker$symbol, "circle") expect_true(info$data[[i]]$showlegend) } - - save_outputs(gg, "theme-marker-default") }) test_that("plot panel border is translated correctly", { ggiris <- iris.base + theme_grey() # has no panel.border - info <- gg2list(ggiris) + info <- save_outputs(ggiris, "theme-panel-border-1") for (xy in c("x", "y")) { ax.list <- info$layout[[paste0(xy, "axis")]] expect_identical(ax.list$showline, FALSE) } - save_outputs(ggiris, "theme-panel-border-1") - red <- ggplot(iris) + theme_grey() + geom_point(aes(Petal.Width, Sepal.Width)) + theme(panel.border=element_rect(colour="red", fill=NA)) - info <- gg2list(red) + info <- save_outputs(red, "theme-panel-border-2") for (xy in c("x", "y")) { ax.list <- info$layout[[paste0(xy, "axis")]] expect_identical(ax.list$showline, TRUE) expect_identical(ax.list$linecolor, toRGB("red")) } - - save_outputs(red, "theme-panel-border-2") }) diff --git a/tests/testthat/test-ggplot-ticks.R b/tests/testthat/test-ggplot-ticks.R index b40bcfbe08..8954733001 100644 --- a/tests/testthat/test-ggplot-ticks.R +++ b/tests/testthat/test-ggplot-ticks.R @@ -7,8 +7,7 @@ boxes <- ggplot(PlantGrowth, aes(x=group, y=weight)) + geom_boxplot() expect_traces <- function(gg, n.traces, name){ stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("ticks-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("ticks-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-ggplot-vline.R b/tests/testthat/test-ggplot-vline.R index a2bee6d5a0..5ce1e93988 100644 --- a/tests/testthat/test-ggplot-vline.R +++ b/tests/testthat/test-ggplot-vline.R @@ -9,7 +9,7 @@ gg <- ggplot(df) + geom_point(aes(x=x1, y=x2)) test_that("second trace be the vline", { gg <- gg + geom_vline(xintercept=1.1, colour="green", size=3) - L <- gg2list(gg) + L <- save_outputs(gg, "vline") expect_equal(length(L$data), 2) expect_equal(L$data[[2]]$x[1], 1.1) @@ -19,14 +19,12 @@ test_that("second trace be the vline", { expect_identical(L$data[[2]]$line$shape, "linear") expect_equal(L$data[[2]]$line$width, 6) expect_identical(L$data[[2]]$line$color, "rgb(0,255,0)") - - save_outputs(gg, "vline") }) test_that("vector xintercept results in multiple vertical lines", { gg <- gg + geom_vline(xintercept=1:2, colour="blue", size=3) - L <- gg2list(gg) + L <- save_outputs(gg, "vline-multiple") expect_equal(length(L$data), 3) expect_equal(L$data[[2]]$x[1], 1) @@ -37,6 +35,4 @@ test_that("vector xintercept results in multiple vertical lines", { expect_identical(L$data[[3]]$line$shape, "linear") expect_equal(L$data[[3]]$line$width, 6) expect_identical(L$data[[3]]$line$color, "rgb(0,0,255)") - - save_outputs(gg, "vline-multiple") }) diff --git a/tests/testthat/test-ggplot-ylim.R b/tests/testthat/test-ggplot-ylim.R index e381b363f5..db0d27560d 100644 --- a/tests/testthat/test-ggplot-ylim.R +++ b/tests/testthat/test-ggplot-ylim.R @@ -16,8 +16,7 @@ gg.ylim <- expect_traces <- function(gg, n.traces, name){ stopifnot(is.ggplot(gg)) stopifnot(is.numeric(n.traces)) - save_outputs(gg, paste0("ylim-", name)) - L <- gg2list(gg) + L <- save_outputs(gg, paste0("ylim-", name)) all.traces <- L$data no.data <- sapply(all.traces, function(tr) { is.null(tr[["x"]]) && is.null(tr[["y"]]) diff --git a/tests/testthat/test-plotly-filename.R b/tests/testthat/test-plotly-filename.R index 51c92b14ec..6164ad8757 100644 --- a/tests/testthat/test-plotly-filename.R +++ b/tests/testthat/test-plotly-filename.R @@ -1,20 +1,9 @@ context("Filename") test_that("filepath with directories is returned as passed", { - x <- c(-1.50548425849621, 0.023267831354017, -1.38460390550496, - -0.805552814226363, 1.59651736643461, 0.936302685370894, - 0.512729504994891, -0.24492573745161, -0.465348603632604, - 0.173523456651353, 0.389491211182137, -0.275308705542518, - -0.132866228059449, -0.336255877656944, 0.916535489109209, - -0.936870130264329, 0.363137478307925, -1.26433467241078, - -0.388804188531171, 0.785842426281935) - data = list(x=x, type="histogramx") - l <- list(autosize=FALSE, width=600, height=400, showlegend=FALSE) - - py <- plotly("get_test_user_2", "0f9es4r6tm") - response <- py$plotly(data, kwargs=list(layout=l, filename="directory/hist", - fileopt="overwrite")) - - expect_identical(response$filename, "directory/hist") - + p <- print(plot_ly(mtcars, x = wt, y = vs, filename = "directory/awesome")) + usr <- sub("https://plot.ly/~(.*)/[0-9]+", "\\1", p$url) + id <- sub("https://plot.ly/~.*/([0-9]+)", "\\1", p$url) + fig <- plotly_build(get_figure(usr, id)) + expect_identical(fig$data[[1]]$filename, "directory/awesome") }) diff --git a/tests/testthat/test-plotly-getfigure.R b/tests/testthat/test-plotly-getfigure.R index 44d248a545..a8a49f1a8e 100644 --- a/tests/testthat/test-plotly-getfigure.R +++ b/tests/testthat/test-plotly-getfigure.R @@ -1,42 +1,26 @@ context("get_figure") test_that("requests made by a user who doesn't exist error a 404", { - py <- plotly("user_does_not_exist", "api_key_shouldnt_matter") expect_error({ - py$get_figure("get_test_user", 0) - }, "404") + get_figure("klmadslfjdfljdsf", 0) + }, ".*404.*") }) -test_that("requests made to retrieve a file that doesn't error return a 404", { - py <- plotly("get_test_user", "vgs6e0cnoi") +test_that("requests made to retrieve a figure that doesn't exist returns a 404", { expect_error({ - py$get_figure("get_test_user", 1000) - }, "404") -}) - -test_that("requests made with the wrong API key error a 401", { - py <- plotly("get_test_user", "some_invalid_api_key") - expect_error({ - py$get_figure("get_test_user", 1) - }, "401") -}) - -test_that("requests made to retrieve some elses private file errors a 403", { - py <- plotly("get_test_user_2", "0f9es4r6tm") - expect_error({ - py$get_figure("get_test_user", 1) - }, "403") + get_figure("get_test_user", 18324823) + }, ".*404.*") }) test_that("requests made to retrieve some elses private file errors a 403", { - py <- plotly("get_test_user_2", "0f9es4r6tm") expect_error({ - py$get_figure("get_test_user", 1) - }, "403") + get_figure("get_test_user", 1) + }, ".*403.*") }) test_that("retrieving a public figure ... works.", { - py <- plotly("get_test_user_2", "0f9es4r6tm") - figure <- py$get_figure("get_test_user", 0) - expect_equivalent(figure$data[[1]]$x, list("1", "2", "3")) + fig <- get_figure("get_test_user", 0) + # get the data behind the hash + p <- plotly_build(fig) + expect_equivalent(p$data[[1]]$x, list("1", "2", "3")) }) diff --git a/tests/testthat/test-plotly-knitr.R b/tests/testthat/test-plotly-knitr.R new file mode 100644 index 0000000000..809b15e542 --- /dev/null +++ b/tests/testthat/test-plotly-knitr.R @@ -0,0 +1,18 @@ +context("knitr") + +txt <- " +Simple knitr demo +```{r} +p <- qplot(rnorm(50)) +ggplotly(p) +``` +" +test_that("plotly embeds inside knitr", { + html <- knitr::knit2html(text = txt) + expect_true(grepl("= doms$yaxis2[2]) +}) + + + + diff --git a/tests/testthat/test-plotly.R b/tests/testthat/test-plotly.R new file mode 100644 index 0000000000..88740b0e23 --- /dev/null +++ b/tests/testthat/test-plotly.R @@ -0,0 +1,90 @@ +context("plot_ly") + +expect_traces <- function(p, n.traces, name){ + stopifnot(is.numeric(n.traces)) + L <- save_outputs(p, paste0("plotly-", name)) + expect_equal(length(L$data), n.traces) + L +} + +test_that("plot_ly() handles a simple scatterplot", { + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, mode = "markers") + l <- expect_traces(p, 1, "scatterplot") + expect_identical(l$data[[1]]$mode, "markers") + expect_identical(l$data[[1]]$x, iris$Sepal.Length) + expect_identical(l$data[[1]]$y, iris$Petal.Length) + expect_identical(l$layout$xaxis$title, "Sepal.Length") + expect_identical(l$layout$yaxis$title, "Petal.Length") +}) + +test_that("Using group argument creates multiple traces", { + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, group = Species) + l <- expect_traces(p, 3, "scatterplot-group") + expect_identical(l$layout$xaxis$title, "Sepal.Length") + expect_identical(l$layout$yaxis$title, "Petal.Length") +}) + +test_that("Mapping a variable to symbol works", { + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, symbol = Species) + l <- expect_traces(p, 3, "scatterplot-symbol") + markers <- lapply(l$data, "[[", "marker") + syms <- unlist(lapply(markers, "[[", "symbol")) + expect_identical(syms, c("dot", "cross", "diamond")) +}) + +test_that("Mapping a factor variable to color works", { + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, + color = Species, mode = "markers") + l <- expect_traces(p, 3, "scatterplot-color-factor") + markers <- lapply(l$data, "[[", "marker") + cols <- unlist(lapply(markers, "[[", "color")) + expect_equal(length(cols), 3) +}) + +test_that("Custom RColorBrewer pallette works for factor variable", { + cols <- RColorBrewer::brewer.pal(9, "Set1") + # specifying a pallette set should "span the gamut" + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, + color = Species, colors = "Set1", mode = "markers") + l <- expect_traces(p, 3, "scatterplot-color-factor-custom") + markers <- lapply(l$data, "[[", "marker") + colz <- unlist(lapply(markers, "[[", "color")) + expect_identical(sort(cols[c(1, 5, 9)]), sort(colz)) + # providing vector of RGB codes should also work + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, + color = Species, colors = cols[1:3], mode = "markers") + l <- expect_traces(p, 3, "scatterplot-color-factor-custom2") + markers <- lapply(l$data, "[[", "marker") + colz <- unlist(lapply(markers, "[[", "color")) + expect_identical(sort(cols[1:3]), sort(colz)) +}) + +test_that("Mapping a numeric variable to color works", { + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, + color = Petal.Width, mode = "markers") + l <- expect_traces(p, 1, "scatterplot-color-numeric") + marker <- l$data[[1]]$marker + expect_identical(marker$colorbar$title, "Petal.Width") + expect_identical(marker$color, iris$Petal.Width) + expect_true(all(0 <= marker$colorscale[,1] & marker$colorscale[,1] <= 1)) +}) + +test_that("Custom RColorBrewer pallette works for numeric variable", { + p <- plot_ly(data = iris, x = Sepal.Length, y = Petal.Length, + color = Petal.Width, colors = "Greens", mode = "markers") + l <- expect_traces(p, 1, "scatterplot-color-numeric-custom") + marker <- l$data[[1]]$marker + expect_identical(marker$colorbar$title, "Petal.Width") + expect_identical(marker$color, iris$Petal.Width) + expect_true(all(0 <= marker$colorscale[,1] & marker$colorscale[,1] <= 1)) +}) + +test_that("axis titles get attached to scene object for 3D plots", { + p <- plot_ly(iris, x = Petal.Length, y = Petal.Width, z = Sepal.Width, + type = "scatter3d", mode = "markers") + l <- expect_traces(p, 1, "scatterplot-scatter3d-axes") + scene <- l$layout$scene + expect_identical(scene$xaxis$title, "Petal.Length") + expect_identical(scene$yaxis$title, "Petal.Width") + expect_identical(scene$zaxis$title, "Sepal.Width") +}) diff --git a/tests/testthat/test-rotated-ticks.R b/tests/testthat/test-rotated-ticks.R index 92c3b8bfce..f529c66593 100644 --- a/tests/testthat/test-rotated-ticks.R +++ b/tests/testthat/test-rotated-ticks.R @@ -67,6 +67,3 @@ test_that('axis.text.x=element_text(angle=70) means transform="rotate(-70)"', { ## info <- renderHTML(problem) ## }, "ggplotly only supports hjust values 0, 0.5, 1") ## }) - - - diff --git a/vignettes/intro.Rmd b/vignettes/intro.Rmd new file mode 100644 index 0000000000..daada01e52 --- /dev/null +++ b/vignettes/intro.Rmd @@ -0,0 +1,309 @@ +--- +title: "An introduction to plotly's R API" +author: "Carson Sievert" +output: + html_document: + toc: yes +vignette: | + %\VignetteEngine{knitr::rmarkdown} + %\VignetteIndexEntry{Plotly DSL} +--- + +```{r setup, echo = FALSE, message = FALSE} +library(plotly) +knitr::opts_chunk$set(eval = FALSE) +``` + +Version 1.0.0 of the [plotly R package](https://github.com/ropensci/plotly) introduces a new high-level interface for working with plotly's JavaScript graphing library from R. The aim of this vignette is to explain the semantics of this interface, but I also recommend perusing [plotly's R homepage](https://plot.ly/r/) for more examples. + +## Creating plotlys + +To create a plotly object, start with `plot_ly()`. Here we turn the `economics` data frame (from the ggplot2 package) into a plotly visualization and store it as the object `p`. + +```{r} +library(plotly) +p <- plot_ly(economics, x = date, y = uempmed) +``` + +If you have a plotly account, printing plotly objects in the R console will create a new plotly figure, and open it in your web browser. If you're using knitr/R Markdown with HTML output (like [this vignette](https://github.com/ropensci/plotly/tree/master/vignettes/intro.Rmd)), printing not only creates the plot, but also embeds it as an HTML iframe. If you want to avoid iframes, check out [plotly offline](http://purchasing.plot.ly/) and the accompanying [vignette for R](https://cdn.rawgit.com/ropensci/plotly/master/vignettes/offline.html). + +```{r} +p +``` + + + +## Using special arguments + +`plot_ly()` has a number of arguments which are unique to the R package and make common visualizations a bit easier. These arguments are very much inspired by the semantics of ggplot2's `qplot()` in the sense that a scales are automatically applied these variables (i.e., they map data to visual properties). + +### The color argument + +#### Qualitative color mappings + +If a ordinal variable (aka a non-ordered factor variable) is assigned to color, then a qualitative color palette is used by default. + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + color = Species, mode = "markers") +``` + + + +If you want to change the default palette, it's recommended that you provide a qualitative pallette name (e.g., "Set1" or "Accent") to the colors argument. + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + color = Species, colors = "Set1", mode = "markers") +``` + + + +In this case, the palette consists of 9 colors and the default behavior is to pick colors that are furthest apart ("#E41A1C", "#FF7F00", and "#999999"). + +```{r} +cols <- RColorBrewer::brewer.pal(9, "Set1") +scales::show_col(cols) +``` + + + +If you'd like more control over the mapping, you can provide a vector of colors (of appropriate length). + +```{r} +cols <- RColorBrewer::brewer.pal(nlevels(iris$Species), "Set1") +plot_ly(iris, x = Petal.Length, y = Petal.Width, + color = Species, colors = cols, mode = "markers") +``` + + + +#### Sequential color mappings + +If either a numeric or an ordered factor is mapped to color, `plot_ly()` applies a sequential color scale by default. + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + color = as.ordered(Species), mode = "markers") +``` + + + +In the case of continuous numeric variables, `plot_ly()` performs a linear mapping between the data and an interpolated color pallette. + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + color = Sepal.Length, mode = "markers") +``` + + + +The colors argument takes arbitrary color codes of arbitrary length. Here is how we could use it to replicate the default mapping in ggplot2. + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + color = Sepal.Length, colors = c("#132B43", "#56B1F7"), + mode = "markers") +``` + + + + +#### Diverging color mappings + +To obtain a diverging color mapping, just provide a diverging palette to the colors argument. + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + color = Sepal.Length, colors = "PuOr", mode = "markers") +``` + + + +### The symbol argument + +To encode values using symbols, use the symbol argument. + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + symbol = Species, mode = "markers") +``` + + + +To change the default symbols used, use the symbols argument. All the valid symbol types are listed [here](https://plot.ly/r/reference/#marker). + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, mode = "markers", + symbol = Species, symbols = c("cross", "square", "triangle-down")) +``` + + + +### The group argument and `subplot()` + +Using the group argument splits the data into different plotly "traces". + +```{r} +plot_ly(iris, x = Petal.Length, y = Petal.Width, + group = Species, mode = "markers") +``` + + + + +Although we haven't specified a coloring scheme, plotly will employ one on it's own default scheme. The group argument is quite powerful when used in conjunction with `subplot()` in order to anchor traces onto different axes. + +```{r} +iris$id <- as.integer(iris$Species) +p <- plot_ly(iris, x = Petal.Length, y = Petal.Width, group = Species, + xaxis = paste0("x", id), mode = "markers") +subplot(p) +``` + + + +Since `subplot()` does not assume x/y axes are on a common scale, it does not impose any restrictions on the range by default. However, you can change this by pre-specifying the range of the [axis objects](https://plot.ly/r/reference/#xaxis) via the `layout()` function. + +```{r} +p2 <- layout( + p, + xaxis = list(range = range(Petal.Length) + c(-0.1, 0.1)), + yaxis = list(range = range(Petal.Width) + c(-0.1, 0.1)) +) +subplot(p2) +``` + + + +Part of the magic of `subplot()` is that it generates axis objects with appropriate anchor and domain properties. After generating a subplot, you can always reference these axis objects to customize each plot. + +```{r} +layout( + subplot(p2), + yaxis2 = list(title = ""), + yaxis3 = list(title = "") +) +``` + + + + +[See here](https://plot.ly/r/map-subplots-and-small-multiples/) for another example of using the group argument to make small multiples (with maps!). + +## Manually adding traces + +Sometimes you may want multiple traces on a plot, but have different traces from different data sources. In this case, the `add_trace()` function and it's (optional) `data` argument come in handy. + +```{r} +m <- loess(uempmed ~ as.numeric(date), economics) +efit <- data.frame(date = economics$date, yhat = fitted(m)) + +plot_ly(economics, x = date, y = uempmed, name = "observed") %>% + add_trace(y = yhat, name = "estimated", data = efit) +``` + + + +Note that the date information carries over from the first trace to the second. In fact, by default, information from the first trace carries over to all subsequent traces unless the property is overwritten or if we set `inherit = FALSE` in `plot_ly()` (this helps [avoid repeating yourself](http://en.wikipedia.org/wiki/Don%27t_repeat_yourself)). + +## Mixing data manipulation and visualization verbs + +If you look at the structure of plotly objects, they are actually data frames with a class of plotly and a special environment attached (this environment tracks the mapping from data to visual properties). + +```{r, eval = TRUE} +str(p <- plot_ly(economics, x = date, y = uempmed)) +``` + +Doing this allows us to mix data manipulation and visualization verbs in a [pure(ly) functional, predictable and pipeable](https://dl.dropboxusercontent.com/u/41902/pipe-dsls.pdf) manner. Here, we take advantage of [dplyr](http://cran.r-project.org/web/packages/dplyr/index.html)'s `filter()` verb to label the highest peak in the time series: + +```{r, message = FALSE, warning = FALSE} +p %>% + add_trace(y = fitted(loess(uempmed ~ as.numeric(date)))) %>% + layout(title = "Median duration of unemployment (in weeks)", + showlegend = FALSE) %>% + dplyr::filter(uempmed == max(uempmed)) %>% + layout(annotations = list(x = date, y = uempmed, text = "Peak", showarrow = T)) +``` + + + +Although data frames can be thought of as the central object in this package, plotly visualizations don't actually _require_ a data frame. This makes chart types that accept a `z` argument especially easy to use if you have a numeric matrix: + +```{r} +plot_ly(z = volcano, type = "surface") +``` + + diff --git a/vignettes/intro.html b/vignettes/intro.html new file mode 100644 index 0000000000..2279ee9d5e --- /dev/null +++ b/vignettes/intro.html @@ -0,0 +1,276 @@ + + + + + + + + + + + + + +An introduction to plotly’s R API + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +

Version 1.0.0 of the plotly R package introduces a new high-level interface for working with plotly’s JavaScript graphing library from R. The aim of this vignette is to explain the semantics of this interface, but I also recommend perusing plotly’s R homepage for more examples.

+
+

Creating and modifying plotlys

+

To initiate a plotly object, use plot_ly(). Here we turn the economics data frame (from the ggplot2 package) into a plotly visualization and store it as the object p.

+
library(plotly)
+p <- plot_ly(economics, x = date, y = uempmed)
+

If you have a plotly account, printing plotly objects in the R console will create a new plotly figure, and open it in your web browser. If you’re using knitr/R Markdown with HTML output (like this vignette), printing not only creates the plot, but also embeds it as an HTML iframe. If you want to avoid iframes, check out plotly offline and the accompanying vignette for R.

+
p
+
+ +
+
+
+

Using special arguments

+

plot_ly() has a number of arguments which are unique to the R package and make common visualizations a bit easier. These arguments are very much inspired by the semantics of ggplot2’s qplot() in the sense that a scales are automatically applied these variables (i.e., they map data to visual properties).

+
+

The color argument

+
+

Qualitative color mappings

+

If a ordinal variable (aka a non-ordered factor variable) is assigned to color, then a qualitative color palette is used by default.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        color = Species, mode = "markers")
+
+ +
+

If you want to change the default palette, it’s recommended that you provide a http://colorbrewer2.org qualitative pallette name (e.g., “Set1” or “Accent”) to the colors argument.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        color = Species, colors = "Set1", mode = "markers")
+
+ +
+

In this case, the palette consists of 9 colors and the default behavior is to pick colors that are furthest apart (“#E41A1C”, “#FF7F00”, and “#999999”).

+
cols <- RColorBrewer::brewer.pal(9, "Set1")
+scales::show_col(cols)
+
+ +
+

If you’d like more control over the mapping, you can provide a vector of colors (of appropriate length).

+
cols <- RColorBrewer::brewer.pal(nlevels(iris$Species), "Set1")
+plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        color = Species, colors = cols, mode = "markers")
+
+ +
+
+
+

Sequential color mappings

+

If either a numeric or an ordered factor is mapped to color, plot_ly() applies a sequential color scale by default.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        color = as.ordered(Species), mode = "markers")
+
+ +
+

In the case of continuous numeric variables, plot_ly() performs a linear mapping between the data and an interpolated color pallette.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        color = Sepal.Length, mode = "markers")
+
+ +
+

The colors argument takes arbitrary color codes of arbitrary length. Here is how we could use it to replicate the default mapping in ggplot2.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        color = Sepal.Length, colors = c("#132B43", "#56B1F7"), 
+        mode = "markers")
+
+ +
+
+
+

Diverging color mappings

+

To obtain a diverging color mapping, just provide a diverging palette to the colors argument.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        color = Sepal.Length, colors = "PuOr", mode = "markers")
+
+ +
+
+
+
+

The symbol argument

+

To encode values using symbols, use the symbol argument.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        symbol = Species, mode = "markers")
+
+ +
+

To change the default symbols used, use the symbols argument. All the valid symbol types are listed here.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, mode = "markers",
+        symbol = Species, symbols = c("cross", "square", "triangle-down"))
+
+ +
+
+
+

The group argument and subplot()

+

Using the group argument splits the data into different plotly “traces”.

+
plot_ly(iris, x = Petal.Length, y = Petal.Width, 
+        group = Species, mode = "markers")
+
+ +
+

Although we haven’t specified a coloring scheme, plotly will employ one on it’s own default scheme. The group argument is quite powerful when used in conjunction with subplot() in order to anchor traces onto different axes.

+
iris$id <- as.integer(iris$Species)
+p <- plot_ly(iris, x = Petal.Length, y = Petal.Width, group = Species,
+             xaxis = paste0("x", id), mode = "markers")
+subplot(p)
+
+ +
+

Since subplot() does not assume x/y axes are on a common scale, it does not impose any restrictions on the range by default. However, you can change this by pre-specifying the range of the axis objects via the layout() function.

+
p2 <- layout(
+  p, 
+  xaxis = list(range = range(Petal.Length) + c(-0.1, 0.1)),
+  yaxis = list(range = range(Petal.Width) + c(-0.1, 0.1))
+)
+subplot(p2)
+
+ +
+

The subplot() function creates “xaxis[0-9]” objects which inherit pre-specified properties, but you can also customize each subplot by referencing these objects in the layout

+
layout(
+    subplot(p2),
+    yaxis2 = list(title = ""), 
+    yaxis3 = list(title = "")
+)
+
+ +
+

See here for another example of using the group argument to make small multiples (with maps!).

+
+
+
+

Manually adding traces

+

Sometimes you may want multiple traces on a plot, but have different traces from different data sources. In this case, the add_trace() function and it’s (optional) data argument come in handy.

+
m <- loess(uempmed ~ as.numeric(date), economics)
+efit <- data.frame(date = economics$date, yhat = fitted(m))
+
+plot_ly(economics, x = date, y = uempmed, name = "observed") %>%
+  add_trace(y = yhat, name = "estimated", data = efit)
+
+ +
+

Note that the date information carries over from the first trace to the second. In fact, by default, information from the first trace carries over to all subsequent traces unless the property is overwritten or if we set inherit = FALSE in plot_ly() (this helps avoid repeating yourself).

+
+
+

Mixing data manipulation and visualization verbs

+

If you look at the structure of plotly objects, they are actually data frames with a class of plotly and a special environment attached (this environment tracks the mapping from data to visual properties).

+
str(p <- plot_ly(economics, x = date, y = uempmed))
+
## Classes 'plotly' and 'data.frame':   478 obs. of  6 variables:
+##  $ date    : Date, format: "1967-06-30" "1967-07-31" ...
+##  $ pce     : num  508 511 517 513 518 ...
+##  $ pop     : int  198712 198911 199113 199311 199498 199657 199808 199920 200056 200208 ...
+##  $ psavert : num  9.8 9.8 9 9.8 9.7 9.4 9 9.5 8.9 9.6 ...
+##  $ uempmed : num  4.5 4.7 4.6 4.9 4.7 4.8 5.1 4.5 4.1 4.6 ...
+##  $ unemploy: int  2944 2945 2958 3143 3066 3018 2878 3001 2877 2709 ...
+##  - attr(*, "plotly_hash")= chr "7ff330ec8c566561765c62cbafed3e0f#0"
+

Doing this allows us to mix data manipulation and visualization verbs in a pure(ly) functional, predictable and pipeable manner. Here, we take advantage of dplyr’s filter() verb to label the highest peak in the time series:

+
p %>%
+  add_trace(y = fitted(loess(uempmed ~ as.numeric(date)))) %>%
+  layout(title = "Median duration of unemployment (in weeks)",
+         showlegend = FALSE) %>%
+  dplyr::filter(uempmed == max(uempmed)) %>%
+  layout(annotations = list(x = date, y = uempmed, text = "Peak", showarrow = T))
+
+ +
+

Although data frames can be thought of as the central object in this package, plotly visualizations don’t actually require a data frame. This makes chart types that accept a z argument especially easy to use if you have a numeric matrix:

+
plot_ly(z = volcano, type = "surface")
+
+ +
+
+ + +
+ + + + + + + + diff --git a/vignettes/offline.Rmd b/vignettes/offline.Rmd new file mode 100644 index 0000000000..91d72c2726 --- /dev/null +++ b/vignettes/offline.Rmd @@ -0,0 +1,61 @@ +--- +title: "Plotly Offline in R" +author: "Carson Sievert" +output: + html_document: + pandoc_args: [ + "+RTS", "-K512m", + "-RTS" + ] +vignette: > + %\VignetteEngine{knitr::rmarkdown} + %\VignetteIndexEntry{offline} +--- + +```{r, echo = FALSE} +knitr::opts_chunk$set(message = FALSE) +``` + +## Setup plotly offline + +When you purchase [plotly offline](http://purchasing.plot.ly/), you'll receive a personal download link to a zip file named plotlyjs.zip. Once downloaded, just move that file to your `~/.plotly` directory. + +```{r, eval = FALSE} +if (!dir.exists("~/.plotly")) dir.create("~/.plotly") +file.rename("~/Downloads/plotlyjs.zip", "~/.plotly/plotlyjs.zip") +``` + +If, for some reason, you can't move the zip file to that location, tell R to look elsewhere by changing the "plotly_offline" environment variable (in this case, you may want to place this snippet in your ~/.Rprofile). + +```{r, eval = FALSE} +Sys.setenv("plotly_offline" = "~/Downloads/") +``` + +## Hello Plotly Offline + +To make offline plots, just give the `offline()` function a plotly object. + +```{r} +library(plotly) +p <- plot_ly(iris, x = Sepal.Width, y = Sepal.Length, color = Species, mode = "markers") +offline(p) +``` + +Or give it a ggplot2 object + +```{r} +gg <- qplot(data = iris, x = Sepal.Width, y = Sepal.Length, color = Species) +offline(gg) +``` + +Since plotly offline allows us to make standalone web pages, when using RStudio, your offline plots will appear directly in the viewer: + +
+ +
+ +If you use plotly inside of shiny apps or reactive rmarkdown documents (and have plotly offline), your plotly graphs will be offline by default! + +```{r, eval = FALSE} +shiny::runApp(system.file("examples/UN_Simple", package = "plotly")) +``` diff --git a/vignettes/offline.gif b/vignettes/offline.gif new file mode 100644 index 0000000000..ee80bdd4a1 Binary files /dev/null and b/vignettes/offline.gif differ diff --git a/vignettes/offline.html b/vignettes/offline.html new file mode 100644 index 0000000000..c6206bad33 --- /dev/null +++ b/vignettes/offline.html @@ -0,0 +1,1254 @@ + + + + + + + + + + + + + +Plotly Offline in R + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Setup plotly offline

+

When you purchase plotly offline, you’ll receive a personal download link to a zip file named plotlyjs.zip. Once downloaded, just move that file to your ~/.plotly directory.

+
if (!dir.exists("~/.plotly")) dir.create("~/.plotly")
+file.rename("~/Downloads/plotlyjs.zip", "~/.plotly/plotlyjs.zip")
+

If, for some reason, you can’t move the zip file to that location, tell R to look elsewhere by changing the “plotly_offline” environment variable (in this case, you may want to place this snippet in your ~/.Rprofile).

+
Sys.setenv("plotly_offline" = "~/Downloads/")
+
+
+

Hello Plotly Offline

+

To make offline plots, just give the offline() function a plotly object.

+
library(plotly)
+p <- plot_ly(iris, x = Sepal.Width, y = Sepal.Length, color = Species, mode = "markers")
+offline(p)
+ +
+Drawing… +
+
+ +
+ +

Or give it a ggplot2 object

+
gg <- qplot(data = iris, x = Sepal.Width, y = Sepal.Length, color = Species)
+offline(gg)
+
+Drawing… +
+
+ +
+ +

Since plotly offline allows us to make standalone web pages, when using RStudio, your offline plots will appear directly in the viewer:

+
+ +
+

If you use plotly inside of shiny apps or reactive rmarkdown documents (and have plotly offline), your plotly graphs will be offline by default!

+
shiny::runApp(system.file("examples/UN_Simple", package = "plotly"))
+
+ + +
+ + + + + + + +