New Horizons

Some thoughts about my first post and using Quarto.
personal
Author

Diego Andrés Gómez Polo

Published

February 15, 2024

A Brief Introduction

For a while now i have been trying to express my thoughs in a shareable media. I ran around circles trying to figure out which technology should i use, with what topic should i start and many other self-made blockers. Finally, i think i’ve found a decent media that has all the requirements i hoped for. This blog and the website itself is powered by Quarto, a technology that lets me combine Markdown, Python, R, and Latex into a single document

This is a note to myself: You are now out of excuses to actually start writing

A personal Blog is a project i’ve been procrastinating for a while now. The idea of exposing you thoughts for everyone to see them is rather scary, but i can not think of a better way of actually learning an consolidating ones mental models. Language is a projection of our thoughts, and writing is a way of making them tangible, and most importantly, shareable.

Quarto’s Capabilities

What follows now is dummy made up content to demonstrate the capabilities of Quarto.

A Nice Figure

Tet’s see if we can add a nice figure to this post.

Show source
import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
  subplot_kw = {'projection': 'polar'} 
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
Figure 1: A line plot on a polar axis

A Pretty Equation

Now let’s do some math.

\[ \int_0^\infty x^2 dx \]

Tip

Use single dollar sings $ for inline math \(\frac{1}{2}\)

Some column margin text in here:

We know from the first fundamental theorem of calculus that for \(x\) in \([a, b]\):

\[\frac{d}{dx}\left( \int_{a}^{x} f(u)\,du\right)=f(x).\]

An Interactive Plot

What if we want the nice graph to be interactive?

import plotly.express as px
import plotly.io as pio
df = px.data.iris()
1fig = px.scatter(df, x="sepal_width", y="sepal_length",
                 color="species",
                 marginal_y="violin", marginal_x="box",
                 trendline="ols", template="simple_white")
fig.show()
1
Example of code line annotations
Figure 2: An interactive plot

Pretty Tables

Demonstration of pipe table syntax
Default Left Right Center
12 12 12 12
123 123 123 123
1 1 1 1

A Wider Figure

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv')

import plotly.express as px
fig = px.density_mapbox(df, lat='Latitude', lon='Longitude', z='Magnitude', radius=10,
                        center=dict(lat=0, lon=180), zoom=0,
                        mapbox_style="open-street-map")
fig.show()
Figure 3: A wide figure
A Margin Table
Default Left Right Center
12 12 12 12
123 123 123 123
1 1 1 1

References

What about some biblioghraphy and cross-references?

References

Montague, P Read. 1999. “Reinforcement Learning: An Introduction, by Sutton, RS and Barto, AG.” Trends in Cognitive Sciences 3 (9): 360.