From 58e480abac541f23b66611220ed8a6a49c30af36 Mon Sep 17 00:00:00 2001 From: Julien Barnier Date: Tue, 10 Sep 2024 12:55:17 +0000 Subject: [PATCH] Built site for gh-pages --- .nojekyll | 2 +- changelog.html | 1 + development.html | 2 +- gallery_geo.html | 8 +++---- gallery_interaction.html | 14 ++++++------ gallery_marks.html | 8 +++---- gallery_themes.html | 14 ++++++------ gallery_transforms.html | 10 ++++----- getting_started.html | 18 +++++++-------- index.html | 10 ++++----- search.json | 6 ++--- sitemap.xml | 20 ++++++++--------- usage.html | 48 ++++++++++++++++++++-------------------- 13 files changed, 81 insertions(+), 80 deletions(-) diff --git a/.nojekyll b/.nojekyll index d79c3fe..90ef6e4 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -c145397c \ No newline at end of file +78df2dd9 \ No newline at end of file diff --git a/changelog.html b/changelog.html index 3c1ab6b..1f67e0d 100644 --- a/changelog.html +++ b/changelog.html @@ -162,6 +162,7 @@

Changelog

pyobsplot 0.5.1-dev

diff --git a/development.html b/development.html index 13ce32b..dbc1365 100644 --- a/development.html +++ b/development.html @@ -331,7 +331,7 @@

Tests

Debug mode

“Debug mode” outputs the computed JavaScript plot structure (the one passed to Plot.plot).

To activate it, add debug=True when creating your plot generator object:

-
+
op = Obsplot(debug=True)

If using the widget renderer, debug output will be displayed in JavaScript console. With the jsdom renderer, it will be displayed directly in the notebook.

diff --git a/gallery_geo.html b/gallery_geo.html index 020804b..01a8b58 100644 --- a/gallery_geo.html +++ b/gallery_geo.html @@ -280,7 +280,7 @@

Mapping and spatial data

Geo mark

The Geo mark allows to draw geographic features such as points, lines and polygons. These marks data are passed as GeoJSON.

This allows to create choropleth maps such as the following:

-
+
from pyobsplot import Obsplot, Plot
 import geopandas as gpd
 import pandas as pd
@@ -333,7 +333,7 @@ 

Geo mark

Of course other marks can be used in conjunction with geo marks. This example represents the density of Walmarts supermarkets and is taken from the Mapping notebook.

-
+
# Load US states from TopoJson with geopandas and convert to GeoJson
 states = gpd.read_file("data/us-counties-10m.json", layer="states").to_json()
 nation = gpd.read_file("data/us-counties-10m.json", layer="nation").to_json()
@@ -377,7 +377,7 @@ 

Geo mark

Raster mark

The Raster mark creates an image from spatial data.

Plot allows to do different type of spatial interpolations, such as nearest, which draws voronoi cells around values:

-
+
import polars as pl
 
 ca55 = pl.read_csv("data/ca55-south.csv")
@@ -424,7 +424,7 @@ 

Raster mark

Or the more recent random walk interpolation:

-
+
flare_map("random-walk")

Interactions

Tooltips

The tip mark, introduced in Observable 0.6.7, allows to easily add tooltips to a plot.

-
+
import polars as pl
 from pyobsplot import Plot, d3, js
 
@@ -313,7 +313,7 @@ 

Tooltips

)
@@ -321,7 +321,7 @@

Tooltips

Crosshair mark

The crosshair mark alows to display the coordinates of the nearest point.

-
+
penguins = pl.read_csv("data/penguins.csv")
 
 Plot.plot(
@@ -340,7 +340,7 @@ 

Crosshair mark

)
@@ -348,7 +348,7 @@

Crosshair mark

Pointer interaction

More generally, the pointer interaction allows to filter out the closest data point and apply some custom marks to it.

-
+
aapl = stocks.filter(pl.col("Symbol") == "AAPL")
 
 Plot.plot(
@@ -379,7 +379,7 @@ 

Pointer interaction)

@@ -389,7 +389,7 @@

Pointer interaction

@@ -311,7 +311,7 @@

light theme

dark theme

The dark theme produces plots with a black background and a white foreground color.

-
+
op = Obsplot(theme="dark")
 
 op(
@@ -327,7 +327,7 @@ 

dark theme

)
@@ -336,7 +336,7 @@

dark theme

current theme

The “current” theme uses a transparent background and a currentColor foreground, so it should keep the current color theme:

-
+
op = Obsplot(theme="current")
 
 op(
@@ -352,7 +352,7 @@ 

current theme)

@@ -363,7 +363,7 @@

current theme

Or, for a bit more complex example:

-
+
Plot.plot(
     {
         "marginLeft": 75,
@@ -241,7 +241,7 @@ 

Overview

)
@@ -288,7 +288,7 @@

Credits