• R/O
  • SSH

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版47bbc49c5bf25f911f39849cb550f7e0283edad8 (tree)
时间2024-12-16 21:15:12
作者Lorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

I simply modified a few paths.

更改概述

差异

diff -r d5b882626748 -r 47bbc49c5bf2 R-codes/process_time_portfolios.R
--- a/R-codes/process_time_portfolios.R Sun Dec 15 23:41:17 2024 +0100
+++ b/R-codes/process_time_portfolios.R Mon Dec 16 13:15:12 2024 +0100
@@ -10,9 +10,9 @@
1010 threshold <- 1. ##min_value of usdt for the top assets to be considered
1111
1212
13-system("detox ./history_usdt/*csv")
13+system("detox ../input/*csv")
1414
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)
1616
1717 df <- df_ini |>
1818 filter(!is.na(value_usdt))
@@ -20,7 +20,7 @@
2020 errors <- df_ini |>
2121 filter(is.na(value_usdt))
2222
23-save_excel(errors, "./history_usdt/possible_errors.xlsx")
23+save_excel(errors, "../output/possible_errors.xlsx")
2424
2525
2626 df_evol1 <- df |>
@@ -52,7 +52,7 @@
5252 ylab("Total Value (USDT)")+
5353 xlab("Time")
5454
55-fname <- paste("./history_usdt/history_portfolio_value.pdf")
55+fname <- paste("../output/history_portfolio_value.pdf")
5656
5757 ggsave(fname, gpl, width=8,height=8)
5858
@@ -63,7 +63,7 @@
6363 filter(timestamp==max(timestamp)) |>
6464 filter(amount>0)
6565
66-save_excel(df_recent, "./history_usdt/recent_portfolio_detailed.xlsx")
66+save_excel(df_recent, "../output/recent_portfolio_detailed.xlsx")
6767
6868 recent_assets <- df_recent |>
6969 summarise(asset_value_usdt=sum(value_usdt),
@@ -72,7 +72,7 @@
7272 timestamp=timestamp[1],.by=asset) |>
7373 arrange(desc(asset_value_usdt))
7474
75-save_excel(recent_assets, "./history_usdt/recent_portfolio_top_assets.xlsx")
75+save_excel(recent_assets, "../output/recent_portfolio_top_assets.xlsx")
7676
7777 recent_assets_long <- recent_assets |>
7878 arrange(asset_value_usdt) |>
@@ -96,7 +96,7 @@
9696 ylab(NULL)
9797
9898
99-ggsave("./history_usdt/portfolio_features.pdf", gpl, width=12,height=8)
99+ggsave("../output/portfolio_features.pdf", gpl, width=12,height=8)
100100
101101
102102 total_portfolio_value_usdt <- df_recent$value_usdt|>
@@ -112,7 +112,7 @@
112112 select(asset) |>
113113 distinct()
114114
115-save_excel(final_asset_list, "./history_usdt/asset_list.xlsx")
115+save_excel(final_asset_list, "../output/asset_list.xlsx")
116116
117117
118118 top_ini <- df |>
@@ -145,7 +145,7 @@
145145 ylab(NULL)
146146
147147
148-ggsave("./history_usdt/portfolio_snapshots.pdf", gpl, width=12,height=8)
148+ggsave("../output/portfolio_snapshots.pdf", gpl, width=12,height=8)
149149
150150
151151 my_time_stamp <- top_recent |>
@@ -163,7 +163,7 @@
163163
164164 title2 <- paste("Portfolio at ", my_time_stamp, sep="" )
165165
166-fname2 <- paste("portfolio_now_",my_time_stamp, ".pdf", sep="" )
166+fname2 <- paste("../output/portfolio_now_",my_time_stamp, ".pdf", sep="" )
167167
168168
169169
@@ -197,10 +197,10 @@
197197 ylab(NULL)
198198
199199
200-ggsave("./history_usdt/portfolio_now.pdf", gpl, width=6,height=8)
200+ggsave("../output/portfolio_now.pdf", gpl, width=6,height=8)
201201
202202
203-fsave <- paste("./history_usdt/", fname2, sep="")
203+fsave <- paste("../output/", fname2, sep="")
204204
205205 ggsave(fsave, gpl, width=6,height=8)
206206
@@ -209,6 +209,6 @@
209209 print(total_portfolio_value_usdt)
210210
211211
212-system("detox *")
212+system("detox ../output/*")
213213
214214 print("So far so good")