File tree Expand file tree Collapse file tree 7 files changed +1308
-27
lines changed
quarto-stock-report-python Expand file tree Collapse file tree 7 files changed +1308
-27
lines changed Original file line number Diff line number Diff line change 256256 "version" : " 1.0.0" ,
257257 "released" : " 2025-04-14T20:05:36Z" ,
258258 "url" : " https://github.com/posit-dev/connect-extensions/releases/download/quarto-document%40v1.0.0/quarto-document.tar.gz" ,
259- "minimumConnectVersion" : " 2025.04.0"
259+ "minimumConnectVersion" : " 2025.04.0" ,
260+ "requiredEnvironment" : {
261+ "quarto" : {
262+ "requires" : " ~=1.0"
263+ }
264+ }
260265 },
261266 "versions" : [
262267 {
263268 "version" : " 1.0.0" ,
264269 "released" : " 2025-04-14T20:05:36Z" ,
265270 "url" : " https://github.com/posit-dev/connect-extensions/releases/download/quarto-document%40v1.0.0/quarto-document.tar.gz" ,
266- "minimumConnectVersion" : " 2025.04.0"
271+ "minimumConnectVersion" : " 2025.04.0" ,
272+ "requiredEnvironment" : {
273+ "quarto" : {
274+ "requires" : " ~=1.0"
275+ }
276+ }
267277 }
268278 ]
269279 },
280290 "requiredEnvironment" : {
281291 "python" : {
282292 "requires" : " ~=3.9"
293+ },
294+ "quarto" : {
295+ "requires" : " ~=1.4"
283296 }
284297 }
285298 },
292305 "requiredEnvironment" : {
293306 "python" : {
294307 "requires" : " ~=3.9"
308+ },
309+ "quarto" : {
310+ "requires" : " ~=1.4"
295311 }
296312 }
297313 }
Original file line number Diff line number Diff line change 3131 "description" : " This Quarto example shows how a basic document can present diagrams and interactivity." ,
3232 "homepage" : " https://github.com/posit-dev/connect-extensions/tree/main/extensions/quarto-document" ,
3333 "minimumConnectVersion" : " 2025.04.0" ,
34- "version" : " 1.0.0"
34+ "version" : " 1.0.1"
35+ },
36+ "environment" : {
37+ "quarto" : {
38+ "requires" : " ~=1.0"
39+ }
3540 }
3641}
Original file line number Diff line number Diff line change 11/.quarto /
2- * .csv
2+ data .csv
33index.html
44index_files
55index.ipynb
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -10,18 +10,27 @@ attachments:
1010email-preview : true
1111---
1212
13- ## Report for TSLA
13+ ## Report for GSPC
1414
1515``` {python}
1616#| echo: true
1717
1818import pandas as pd
19- import yfinance as yf
2019import datetime
20+ ```
2121
22- tsla = yf.Ticker("TSLA")
23- hist = tsla.history("5y")
22+ ``` {python}
23+ #| eval: false
24+ #| echo: false
25+ # set eval: true to fetch updated data
26+ import yfinance as yf
27+ spx = yf.Ticker("^GSPC")
28+ hist = spx.history("5y")
29+ hist.to_csv("gspc.csv")
30+ ```
2431
32+ ``` {python}
33+ hist = pd.read_csv("gspc.csv", parse_dates=[0], index_col=0)
2534hist['Change'] = hist['Close'] - hist['Open']
2635
2736latest = hist.last_valid_index()
5665``` {python}
5766#| echo: false
5867#| label: fig-history
59- #| fig-cap: "TSLA price history"
68+ #| fig-cap: "GSPC price history"
6069
6170_ = hist['Close'].plot(grid=True)
6271```
@@ -86,7 +95,7 @@ prices_90d.to_csv("data.csv")
8695## Email
8796
8897This report also produces an email that is sent to key stakeholders with summary
89- information.
98+ information.
9099
91100::: {.email}
92101
@@ -101,7 +110,7 @@ abschange = abs(change)
101110updown = "up"
102111if change < 0:
103112 updown = "down"
104- print(f"TSLA is {updown} today by ${abschange:.2f}")
113+ print(f"GSPC is {updown} today by ${abschange:.2f}")
105114```
106115:::
107116
@@ -111,7 +120,7 @@ Hello Team,
111120#| echo: false
112121#| output: asis
113122
114- print(f"Here are the latest stock prices for **TSLA ** as of {datetime.date.today()}:")
123+ print(f"Here are the latest stock prices for **GSPC ** as of {datetime.date.today()}:")
115124```
116125
117126``` {python}
Original file line number Diff line number Diff line change 1010 "description" : " An example of how you might automate regular updates using a data source" ,
1111 "homepage" : " https://github.com/posit-dev/connect-extensions/tree/main/extensions/quarto-stock-report-python" ,
1212 "minimumConnectVersion" : " 2025.04.0" ,
13- "version" : " 1.0.0 "
13+ "version" : " 1.0.1 "
1414 },
1515 "environment" : {
1616 "python" : {
1717 "requires" : " ~=3.9"
18+ },
19+ "quarto" : {
20+ "requires" : " ~=1.4"
1821 }
1922 },
2023 "quarto" : {
3235 }
3336 },
3437 "files" : {
35- "requirements.txt" : {
36- "checksum" : " 1b9e705f62a822cffaa4dc0e988101b4"
37- },
38- ".gitignore" : {
39- "checksum" : " ae206a13f5875901e752811238e8fdbd"
40- },
41- "README.md" : {
42- "checksum" : " 837f74720c4532629d02fd4bff3df83b"
43- },
4438 "_quarto.yml" : {
4539 "checksum" : " 35b4c4c58cce875b126683c525ad40f4"
4640 },
4741 "index.qmd" : {
4842 "checksum" : " 6fb0db80d26eab1544afdcbc91df228b"
4943 },
50- "index.quarto_ipynb " : {
51- "checksum" : " 04ad8e09510236db1b397038a4c06186 "
44+ "gspc.csv " : {
45+ "checksum" : " f74c93cd12f334a4923d6fa4d81cdd1e "
5246 },
53- "thumbnail.jpg " : {
54- "checksum" : " 8db36358d1e9dbab78f8ffef39846eee "
47+ "requirements.txt " : {
48+ "checksum" : " 1b9e705f62a822cffaa4dc0e988101b4 "
5549 }
5650 }
5751}
Original file line number Diff line number Diff line change @@ -8,4 +8,3 @@ ipywidgets==8.1.2
88
99matplotlib == 3.8.3
1010pandas == 2.2.1
11- yfinance == 0.2.54
You can’t perform that action at this time.
0 commit comments