Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebranding #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions CartoDB/R/CartoDB-internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -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])
# }

Expand All @@ -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/"
# )
# }
# }
# }
10 changes: 5 additions & 5 deletions CartoDB/R/cartodb.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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') }
}
}
4 changes: 2 additions & 2 deletions CartoDB/man/cartodb.maps.link.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
}
\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"
Expand Down
4 changes: 2 additions & 2 deletions CartoDB/man/cartodb.tiles.tile.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,7 +40,7 @@ cartodb.tiles.tile(name = NULL, x = NULL, y = NULL, z = NULL, sql = NULL, style=
Andrew Hill <[email protected]>
}
\examples{
cartodb_account_name = "examples";
cartodb_account_name = "examples";
cartodb(cartodb_account_name)
tile<-cartodb.tiles.tile("earthquakes", 0, 0, 0, urlOnly=TRUE)
tile
Expand Down
20 changes: 10 additions & 10 deletions README.mdown
Original file line number Diff line number Diff line change
@@ -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/

<img src="http://i.imgur.com/x3SWS.png" alt="" title="Hosted by imgur.com" width="900px" />

Expand All @@ -19,29 +19,29 @@ For more information on the these APIs see http://developers.cartodb.com/
Andrew Hill

- Email: [email protected]

### 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.

- 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")`


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down