Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Java: Data Science Made Easy

You're reading from   Java: Data Science Made Easy Data collection, processing, analysis, and more

Arrow left icon
Product type Course
Published in Jul 2017
Publisher Packt
ISBN-13 9781788475655
Length 734 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Alexey Grigorev Alexey Grigorev
Author Profile Icon Alexey Grigorev
Alexey Grigorev
Richard M. Reese Richard M. Reese
Author Profile Icon Richard M. Reese
Richard M. Reese
Jennifer L. Reese Jennifer L. Reese
Author Profile Icon Jennifer L. Reese
Jennifer L. Reese
Arrow right icon
View More author details
Toc

Table of Contents (29) Chapters Close

Title Page
Credits
Preface
1. Module 1 FREE CHAPTER
2. Getting Started with Data Science 3. Data Acquisition 4. Data Cleaning 5. Data Visualization 6. Statistical Data Analysis Techniques 7. Machine Learning 8. Neural Networks 9. Deep Learning 10. Text Analysis 11. Visual and Audio Analysis 12. Visual and Audio Analysis 13. Mathematical and Parallel Techniques for Data Analysis 14. Bringing It All Together 15. Module 2
16. Data Science Using Java 17. Data Processing Toolbox 18. Exploratory Data Analysis 19. Supervised Learning - Classification and Regression 20. Unsupervised Learning - Clustering and Dimensionality Reduction 21. Working with Text - Natural Language Processing and Information Retrieval 22. Extreme Gradient Boosting 23. Deep Learning with DeepLearning4J 24. Scaling Data Science 25. Deploying Data Science Models 26. Bibliography

Creating stacked graphs


An area chart depicts information by allocating more space for larger values. By stacking area charts on top of each other we create a stacked graph, sometimes called a stream graph. However, stacked graphs do not work well with negative values and cannot be used for data where summation does not make sense, such as with temperatures. If too many graphs are stacked, then it can become difficult to interpret.

Next, we will show how to create a stacked bar chart. The stackedGraphExample method contains the code to create the bar chart. We start with familiar code to set the title and labels. However, for the X axis, the setCategories method FXCollections.<String>observableArrayList instance is used to set the categories. The argument of this constructor is an array of strings created by the Arrays class's asList method and the names of the countries:

public void stackedGraphExample(Stage stage) { 
    stage.setTitle("Stacked Bar Chart"); 
    final StackedBarChart...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime