diff --git a/DESCRIPTION b/DESCRIPTION index 83b3f2e..07feea2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,8 +10,8 @@ Description: Provides easier interaction with format and manages throttling by 'Socrata'. Users can upload data to 'Socrata' portals directly from R. -Version: 1.8.0-10 -Date: 2019-01-27 +Version: 1.8.0-11 +Date: 2019-09-10 Author: Hugh Devlin, Ph. D., Tom Schenk, Jr., Gene Leynes, Nick Lucius, John Malc, Mark Silverberg, and Peter Schmeideskamp Maintainer: "Tom Schenk Jr." Depends: @@ -29,4 +29,4 @@ Suggests: License: MIT + file LICENSE URL: https://github.com/Chicago/RSocrata BugReports: https://github.com/Chicago/RSocrata/issues -RoxygenNote: 6.1.0 +RoxygenNote: 6.1.1 diff --git a/R/RSocrata.R b/R/RSocrata.R index 1c5698b..e63cbfa 100644 --- a/R/RSocrata.R +++ b/R/RSocrata.R @@ -472,7 +472,14 @@ checkUpdateResponse <- function(json_data_to_upload, url, http_verb, email, pass #' Write to a Socrata dataset (full replace or upsert) #' -#' @description Method for updating Socrata datasets +#' @description Method for updating Socrata datasets with the Socrata Open Data API (SODA). +#' +#' Note: SODA differs in functionality from the Socrata Data Management API. +#' The Data Management API stages and transforms data in drafts on Socrata during the data ingress cycle. With any data updates to Socrata datasets that utilize +#' one or more on-platform data transformations, use the Data Management API to continue to apply those transformations to any new data. +#' +#' If you do not need or use the on-platform transform functionality for a given dataset, the SODA API and \code{write.socrata()} +#' will continue to perform as expected. For more on the Socrata Data Management API, see the latter API's documentation \url{https://socratapublishing.docs.apiary.io/#} #' #' @param dataframe - dataframe to upload to Socrata #' @param dataset_json_endpoint - Socrata Open Data Application Program Interface (SODA) endpoint (JSON only for now) diff --git a/README.md b/README.md index 5ed9fc9..43646b9 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,9 @@ allSitesDataFrame$title # Names of each dataset ``` ### Upload data to portal + +Note: ```write.socrata()``` writes directly to Socrata datasets using the Socrata Open Data API, which differs in functionality from the [Socrata Data Management API](https://socratapublishing.docs.apiary.io/#). Creating datasets with the Socrata user interface, or directly with the Data Management API, uses drafts to stage and transform data during the data ingress cycle. With any data updates to Socrata datasets that utilize one or more on-platform data transformations (like adding a georeference), use the Data Management API to continue to apply those transformations to any new data. If your dataset schema is exactly the same between your source and the Socrata dataset, and you do not need the on-platform transform functionality, the SODA API and ```write.socrata()``` will continue to perform as expected. For more on the difference between the SODA API and the Socrata Data Management API, see the latter API's documentation [here](https://socratapublishing.docs.apiary.io/#). + ```r # Store user email and password socrataEmail <- Sys.getenv("SOCRATA_EMAIL", "mark.silverberg+soda.demo@socrata.com") diff --git a/man/write.socrata.Rd b/man/write.socrata.Rd index 35de583..c4f6f67 100644 --- a/man/write.socrata.Rd +++ b/man/write.socrata.Rd @@ -4,8 +4,8 @@ \alias{write.socrata} \title{Write to a Socrata dataset (full replace or upsert)} \usage{ -write.socrata(dataframe, dataset_json_endpoint, update_mode, email, password, - app_token = NULL) +write.socrata(dataframe, dataset_json_endpoint, update_mode, email, + password, app_token = NULL) } \arguments{ \item{dataframe}{- dataframe to upload to Socrata} @@ -22,7 +22,14 @@ write.socrata(dataframe, dataset_json_endpoint, update_mode, email, password, portal \url{http://dev.socrata.com/consumers/getting-started.html}} } \description{ -Method for updating Socrata datasets +Method for updating Socrata datasets with the Socrata Open Data API (SODA). + +Note: SODA differs in functionality from the Socrata Data Management API. +The Data Management API stages and transforms data in drafts on Socrata during the data ingress cycle. With any data updates to Socrata datasets that utilize +one or more on-platform data transformations, use the Data Management API to continue to apply those transformations to any new data. + +If you do not need or use the on-platform transform functionality for a given dataset, the SODA API and \code{write.socrata()} +will continue to perform as expected. For more on the Socrata Data Management API, see the latter API's documentation \url{https://socratapublishing.docs.apiary.io/#} } \examples{ # Store user email and password @@ -42,4 +49,3 @@ write.socrata(df_in,datasetToAddToUrl,"UPSERT",socrataEmail,socrataPassword) \author{ Mark Silverberg \email{mark.silverberg@socrata.com} } -