GitLab now enforces expiry dates on tokens that originally had no set expiration date. Those tokens were given an expiration date of one year later. Please review your personal access tokens, project access tokens, and group access tokens to ensure you are aware of upcoming expirations. Administrators of GitLab can find more information on how to identify and mitigate interruption in our documentation.
The goal of this project is to implement a program that generates **tree maps**, a visual representation where data is divided into regions proportional to their values. This involves processing input data, applying recursive splitting strategies, and rendering the result as a PDF image.
## Final Result
Here is an example of the final tree map generated by the program (scaled to fit the display):
<imgsrc="images/example.png"alt="Final Tree Map"width="300px">
---
## Project Structure
The program follows a pipeline structure:
1.**Input Data**: Parses input in various formats (plain text, optional SQL database, etc.).
2.**Data Splitting**: Groups data hierarchically using recursive splitting strategies.
3.**Placement**: Assigns regions to data values within a square.
4.**Rendering**: Produces a visual representation in PDF format.
The project includes:
- A main program, `treemap.c`, that orchestrates the pipeline.
- A test suite, `test-treemap.c`, implemented with the Check library.
- Utility scripts for generating PDF files from vector output.
---
## Difficulties Encountered
### 1. Configuring `vector2tex` and `pdflatex`
The provided script `vector2tex.sh` converts vector output into LaTeX code for rendering. Challenges included:
- Ensuring that the script had executable permissions (`chmod +x vector2tex.sh`).
- Handling errors in LaTeX compilation with `pdflatex`, such as missing or malformed `.tex` files.
### 2. `<check.h>` Not Found
The **Check** library, used for the test suite, was not initially recognized by the compiler. This required:
- Installing the library with Homebrew: `brew install check`.
- Adding the appropriate include (`-I`) and library (`-L`) paths: