Working with Data
Make data the center: model, transform, validate, and serialize values with confidence.
In Java, it is common to wrap data in classes and let behavior hang off methods. In Clojure, data is usually front and center: you model it as maps and vectors, transform it with functions, and keep the shape easy to inspect at the REPL.
This chapter teaches practical data work: building clear domain maps, transforming nested structures, validating inputs, and moving data across boundaries (JSON, EDN, databases). It also covers the trade-offs you need to be aware of when you choose “plain data” over rich objects.
If you learn to make data explicit and readable, your Clojure code becomes dramatically easier to debug and evolve.
In this section
-
Data Transformation and Pipelines
Build readable pipelines that transform nested data without mutation.
-
JSON and XML Processing
Move data across boundaries (JSON/XML) while keeping internal data shapes consistent.
-
Interacting with Databases Using JDBC
Treat SQL and connections as an edge: parameterize queries and return plain data.
-
Using Datomic and Other Datastores
When a database is more than CRUD: immutable history, queries, and data modeling trade-offs.
-
Introduction to Datomic: A Scalable, Immutable Database for Clojure Developers
Explore Datomic, a distributed database designed for immutability and scalability, and learn how it integrates with Clojure to enhance data management.
-
Mastering Datomic: A Comprehensive Guide for Java Developers
Explore the power of Datomic in Clojure, from connecting to defining schemas, querying with Datalog, and handling transactions.
-
Integrating Clojure with MongoDB, Cassandra, and Redis
Explore how to integrate Clojure with popular datastores like MongoDB, Cassandra, and Redis using libraries such as Monger, Cassaforte, and Carmine. Learn through examples and comparisons with Java.
-
Data Analysis and Visualization
Use the REPL to explore data, then turn insights into reproducible transformations.
-
Clojure Data Analysis Libraries: Incanter and Tablecloth
Explore Clojure's powerful data analysis libraries, Incanter and Tablecloth, designed for statistical computing and data processing.
-
Performing Data Analysis with Clojure: A Comprehensive Guide for Java Developers
Explore how to perform data analysis using Clojure, focusing on loading datasets, statistical computations, data aggregation, and summarization, tailored for Java developers.
-
Data Visualization in Clojure: Incanter, Vega-Lite, and Hanami
Explore data visualization in Clojure using Incanter, Vega-Lite with the oz library, and Hanami. Learn to create charts and graphs to represent data effectively.
-
Handling Big Data with Clojure
Scale data work with streaming, batching, and JVM ecosystems—without losing simplicity.
-
Data Serialization and Transit
Choose serialization formats (EDN, JSON, Transit) that preserve meaning across boundaries.
-
Data Serialization in Clojure: A Comprehensive Guide for Java Developers
Explore the importance of data serialization in Clojure for transmitting and storing data, with comparisons to Java serialization techniques.
-
Using Transit for Data Serialization in Clojure
Explore how to use Transit, a data serialization format optimized for Clojure and ClojureScript, to efficiently serialize and deserialize data.
-
Comparing Serialization Formats: Transit, JSON, XML, and Protocol Buffers
Explore the differences between Transit, JSON, XML, and Protocol Buffers for data serialization in Clojure, focusing on performance, compatibility, and ease of use.
-
Real-Time Data Processing
Process event streams with explicit state, idempotency, and backpressure-aware design.
-
Tools and Libraries for Data Workflows
Libraries for parsing, validation, transformation, and performance—used as building blocks.
-
Practical Examples and Projects
Practice end-to-end data work: ingest, transform, validate, and emit results.