-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit, start of nomisr project
- Loading branch information
Showing
16 changed files
with
236 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^README\.Rmd$ | ||
^README-.*\.png$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
src/*.o | ||
src/*.so | ||
src/*.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Package: nomisr | ||
Type: Package | ||
Title: What the Package Does in One 'Title Case' Line | ||
Version: 1.0 | ||
Date: 2018-01-19 | ||
Author: Your Name | ||
Maintainer: Your Name <your@email.com> | ||
Description: One paragraph description of what the package does as one or more full sentences. | ||
License: GPL (>= 2) | ||
Imports: Rcpp (>= 0.12.14) | ||
LinkingTo: Rcpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
useDynLib(nomisr, .registration=TRUE) | ||
exportPattern("^[[:alpha:]]+") | ||
importFrom(Rcpp, evalCpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
|
||
|
||
|
||
# nomisr 0.0.1 | ||
|
||
Start of project | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Generated by using Rcpp::compileAttributes() -> do not edit by hand | ||
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 | ||
|
||
rcpp_hello_world <- function() { | ||
.Call(`_nomisr_rcpp_hello_world`) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
|
||
# Docs: https://www.nomisweb.co.uk/api/v01/help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
### function for searching | ||
|
||
|
||
|
||
|
||
nomis_search <- function(search, keyword=FALSE){ | ||
|
||
mydata <- dplyr::if_else(keyword==FALSE, | ||
jsonlite::fromJSON(paste0("https://www.nomisweb.co.uk/api/v01/dataset/def.sdmx.json?search=*", search, "*"), flatten = TRUE), | ||
jsonlite::fromJSON(paste0("https://www.nomisweb.co.uk/api/v01/dataset/def.sdmx.json?search=keywords-", search, "*"), flatten = TRUE)) | ||
|
||
df <- mydata$structure$keyfamilies$keyfamily | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
output: github_document | ||
--- | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
```{r, echo = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>", | ||
fig.path = "README-" | ||
) | ||
``` | ||
|
||
# nomisr | ||
|
||
The goal of nomisr is to ... | ||
|
||
## Installation | ||
|
||
You can install nomisr from github with: | ||
|
||
```{r gh-installation, eval = FALSE} | ||
# install.packages("devtools") | ||
devtools::install_github("evanodell/nomisr") | ||
``` | ||
<!-- | ||
## Example | ||
This is a basic example which shows you how to solve a common problem: | ||
```{r example} | ||
## basic example code | ||
``` | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
# nomisr | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
nomisr | ||
====== | ||
|
||
The goal of nomisr is to ... | ||
|
||
Installation | ||
------------ | ||
|
||
You can install nomisr from github with: | ||
|
||
``` r | ||
# install.packages("devtools") | ||
devtools::install_github("evanodell/nomisr") | ||
``` | ||
|
||
<!-- | ||
## Example | ||
This is a basic example which shows you how to solve a common problem: | ||
```r | ||
## basic example code | ||
``` | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* Edit the help file skeletons in 'man', possibly combining help files for multiple functions. | ||
* Edit the exports in 'NAMESPACE', and add necessary imports. | ||
* Put any C/C++/Fortran code in 'src'. | ||
* If you have compiled code, add a useDynLib() directive to 'NAMESPACE'. | ||
* Run R CMD build to build the package tarball. | ||
* Run R CMD check to check the package tarball. | ||
|
||
Read "Writing R Extensions" for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
\name{nomisr-package} | ||
\alias{nomisr-package} | ||
\alias{nomisr} | ||
\docType{package} | ||
\title{ | ||
A short title line describing what the package does | ||
} | ||
\description{ | ||
A more detailed description of what the package does. A length | ||
of about one to five lines is recommended. | ||
} | ||
\details{ | ||
This section should provide a more detailed overview of how to use the | ||
package, including the most important functions. | ||
} | ||
\author{ | ||
Your Name, email optional. | ||
|
||
Maintainer: Your Name <your@email.com> | ||
} | ||
\references{ | ||
This optional section can contain literature or other references for | ||
background information. | ||
} | ||
\keyword{ package } | ||
\seealso{ | ||
Optional links to other man pages | ||
} | ||
\examples{ | ||
\dontrun{ | ||
## Optional simple examples of the most important functions | ||
## These can be in \dontrun{} and \donttest{} blocks. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
\name{rcpp_hello_world} | ||
\alias{rcpp_hello_world} | ||
\docType{package} | ||
\title{ | ||
Simple function using Rcpp | ||
} | ||
\description{ | ||
Simple function using Rcpp | ||
} | ||
\usage{ | ||
rcpp_hello_world() | ||
} | ||
\examples{ | ||
\dontrun{ | ||
rcpp_hello_world() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: knitr | ||
LaTeX: pdfLaTeX | ||
|
||
BuildType: Package | ||
PackageUseDevtools: Yes | ||
PackageInstallArgs: --no-multiarch --with-keep.source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Generated by using Rcpp::compileAttributes() -> do not edit by hand | ||
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 | ||
|
||
#include <Rcpp.h> | ||
|
||
using namespace Rcpp; | ||
|
||
// rcpp_hello_world | ||
List rcpp_hello_world(); | ||
RcppExport SEXP _nomisr_rcpp_hello_world() { | ||
BEGIN_RCPP | ||
Rcpp::RObject rcpp_result_gen; | ||
Rcpp::RNGScope rcpp_rngScope_gen; | ||
rcpp_result_gen = Rcpp::wrap(rcpp_hello_world()); | ||
return rcpp_result_gen; | ||
END_RCPP | ||
} | ||
|
||
static const R_CallMethodDef CallEntries[] = { | ||
{"_nomisr_rcpp_hello_world", (DL_FUNC) &_nomisr_rcpp_hello_world, 0}, | ||
{NULL, NULL, 0} | ||
}; | ||
|
||
RcppExport void R_init_nomisr(DllInfo *dll) { | ||
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); | ||
R_useDynamicSymbols(dll, FALSE); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
#include <Rcpp.h> | ||
using namespace Rcpp; | ||
|
||
// [[Rcpp::export]] | ||
List rcpp_hello_world() { | ||
|
||
CharacterVector x = CharacterVector::create( "foo", "bar" ) ; | ||
NumericVector y = NumericVector::create( 0.0, 1.0 ) ; | ||
List z = List::create( x, y ) ; | ||
|
||
return z ; | ||
} |