Update chapter-05-gbdialog-reference.md
This commit is contained in:
parent
2db2b6022a
commit
8c1b2df7d4
1 changed files with 19 additions and 4 deletions
|
@ -118,9 +118,6 @@ png = data as IMAGE
|
||||||
SEND FILE png
|
SEND FILE png
|
||||||
```
|
```
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
On the fly charts
|
On the fly charts
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -130,7 +127,25 @@ img = CHART "pie", data, legends
|
||||||
SEND FILE img
|
SEND FILE img
|
||||||
SAVE img as "folder/filename.jpg"
|
SAVE img as "folder/filename.jpg"
|
||||||
```
|
```
|
||||||

|
|
||||||
|
### Using complete General Bots Data Analytics
|
||||||
|
|
||||||
|
result = GET "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/gift_contributions?page[size]=500"
|
||||||
|
data = result.data
|
||||||
|
data = SELECT YEAR(record_date) as Yr, SUM(CAST(contribution_amt AS NUMBER)) AS Amount FROM data GROUP BY YEAR(record_date)
|
||||||
|
|
||||||
|
TALK "Demonstration of Gift Contributions with AS IMAGE keyword"
|
||||||
|
SET THEME dark
|
||||||
|
png = data as IMAGE
|
||||||
|
SEND FILE png
|
||||||
|
|
||||||
|
DELAY 5
|
||||||
|
TALK " Demonstration of Gift Contributions CHART keyword"
|
||||||
|
img = CHART "bar", data
|
||||||
|
SEND FILE img
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue