- Notifications
You must be signed in to change notification settings - Fork2
Visualization part of wt-data-project.
License
ControlNet/wt-data-project.visualization
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repo is the visualization part of wt-data-project.
Repository | Info |
---|---|
wt-data-project.data | |
wt-data-project.web | |
wt-data-project.visualization |
The data is in thisrepo.
To use this visualization repo, you need create a directory like this. Thedata
directory contains everything inthewt-data-project.data
repo, and thevisualization
directory contains everything in this repo.
wt-data-project (as working directory)├─data│ ├─joined│ ├─ts│ └─wk└─visualization
A web-based visualizationrepo is in WIP.
You can check this inhttps://wt.controlnet.space.
This repo is written by R 4.0.2.Pleasedownload R interpreter to use.
Please use code below to install 3rd-party packages.
install.packages("<package name>")
- dplyr
- reshape2
- ggplot2
- data.table
- gganimate
- gifski
- ggsci
Please usemain.R
to run functions below.
source("visualization/utils.R")source("visualization/static_plot.R")source("visualization/time_animation.R")source("visualization/time_trend.R")# add everything you want# for examplestatic.heatmap.default.ground_vehicles.win_rate()
There are some default functions for easy use.
Display the win rates/battles of ground vehicles/aviation for each BR range and nation.
static.heatmap.default.ground_vehicles.win_rate()static.heatmap.default.ground_vehicles.battles()static.heatmap.default.aviation.win_rate()static.heatmap.default.aviation.battles()
Display a pie chart of the battle counts for each nation
static.pie.default.battles()
Except the default functions, there are more functions you can use for visualizations with specified arguments.
For example, you can visualize the trend of battles counts with the code below.
trend.nations.battles(class.sample="Ground_vehicles",y="rb_battles_sum")
Also, you can plot each vehicle as a scatter.
static.scatter(date.sample="2020-08-13",class.sample="Ground_vehicles",x="rb_ground_frags_per_death",y="rb_win_rate",size="rb_battles",x.limits=NULL,y.limits=NULL,colors=NULL)
With the code below, it is a bar chart for a nation in one specific date.
static.bars(nation.sample="USA",date.sample="2020-08-13",class.sample= c("Aviation","Ground_vehicles"),y="rb_win_rate",y.limits=NULL)
Also, you can make gif animation with these codes below.
animation.trend.heatmap(class.sample="Ground_vehicles",fill="rb_win_rate",fill.limits= c(0,100),colors= c(white,black,red,yellow,green,black,black),colors.pos= c(0,0.05,0.4,0.5,0.6,0.95,1.0)) %>%animation.render# if you need save as a fileanim_save(filename="out.gif")
About
Visualization part of wt-data-project.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.