All Projects → mrjoh3 → ggtrack

mrjoh3 / ggtrack

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE MIT LICENSE.md
restlessdata.com.au/ggtrack

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to ggtrack

mapr
Map species occurrence data
Stars: ✭ 34 (-12.82%)
Mutual labels:  ggplot2
alternative-frontends
🔐🌐 Privacy-respecting web frontends for popular services
Stars: ✭ 821 (+2005.13%)
Mutual labels:  tracking
linear-discord-serverless
Get linear's events forwarded to Discord webhooks through Vercel serverless functions.
Stars: ✭ 47 (+20.51%)
Mutual labels:  tracking
classification
Catalyst.Classification
Stars: ✭ 35 (-10.26%)
Mutual labels:  reproducibility
python
Build Python extension with Dynamsoft Barcode Reader.
Stars: ✭ 35 (-10.26%)
Mutual labels:  qrcode
traceml
Engine for ML/Data tracking, visualization, dashboards, and model UI for Polyaxon.
Stars: ✭ 445 (+1041.03%)
Mutual labels:  tracking
aliqrcode
自动批量生成支付宝收款码工具
Stars: ✭ 45 (+15.38%)
Mutual labels:  qrcode
qrcode
A simple library for generating QR codes in C.
Stars: ✭ 23 (-41.03%)
Mutual labels:  qrcode
ips-qr-code
IPS QR Code Generator
Stars: ✭ 30 (-23.08%)
Mutual labels:  qrcode
R4Econ
R Code Examples Multi-dimensional/Panel Data
Stars: ✭ 16 (-58.97%)
Mutual labels:  ggplot2
Zxing
🎫 Nepxion Zxing is a general code picture generator based on google zxing framework, support QR code and EAN code for file and byte array formats 基于Google Zxing的二维码/条形码创建和扫描组件
Stars: ✭ 26 (-33.33%)
Mutual labels:  qrcode
wifiqr
Create a QR code with your Wi-Fi login details
Stars: ✭ 207 (+430.77%)
Mutual labels:  qrcode
awesome-3d-multi-object-tracking-autonomous-driving
A summary and list of open source 3D multi object tracking and datasets at this stage.
Stars: ✭ 16 (-58.97%)
Mutual labels:  tracking
escpos-coffee
Java library for ESC/POS printer
Stars: ✭ 172 (+341.03%)
Mutual labels:  qrcode
rockthemes
R colour palettes based on classic rock album covers.
Stars: ✭ 30 (-23.08%)
Mutual labels:  ggplot2
otp-authenticator-webapp
A 'Google Authenticator' like Single Page Application
Stars: ✭ 69 (+76.92%)
Mutual labels:  qrcode
Kalman.jl
Flexible filtering and smoothing in Julia
Stars: ✭ 62 (+58.97%)
Mutual labels:  tracking
ShortURL
短网址生成器,演示地址:http://t.haojima.net/
Stars: ✭ 50 (+28.21%)
Mutual labels:  qrcode
pcan
Prototypical Cross-Attention Networks for Multiple Object Tracking and Segmentation, NeurIPS 2021 Spotlight
Stars: ✭ 294 (+653.85%)
Mutual labels:  tracking
art-qr
JavaScript library to generate beautiful QR code in browser 艺术二维码
Stars: ✭ 19 (-51.28%)
Mutual labels:  qrcode

ggtrack

Lifecycle: stable R-CMD-check Codecov test coverage

Sometimes in a workplace it is hard to know exactly where or when a specific chart has been produced. This is especially true when someone has copied a chart out of a report to use somewhere else. The ggtrack package aims to solve this problem by embedding enough metadata in the charts image to identify the source and the exact time it was produced.

The metadata is added by way of a QR code embedded in a chart “tracking” footer. The QR code can encode any arbitrary text and will append a time stamp. The text is intended to be a URL or a unique id for the original document or chart source.

QR codes can then be scanned using a phone scanner or the quadrangle package.

The ggtrack footer can also display a corporate logo and additional text.

Installation

You can install the latest version of project from Github with:

devtools::install_github("mrjoh3/ggtrack")

On a linux system you may also need to install the png and jpeg libs.

sudo apt install libpng-dev libjpeg-dev

Development

This package is still quite young but now contains most of the desired features. It now has a full testing suite and documentation. For future updates all efforts will be made to maintain a stable API. If you have any suggestions, or feature requests please submit an issue. All feedback is welcome.

A Minimum Example

To start you just need a ggplot and some text you wish to encode into the QR. The QR is intended to contain enough information to uniquely identify the report, so a URL, file name or other unique identifier. The QR encode process automatically appends a time stamp. But try to keep the content of the QR code minimal. The for information it is the more pixels its requires and the larger it needs to be. The examples here need a QR code size of 1.8cm to be reliably scanned using a phone off the screen. QR code are encoded using the qrencoder package.

library(ggtrack)
library(ggplot2)
library(grid)
library(rWBclimate)
library(ggthemes)

temp <- get_historical_temp('aus', "year")
#> No encoding supplied: defaulting to UTF-8.

tp <- ggplot(temp, aes(x = year, y = data)) +
  geom_path(color = 'blue') + geom_point(color = 'darkblue') +
  labs(title = 'Average Annual Temperature for Australia',
       y = 'degrees celcius') +
  stat_smooth(se = TRUE, colour = "darkred") +
  theme_fivethirtyeight() 

ggtrack(tp, 
        qr_content = paste0('Data accessed using R package: ',
                            'https://github.com/ropensci/rWBclimate / ',
                            'https://docs.ropensci.org/rWBclimate/'),
        logo = 'man/figures/ggtrack-logo.svg',
        caption = paste0('data accessed from the World Bank <br>',
                         'Climate Portal via the R package <br>',
                         '<span style="color:blue">rWBclimate</span>.'),
        plot.background = element_rect(fill = "#f0f0f0", size = 0)) 
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Related and Enabling Packages

The ggrack package makes use of many R packages. But I want to include a special thank-you to some packages without which the ggtrack package would not be possible.

  • The qrencoder package generate to QR codes that form the basis for much of ggtrack. qrencoder is both fast and easy to use, and provides a variety of outputs that make it easy to incorporate QR codes into a project.
  • Without ggplot2 there would be little point to a package like ggtrack. The entire banner object is a ggplot with theme_void and annotation_custom used to place the three tracking elements.
  • The rasterGrob elements from the grid package make it possible to add both the QR code and arbitrary images such as logos.
  • grid.arrange from gridExtra makes it possible to stack the ggplot object on top of the tracking banner.
  • The stegasaur is used the encode arbitrary text or R objects into the plot PNG. This is very cool and stegasaur is a great package that makes it really easy to encode and decode images.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].