-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6eb342d
commit 7d1e43b
Showing
13 changed files
with
81 additions
and
0 deletions.
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,9 @@ | ||
# orderly | ||
|
||
This is an [`orderly`](https://github.com/vimc/orderly) project. The directories are: | ||
|
||
* `src`: create new reports here | ||
* `archive`: versioed results of running your report | ||
* `data`: copies of data used in the reports | ||
|
||
(you can delete or edit this file safely) |
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 @@ | ||
0.7.15 |
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,5 @@ | ||
# orderly: archive | ||
|
||
This directory contains the result of running your reports. Do not edit anything inside this directory. | ||
|
||
(you can delete or edit this file safely) |
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,5 @@ | ||
# orderly: data | ||
|
||
This directory contains the results of queries run against the database, in csv and rds form. Reports will reference these by the hashes. This directory could grow quite large over time. | ||
|
||
(you can delete or edit this file safely) |
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,21 @@ | ||
"name","number" | ||
"careful_bobolink",0.406830187188461 | ||
"uncalorific_bonobo",0.912875924259424 | ||
"marginal_eagle",0.293603372760117 | ||
"unterrestrial_slothbear",0.459065726259723 | ||
"illfated_anchovy",0.332394674187526 | ||
"wet_shrimp",0.65087046707049 | ||
"classless_drafthorse",0.258016780717298 | ||
"upstanding_tattler",0.478545248275623 | ||
"cranky_earwig",0.766310670645908 | ||
"uninspirable_indianglassfish",0.0842469143681228 | ||
"changeable_bream",0.875321330036968 | ||
"zealous_emperorshrimp",0.339072937844321 | ||
"brilliant_nandine",0.839440350187942 | ||
"waiting_agouti",0.34668348915875 | ||
"tricolour_xrayfish",0.333774930797517 | ||
"preagricultural_dromaeosaur",0.476351245073602 | ||
"rhombohedral_canary",0.892198335845023 | ||
"necessary_barnowl",0.864339470630512 | ||
"ethnological_oyster",0.389989543473348 | ||
"snobbish_capeghostfrog",0.777320698834956 |
Binary file not shown.
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 @@ | ||
- name: example |
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,5 @@ | ||
# orderly: draft | ||
|
||
This directory contains the result of running your reports. Do not edit anything inside this directory. These are *draft* reports and should be considered temporary. You can *commit* a draft report to move it into `archive` and to add it to the database. | ||
|
||
(you can delete or edit this file safely) |
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,5 @@ | ||
database: | ||
source: | ||
driver: RSQLite::SQLite | ||
args: | ||
dbname: source.sqlite |
Binary file not shown.
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,5 @@ | ||
# orderly: src | ||
|
||
This directory contains a series of source directories for your reports. Each directory must contain a file `orderly.yml`. The directory name is important - if you change it it will be treated as a totally separate report. | ||
|
||
(you can delete or edit this file safely) |
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 @@ | ||
data: | ||
dat: | ||
query: SELECT name, number FROM thing | ||
script: script.R | ||
artefacts: | ||
staticgraph: | ||
description: A graph of things | ||
filenames: mygraph.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,16 @@ | ||
library(drake) | ||
|
||
save_bar_plot <- function(data, file) { | ||
png(file) | ||
par(mar = c(15, 4, 0.5, 0.5)) | ||
barplot(data, las = 2) | ||
dev.off() | ||
file | ||
} | ||
|
||
plan <- drake_plan( | ||
bar_data = setNames(dat$number, dat$name), | ||
bar_plot = save_bar_plot(bar_data, file_out("mygraph.png")) | ||
) | ||
|
||
make(plan) |