You are previewing Mastering Julia.
O'Reilly logo
Mastering Julia

Book Description

Develop your analytical and programming skills further in Julia to solve complex data processing problems

In Detail

Julia is a well-constructed programming language with fast execution speed, eliminating the classic problem of performing analysis in one language and translating it for performance into a second. This book will help you develop and enhance your programming skills in Julia to solve real-world automation challenges.

This book starts off with a refresher on installing and running Julia on different platforms. Next, you will compare the different ways of working with Julia and explore Julia's key features in-depth by looking at design and build. You will see how data works using simple statistics and analytics, and discover Julia's speed, its real strength, which makes it particularly useful in highly intensive computing tasks and observe how Julia can cooperate with external processes in order to enhance graphics and data visualization. Finally, you will look into meta-programming and learn how it adds great power to the language and establish networking and distributed computing with Julia.

What You Will Learn

  • Install and build Julia and configure it with your environment

  • Build a data science project through the entire cycle of ETL, analytics, and data visualization

  • Understand the type system and principles of multiple dispatch for a better coding experience in Julia

  • Interact with data files and data frames to study simple statistics and analytics

  • Display graphics and visualizations to carry out modeling and simulation in Julia

  • Use Julia to interact with SQL and NoSQL databases

  • Work with distributed systems on the Web and in the cloud

  • Develop your own packages and contribute to the Julia Community

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Mastering Julia
      1. Table of Contents
      2. Mastering Julia
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. The Julia Environment
        1. Introduction
          1. Philosophy
          2. Role in data science and big data
          3. Comparison with other languages
          4. Features
        2. Getting started
          1. Julia sources
          2. Building from source
            1. Installing on CentOS
            2. Mac OS X and Windows
          3. Exploring the source stack
          4. Juno
          5. IJulia
        3. A quick look at some Julia
          1. Julia via the console
          2. Installing some packages
            1. A bit of graphics creating more realistic graphics with Winston
          3. My benchmarks
        4. Package management
          1. Listing, adding, and removing
          2. Choosing and exploring packages
            1. Statistics and mathematics
            2. Data visualization
            3. Web and networking
            4. Database and specialist packages
          3. How to uninstall Julia
          4. Adding an unregistered package
        5. What makes Julia special
          1. Parallel processing
          2. Multiple dispatch
          3. Homoiconic macros
          4. Interlanguage cooperation
        6. Summary
      9. 2. Developing in Julia
        1. Integers, bits, bytes, and bools
          1. Integers
          2. Logical and arithmetic operators
          3. Booleans
        2. Arrays
          1. Operations on matrices
          2. Elemental operations
          3. A simple Markov chain – cat and mouse
        3. Char and strings
          1. Characters
          2. Strings
            1. Unicode support
            2. Regular expressions
            3. Byte array literals
            4. Version literals
          3. An example
        4. Real, complex, and rational numbers
          1. Reals
            1. Operators and built-in functions
            2. Special values
            3. BigFloats
          2. Rationals
          3. Complex numbers
            1. Juliasets
        5. Composite types
        6. More about matrices
          1. Vectorized and devectorized code
          2. Multidimensional arrays
            1. Broadcasting
          3. Sparse matrices
        7. Data arrays and data frames
        8. Dictionaries, sets, and others
          1. Dictionaries
          2. Sets
          3. Other data structures
        9. Summary
      10. 3. Types and Dispatch
        1. Functions
          1. First-class objects
          2. Passing arguments
            1. Default and optional arguments
            2. Variable argument list
            3. Named parameters
          3. Scope
          4. The Queen's problem
        2. Julia's type system
          1. A look at the rational type
          2. A vehicle datatype
            1. Typealias and unions
        3. Enumerations (revisited)
        4. Multiple dispatch
          1. Parametric types
          2. Conversion and promotion
            1. Conversion
            2. Promotion
          3. A fixed vector module
        5. Summary
      11. 4. Interoperability
        1. Interfacing with other programming environments
          1. Calling C and Fortran
            1. Mapping C types
              1. Array conversions
              2. Type correspondences
            2. Calling a Fortran routine
            3. Calling curl to retrieve a web page
          2. Python
          3. Some others to watch
          4. The Julia API
          5. Calling API from C
        2. Metaprogramming
          1. Symbols
          2. Macros
          3. Testing
            1. Error handling
          4. The enum macro
        3. Tasks
          1. Parallel operations
          2. Distributed arrays
          3. A simple MapReduce
        4. Executing commands
          1. Running commands
          2. Working with the filesystem
          3. Redirection and pipes
            1. Perl one-liners
        5. Summary
      12. 5. Working with Data
        1. Basic I/O
          1. Terminal I/O
          2. Disk files
          3. Text processing
          4. Binary files
        2. Structured datasets
          1. CSV and DLM files
          2. HDF5
          3. XML files
        3. DataFrames and RDatasets
          1. The DataFrames package
          2. DataFrames
          3. RDatasets
            1. Subsetting, sorting, and joining data
        4. Statistics
          1. Simple statistics
          2. Samples and estimations
          3. Pandas
        5. Selected topics
          1. Time series
          2. Distributions
            1. Kernel density
          3. Hypothesis testing
          4. GLM
        6. Summary
      13. 6. Scientific Programming
        1. Linear algebra
          1. Simultaneous equations
          2. Decompositions
          3. Eigenvalues and eigenvectors
          4. Special matrices
            1. A symmetric eigenproblem
        2. Signal processing
          1. Frequency analysis
          2. Filtering and smoothing
          3. Digital signal filters
          4. Image processing
        3. Differential equations
          1. The solution of ordinary differential equations
          2. Non-linear ordinary differential equations
          3. Partial differential equations
        4. Optimization problems
          1. JuMP
          2. Optim
          3. NLopt
            1. Using with the MathProgBase interface
        5. Stochastic problems
          1. Stochastic simulations
            1. SimJulia
            2. Bank teller example
          2. Bayesian methods and Markov processes
            1. Monte Carlo Markov Chains
            2. MCMC frameworks
        6. Summary
      14. 7. Graphics
        1. Basic graphics in Julia
          1. Text plotting
          2. Cairo
          3. Winston
        2. Data visualization
          1. Gadfly
          2. Compose
        3. Graphic engines
          1. PyPlot
          2. Gaston
          3. PGF plots
        4. Using the Web
          1. Bokeh
          2. Plotly
        5. Raster graphics
          1. Cairo (revisited)
          2. Winston (revisited)
          3. Images and ImageView
        6. Summary
      15. 8. Databases
        1. A basic view of databases
          1. The red pill or the blue pill?
          2. Interfacing to databases
          3. Other considerations
        2. Relational databases
          1. Building and loading
          2. Native interfaces
          3. ODBC
          4. Other interfacing techniques
          5. DBI
            1. SQLite
            2. MySQL
            3. PostgreSQL
          6. PyCall
          7. JDBC
        3. NoSQL datastores
          1. Key-value systems
          2. Document datastores
        4. RESTful interfacing
          1. JSON
          2. Web-based databases
          3. Graphic systems
        5. Summary
      16. 9. Networking
        1. Sockets and servers
          1. Well-known ports
          2. UDP and TCP sockets in Julia
          3. A "Looking-Glass World" echo server
          4. Named pipes
        2. Working with the Web
          1. A TCP web service
          2. The JuliaWeb group
          3. The "quotes" server
          4. WebSockets
        3. Messaging
          1. E-mail
          2. Twitter
          3. SMS and esendex
        4. Cloud services
          1. Introducing Amazon Web Services
          2. The AWS.jl package
          3. The Google Cloud
        5. Summary
      17. 10. Working with Julia
        1. Under the hood
          1. Femtolisp
          2. The Julia API
          3. Code generation
        2. Performance tips
          1. Best practice
          2. Profiling
          3. Lint
          4. Debugging
        3. Developing a package
          1. Anatomy
          2. Taxonomy
          3. Using Git
          4. Publishing
        4. Community groups
          1. Classifications
          2. JuliaAstro
            1. Cosmology models
            2. The Flexible Image Transport System
              1. The high-level API
              2. The low-level API
          3. JuliaGPU
        5. What's missing?
        6. Summary
      18. Index