This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| Compress pdf document using ghostscript | |
| """ | |
| __author__ = "Brendan Harmon" | |
| __copyright__ = '2025' | |
| __email__ = "[email protected]" | |
| __license__ = "MIT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import numpy as np | |
| import pandas as pd | |
| import seaborn as sns | |
| import seaborn.objects as so | |
| # Set theme | |
| sns.set_theme( | |
| context="paper", | |
| style="darkgrid" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import numpy as np | |
| import seaborn as sns | |
| # Set theme | |
| sns.set_theme( | |
| context="paper", | |
| style="darkgrid" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import grass.script as gs | |
| from grass.script import array as garray | |
| import numpy as np | |
| # Set region | |
| n = 200 | |
| e = 800 | |
| s = 0 | |
| w = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import os | |
| import sys | |
| import subprocess | |
| from pathlib import Path | |
| import urllib.request | |
| from zipfile import ZipFile | |
| # Find GRASS Python packages | |
| sys.path.append( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import os | |
| import sys | |
| import subprocess | |
| from pathlib import Path | |
| # Find GRASS Python packages | |
| sys.path.append( | |
| subprocess.check_output( | |
| ["grass", "--config", "python_path"], |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Visualize | |
| m = gj.Map(width=800) | |
| m.d_rast(map="raster") | |
| m.d_legend( | |
| raster="raster", | |
| font="FiraSans-Regular", | |
| fontsize=10, | |
| color="white", | |
| at=(5, 95, 1, 3) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Visualize in 3D | |
| map3d = gj.Map3D(width=800, height=200) | |
| map3d.render( | |
| elevation_map="elevation", | |
| zexag=1, | |
| height=2000, | |
| perspective=6, | |
| position=[0.5,0.25], | |
| bgcolor=[17, 17, 17] | |
| ) |