From 5d87c0c8a31e6b0043e0ec9ca2675bc0a4f9b4fa Mon Sep 17 00:00:00 2001 From: Julien Barnier Date: Mon, 17 Jun 2024 14:59:58 +0200 Subject: [PATCH] maint: update URLs for Lifemap-ToL organisation --- README.md | 8 ++++---- doc/_quarto.yml | 6 +++--- doc/development.qmd | 4 ++-- doc/getting_started.qmd | 4 ++-- doc/index.qmd | 2 +- doc/installation.qmd | 10 +++++----- doc/layers/layer_donuts.qmd | 2 +- doc/layers/layer_heatmap.qmd | 2 +- doc/layers/layer_lines.qmd | 2 +- doc/layers/layer_points.qmd | 2 +- doc/layers/layer_screengrid.qmd | 2 +- notebooks/introduction.ipynb | 30 +++++++++++++++--------------- pyproject.toml | 7 ++++--- 13 files changed, 41 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index a6ea7fe..4b35cfe 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # pylifemap [![PyPI](https://img.shields.io/pypi/v/pylifemap.svg?color=green)](https://pypi.org/project/pylifemap) -[![Tests](https://github.com/juba/pylifemap/actions/workflows/tests.yml/badge.svg)](https://github.com/juba/pylifemap/actions/workflows/tests.yml) -[![Documentation](https://github.com/juba/pylifemap/actions/workflows/publish.yml/badge.svg)](https://github.com/juba/pylifemap/actions/workflows/publish.yml) -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/juba/pylifemap/blob/master/notebooks/introduction.ipynb) +[![Tests](https://github.com/Lifemap-ToL/pylifemap/actions/workflows/tests.yml/badge.svg)](https://github.com/Lifemap-ToL/pylifemap/actions/workflows/tests.yml) +[![Documentation](https://github.com/Lifemap-ToL/pylifemap/actions/workflows/publish.yml/badge.svg)](https://github.com/Lifemap-ToL/pylifemap/actions/workflows/publish.yml) +[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Lifemap-ToL/pylifemap/blob/master/notebooks/introduction.ipynb) Python package for Lifemap visualizations. -Documentation: +Documentation: diff --git a/doc/_quarto.yml b/doc/_quarto.yml index 06d20d7..da4c0dd 100644 --- a/doc/_quarto.yml +++ b/doc/_quarto.yml @@ -6,9 +6,9 @@ execute: website: title: "pylifemap" - site-url: "https://juba.github.io/pylifemap" + site-url: "https://lifemap-tol.github.io/pylifemap" favicon: favicon.png - repo-url: https://github.com/juba/pylifemap/ + repo-url: https://github.com/Lifemap-ToL/pylifemap/ repo-subdir: "doc" repo-actions: [issue] search: @@ -35,7 +35,7 @@ website: - development.qmd tools: - icon: github - href: https://github.com/juba/pylifemap/ + href: https://github.com/Lifemap-ToL/pylifemap/ metadata-files: - _quartodoc_sidebar.yml diff --git a/doc/development.qmd b/doc/development.qmd index e556e74..9e6069c 100644 --- a/doc/development.qmd +++ b/doc/development.qmd @@ -8,7 +8,7 @@ title: "Development notes" To install `pylifemap` from git: ```sh -pip install git+https://github.com/juba/pylifemap.git +pip install git+https://github.com/Lifemap-ToL/pylifemap.git ``` ## Install fom source @@ -17,7 +17,7 @@ If you want to build `pylifemap` from source, you'll have to follow these steps: - Install [node.js](https://nodejs.org/en) - Install [hatch](https://hatch.pypa.io/latest/) dependency management system -- Clone the [pylifemap](https://github.com/juba/pylifemap) repository +- Clone the [pylifemap](https://github.com/Lifemap-ToL/pylifemap) repository - Install Python dependencies with : `hatch shell` - Install JavaScript dependencies with : `npm install --workspaces --include-root-workspace` diff --git a/doc/getting_started.qmd b/doc/getting_started.qmd index 5af3b0b..c936bf6 100644 --- a/doc/getting_started.qmd +++ b/doc/getting_started.qmd @@ -28,7 +28,7 @@ We can import it as a polars or pandas DataFrame with the following code: import polars as pl iucn = pl.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) ``` @@ -39,7 +39,7 @@ iucn = pl.read_csv( import pandas as pd iucn = pd.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) ``` diff --git a/doc/index.qmd b/doc/index.qmd index d7942b1..e9b2590 100644 --- a/doc/index.qmd +++ b/doc/index.qmd @@ -14,7 +14,7 @@ from pylifemap import Lifemap # Load iucn dataset iucn = pd.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) Lifemap(iucn).layer_points(radius=5, opacity=0.1).show() diff --git a/doc/installation.qmd b/doc/installation.qmd index 10f2686..13ed5c9 100644 --- a/doc/installation.qmd +++ b/doc/installation.qmd @@ -19,26 +19,26 @@ You can install the package locally (preferably in a virtual environment) with [ For the moment only the development version can be installed from Github with the following command: ```shell -pip install git+https://github.com/juba/pylifemap.git +pip install git+https://github.com/Lifemap-ToL/pylifemap.git ``` ## Run in Google Colab You can try the package (without installing anything) in [Google Colab](https://colab.research.google.com/). -The easiest way is by using our [introduction notebook](https://colab.research.google.com/github/juba/pylifemap/blob/master/notebooks/introduction.ipynb) directly in Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/juba/pylifemap/blob/master/notebooks/introduction.ipynb). +The easiest way is by using our [introduction notebook](https://colab.research.google.com/github/Lifemap-ToL/pylifemap/blob/master/notebooks/introduction.ipynb) directly in Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Lifemap-ToL/pylifemap/blob/master/notebooks/introduction.ipynb). ## Run with Docker ### Run in Jupyter -Another way to use the package without having to install it is to use our [Docker image](https://github.com/juba/pylifemap/pkgs/container/pylifemap). +Another way to use the package without having to install it is to use our [Docker image](https://github.com/Lifemap-ToL/pylifemap/pkgs/container/pylifemap). To use `pylifemap` in a Jupyter environment, you have to [install Docker](https://docs.docker.com/engine/install/), open a terminal in the directory containing your data and notebook files, and run: ```sh -docker run -it -p 8899:8899 -v $PWD:/local/ ghcr.io/juba/pylifemap:latest +docker run -it -p 8899:8899 -v $PWD:/local/ ghcr.io/Lifemap-ToL/pylifemap:latest ``` Open the following URL in your browser: , and you will have access to a Jupyter notebook environment with `pylifemap` and its dependencies preinstalled. @@ -48,7 +48,7 @@ Open the following URL in your browser: , and you wil If you just want to run a Python script generating a pylifemap visualization, you can open a terminal in the script directory and run the following command: ```sh -docker run -v $PWD:/local/ ghcr.io/juba/pylifemap:latest myscript.py +docker run -v $PWD:/local/ ghcr.io/Lifemap-ToL/pylifemap:latest myscript.py ``` In this case, if you use [show()](`~pylifemap.Lifemap.show`) in your script the result will not be opened in your browser but will instead be saved in a `lifemap.html` file in your working directory. \ No newline at end of file diff --git a/doc/layers/layer_donuts.qmd b/doc/layers/layer_donuts.qmd index e84d6e3..5aa94fe 100644 --- a/doc/layers/layer_donuts.qmd +++ b/doc/layers/layer_donuts.qmd @@ -10,7 +10,7 @@ from pylifemap import Lifemap, aggregate_freq # Load iucn dataset iucn = pl.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) # Aggregate observations count along branches diff --git a/doc/layers/layer_heatmap.qmd b/doc/layers/layer_heatmap.qmd index 4a8ad95..3ac58d5 100644 --- a/doc/layers/layer_heatmap.qmd +++ b/doc/layers/layer_heatmap.qmd @@ -11,7 +11,7 @@ from pylifemap import Lifemap # Load iucn dataset iucn = pl.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) ( diff --git a/doc/layers/layer_lines.qmd b/doc/layers/layer_lines.qmd index 82cef55..a079694 100644 --- a/doc/layers/layer_lines.qmd +++ b/doc/layers/layer_lines.qmd @@ -12,7 +12,7 @@ from pylifemap import Lifemap, aggregate_count # Load iucn dataset iucn = pl.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) # Aggregate observations count along branches diff --git a/doc/layers/layer_points.qmd b/doc/layers/layer_points.qmd index 53a573e..f70fe03 100644 --- a/doc/layers/layer_points.qmd +++ b/doc/layers/layer_points.qmd @@ -12,7 +12,7 @@ from pylifemap import Lifemap, aggregate_count # Load iucn dataset iucn = pl.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) # Aggregate observations count along branches diff --git a/doc/layers/layer_screengrid.qmd b/doc/layers/layer_screengrid.qmd index 25da61e..b2d1573 100644 --- a/doc/layers/layer_screengrid.qmd +++ b/doc/layers/layer_screengrid.qmd @@ -15,7 +15,7 @@ from pylifemap import Lifemap # Load iucn dataset iucn = pl.read_csv( - "https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv" + "https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv" ) ( diff --git a/notebooks/introduction.ipynb b/notebooks/introduction.ipynb index 386ab8f..e9c569f 100644 --- a/notebooks/introduction.ipynb +++ b/notebooks/introduction.ipynb @@ -12,7 +12,7 @@ "\n", "## Installation\n", "\n", - "For the moment the package is only available on Github. You can install it by running the following code:" + "For the moment the package is only available on Github. You can install it by running the following code:\n" ] }, { @@ -21,7 +21,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install git+https://github.com/juba/pylifemap.git" + "%pip install git+https://github.com/Lifemap-ToL/pylifemap.git" ] }, { @@ -32,7 +32,7 @@ "\n", "In this notebook we will use a sample data file generated from [The IUCN Red List of Threatened Species](https://www.gbif.org/dataset/19491596-35ae-4a91-9a98-85cf505f1bd3). It is a CSV file with the Red List category (in 2022) of more than 84000 species.\n", "\n", - "We can load the file with the pandas or polars data frame libraries:" + "We can load the file with the pandas or polars data frame libraries:\n" ] }, { @@ -44,7 +44,7 @@ "import polars as pl\n", "\n", "iucn = pl.read_csv(\n", - " \"https://raw.githubusercontent.com/juba/pylifemap/main/data/iucn.csv\"\n", + " \"https://raw.githubusercontent.com/Lifemap-ToL/pylifemap/main/data/iucn.csv\"\n", ")" ] }, @@ -52,7 +52,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The data set only contains two variables: the `taxid` of the species, and its `status`:" + "The data set only contains two variables: the `taxid` of the species, and its `status`:\n" ] }, { @@ -68,7 +68,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Besides the full `iucn` dataset, we will create another `iucn_extinct` object with only the species with the \"Extinct\" status." + "Besides the full `iucn` dataset, we will create another `iucn_extinct` object with only the species with the \"Extinct\" status.\n" ] }, { @@ -89,7 +89,7 @@ "\n", "We will first try to visualize the distribution of the species in `iucn_extinct`.\n", "\n", - "The first thing we have to do is to create a new `Lifemap` instance by passing it our data:" + "The first thing we have to do is to create a new `Lifemap` instance by passing it our data:\n" ] }, { @@ -107,7 +107,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "To visualize our data we have to add a *layer* to our `Lifemap` object. Here we can use `layer_points`, which displays each species with a colored point. We also call the `show()` method to display the result." + "To visualize our data we have to add a _layer_ to our `Lifemap` object. Here we can use `layer_points`, which displays each species with a colored point. We also call the `show()` method to display the result.\n" ] }, { @@ -123,7 +123,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Another interesting layer for species distribution is `layer_heatmap`:" + "Another interesting layer for species distribution is `layer_heatmap`:\n" ] }, { @@ -141,7 +141,7 @@ "source": [ "In our dataset we have a list of extinct species which are \"leaves\" of the tree. One thing we can do is compute the frequency of extinct species for each tree node, by aggregating the count along the branches.\n", "\n", - "We can compute this by using the `aggregate_count` function on our data:" + "We can compute this by using the `aggregate_count` function on our data:\n" ] }, { @@ -160,7 +160,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can visualize this new dataset with a `layer_points`. But it is more interesting visually if we make the size and the color of the points depend on their associated count. This is possible by using the `radius_col` and `fill_col` arguments:" + "We can visualize this new dataset with a `layer_points`. But it is more interesting visually if we make the size and the color of the points depend on their associated count. This is possible by using the `radius_col` and `fill_col` arguments:\n" ] }, { @@ -176,7 +176,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "And we can add a second layer to also color the branches depending on the species frequencies:" + "And we can add a second layer to also color the branches depending on the species frequencies:\n" ] }, { @@ -217,7 +217,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Another possibility is to make another aggregation along the tree branches, this time to compute the frequencies of the different statuses at each node. This can ben done with the `aggregate_cat` function." + "Another possibility is to make another aggregation along the tree branches, this time to compute the frequencies of the different statuses at each node. This can ben done with the `aggregate_cat` function.\n" ] }, { @@ -235,7 +235,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can then visualize this data as a series of donut charts. You can click on a chart to display a popup with more informations:" + "We can then visualize this data as a series of donut charts. You can click on a chart to display a popup with more informations:\n" ] }, { @@ -264,7 +264,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/pyproject.toml b/pyproject.toml index a2c8a9c..c4c5eea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,15 +28,16 @@ dependencies = [ "pandas", "pyarrow>=15.0.0", "ipywidgets>=8.1.0", + "pickleshare>=0.7.5" ] [project.optional-dependencies] dev = ["watchfiles", "jupyterlab"] [project.urls] -Documentation = "https://github.com/juba/pylifemap#readme" -Issues = "https://github.com/juba/pylifemap/issues" -Source = "https://github.com/juba/pylifemap" +Documentation = "https://github.com/Lifemap-ToL/pylifemap#readme" +Issues = "https://github.com/Lifemap-ToL/pylifemap/issues" +Source = "https://github.com/Lifemap-ToL/pylifemap" [tool.hatch.version] path = "src/pylifemap/__about__.py"