RSocrata
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'.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.6%) to scientific vocabulary
Keywords
Repository
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'.
Basic Info
- Host: GitHub
- Owner: Chicago
- License: other
- Language: R
- Default Branch: master
- Homepage: https://CRAN.R-project.org/package=RSocrata
- Size: 550 KB
Statistics
- Stars: 237
- Watchers: 19
- Forks: 83
- Open Issues: 43
- Releases: 18
Topics
Metadata Files
README.md
RSocrata
Master
Stable beta branch. Test about-to-be-released features in a stable pre-release build before it is submitted to CRAN.
Dev
"Nightly" alpha branch. Test the latest features and bug fixes -- enjoy at your own risk.
A tool for downloading and uploading Socrata datasets
Provided with a URL to a dataset resource published on a Socrata webserver,
or a Socrata SoDA (Socrata Open Data Application Program Interface) web API query,
or a Socrata "human-friendly" URL, read.socrata()
returns an R data frame.
Converts dates to POSIX format.
Supports CSV and JSON download file formats from Socrata.
Manages the throttling of data returned from Socrata and allows users to provide an application token.
Supports SoDA query parameters in the URL string for further filtering, sorting, and queries.
Upload data to Socrata data portals using "upsert" and "replace" methods.
Use ls.socrata() to list all datasets available on a Socrata webserver.
testthat test coverage.
Installation
To get the current released version from CRAN:
R
install.packages("RSocrata")
The most recent beta with soon-to-be-released changes can be installed from GitHub:
```R
install.packages("devtools")
devtools::install_github("Chicago/RSocrata") ```
The "nightly" version with the most recent bug fixes and features is also available. This version is always an alpha and may contain significant bugs. You can install it from the dev branch from GitHub:
```R
install.packages("devtools")
devtools::install_github("Chicago/RSocrata", ref="dev") ```
Examples
Reading SoDA valid URLs
r
earthquakesDataFrame <- read.socrata("https://soda.demo.socrata.com/resource/4334-bgaj.csv")
nrow(earthquakesDataFrame) # 1007 (two "pages")
class(earthquakesDataFrame$Datetime[1]) # POSIXlt
Reading "human-readable" URLs
r
earthquakesDataFrame <- read.socrata("https://soda.demo.socrata.com/dataset/USGS-Earthquakes-for-2012-11-01-API-School-Demo/4334-bgaj")
nrow(earthquakesDataFrame) # 1007 (two "pages")
class(earthquakesDataFrame$Datetime[1]) # POSIXlt
Using API key to read datasets
r
token <- "ew2rEMuESuzWPqMkyPfOSGJgE"
earthquakesDataFrame <- read.socrata("https://soda.demo.socrata.com/resource/4334-bgaj.csv", app_token = token)
nrow(earthquakesDataFrame)
Download private datasets from portal
```r
Store user email and password
socrataEmail <- Sys.getenv("SOCRATAEMAIL", "mark.silverberg+soda.demo@socrata.com") socrataPassword <- Sys.getenv("SOCRATAPASSWORD", "7vFDsGFDUG")
privateResourceToReadCsvUrl <- "https://soda.demo.socrata.com/resource/a9g2-feh2.csv" # dataset
read.socrata(url = privateResourceToReadCsvUrl, email = socrataEmail, password = socrataPassword) ```
List all datasets on portal
r
allSitesDataFrame <- ls.socrata("https://soda.demo.socrata.com")
nrow(allSitesDataFrame) # Number of datasets
allSitesDataFrame$title # Names of each dataset
Upload data to portal
```r
Store user email and password
socrataEmail <- Sys.getenv("SOCRATAEMAIL", "mark.silverberg+soda.demo@socrata.com") socrataPassword <- Sys.getenv("SOCRATAPASSWORD", "7vFDsGFDUG")
datasetToAddToUrl <- "https://soda.demo.socrata.com/resource/xh6g-yugi.json" # dataset
Generate some data
x <- sample(-1000:1000, 1) y <- sample(-1000:1000, 1) df_in <- data.frame(x,y)
Upload to Socrata
write.socrata(df_in,datasetToAddToUrl,"UPSERT",socrataEmail,socrataPassword) ```
Issues
Please report issues, request enhancements or fork us at the City of Chicago github.
Contributing
If you would like to contribute to this project, please see the contributing documentation and the product roadmap.
Owner
- Name: City of Chicago
- Login: Chicago
- Kind: organization
- Email: developers@cityofchicago.org
- Location: Chicago, IL
- Website: http://dev.cityofchicago.org
- Repositories: 84
- Profile: https://github.com/Chicago
Open source projects created by the City of Chicago. City staff can request access through developers@cityofchicago.org from their work email.
GitHub Events
Total
- Issues event: 3
- Watch event: 6
- Member event: 1
- Issue comment event: 11
- Gollum event: 1
- Pull request event: 2
- Pull request review event: 1
- Fork event: 2
- Create event: 1
Last Year
- Issues event: 3
- Watch event: 6
- Member event: 1
- Issue comment event: 11
- Gollum event: 1
- Pull request event: 2
- Pull request review event: 1
- Fork event: 2
- Create event: 1
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Tom Schenk Jr | t****r@g****m | 104 |
| Lucius | n****2@c****g | 36 |
| Hugh | H****n@c****l | 32 |
| Tom Schenk Jr | t****k@c****g | 32 |
| dmpe | c****o@s****z | 22 |
| Gene Leynes | g****s@g****m | 20 |
| Gene Leynes | g****s@c****g | 13 |
| unknown | 3****2@M****l | 12 |
| Tom Schenk Jr | t****r | 10 |
| Peter Schmiedeskamp | p****r@t****t | 8 |
| Mark Silverberg | m****g@s****m | 3 |
| Kent Johnson | k****7@g****m | 1 |
| jjchern | j****n@g****m | 1 |
| Gene Leynes | G****s@c****g | 1 |
| Nick Lucius | l****s@N****l | 1 |
| Nick Lucius | n****s@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 83
- Total pull requests: 42
- Average time to close issues: 4 months
- Average time to close pull requests: 3 days
- Total issue authors: 30
- Total pull request authors: 10
- Average comments per issue: 3.89
- Average comments per pull request: 1.76
- Merged pull requests: 30
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 2
- Average time to close issues: 5 months
- Average time to close pull requests: 19 minutes
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 2.33
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- geneorama (25)
- tomschenkjr (18)
- nicklucius (9)
- chursaner (2)
- finestjava (2)
- LoveYukee (2)
- Lulliter (1)
- jbrnbrg (1)
- heathyates (1)
- ecorreig (1)
- daniel-kramer (1)
- marks (1)
- bartling (1)
- delsea (1)
- jospueyo (1)
Pull Request Authors
- geneorama (16)
- nicklucius (14)
- tomschenkjr (5)
- JordanMPDS (2)
- ryan-hall (1)
- danielOKeefe (1)
- Elsiemtz (1)
- userfog (1)
- shorty0789 (1)
- flynn-d (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- cran 1,040 last-month
- Total docker downloads: 21,255
-
Total dependent packages: 2
(may contain duplicates) -
Total dependent repositories: 13
(may contain duplicates) - Total versions: 53
- Total maintainers: 1
proxy.golang.org: github.com/Chicago/RSocrata
- Documentation: https://pkg.go.dev/github.com/Chicago/RSocrata#section-documentation
- License: other
-
Latest release: v1.7.10
published over 6 years ago
Rankings
proxy.golang.org: github.com/chicago/rsocrata
- Documentation: https://pkg.go.dev/github.com/chicago/rsocrata#section-documentation
- License: other
-
Latest release: v1.7.10
published over 6 years ago
Rankings
cran.r-project.org: RSocrata
Download or Upload 'Socrata' Data Sets
- Homepage: https://github.com/Chicago/RSocrata
- Documentation: http://cran.r-project.org/web/packages/RSocrata/RSocrata.pdf
- License: MIT + file LICENSE
- Status: removed
-
Latest release: 1.7.15-1
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.3.0 depends
- httr >= 1.0.0 imports
- jsonlite >= 0.9.16 imports
- mime >= 0.3 imports
- plyr >= 1.8.4 imports
- readr >= 0.2.2 suggests
- roxygen2 >= 4.1.0 suggests
- testthat >= 0.10.0 suggests