Skip to content

Commit 0235b2e

Browse files
authored
Brand synchronization (#12)
1 parent 9bfdeea commit 0235b2e

File tree

42 files changed

+2322
-99
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2322
-99
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737

3838
- name: Render Quarto Project
3939
uses: quarto-dev/quarto-actions/render@v2
40+
env:
41+
QUARTO_PROFILE: production
4042

4143
- name: Upload static files as artifact
4244
uses: actions/upload-pages-artifact@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ index.ipynb
120120
index.md
121121
index_files/
122122
index.tex
123+
/_*.local
123124

124125
# Prevents committing locally rendered site
125126
docs

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,20 @@ explained in the [GitHub
1616
guide](https://github.com/OSGeo/grass/blob/main/doc/development/github_guide.md)
1717
written for OSGeo/grass repository, so just adjust it for this repository.
1818

19-
2019
## License
2120

22-
The content in this repository is dual-licensed under the
23-
[GNU Free Documentation License v1.2 or later](https://www.gnu.org/licenses/fdl-1.2.html)
24-
(GFDL-1.2-or-later) and the
25-
[Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
21+
The content in this repository is dual-licensed under the
22+
[GNU Free Documentation License v1.2 or later](https://www.gnu.org/licenses/fdl-1.2.html)
23+
(GFDL-1.2-or-later) and the
24+
[Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
2625
(CC-BY-SA-4.0).
2726

2827
## Acknowledgments
2928

30-
The initial content of this website was supported by funding from the
29+
The initial content of this website was supported by funding from the
3130
U.S. National Science Foundation [award 2303651](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2303651).
3231

3332
## Contact
3433

35-
For questions or suggestions, feel free to open an issue or reach out to the
34+
For questions or suggestions, feel free to open an issue or reach out to the
3635
maintainers through the [GRASS community channels](https://grass.osgeo.org/community/).

_brand.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
meta:
2+
name:
3+
full: GRASS
4+
short: GRASS
5+
link:
6+
home: https://grass.osgeo.org
7+
docs: https://grass.osgeo.org/grass-stable/manuals/
8+
description: |
9+
Bringing advanced geospatial technologies to the world
10+
founded: 1984
11+
12+
# https://posit-dev.github.io/brand-yml/brand/logo.html
13+
# https://sc.edu/about/offices_and_divisions/digital-accessibility/toolbox/best_practices/alternative_text/logo-alt-text/index.php
14+
logo:
15+
images:
16+
logo-small-no-text-light:
17+
path: ../../images/logos/small/[email protected]
18+
alt: "Small sized GRASS icon colored white with GRASS shape"
19+
logo-small-no-text-dark:
20+
path: ../../images/logos/small/[email protected]
21+
alt: "Small sized GRASS icon colored GRASS green with GRASS shape"
22+
logo-medium-no-text-light:
23+
path: ../../images/logos/medium/[email protected]
24+
alt: "Medium sized GRASS icon colored white with GRASS shape"
25+
logo-medium-no-text-dark:
26+
path: ../../images/logos/medium/[email protected]
27+
alt: "Medium sized GRASS icon colored GRASS green with GRASS shape"
28+
logo-large-no-text-light:
29+
path: ../../images/logos/large/grass-white-no-text.svg
30+
alt: "Large vector (svg) GRASS icon colored white with GRASS shape"
31+
logo-large-no-text-dark:
32+
path: ../../images/logos/large/grass-green-no-text.svg
33+
alt: "Large vector (svg) GRASS icon colored GRASS green with GRASS shape"
34+
small:
35+
light: logo-small-no-text-light
36+
dark: logo-small-no-text-dark
37+
medium:
38+
light: logo-medium-no-text-light
39+
dark: logo-medium-no-text-dark
40+
large:
41+
light: logo-large-no-text-light
42+
dark: logo-large-no-text-dark
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"hash": "924be59cc65ec1d83de0079693abb610",
3+
"result": {
4+
"engine": "jupyter",
5+
"markdown": "---\ntitle: GRASS Quarto Design Guide\ndescription: Adopted from Quarto Documentatoin\nauthor:\n - name: Corey White\n - name: Sarah White\ndate: May 5, 2025\ndate-modified: today\nformat: \n html:\n other-links:\n - text: GRASS Website\n href: \"{{< var grass.website >}}\"\n code-links:\n - text: Data Import Code\n icon: file-code\n href: data-import.py\n notebook-links: inline\n code-tools: true\n code-copy: true\n code-fold: true\n code-summary: \"Show the code\"\nprofile: local\ntoc: true\ntoc-depth: 3\nlisting: \n - id: lab-reports\n contents: \"*.qmd\"\n type: table\n - id: meeting-notes\n contents: \"*.qmd\"\n type: grid\n - id: default-notes\n contents: \"*.qmd\"\n type: default\ncitation:\n type: article-journal\n container-title: ACM Transactions on Embedded Computing Systems\n volume: 21\n issue: 2\n issued: 2022-03\n issn: 1539-9087\n doi: 10.1145/3514174\nexecute:\n eval: false\n echo: true\n output: false\n\n\n---\n\n# Components Showcase\n\nThis document demonstrates various components available in Quarto.\n\n## Headings\n\n# Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6\n\n## Text Formatting\n\n**Bold Text** \n*Italic Text* \n~~Strikethrough~~ \n`Inline Code`\n\nsuperscript^2^ / subscript~2~\n\n## Lists\n\n### Ordered List\n1. First item\n2. Second item\n3. Third item\n\n### Unordered List\n- Item 1\n- Item 2\n- Item 3\n\n* unordered list\n + sub-item 1\n + sub-item 2\n - sub-sub-item 1\n\n* item 2\n\n Continued (indent 4 spaces)\n\n(@) A list whose numbering\n\ncontinues after\n\n(@) an interruption\n\n### Tasks\n\n- [ ] Task 1\n- [x] Task 2\n\n## Blockquotes\n\n### `>` Blockquote\n\n> This is a blockquote. \n> It can span multiple lines.\n\n### Line Block\n\n| Line Block\n| Spaces and newlines\n| are preserved\n\n## Footnotes\n\nHere is a footnote reference,[^1] and another.[^longnote]\n\n[^1]: Here is the footnote.\n\n[^longnote]: Here's one with multiple blocks.\n\n Subsequent paragraphs are indented to show that they\nbelong to the previous footnote.\n\n { some.code }\n\n The whole paragraph can be indented, or just the first\n line. In this way, multi-paragraph footnotes work like\n multi-paragraph list items.\n\nThis paragraph won't be part of the note, because it\nisn't indented.\n\nHere is an inline note.^[Inlines notes are easier to write,\nsince you don't have to pick an identifier and move down to\ntype the note.]\n\n## Tables\n\n### Default\n\n| Header 1 | Header 2 | Header 3 |\n|----------|----------|----------|\n| Row 1 | Data 1 | Data 2 |\n| Row 2 | Data 3 | Data 4 |\n\n```md\n| Header 1 | Header 2 | Header 3 |\n|----------|----------|----------|\n| Row 1 | Data 1 | Data 2 |\n| Row 2 | Data 3 | Data 4 |\n```\n\n### Column Aligned\n\n| Default | Left | Right | Center |\n|---------|:-----|------:|:------:|\n| 12 | 12 | 12 | 12 |\n| 123 | 123 | 123 | 123 |\n| 1 | 1 | 1 | 1 |\n\n```{md}\n| Default | Left | Right | Center |\n|---------|:-----|------:|:------:|\n| 12 | 12 | 12 | 12 |\n| 123 | 123 | 123 | 123 |\n| 1 | 1 | 1 | 1 |\n```\n\n### Pipe Format\n\nfruit| price\n-----|-----:\napple|2.05\npear|1.37\norange|3.09\n\n: Demonstration of pipe table syntax\n\n### Pipe Format Striped\n\n| fruit | price |\n|--------|--------|\n| apple | 2.05 |\n| pear | 1.37 |\n| orange | 3.09 |\n\n: Fruit prices {.striped .hover}\n\n### Pipe Format Custom Col widths\n\n| fruit | price |\n|--------|--------|\n| apple | 2.05 |\n| pear | 1.37 |\n| orange | 3.09 |\n\n: Fruit prices {tbl-colwidths=\"[75,25]\"}\n\n### Grid Table\n\n+-----------+-----------+--------------------+\n| Fruit | Price | Advantages |\n+===========+===========+====================+\n| Bananas | $1.34 | - built-in wrapper |\n| | | - bright color |\n+-----------+-----------+--------------------+\n| Oranges | $2.10 | - cures scurvy |\n| | | - tasty |\n+-----------+-----------+--------------------+\n\n: Sample grid table.\n\n## Cross Reference\n\n| Col1 | Col2 | Col3 |\n|------|------|------|\n| A | B | C |\n| E | F | G |\n| A | G | G |\n\n: My Caption {#tbl-letters}\n\nSee @tbl-letters.\n\n### Subtables\n\n::: {#tbl-panel layout-ncol=2}\n| Col1 | Col2 | Col3 |\n|------|------|------|\n| A | B | C |\n| E | F | G |\n| A | G | G |\n\n: First Table {#tbl-first}\n\n| Col1 | Col2 | Col3 |\n|------|------|------|\n| A | B | C |\n| E | F | G |\n| A | G | G |\n\n: Second Table {#tbl-second}\n\nMain Caption\n:::\n\nSee @tbl-panel for details, especially @tbl-second.\n\n## Links & Images\n\n[GRASS Website]({{< var grass.website >}})\n\n{{< var grass.website >}}\n\n## Images\n\n![Width 25%]({{< var grass.logos.horizontal.gradient >}}){width=25%}\n\n![Width 50%]({{< var grass.logos.horizontal.gradient >}}){width=50%}\n\n![Width 75%]({{< var grass.logos.horizontal.gradient >}}){width=75%}\n\n![Width 100%]({{< var grass.logos.horizontal.gradient >}}){width=100%}\n\n### Image Link\n\n[![Caption]({{< var grass.logos.gradient >}}){width=20%}]({{< var grass.website >}})\n\n[![Caption]({{< var grass.logos.gradient >}} \"Alt text\"){width=20%}]({{< var grass.website >}})\n\n### Aligned Images\n\n![Aligned Left]({{< var grass.logos.gradient >}} \"Alt text\"){width=20% fig-align=\"left\"}\n![Aligned Right]({{< var grass.logos.gradient >}} \"Alt text\"){width=20% fig-align=\"right\"}\n\n### Lightbox\n![Lightbox]({{< var grass.logos.gradient >}} \"Alt text\"){width=20% fig-align=\"center\" .lightbox}\n\n### Placeholders\n\n{{< placeholder 400 200 format=svg >}}\n\n## Brand\n\nUsing `{{< brand logo small light >}}` from the `_brand.yml` file.\n\n### Logo small light\n{{< brand logo small light >}}\n\n<!-- #### Logo medium dark\n{{< brand logo medium light >}} -->\n\n## Callouts\n\nNote that there are five types of callouts, including: \n`note`, `tip`, `warning`, `caution`, and `important`.\n\n\n### Note\n\n::: {.callout-note}\nThis is a note callout.\n:::\n\n### Warning\n\n::: {.callout-warning}\nThis is a warning callout.\n:::\n\n### Tip\n\n::: {.callout-tip}\nThis is a warning callout.\n:::\n\n### Important\n\n::: {.callout-important}\nThis is a warning callout.\n:::\n\n### Caution\n\n::: {.callout-caution collapse=\"true\"}\n## Expand To Learn About Collapse\nThis is a caution callout.\n:::\n\n## Math\n\n### Inline\nInline math: $E = mc^2$\n\n### Block\n\nBlock math: \n$$\n\\int_a^b f(x) dx = F(b) - F(a)\n$$\n\n### TeX Macro\n::: {.hidden}\n$$\n \\def\\RR{{\\bf R}}\n \\def\\bold#1{{\\bf #1}}\n$$\n:::\n\n## Buttons\n\n[Primary](#){.btn .btn-primary .btn role=\"button\"}\n[Secondary](#){.btn .btn-secondary .btn role=\"button\"}\n[Donate](#){.btn .btn-primary .gs-support-button .btn role=\"button\"}\n\n[Primary Outline](#){.btn .btn-outline-primary .btn role=\"button\"}\n[Secondary Outline](#){.btn .btn-outline-primary .btn role=\"button\"}\n\n## Alerts\n\n::: {.alert .alert-success}\nThis is a success alert.\n:::\n\n::: {.alert .alert-danger}\nThis is a danger alert.\n:::\n\n## Code Blocks with Syntax Highlighting\n\n### Default\n\n```default\ncode\n```\n\n### Python\n```python\n# Comment\nimport sys\nimport subprocess\n\nsys.path.append(\n subprocess.check_output([\"grass\", \"--config\", \"python_path\"], text=True).strip()\n)\n\nimport grass.script as gs\nimport grass.jupyter as gj\n```\n\n### Terminal\n```bash\ngrass \"~/grassdata/\" --exec script.py \n```\n\n### R\n```r\nlibrary(rgrass)\n\nsession <- initGRASS(gisBase = \"/usr/lib/grass84\", # where grass binaries live, `grass --config path`\n gisDbase = \"/home/user/grassdata\", # path to grass database or folder where your project lives\n location = \"nc_basic_spm_grass7\", # existing project name\n mapset = \"PERMANENT\" # mapset name\n )\n\n```\n\n### Raw Content\n\n```{=html}\n<iframe src=\"https://grass.osgeo.org/\" width=\"500\" height=\"400\"></iframe>\n```\n\n## Diagrams\n\n### Flowchart\n```{mermaid}\nflowchart LR\n A[Hard edge] --> B(Round edge)\n B --> C{Decision}\n C --> D[Result one]\n C --> E[Result two]\n```\n\n### Sequence Diagram\n```{mermaid}\nsequenceDiagram\n participant Alice\n participant Bob\n Alice->>John: Hello John, how are you?\n loop Healthcheck\n John->>John: Fight against hypochondria\n end\n Note right of John: Rational thoughts <br/>prevail!\n John-->>Alice: Great!\n John->>Bob: How about you?\n Bob-->>John: Jolly good!\n```\n\n### Dot\n\n```{dot}\ngraph G {\n layout=neato\n run -- intr;\n intr -- runbl;\n runbl -- run;\n run -- kernel;\n kernel -- zombie;\n kernel -- sleep;\n kernel -- runmem;\n sleep -- swap;\n swap -- runswap;\n runswap -- new;\n runswap -- runmem;\n new -- runmem;\n sleep -- runmem;\n}\n```\n\n## Videos\n\n{{< video https://www.youtube.com/embed/zboP3Z7VBuU >}}\n\n## Page Break\n\npage 1\n\n{{< pagebreak >}}\n\npage 2\n\n## Divs & Spans\n\n### Boarder\n\n::: {.border}\nThis content can be styled with a border\n:::\n\n### Sidebar\n\n::::: {#special .sidebar}\n\n::: {.warning}\nHere is a warning.\n:::\n\nMore content.\n:::::\n\n### Spans\n\n[This is *some text*]{.class key=\"val\"}\n\n\n<span class=\"custom-span\">This is a custom span.</span>\n\n## Listing\n\n### Table\n\n:::{#lab-reports}\n:::\n\n### Grid\n\n:::{#meeting-notes}\n:::\n\n### Default\n:::{#default-notes}\n:::\n\n## Layout\n\n### Column Full screen inset\n::: {.column-screen-inset}\n![A full screen image](images/LinkedIn-Post-Image.png)\n:::\n\n### Column Full screen shaded inset\n::: {.column-shaded-screen-inset}\n![A full screen image](images/LinkedIn-Post-Image.png)\n:::\n\n### Column Margin\n::: {.column-margin}\n![A image in the margin](images/LinkedIn-Post-Image.png)\n:::\n\n## Lipsum\n\n### Single Paragraph\n{{< lipsum 1 >}}\n\n### Multi Paragraph\n{{< lipsum 2 random=true >}}\n\n",
6+
"supporting": [
7+
"styling_files"
8+
],
9+
"filters": [],
10+
"includes": {}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"hash": "7c6836e62a1583bd1a107417cd6a1726",
3+
"result": {
4+
"engine": "jupyter",
5+
"markdown": "---\ntitle: \"Get started with GRASS in Jupyter Notebooks on Windows\"\nauthor: \"Caitlin Haedrich\"\ndate: 2024-06-15\nimage: images/getting_started_grass_jupyternotebook.png\ndate-modified: today\nformat:\n html:\n toc: true\n code-tools: true\n code-copy: true\n code-fold: false\ncategories: [Python, Windows, beginner]\ndescription: Learn how to run GRASS in Jupyter Notebooks on Windows.\nengine: jupyter\nexecute:\n eval: false\njupyter: python3\n---\n\n\nThe development of the Python package `grass.jupyter`, has streamlined the use \nof GRASS is Jupyter notebooks. In this tutorial we will demonstrate the \nrecommended way of running GRASS in Jupyter Notebooks for Windows users.\n\n## Set Up\n\nOn Windows, we'll use the OSGeo4W package manager to setup and update GRASS,\nJupyterlab and other dependencies. Follow the directions below to setup Jupyter \nand GRASS in Windows.\n\n#### 1. Download the OSGeo4W Network Installer\n\nDownload the OSGeo4W network install from [here](https://trac.osgeo.org/osgeo4w/). \nOpen it and select _\"Advanced Install\"_.\n\n#### 2. Install GRASS, Jupyterlab and `grass.jupyter` dependencies\n\nFollow the prompts until you get to the _\"Select Packages\"_ window (the defaults\nare fine for most situations). Use the Search bar to find and select the \nfollowing packages for install (switching from \"Skip\" to the version number):\n\n* `grass`\n* `python3-jupyterlab`\n* `python3-ipywidgets`\n\n![Install GRASS with OSGeo4W installer](images/osgeo4w_install_grass.png){width=60%}\n\n#### 3. Go make a cup of tea\n\nIt may take a minute to install... Click \"Finish\" and exit when it finishes.\n\n#### 4. Open the OSGeo4W Shell and install folium\n\nLaunch the OSGeo4W Shell and install folium with:\n\n`pip install folium`\n\n#### 5. Launch Jupyter Lab\n\nWe're ready to launch jupyterlab now: \n\n`jupyter lab`\n\n\nThis should launch Jupyter lab in your default web browser. Use the left side\npanel to navigate to the notebook you wish to run and you're ready to go!\n\n#### 6. Launching Jupyter Lab in the Future\n\nTo launch Jupyter Lab in the future:\n\n1. Open the OSGeo4W Shell\n2. Launch jupyter lab with `jupyter lab`\n\n\n## Start GRASS within Jupyter\n\nNow, we're ready to code! Let's import the GRASS Python packages and launch\nGRASS. If you want to run this tutorial, please download and unzip the \nNorth Carolina [sample dataset](https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_grass7.zip).\n\n::: {#b243f45c .cell execution_count=1}\n``` {.python .cell-code}\n# Import standard python packages\nimport sys\nimport subprocess\n\n# Ask GRASS where its Python packages are and add them to the path\ngrass_call = \"grass83\"\nsys.path.append(\n subprocess.check_output([grass_call, \"--config\", \"python_path\"], text=True, shell=True).strip()\n)\n\n# Import the GRASS python packages we need\nimport grass.script as gs\nimport grass.jupyter as gj\n\n# Launch a GRASS session.\ngj.init(\"path/to/nc_spm_08_grass/user1\");\n```\n:::\n\n\n## Using GRASS\n\nNow that we have GRASS running in our notebook, let's try some basic \ncommands. \n\nIn this section, we will set the color table to the `elevation` raster map from\nthe GRASS sample project we downloaded and then display it. \n\n::: {#b23efd61 .cell execution_count=2}\n``` {.python .cell-code}\n# Set the computational region to the study area\ngs.parse_command(\"g.region\", \n raster=\"elevation\", \n flags='pg')\n\n# Set colors for elevation raster\ngs.run_command(\"r.colors\", \n map=\"elevation\", \n color=\"elevation\")\n```\n:::\n\n\n::: {#0d9685ac .cell execution_count=3}\n``` {.python .cell-code}\n# Create Map instance\nimg = gj.Map()\n# Add a raster\nimg.d_rast(map=\"elevation\")\n# Add legend\nimg.d_legend(raster=\"elevation\", at=(55, 95, 80, 84), flags=\"b\")\n# Display map\nimg.show()\n```\n:::\n\n\nNow, we're up and running! Have a look at other tutorials for inspiration on \nthe avenues you can follow with GRASS tools combined with other Python packages. \n\n## Troubleshooting\n\nSomething not working? Here are some common stumbling blocks...\n\n* `FileNotFoundError`\n\n::: {#57d8a58f .cell execution_count=4}\n``` {.python .cell-code}\nFileNotFoundError: [WinError 2] The system cannot find the file specified\n```\n:::\n\n\nCheck the `shell` parameter in the `subprocess.check_output()`. On Windows, \nthis should be `shell=True`. On Mac and Linux operating systems, this should \nbe `shell=False`.\n\n* `CalledProcessError`\n\n::: {#812330be .cell execution_count=5}\n``` {.python .cell-code}\nCalledProcessError: Command '['grass83', '--config', 'python_path']' returned non-zero exit status 1.\n```\n:::\n\n\nCheck which version of GRASS you have installed. On Windows, the `grass_call`\nshould be `grass` followed by the first two digits of the version you have \ninstalled (for example, GRASS 8.4 would be called with `grass84`). On Mac and \nLinux, it should be just `grass`.\n\n* Errors from `gj.init()`\n\nThis command takes several different configurations of the GRASS project \nand mapset location on your system. All the following are examples that work:\n\n```\ngj.init(\"path/to/grassdata\", \"project_name\", \"mapset_name\")\ngj.init(\"path/to/project_name/mapset_name\")\ngj.init(\"../project_name/mapset_name\")\n```\n\nAlso pay attention to the slash direction. Windows uses `\\` in it's file \npaths but the `\\` character in strings is also for escaping characters (for\nexample, putting `\\n` in a string will print a new line). Therefore, you'll \nneed to either switch to forward slashes (`/`) or put double back-slashes \n(`\\\\`).\n\n",
6+
"supporting": [
7+
"JupyterOnWindows_OSGeo4W_Tutorial_files"
8+
],
9+
"filters": [],
10+
"includes": {}
11+
}
12+
}

0 commit comments

Comments
 (0)