Get and Analyzed your laptop battery health report. Compare the current with design capacity
The battery capacity will decrease over time. This application will help you to track the current capacity compared to the design capacity
After scan successful you will received the information of your computer. Now you have to option, you can either choose the short result to get the percentage of design capacity or a details one which will thoroughly analyze the battery health since you bought the laptop.
Choose the Short Result Option:
Choose the Detail Result Option:
two windows of a point plot and a csv file will pop up give the the data how your battery capacity decrease over time
I will use cmd commnad to generate a battery-report.html and using Jsoup.jar to parsing this file and read it into a csv file.
The html file will give us the data as
I will then use BufferedReader to read this .html file
After the data has been read. CSVWriter from the OpenCSV can be used to write these data into a .csv file .csv file can then be used by R language to clean and analyze. I use Renjin instead of JRI because Renjin will run on JVM and not require and JRI require installed R on the computer to implement. Renjin can be set up in Java IDE as
engine.eval command just simply pass the command into normal R Terminal to execute the data.frame
The data after been clean and analyze in BatteryReport.csv, I use JFreeChart to draw a scatter point plot analyze how the capacity of laptop battery decrease in terms of weeks since it was first used.
Most of the API is build based on javaFX
Currently, due to the bugs in Renjin I couldn't execute the final .Jar file for this program. Therefore, I have provide the code and neccessary lib folder to implement this in any IDE
jsoup: for the purpose of parsing and reading the html file.
opencsv: can be used to write and read csv file
Renjin: using JVM to intergrate Java and R for better data analysize (note: user does not need to have R installed on computer when using Renjin)
JRI: user can used JRI for the familiar if Renjin is still new
- Renjin Document and Instruction
- Capturing results from Renjin
- Insert command on cmd through Java
- Hash Map
- JavaFX Dialog