Blog setup

This blog is a statically generated blog that can contain executable documents (Jupyter notebooks) using a simple stack:

  • Hugo: No need for introductions, one of the most used static site generators out there.

  • Jupyter notebooks: Also no need for introductions but just in case… here is an amazing explanation for what Jupyter notebooks are and why they rock:

  • Quarto: This is a relatively new library for scientific publication built on top of Pandoc from the same team that created RStudio. Quarto is very easy to configure and comes with batteries included, with Quarto we can:

    • Create dynamic content with Python, R, Julia, and Observable.
    • Author documents as plain text markdown or Jupyter notebooks.
    • Publish high-quality articles, reports, presentations, websites, blogs, and books in HTML, PDF, MS Word, ePub, and more.
    • Author with scientific markdown, including equations, citations, crossrefs, figure panels, callouts, advanced layout, and more.

For a demonstration, let’s use the example with geopandas.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import geopandas

world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
world = world[(world.pop_est>0) & (world.name!="Antarctica")]

world['gdp_per_cap'] = round((world.gdp_md_est * 1e6) / world.pop_est, 2)

world.explore(
     column="gdp_per_cap", # make choropleth based on "BoroName" column
     popup=True, # show all values in popup (on click)
     # tiles="CartoDB positron", # use "CartoDB positron" tiles
     cmap="viridis", # use "Set1" matplotlib colormap
     style_kwds=dict(color="black") # use black outline
    )
Make this Notebook Trusted to load map: File -> Trust Notebook