I have a decently large dataset, that actually gets larger weekly since it stores football data from around 40 leagues. I want to create a shiny app with visualizations and obviously is crucial to make the process as fast as possible.
Currently I’m testing the entire code aside from a shiny app and most of it (so far) is pretty fast, except for the filtering at the beginning.
I tried with this that, based on 1k iterations, it takes around 6 seconds just two run this miserable piece of code:
player_matchLogs <- match_logs_dt[Player %in% player_name &
Team %in% player_teams &
Min >= matches_min_minutes_played &
Match_Date >= player_date_range[1] & Match_Date <= player_date_range[2] &
Matchweek >= player_matchweek_range[1] & Matchweek <= player_matchweek_range[2]]
Is there a faster way to do this?