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

update readme with clarifying socrata api documentation #181

Open
wants to merge 2 commits into
base: dev
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
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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." <[email protected]>
Depends:
Expand All @@ -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
9 changes: 8 additions & 1 deletion R/RSocrata.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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", "[email protected]")
Expand Down
14 changes: 10 additions & 4 deletions man/write.socrata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.