Skip to content
Closed
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: 4 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ RSocrata.Rcheck
^.*\.Rproj$
^\.Rproj\.user$
.DS_Store
README.md
^\.travis\.yml$
appveyor.yml
CONTRIBUTING.md
CONTRIBUTING.md
vignettes/rsconnect
vignettes/bench.rmd
^.*\.o$
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/.README.md.html
/.settings
/DESCRIPTION.Rcheck
/man
/out
/RCheck
/RSocrata_*.tar.gz
Expand All @@ -14,3 +13,5 @@
*.Rproj.user
*.Rhistory
.Rproj.user
inst/doc
/vignettes/rsconnect
48 changes: 34 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
# Sample .travis.yml for R projects.
#
# See README.md for instructions, or for more configuration options,
# see the wiki:
# http://docs.travis-ci.com/user/languages/r/

language: R
language: c
sudo: required
warnings_are_errors: true
dist: trusty
script: ./travis-tool.sh run_tests

before_script:
- sudo apt-get --yes --force-yes update -qq
- sudo apt-get install -y gdal-bin libgdal-dev libgdal1-dev netcdf-bin libproj-dev libv8-dev
- curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh
- chmod 755 ./travis-tool.sh
- ./travis-tool.sh bootstrap
- ./travis-tool.sh install_deps

r_github_packages:
- hadley/httr
- jeroenooms/jsonlite
- jeroenooms/curl
- klutometis/roxygen
- jimhester/covr
- yihui/mime
- ropensci/geojsonio

after_failure:
- ./travis-tool.sh dump_logs

env:
global:
- R_LIBS="http://cran.rstudio.com"
- R_BUILD_ARGS="--no-build-vignettes --no-manual"
- R_CHECK_ARGS="--no-build-vignettes --no-manual --as-cran"
- BOOTSTRAP_LATEX=""

#language: R
#warnings_are_errors: true

#before_install:
# - sudo apt-get --yes --force-yes update -qq
# - sudo apt-get install -y gdal-bin libgdal-dev libgdal1-dev netcdf-bin libproj-dev libv8-dev

before_install:
- Rscript -e "install.packages('roxygen2', repos='http://cran.us.r-project.org'); library(roxygen2); roxygen2::roxygenize(package.dir='.', roclets=c('rd', 'collate', 'namespace'))"

after_success:
- Rscript -e 'source("R/tests/testRSocrata.R"); runAllTestsCI()'
#after_success:
# - Rscript -e 'library(covr);coveralls()'

notifications:
email:
on_success: change
on_failure: change
on_failure: change
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# How to contribute

We really appreciate when users [fix bugs](https://github.com/Chicago/RSocrata/pull/25) or [provide new features](https://github.com/Chicago/RSocrata/pull/21). When submitting changes, please read below to help the development team keep on top of issues and changes.
Expand All @@ -18,8 +17,8 @@ If you have multiple issues, please submit multiple requests. Once you submit yo

When you want to make a change, either to fix a bug or introduce a new feature, please follow the instructions below

* Create a branch or fork of the project based off of the `dev` branch.
* Create a branch or fork of the project based off of the **`dev`** branch.
* Make commits of logical units
* Add unit tests for any new features
* Run all tests in `R/tests/testRSocrata.R`
* Run all tests in `tests/testthat/` (CTRL+SHIFT+T)
* Create a pull request with a robust description or [reference the issue number](https://github.com/Chicago/RSocrata/issues)
39 changes: 22 additions & 17 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
Package: RSocrata
Type: Package
Title: Download 'Socrata' Data Sets as R Data Frames
Description: Provides easier interaction with
Socrata open data portals http://dev.socrata.com.
Users can provide a 'Socrata' data set resource URL,
or a 'Socrata' Open Data API (SoDA) web query,
or a 'Socrata' "human-friendly" URL,
returns an R data frame.
Converts dates to 'POSIX' format.
Manages throttling by 'Socrata'.
Version: 1.6.1-4
Date: 2015-7-10
or a 'Socrata' "human-friendly" URL, all of which
return a R data frame.
Additionally, it converts dates to 'POSIX' format,
manages throttling by 'Socrata' and supports geospacial data.
Version: 1.7.0-9
Date: 2015-10-26
Author: Hugh Devlin, Ph. D., Tom Schenk, Jr. and John Malc (@dmpe)
Maintainer: "Tom Schenk Jr." <developers@cityofchicago.org>
Depends:
R (>= 3.2.2)
Imports:
httr (>= 1.0.0),
jsonlite (>= 0.9.19),
mime (>= 0.4),
geojsonio (>= 0.1.4),
plyr (>= 1.8.3)
Suggests:
testthat (>= 0.11.0),
roxygen2 (>= 5.0.1),
License: MIT + file LICENSE
URL: https://github.com/Chicago/RSocrata
BugReports: https://github.com/Chicago/RSocrata/issues
Imports:
httr (>= 0.3),
jsonlite (>= 0.9.14),
mime (>= 0.2),
Depends:
curl (>= 0.5)
Suggests:
testthat (>= 0.10.0)
Author: Hugh Devlin, Ph. D. and Tom Schenk, Jr.
Maintainer: Tom Schenk Jr <developers@cityofchicago.org>
License: MIT + file LICENSE
RoxygenNote: 5.0.1
25 changes: 18 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
export(fieldName)
export(posixify)
export(read.socrata)
# Generated by roxygen2: do not edit by hand

export(getMetadata)
export(isFourByFour)
export(ls.socrata)
importFrom("httr", "parse_url", "build_url", "http_status", "stop_for_status", "GET", "content")
importFrom("mime", "guess_type")
importFrom("jsonlite", "fromJSON")
import("curl")
export(read.socrata)
export(read.socrataGEO)
export(validateUrl)
importFrom(geojsonio,geojson_read)
importFrom(httr,GET)
importFrom(httr,add_headers)
importFrom(httr,build_url)
importFrom(httr,config)
importFrom(httr,content)
importFrom(httr,parse_url)
importFrom(httr,stop_for_status)
importFrom(jsonlite,fromJSON)
importFrom(mime,guess_type)
importFrom(plyr,rbind.fill)
48 changes: 48 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
### 1.1
Add check for valid Socrata resource URL. Add check for supported download file format. Add support for Socrata short dates.

### 1.2
Use comma-separated file format for Socrata downloads.

### 1.3
* Added support for human-readable URL. Users can now copy and paste URLs of Socrata-hosted datasets, which will be transformed into a valid SoDA API web query.

* Added additional RUnit tests to validate new functionality.

### 1.4
Add json file format for Socrata downloads. Switch to `RJSONIO` from `rjson`.

### 1.5 Several changes:

* Swapped to ```jsonlite``` from ```RJSONIO```
* Added handling for long and short dates
* Added unit test for reading private datasets

### 1.5.1
Deprecated ```httr::guess_media()``` and implemented ```mime::guess_type()```

### 1.6.0 Several changes:

* New function, ```ls.socrata``` to list all datasets on a Socrata portal.
* New optional argument, ```app_token```, which lets users supply an API token while using ```read.socrata()``` to minimize throttling.
* Repairs a bug where ```read.socrata``` failed when reading in a date with a column, but there are null values in that column.
* Minor changes to the DESCRIPTION documentation to point users to GitHub for issues and provides new contact information.

### 1.6.1 Bug fixes:

* Resolved potential [name collision issue](https://github.com/Chicago/RSocrata/issues/42)
* Cleaned-up documentation with contributor instructions [#23](https://github.com/Chicago/RSocrata/issues/23) and [#28](https://github.com/Chicago/RSocrata/issues/28))
* Moved test coverage in `RUnit` to `testthat` and implemented code coverage monitoring ([#41](https://github.com/Chicago/RSocrata/issues/41))
* Clean-up DESCRIPTION ([#40](https://github.com/Chicago/RSocrata/issues/40))
* Add continuous integration for Windows ([#39](https://github.com/Chicago/RSocrata/issues/39))
* Migrate Travis-CI to "proper" R YAML ([#46](https://github.com/Chicago/RSocrata/issues/46))


### 1.7.0 Several changes, bug fixes and new features:

* New function, `read.socrataGEO()`, which allows downloading GeoJSON data from Socrata data portals.
* Downloads now default to JSON for any requests for improved speed ([#53](https://github.com/Chicago/RSocrata/pull/53))
* Add support of a "floating timestamp"
* Improved error handling and warnings
* Fixed errors when "NA" was present in date columns ([#27](https://github.com/Chicago/RSocrata/issues/27) and [#24](https://github.com/Chicago/RSocrata/pull/25))
* Use `plyr` to improve the speed and performance of downloads [in some cases](https://github.com/Chicago/RSocrata/pull/56).
Loading