Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat french pages #1870

Merged
merged 15 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/1-Experiments/Kubeflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The following can be customized here:
<!-- prettier-ignore -->
!!! success "Your server is running"
If all goes well, your server should be running!!! You will now have the
option to connect, and [try out Jupyter!](/daaas/en/1-Experiments/Jupyter)
option to connect, and [try out Jupyter!](../Jupyter)

# Once you've got the basics ...

Expand Down
7 changes: 2 additions & 5 deletions docs/en/1-Experiments/RStudio.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# Overview

RStudio is an integrated development environment (IDE) for R. It includes a
console, editor, and tools for plotting, history, debugging and workspace
management.
RStudio is an integrated development environment (IDE) for R. It includes a console, editor, and tools for plotting, history, debugging and workspace management.

# Video Tutorial

[![Click here for the video](../images/KubeflowVideo.PNG)](https://www.youtube.com/watch?v=Xrk1kN9Lr_4&list=PL1zlA2D7AHugkDdiyeUHWOKGKUd3MB_nD&index=3 "Advanced Analytics Workspace - R-Studio Basics")

# Setup

You can use the `rstudio` image to get an RStudio environment! When you create
your notebook, choose RStudio from the list of available images.
You can use the `rstudio` image to get an RStudio environment! When you create your notebook, choose RStudio from the list of available images.
![RStudio menu](../images/RStudioOption.PNG)

![RStudio](../images/rstudio_visual.png)
Expand Down
53 changes: 23 additions & 30 deletions docs/en/1-Experiments/Remote-Desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ quick access to supporting tools. The operating system is
[**Ubuntu**](https://ubuntu.com/about) **22.04** with the
[**XFCE**](https://www.xfce.org/about) desktop environment.

<center>
![Remote Desktop](../images/rd_desktop.png)
</center>

## Geomatics

Expand All @@ -31,64 +33,55 @@ _pip_, _conda_, _npm_ and _yarn_ are available to install various packages.

## Accessing the Remote Desktop

To launch the Remote Desktop or any of its supporting tools, create a Notebook
Server in [Kubeflow](./Kubeflow.md) and select the remote desktop option, which is the Ubuntu image.
To launch the Remote Desktop or any of its supporting tools, create a Notebook Server in [Kubeflow](./Kubeflow.md) and select the remote desktop option, which is the Ubuntu image.

![Remote Desktop](../images/RemoteDesktop.PNG)

Once it has been created, click `Connect` to be redirected to the Remote
Desktop.
Once it has been created, click `Connect` to be redirected to the Remote Desktop.

_Remote Desktop_ brings you to the Desktop GUI through a noVNC session. Click on
the > on the left side of the screen to expand a panel with options such as
fullscreen and clipboard access.
_Remote Desktop_ brings you to the Desktop GUI through a noVNC session. Click on the > on the left side of the screen to expand a panel with options such as fullscreen and clipboard access.

<center>
![NoVNC Panel](../images/rd_novnc_panel.png)
</center>

## Accessing the Clipboard

This is done via the second button from the top of the panel on the left.
It brings up a text box which we can modify to change the contents of the clipboard
or copy stuff from the clipboard of the remote desktop.
This is done via the second button from the top of the panel on the left. It brings up a text box which we can modify to change the contents of the clipboard or copy stuff from the clipboard of the remote desktop.

For example, suppose we want to execute the command `head -c 20 /dev/urandom | md5sum`
and copy-paste the result into a text file on our computer used to connect to the
remote desktop.
For example, suppose we want to execute the command `head -c 20 /dev/urandom | md5sum` and copy-paste the result into a text file on our computer used to connect to the remote desktop.

We first open the clipboard from the panel on the left and paste in that command into
the text box:
We first open the clipboard from the panel on the left and paste in that command into the text box:

<center>
![Clipboard Paste Command from Computer](../images/rd-clipboard-send-to-rd.png)
</center>

To close the clipboard window over the remote desktop, simply click the clipboard
button again.
To close the clipboard window over the remote desktop, simply click the clipboard button again.

We then right click on a terminal window to paste in that command and press enter to
execute the command. At that point we select the MD5 result, right click, and click
copy:
We then right click on a terminal window to paste in that command and press enter to execute the command. At that point we select the MD5 result, right click, and click copy:

<center>
![Copy to Clipboard from Remote Desktop](../images/rd-clipboard-copy-from-rd.png)
</center>

If we open the clipboard from the panel on the left again, it will now have the new
contents:
If we open the clipboard from the panel on the left again, it will now have the new contents:

<center>
![Copy to Clipboard from Remote Desktop](../images/rd-clipboard-copy-from-rd.png)
</center>

The clipboard window will even update in-place if we leave it open the whole time
and we simply select new material on the remote desktop and press copy again. We can
simply copy what we have in that text box and paste it into any other software running
on the computer used to connect.
The clipboard window will even update in-place if we leave it open the whole time and we simply select new material on the remote desktop and press copy again. We can simply copy what we have in that text box and paste it into any other software running on the computer used to connect.

## In-browser Tools

### VS Code

Visual Studio Code is a lightweight but powerful source code editor. It comes
with built-in support for JavaScript, TypeScript and Node.js and has a rich
ecosystem of extensions for several languages (such as C++, C#, Java, Python,
PHP, Go).
Visual Studio Code is a lightweight but powerful source code editor. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for several languages (such as C++, C#, Java, Python, PHP, Go).

<center>
![VS Code](../images/rd_vs_code.png)
</center>

## Footnotes

Expand Down
49 changes: 13 additions & 36 deletions docs/en/1-Experiments/Selecting-an-Image.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Selecting an Image for your Notebook Server

Depending on your project or use case of the Notebook Server, some images may be
more suitable than others. The following will go through the main features of
each to help you pick the most appropriate image for you.
Depending on your project or use case of the Notebook Server, some images may be more suitable than others. The following will go through the main features of each to help you pick the most appropriate image for you.

When selecting an image, you have 3 main options:

Expand All @@ -12,54 +10,33 @@ When selecting an image, you have 3 main options:

## Jupyter Notebooks

[Jupyter Notebooks](https://jupyter.org/) are used to create and share
interactive documents that contain a mix of live code, visualizations, and text.
These can be written in `Python`, `Julia`, or `R`.
[Jupyter Notebooks](https://jupyter.org/) are used to create and share interactive documents that contain a mix of live code, visualizations, and text. These can be written in `Python`, `Julia`, or `R`.

<center>
![Jupyter Notebooks](../images/jupyter_in_action.png)
</center>

<!-- prettier-ignore -->
??? info "Common uses include:"
data transformation, numerical simulation, statistical
modelling, machine learning and more.

The jupyter notebooks are great launchpads for analytics including machine
learning. The `jupyterlab-cpu` image gives a good core experience for python,
including common packages such as `numpy`, `pandas` and `scikit-learn`. If
you're interested specifically in using **_TensorFlow_** or **_PyTorch_**, we
also have `jupyterlab-tensorflow` and `jupyterlab-pytorch` which come with those
tools pre-installed.

For the `jupyterlab-pytorch` image, the PyTorch packages (torch, torchvision,
and torchaudio) are installed in the `torch` conda environment. You must
activate this environment to use PyTorch.

For the `jupyterlab-cpu`, `jupyterlab-tensorflow`, and `jupyterlab-pytorch`
images, in the default shell the `conda activate` command may not work. This is
due to the environment not being initialized properly. In this case run `bash`,
you should see the AAW logo and a few instructions appear. After this
`conda activate` should work properly. If you see the AAW logo on startup it
means the environment is correctly initialized and `conda activate` should work
properly. A fix for this bug is in the works, once this is fixed this paragraph
will be removed.

Each image comes pre-loaded with VS Code in the browser if you prefer a full IDE
experience.
The jupyter notebooks are great launchpads for analytics including machine learning. The `jupyterlab-cpu` image gives a good core experience for python, including common packages such as `numpy`, `pandas` and `scikit-learn`. If you're interested specifically in using **_TensorFlow_** or **_PyTorch_**, we also have `jupyterlab-tensorflow` and `jupyterlab-pytorch` which come with those tools pre-installed.

For the `jupyterlab-pytorch` image, the PyTorch packages (torch, torchvision, and torchaudio) are installed in the `torch` conda environment. You must activate this environment to use PyTorch.

For the `jupyterlab-cpu`, `jupyterlab-tensorflow`, and `jupyterlab-pytorch` images, in the default shell the `conda activate` command may not work. This is due to the environment not being initialized properly. In this case run `bash`, you should see the AAW logo and a few instructions appear. After this `conda activate` should work properly. If you see the AAW logo on startup it means the environment is correctly initialized and `conda activate` should work properly. A fix for this bug is in the works, once this is fixed this paragraph will be removed.

Each image comes pre-loaded with VS Code in the browser if you prefer a full IDE experience.

## RStudio

**[RStudio](../RStudio/)** gives you an integrated development environment
specifically for `R`. If you're coding in `R`, this is typically the Notebook
Server to use. Use the `rstudio` image to get an RStudio environment.
**[RStudio](../RStudio/)** gives you an integrated development environment specifically for `R`. If you're coding in `R`, this is typically the Notebook Server to use. Use the `rstudio` image to get an RStudio environment.

![RStudio](../images/rstudio_visual.png)

## Remote-Desktop

For a full Ubuntu desktop experience, use the remote desktop image. It comes
pre-loaded with Python, R and Geomatics tooling, but are delivered in a typical
desktop experience that also comes with Firefox, VS Code, and open office tools.
The operating system is **[Ubuntu](https://ubuntu.com/about)** 22.04 with the
**[XFCE](https://www.xfce.org/about)** desktop environment.
For a full Ubuntu desktop experience, use the remote desktop image. It comes pre-loaded with Python, R and Geomatics tooling, but are delivered in a typical desktop experience that also comes with Firefox, VS Code, and open office tools. The operating system is **[Ubuntu](https://ubuntu.com/about)** 22.04 with the **[XFCE](https://www.xfce.org/about)** desktop environment.

![Screenshot of the Virtual Desktop](../images/rd_desktop.png)
12 changes: 4 additions & 8 deletions docs/en/2-Publishing/Custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@

## Custom Web Apps

We can deploy anything as long as it's open source and we can put it in a Docker
container. For instance, Node.js apps, Flask or Dash apps. Etc.
We can deploy anything as long as it's open source and we can put it in a Docker container. For instance, Node.js apps, Flask or Dash apps. Etc.

![Example of a Node.js App](../images/readme/covid_ui.png)

<!-- prettier-ignore -->
!!! info "See the source code for this app"
We just push these kinds of applications through GitHub into the server.

# Setup
## Setup

## How to get your app hosted
### How to get your app hosted

If you already have a web app in a git repository then, as soon as it's
containerized, we can fork the Git repository into the StatCan GitHub repository
and point a URL to it. To update it, you'll just interact with the StatCan
GitHub repository with Pull Requests.
If you already have a web app in a git repository then, as soon as it's containerized, we can fork the Git repository into the StatCan GitHub repository and point a URL to it. To update it, you'll just interact with the StatCan GitHub repository with Pull Requests.

**Contact us if you have questions.**
25 changes: 7 additions & 18 deletions docs/en/2-Publishing/Datasette.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
# Overview

Datasette is an instant JSON API for your SQLite databases allowing you to
explore the DB and run SQL queries in a more interactive way.
Datasette is an instant JSON API for your SQLite databases allowing you to explore the DB and run SQL queries in a more interactive way.

You can find a list of example datasettes
[here](https://github.com/simonw/datasette/wiki/Datasettes).

<!-- prettier-ignore -->
!!! faq "The Datasette Ecosystem"
There are all sorts of tools for converting data to and from sqlite
[here](https://docs.datasette.io/en/stable/ecosystem.html). For example,
you can load shapefiles into sqlite, or create [Vega](https://vega.github.io/vega/)
plots from a sqlite database. SQLite works well with `R`, `Python`, and many other tools.
There are all sorts of tools for converting data to and from sqlite [here](https://docs.datasette.io/en/stable/ecosystem.html). For example, you can load shapefiles into sqlite, or create [Vega](https://vega.github.io/vega/) plots from a sqlite database. SQLite works well with `R`, `Python`, and many other tools.

## Example Datasette

Below are some screenshots from the
[global-power-plants](https://global-power-plants.datasettes.com) Datasette, you
can preview and explore the data in the browser, either with clicks or SQL
Below are some screenshots from the [global-power-plants](https://global-power-plants.datasettes.com) Datasette, you can preview and explore the data in the browser, either with clicks or SQL
queries.

![Preview Data](../images/datasette-preview.png)
Expand All @@ -35,19 +29,15 @@ You can even explore maps within the tool!

## Installing Datasette

In your Jupyter Notebook, open a terminal window and run the command
`pip3 install datasette`.
In your Jupyter Notebook, open a terminal window and run the command `pip3 install datasette`.

<center>
![Install Datasette](../images/InstallDatasette.PNG)
</center>

## Starting Datasette

To view your own database in your Jupyter Notebook, create a file called
start.sh in your project directory and copy the below code into it. Make the
file executable using `chmod +x start.sh`. Run the file with `./start.sh`.
Access the web server using the **base URL** with the port number you are using
in the below file.
To view your own database in your Jupyter Notebook, create a file called start.sh in your project directory and copy the below code into it. Make the file executable using `chmod +x start.sh`. Run the file with `./start.sh`. Access the web server using the **base URL** with the port number you are using in the below file.

**start.sh**

Expand Down Expand Up @@ -78,8 +68,7 @@ datasette $DATABASE --cors --config max_returned_rows:100000 --config sql_time_l
you will not be able to simply access it from `http://localhost:5000/` as
normally suggested in the output upon running the web-app.

To access the web server you will need to use the base URL. In your notebook
terminal, run:
To access the web server you will need to use the base URL. In your notebook terminal, run:

```python
echo https://kubeflow.covid.cloud.statcan.ca${JUPYTER_SERVER_URL:19}proxy/5000/
Expand Down
17 changes: 5 additions & 12 deletions docs/en/2-Publishing/PowerBI.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

## Loading data into Power BI

We do not offer a Power BI server, but you can pull your data into Power BI from
our Storage system, and use the data as a `pandas` data frame.
We do not offer a Power BI server, but you can pull your data into Power BI from our Storage system, and use the data as a `pandas` data frame.

![Power BI Dashboard](../images/powerbi_dashboard.png)

Expand All @@ -17,22 +16,16 @@ our Storage system, and use the data as a `pandas` data frame.

## Set up Power BI

Open up your Power BI system, and open up this
[Power BI quick start](https://raw.githubusercontent.com/StatCan/aaw-contrib-jupyter-notebooks/master/querySQL/power_bi_quickstart.py)
in your favourite text editor.
Open up your Power BI system, and open up this [Power BI quick start](https://raw.githubusercontent.com/StatCan/aaw-contrib-jupyter-notebooks/master/querySQL/power_bi_quickstart.py) in your favourite text editor.

You'll have to make sure that `pandas`, `boto3`, and `numpy` are installed, and
that you're using the right Conda virtual environment (if applicable).
You'll have to make sure that `pandas`, `boto3`, and `numpy` are installed, and that you're using the right Conda virtual environment (if applicable).

![Install the dependencies](../images/powerbi_cmd_prompt.png)

You'll then need to make sure that Power BI is using the correct Python
environment. This is modified from the options menu, and the exact path is
specified in the quick start guide.
You'll then need to make sure that Power BI is using the correct Python environment. This is modified from the options menu, and the exact path is specified in the quick start guide.

## Edit your python script

Then, edit your Python script to use your MinIO `ACCESS_KEY` and `SECRET_KEY`,
and then click "Get Data" and copy it in as a Python Script.
Then, edit your Python script to use your MinIO `ACCESS_KEY` and `SECRET_KEY`, and then click "Get Data" and copy it in as a Python Script.

![Run your Python Script](../images/powerbi_python.png)
4 changes: 3 additions & 1 deletion docs/en/2-Publishing/R-Shiny.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ R-Shiny is an R package that makes it easy to build interactive web apps in R.

_Publish Professional Quality Graphics_

<center>
[![InteractiveDashboard](../images/InteractiveDashboard.PNG)](../R-Shiny/)
</center>

R Shiny is an open source web application framework that allows data scientists and analysts to create interactive, web-based dashboards and data visualizations using the R programming language. One of the main advantages of R Shiny is that it offers a straightforward way to create high-quality, interactive dashboards without the need for extensive web development expertise. With R Shiny, data scientists can leverage their R coding skills to create dynamic, data-driven web applications that can be shared easily with stakeholders.

Expand All @@ -22,7 +24,7 @@ Another advantage of R Shiny is that it supports a variety of data visualization

R Shiny is also highly extensible and can be integrated with other open source tools and platforms to build end-to-end data science workflows. With its powerful and flexible features, R Shiny is a popular choice for building data visualization dashboards for a wide range of applications, from scientific research to business analytics. Overall, R Shiny offers a powerful, customizable, and cost-effective solution for creating interactive dashboards and data visualizations.

Use **[R-Shiny](/2-Publishing/R-Shiny/)** to build interactive web apps straight from R. You can deploy your R Shiny dashboard by submitting a pull request to our [R-Dashboards GitHub repository](https://github.com/StatCan/R-dashboards).
Use **[R-Shiny](../R-Shiny/)** to build interactive web apps straight from R. You can deploy your R Shiny dashboard by submitting a pull request to our [R-Dashboards GitHub repository](https://github.com/StatCan/R-dashboards).

# R Shiny UI Editor

Expand Down
Loading
Loading