-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
66 lines (44 loc) · 1.78 KB
/
Copy pathREADME.Rmd
File metadata and controls
66 lines (44 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "inst/app/www/",
out.width = "100%"
)
```
# 🛍 shopper <a href='https:/shopper.github.io'><img src="inst/app/www/favicon.png" align="right" height="135"/></a>
<!-- badges: start -->
[](https://www.tidyverse.org/lifecycle/#experimental)
<!-- badges: end -->
Package to collect tax receipt data from SEFAZ-RS.
<img src="https://media.giphy.com/media/KxtMLfh8k8GEJHpBVi/giphy.gif" align="right" padding-left="10 px" width="30%"/>
For now the package only collects data from the link generated by the QR in the tax receipts.
## Installation
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("fcsest/shopper")
```
## Example
This package helps in collecting data from SEFAZ-RS receipts, below is an example of a complete receipt:

To collect the data we need to cropping the QR Code like this:

And setting the image cropped as parameter to `shopper::get_qrcode_text()`...
```{r example, echo=TRUE}
# Importing pipe
library(magrittr)
# Importing the shopper package
library(shopper)
# QR Code cropped
image_example <- "https://github.com/fcsest/shopper/raw/master/inst/app/www/example.png"
# Read QR Code of impressed receipt
my_df <- get_qrcode_text(image_example) %>%
get_sefaz_rs_rdata()
# Structure of data frame
str(my_df)
```