修订版 | 47bbc49c5bf25f911f39849cb550f7e0283edad8 (tree) |
---|---|
时间 | 2024-12-16 21:15:12 |
作者 | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I simply modified a few paths.
@@ -10,9 +10,9 @@ | ||
10 | 10 | threshold <- 1. ##min_value of usdt for the top assets to be considered |
11 | 11 | |
12 | 12 | |
13 | -system("detox ./history_usdt/*csv") | |
13 | +system("detox ../input/*csv") | |
14 | 14 | |
15 | -df_ini <- read_all_csv("./history_usdt/", show_col_types = FALSE) | |
15 | +df_ini <- read_all_csv("../input/flat_files", show_col_types = FALSE) | |
16 | 16 | |
17 | 17 | df <- df_ini |> |
18 | 18 | filter(!is.na(value_usdt)) |
@@ -20,7 +20,7 @@ | ||
20 | 20 | errors <- df_ini |> |
21 | 21 | filter(is.na(value_usdt)) |
22 | 22 | |
23 | -save_excel(errors, "./history_usdt/possible_errors.xlsx") | |
23 | +save_excel(errors, "../output/possible_errors.xlsx") | |
24 | 24 | |
25 | 25 | |
26 | 26 | df_evol1 <- df |> |
@@ -52,7 +52,7 @@ | ||
52 | 52 | ylab("Total Value (USDT)")+ |
53 | 53 | xlab("Time") |
54 | 54 | |
55 | -fname <- paste("./history_usdt/history_portfolio_value.pdf") | |
55 | +fname <- paste("../output/history_portfolio_value.pdf") | |
56 | 56 | |
57 | 57 | ggsave(fname, gpl, width=8,height=8) |
58 | 58 |
@@ -63,7 +63,7 @@ | ||
63 | 63 | filter(timestamp==max(timestamp)) |> |
64 | 64 | filter(amount>0) |
65 | 65 | |
66 | -save_excel(df_recent, "./history_usdt/recent_portfolio_detailed.xlsx") | |
66 | +save_excel(df_recent, "../output/recent_portfolio_detailed.xlsx") | |
67 | 67 | |
68 | 68 | recent_assets <- df_recent |> |
69 | 69 | summarise(asset_value_usdt=sum(value_usdt), |
@@ -72,7 +72,7 @@ | ||
72 | 72 | timestamp=timestamp[1],.by=asset) |> |
73 | 73 | arrange(desc(asset_value_usdt)) |
74 | 74 | |
75 | -save_excel(recent_assets, "./history_usdt/recent_portfolio_top_assets.xlsx") | |
75 | +save_excel(recent_assets, "../output/recent_portfolio_top_assets.xlsx") | |
76 | 76 | |
77 | 77 | recent_assets_long <- recent_assets |> |
78 | 78 | arrange(asset_value_usdt) |> |
@@ -96,7 +96,7 @@ | ||
96 | 96 | ylab(NULL) |
97 | 97 | |
98 | 98 | |
99 | -ggsave("./history_usdt/portfolio_features.pdf", gpl, width=12,height=8) | |
99 | +ggsave("../output/portfolio_features.pdf", gpl, width=12,height=8) | |
100 | 100 | |
101 | 101 | |
102 | 102 | total_portfolio_value_usdt <- df_recent$value_usdt|> |
@@ -112,7 +112,7 @@ | ||
112 | 112 | select(asset) |> |
113 | 113 | distinct() |
114 | 114 | |
115 | -save_excel(final_asset_list, "./history_usdt/asset_list.xlsx") | |
115 | +save_excel(final_asset_list, "../output/asset_list.xlsx") | |
116 | 116 | |
117 | 117 | |
118 | 118 | top_ini <- df |> |
@@ -145,7 +145,7 @@ | ||
145 | 145 | ylab(NULL) |
146 | 146 | |
147 | 147 | |
148 | -ggsave("./history_usdt/portfolio_snapshots.pdf", gpl, width=12,height=8) | |
148 | +ggsave("../output/portfolio_snapshots.pdf", gpl, width=12,height=8) | |
149 | 149 | |
150 | 150 | |
151 | 151 | my_time_stamp <- top_recent |> |
@@ -163,7 +163,7 @@ | ||
163 | 163 | |
164 | 164 | title2 <- paste("Portfolio at ", my_time_stamp, sep="" ) |
165 | 165 | |
166 | -fname2 <- paste("portfolio_now_",my_time_stamp, ".pdf", sep="" ) | |
166 | +fname2 <- paste("../output/portfolio_now_",my_time_stamp, ".pdf", sep="" ) | |
167 | 167 | |
168 | 168 | |
169 | 169 |
@@ -197,10 +197,10 @@ | ||
197 | 197 | ylab(NULL) |
198 | 198 | |
199 | 199 | |
200 | -ggsave("./history_usdt/portfolio_now.pdf", gpl, width=6,height=8) | |
200 | +ggsave("../output/portfolio_now.pdf", gpl, width=6,height=8) | |
201 | 201 | |
202 | 202 | |
203 | -fsave <- paste("./history_usdt/", fname2, sep="") | |
203 | +fsave <- paste("../output/", fname2, sep="") | |
204 | 204 | |
205 | 205 | ggsave(fsave, gpl, width=6,height=8) |
206 | 206 |
@@ -209,6 +209,6 @@ | ||
209 | 209 | print(total_portfolio_value_usdt) |
210 | 210 | |
211 | 211 | |
212 | -system("detox *") | |
212 | +system("detox ../output/*") | |
213 | 213 | |
214 | 214 | print("So far so good") |