Skip to content

Commit

Permalink
Corrected readme.MD
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornerstedt committed Nov 23, 2015
1 parent ca8d531 commit dd8f920
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/get_scb.R
Expand Up @@ -4,7 +4,7 @@
#'
#' For more info, see:
#'
#' http://www.github.com/bjornerstedt/scbapi
#' \url{http://www.github.com/bjornerstedt/scbapi}
#'
#' @param fname File name of JSON query
#' @param download_data Boolean indicating whether downloaded or saved data should be used
Expand Down
6 changes: 3 additions & 3 deletions README.md
@@ -1,5 +1,5 @@
# scbapi - download SCB data
Downloading data from SCB using JSON is rather simple in R. Here is a function that creates a `data_frame` from a json query file, as generated by the SCB site.
Downloading data from SCB (Statistics Sweden) using JSON is rather simple in R. Here is a function that creates a `data_frame` from a json query file, as generated by the SCB site.

## Using

Expand All @@ -12,8 +12,8 @@ Downloading data from SCB using JSON is rather simple in R. Here is a function t

```
library(scbapi)
url <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0101/BE0101A/BefolkningNy"
df <- get_scb("cpi", url)
popurl <- "http://api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0101/BE0101A/BefolkningNy"
df <- get_scb("cpi", url = popurl )
```
The data frame generated is essentially the transpose of the table shown on screen in the search result. Variable names of your choice have to be set manually, for example with `names(df) <- c("time", "pop")`.

Expand Down
2 changes: 1 addition & 1 deletion man/get_scb.Rd

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

0 comments on commit dd8f920

Please sign in to comment.