Skip to content

Commit

Permalink
Merge pull request #17 from dereckmezquita/MISC-5-R-pkg-dmplot-workin…
Browse files Browse the repository at this point in the history
…g-with-financial-data-vignette

MISC-5: new vignette for financial data.
  • Loading branch information
dereckmezquita authored Jul 8, 2024
2 parents 3ba8229 + 9ea13d4 commit d7574e1
Show file tree
Hide file tree
Showing 19 changed files with 1,101 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install R package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::. # Necessary to avoid object usage linter errors.
extra-packages: github::dereckmezquita/kucoin, local::.

- name: R CMD check
if: always()
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# https://github.com/Appsilon/shiny.blueprint
name: pkgdown
on:
push:
branches: [master]
workflow_dispatch:
# on:
# release:
# types: [published]
# workflow_dispatch:
on: push
permissions:
contents: write
jobs:
Expand All @@ -26,7 +27,7 @@ jobs:
- name: Install R package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
extra-packages: any::pkgdown, github::dereckmezquita/kucoin, local::.

- name: Configure git
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

docs/
deprecated/
.DS_Store
*html
Expand Down
11 changes: 7 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dmplot
Title: A plotting tool kit for financial and time series data
Version: 1.2.0
Title: A framework and toolkit for financial and time series data
Version: 1.3.0
URL: https://github.com/dereckmezquita/dmplot
Authors@R:
person(given = "Dereck",
Expand All @@ -9,12 +9,12 @@ Authors@R:
email = "dereck@mezquita.io",
comment = c(ORCID = "0000-0002-9307-6762"))
Maintainer: Dereck Mezquita <dereck@mezquita.io>
Description: A toolkit for plotting financial and time series datasets in the ggplot framework.
Description: A plotting toolkit for financial and time series data. The package provides algorithms, functions, layers and outlines a framework for working with working with and analysing financial and time series data.
Depends: R (>= 4.1.0)
Imports:
ggplot2 (>= 3.4.0),
data.table
License: All rights reserved.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
VignetteBuilder: knitr
Expand All @@ -24,5 +24,8 @@ Suggests:
rmarkdown,
box,
rcmdcheck,
TTR,
remotes,
gridExtra
Remotes:
dereckmezquita/kucoin
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# MIT License with Citation Requirement

Copyright (c) 2024 Dereck Mezquita, Dereck's Projects

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Additionally, any use of this Software in commercial, academic or research settings
must include appropriate citation. The required citation is:

Mezquita, D. (2024). dmplot. https://github.com/dereckmezquita/dmplot.
ORCID: 0000-0002-9307-6762

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions R/cite_package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#' Print citation information for this package
#' @export
cite_package <- function() {
citation("dmplot")
}
9 changes: 7 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ knitr::opts_chunk$set(
fig.align = "center",
fig.width = 12,
fig.height = 10,
dpi = 75,
dpi = 100,
collapse = TRUE,
comment = "#>"
)
options("datatable.print.topn" = 3, "datatable.print.nrows" = 50, "datatable.print.class" = TRUE, "datatable.print.trunc.cols" = TRUE)
options(
"datatable.print.topn" = 3,
"datatable.print.nrows" = 50,
"datatable.print.class" = TRUE,
"datatable.print.trunc.cols" = TRUE
)
```

## dmplot
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ p <- dt |>
p
```

<img src="man/figures/README-unnamed-chunk-3-1.png" style="display: block; margin: auto;" />
<img src="./man/figures/README-plot-financial-data-1-1.png" style="display: block; margin: auto;" />

Plotting the MACD (moving average convergence divergence) indicator:

Expand Down Expand Up @@ -167,7 +167,7 @@ na.omit(dt) |>
)
```

<img src="man/figures/README-unnamed-chunk-4-1.png" style="display: block; margin: auto;" />
<img src="./man/figures/README-plot-financial-data-2-1.png" style="display: block; margin: auto;" />

Now let’s do the same plot in a light theme:

Expand All @@ -179,4 +179,4 @@ p + dmplot::theme_dereck_light() +
)
```

<img src="man/figures/README-unnamed-chunk-5-1.png" style="display: block; margin: auto;" />
<img src="./man/figures/README-plot-financial-data-3-1.png" style="display: block; margin: auto;" />
18 changes: 18 additions & 0 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
citHeader("To cite dmplot in publications use:")

citEntry(
entry = "Manual",
title = "dmplot: A plotting toolkit for financial and time series data. The package provides algorithms, functions, layers and outlines a framework for working with working with and analysing financial and time series data.",
author = "Dereck Mezquita",
year = "2024",
note = "R package version 1.3.0",
url = "https://github.com/dereckmezquita/dmplot",
doi = "https://github.com/dereckmezquita/dmplot",
textVersion = paste(
"Mezquita, D. (2024).",
"dmplot: A plotting toolkit for financial and time series data. The package provides algorithms, functions, layers and outlines a framework for working with working with and analysing financial and time series data.",
"R package version 1.3.0.",
"https://github.com/dereckmezquita/dmplot",
"DOI: https://github.com/dereckmezquita/dmplot"
)
)
Binary file added man/figures/BITCOIN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/MONERO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-plot-financial-data-1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-plot-financial-data-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-plot-financial-data-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 21 additions & 4 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,28 @@ authors:

navbar:
structure:
right: [search, github]
left: [home, reference, articles, donate]
right: [github, youtube, search, website]
components:
articles:
text: Articles
menu:
- text: "Getting Started with the dmplot Framework"
href: articles/getting-started-with-the-dmplot-framwork.html
- text: "Intro to Financial Indicators with dmplot"
href: articles/intro-to-financial-indicators-with-dmplot.html
donate:
text: Donate
href: articles/donate.html
github:
icon: fa-github fa-lg
href: https://github.com/dereckmezquita/dmplot
twitter:
icon: fa-twitter fa-lg
href: https://twitter.com/dereckmezquita
target: _blank
youtube:
icon: fa-youtube fa-lg
href: https://www.youtube.com/@derecksyoutube
target: _blank
website:
text: derecksnotes.com
href: https://derecksnotes.com
target: _blank
Loading

0 comments on commit d7574e1

Please sign in to comment.