Text Data

This shows examples of TextBlock, Notes, LinkList, CodeBlock.

TextBlock

You can write whatever HTML you want and put it in a TextBlock which will put it in the resultant HTML.

TextBlock allows you to add rich text, HTML, and annotations to your reports.

You can include formatting, styled text, and even inline code.

See here for TextBlock examples.




Notes

Notes provides editable text areas for adding commentary to your visualizations. When using external data formats (parquet, csv_external, json_external), Notes creates text files that you can edit after generating the HTML. Your edits will appear in the document when refreshed.

The idea is sometimes you will want to make a report, interpret it, and then store your observations as part of the report. You can always do this directly by editing the HTML but note is designed to make it easier.

After generating the HTML, edit the text file in the notes/ folder and refresh the page to see your notes.

See the Notes example for a demonstration.




Tutorial Notes

Loading...
Loading notes...
Edit file: notes/tutorial_notes.txt



Julia
function generate_comprehensive_data()
    rng = StableRNG(42)

    # Time period: One year of daily data
    start_date = Date(2024, 1, 1)
    dates = start_date:Day(1):(start_date + Day(700))
    n = length(dates)

    # Product categories
    products = ["Laptop", "Tablet", "Phone"]
    regions = ["North", "South", "West"]
    segments = ["Enterprise", "SMB", "Consumer"]

    # Generate sales data
    records = DataFrame[]

    for (i, date) in enumerate(dates)
        for product in products
            for region in regions
                # Base sales with trends and seasonality
                base = 10000 + 1000 * sin(2π * i / 365)
                trend = i * 10

                # Product-specific multipliers
                product_mult = Dict(
                    "Laptop" => 3.0, "Tablet" => 2.0, "Phone" => 4.0
                )[product]

                # Region-specific multipliers
                region_mult = Dict("North" => 1.2, "South" => 1.0, "West" => 1.1)[region]

                sales = (base + trend) * product_mult * region_mult * (1 + 0.2 * randn(rng))
                quantity = round(Int, sales / (100 + 50 * randn(rng)))
                cost = sales * (0.6 + 0.1 * randn(rng))
                profit = sales - cost

                # Customer metrics
                customers = round(Int, quantity * (0.3 + 0.1 * randn(rng)))
                satisfaction = 3.5 + 1.0 * randn(rng)

                # Geographic coordinates
                lat = 35.0 + Dict("North" => 10, "South" => -10, "West" => 0)[region] + randn(rng)
                lon = -95.0 + Dict("North" => 0, "South" => 0, "West" => -15)[region] + randn(rng)

                # Random segment assignment
                segment = rand(rng, segments)

                push!(records, DataFrame(
                    date = date,
                    product = product,
                    region = region,
                    segment = segment,
                    sales = max(0, sales),
                    quantity = max(0, quantity),
                    cost = max(0, cost),
                    profit = profit,
                    customers = max(0, customers),
                    satisfaction = clamp(satisfaction, 1, 5),
                    latitude = lat,
                    longitude = lon,
                    month = month(date),
                    quarter = (month(date) - 1) ÷ 3 + 1,
                    day_of_year = dayofyear(date)
                ))
            end
        end
    end

    return vcat(records...)
end
We can use a CodeBlock to show code snippets with syntax highlighting. We have correct Syntax highlighting for Julia, Python, R, JavaScript, Java, C, C++, SQL, pl/pgsql, Rust. For anything else it will all be black.



LinkList




Pages

OverView

Tabular Data and Text

Multimedia

2D Plots

Distributional Plots

3D Plots

Variable Relationships

Situational Charts

Financial Charts

A LinkList shows you a list of links with optional descriptions. These are automatically generated if you make a Pages struct where there is a LinkList on the top page with links to the others. You can also make your own. See here for LinkList examples

Data: no_data.parquet


JSPlots.jl This page was created using JSPlots.jl v0.6.3.