diff --git a/CartoDB/R/CartoDB-internal.R b/CartoDB/R/CartoDB-internal.R index 630a9cc..f5b22ce 100644 --- a/CartoDB/R/CartoDB-internal.R +++ b/CartoDB/R/CartoDB-internal.R @@ -4,24 +4,24 @@ .CartoDB$data<-list() # .onLoad <- -# function (libname, pkgname) +# function (libname, pkgname) # { # op <- options() -# op.utils <- list(help.try.all.packages = FALSE, help.search.types = c("vignette", -# "demo", "help"), internet.info = 2, pkgType = .Platform$pkgType, -# str = list(strict.width = "no", digits.d = 3, vec.len = 4), -# demo.ask = "default", example.ask = "default", HTTPUserAgent = defaultUserAgent(), +# op.utils <- list(help.try.all.packages = FALSE, help.search.types = c("vignette", +# "demo", "help"), internet.info = 2, pkgType = .Platform$pkgType, +# str = list(strict.width = "no", digits.d = 3, vec.len = 4), +# demo.ask = "default", example.ask = "default", HTTPUserAgent = defaultUserAgent(), # menu.graphics = TRUE, mailer = "mailto") # extra <- if (.Platform$OS.type == "windows") { -# list(unzip = "internal", editor = if (length(grep("Rgui", -# commandArgs(), TRUE))) "internal" else "notepad", +# list(unzip = "internal", editor = if (length(grep("Rgui", +# commandArgs(), TRUE))) "internal" else "notepad", # repos = c(CRAN = "@CRAN@", CRANextra = "http://www.stats.ox.ac.uk/pub/RWin")) # } -# else list(unzip = Sys.getenv("R_UNZIPCMD"), editor = Sys.getenv("EDITOR"), +# else list(unzip = Sys.getenv("R_UNZIPCMD"), editor = Sys.getenv("EDITOR"), # repos = c(CRAN = "@CRAN@")) # op.utils <- c(op.utils, extra) # toset <- !(names(op.utils) %in% names(op)) -# if (any(toset)) +# if (any(toset)) # options(op.utils[toset]) # } @@ -30,8 +30,8 @@ # .CartoDB$data <- list( # api.key=NULL, # account.name=NULL, -# api.sql=".cartodb.com/api/v2/sql", -# api.maps=".cartodb.com/tiles/" +# api.sql=".carto.com/api/v2/sql", +# api.maps=".carto.com/tiles/" # ) # } -# } \ No newline at end of file +# } diff --git a/CartoDB/R/cartodb.R b/CartoDB/R/cartodb.R index 673bb6c..a656935 100644 --- a/CartoDB/R/cartodb.R +++ b/CartoDB/R/cartodb.R @@ -3,12 +3,12 @@ function(account.name, api.key = NULL) { .CartoDB$data <- list( api.key=NULL, account.name=NULL, - api.sql=".cartodb.com/api/v2/sql", - api.tiles=".cartodb.com/tiles/", - api.maps=".cartodb.com/tables/" + api.sql=".carto.com/api/v2/sql", + api.tiles=".carto.com/tiles/", + api.maps=".carto.com/tables/" ) if(is.character(api.key)){ - .CartoDB$data$api.key<-api.key + .CartoDB$data$api.key<-api.key } else{ warning("Without an API key you are limited to read-only") } @@ -42,4 +42,4 @@ function(option=NULL) { else if (option=="WKB") { return('the_geom as the_geom') } else if (option=="the_geom") { return('the_geom') } else { return('ST_X(the_geom) AS the_geom_x, ST_Y(the_geom) AS the_geom_y,null as the_geom') } -} \ No newline at end of file +} diff --git a/CartoDB/man/cartodb.maps.link.Rd b/CartoDB/man/cartodb.maps.link.Rd index a714b8e..37d31f8 100644 --- a/CartoDB/man/cartodb.maps.link.Rd +++ b/CartoDB/man/cartodb.maps.link.Rd @@ -18,14 +18,14 @@ cartodb.maps.link(name=NULL,sql = NULL, style=NULL) An SQL query for querying dynamic tiles from CartoDB } \item{style}{ - A Carto style string to restyle tiles dynamically (see http://developers.cartodb.com/) + A Carto style string to restyle tiles dynamically (see https://carto.com/docs/) } } \author{ Andrew Hill } \examples{ -cartodb_account_name = "examples"; +cartodb_account_name = "examples"; cartodb(cartodb_account_name) tile<-cartodb.maps.link("earthquakes") "http://examples.cartodb.com/tables/earthquakes/embed_map" diff --git a/CartoDB/man/cartodb.tiles.tile.Rd b/CartoDB/man/cartodb.tiles.tile.Rd index 6d1dfdf..bc6a4f5 100644 --- a/CartoDB/man/cartodb.tiles.tile.Rd +++ b/CartoDB/man/cartodb.tiles.tile.Rd @@ -27,7 +27,7 @@ cartodb.tiles.tile(name = NULL, x = NULL, y = NULL, z = NULL, sql = NULL, style= An SQL query for querying dynamic tiles from CartoDB } \item{style}{ - A Carto style string to restyle tiles dynamically (see http://developers.cartodb.com/) + A Carto style string to restyle tiles dynamically (see https://carto.com/docs/) } \item{method}{ The format of the data you want returned, "bytes". "png" is in development @@ -40,7 +40,7 @@ cartodb.tiles.tile(name = NULL, x = NULL, y = NULL, z = NULL, sql = NULL, style= Andrew Hill } \examples{ -cartodb_account_name = "examples"; +cartodb_account_name = "examples"; cartodb(cartodb_account_name) tile<-cartodb.tiles.tile("earthquakes", 0, 0, 0, urlOnly=TRUE) tile diff --git a/README.mdown b/README.mdown index 6a43bd0..47064d7 100644 --- a/README.mdown +++ b/README.mdown @@ -1,6 +1,6 @@ -## This package provides an R wrapper to the cartodb.com APIs. +## This package provides an R wrapper to the CARTO.com APIs. -For more information on the these APIs see http://developers.cartodb.com/ +For more information on the these APIs see https://carto.com/docs/ @@ -19,15 +19,15 @@ For more information on the these APIs see http://developers.cartodb.com/ Andrew Hill - Email: andrew@vizzuality.com - + ### Requirements The CartoDB R package requires the following external packages - RCurl - + - RJSONIO - + ### Suggested Using rgeos can greatly improve mapping capability in R. It also plays nice with CartoDB, as queries accept geomAs='WKT', which can be directly used in rgeos. @@ -35,13 +35,13 @@ Using rgeos can greatly improve mapping capability in R. It also plays nice with - rgeos ### Installation from source - + To install this package from the source code available here - download the file - + - change directory to the location downloaded - + `> install.packages("CartoDB_1.4.tar.gz", repos=NULL, type="source")` @@ -211,7 +211,7 @@ library(RJSONIO) library(CartoDB) # Setup our CartoDB Connection -cartodb_account_name = "viz2"; +cartodb_account_name = "viz2"; cartodb(cartodb_account_name) # CartoDB the_geom columns are always the following proj string @@ -249,7 +249,7 @@ library(CartoDB) # Setup a CartoDB connection with authenticated API Key access your_api_key = "{your_api_key}" -cartodb_account_name = "examples"; +cartodb_account_name = "examples"; cartodb(cartodb_account_name, api.key=your_api_key) # Insert a new row into a table called us_cities that has columns name, latitude, and longitude. Inserts return the cartodb_id of the newly created record