Skip to content

Instantly share code, notes, and snippets.

View bennyistanto's full-sized avatar

Benny Istanto bennyistanto

View GitHub Profile
@bennyistanto
bennyistanto / xkcd_idn_map.md
Last active May 28, 2024 02:33
Custom xkcd-style map for Indonesia

Custom xkcd-style map for Indonesia

Label setting for capital, country name and the ocean, and the red-dot is manually set, the value is calculate from top-left main map area.

You can paste the below code into an online Python compiler like https://python-fiddle.com/ and grab the result instantly.

map_idn_xkcd_style

@bennyistanto
bennyistanto / xkcd_countrymap.md
Last active May 26, 2024 12:47
xkcd style for country map

xkcd style for country map

This is example of Python script that could generate a xkcd-style for Country Map.

Example:

map_indonesia_xkcd_style

map_philippines_xkcd_style

@bennyistanto
bennyistanto / xkcd_lseqm.md
Last active May 23, 2024 06:21
Graph illustrating the linear scaling and empirical quantile mapping (LSEQM) method for daily precipitation bias correction.

xkcd style for LSEQM illustration

This is example of Python script that could generate a xkcd graph-style to illustrate concept of Linear Scaling and Empirical Quantile Mapping (LSEQM) method for daily precipitation bias correction.

version a

lseqm_xkcd_style_a

version b

@bennyistanto
bennyistanto / ipb_en.csl
Last active May 21, 2024 06:44
IPB Pedoman Penulisan Karya Ilmiah Edisi ke-4 (PPKI) style - English version
<?xml version="1.0" encoding="utf-8"?>
<!-- Modified by: Benny Istanto/KLI/G2501222008, bennyistanto@apps.ipb.ac.id -->
<!-- English version available on: https://gist.github.com/bennyistanto/ef6b1a2bb1ed303a7832f789ac7e7a70 -->
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<!-- changed default-locale to en-US -->
<info>
<title>Institut Pertanian Bogor: Pedoman Penulisan Karya Ilmiah Edisi ke-4 (English)</title>
<!-- updated title -->
<title-short>IPB PPKI 4</title-short>
<id>http://www.zotero.org/styles/institut-pertanian-bogor</id>
@bennyistanto
bennyistanto / Skip_PEARSON_fitting_on_climate-indices_python_package.md
Last active May 6, 2024 17:00
Skip PEARSON fitting on `climate-indices` python package

Skip PEARSON fitting on climate-indices python package

I have been using climate-indices python packages years ago, and the tool developed by James Adam is awesome, it help us to calculate various climate indices. There are two indices that I frequently produced using this tool: SPI and SPEI.

I also wrote a guideline on how to calculate these two indices using this package https://bennyistanto.github.io/spi/.

When I wrote this guideline, I never have any problem during the indices calculation. Then I noticed some people contacted me to ask about some error related to Pearson fitted also in the Github repository there are lot of [Issues](https://github.com/monocongo/climate_indices/issues?q=is%3A

@bennyistanto
bennyistanto / Install_CUDA_and_cuDNN_using_conda.md
Last active May 15, 2024 12:27
Install CUDA and cuDNN using Conda

Install CUDA and cuDNN using Conda

Tested on:

Windows 11 Pro for Workstations and WSL2 Debian 12
Processor: Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz 2.00 GHz (2 processors)
Installed RAM: 384 GB
VGA: NVIDIA Quadro P2000 5GB


@bennyistanto
bennyistanto / zonal_statistics_categorical_landcover.ipynb
Created March 19, 2024 06:05
Zonal Statistics Categorical (Zonal Histogram) for ESA CCI Landcover
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bennyistanto
bennyistanto / 13_mxd13q1_viproducts_annual.py
Created March 13, 2024 08:27
Generate derivative product from Vegetation Indices - annual timeseries
# -*- coding: utf-8 -*-
"""
NAME
13_mxd13q1_viproducts_annual.py
Generate derivative product from Vegetation Indices
DESCRIPTION
Input data for this script will use MXD13Q1 annual data generate by 06_mxd13q1_8day2annual.py
This script can do calculation for ratio, difference, standardize anomaly
and vegetation condition index.
The calculation required timeseries VI and the long-term statistics (min, mean, max, std)
@bennyistanto
bennyistanto / 12_mxd13q1_viproducts_quarter.py
Created March 13, 2024 08:26
Generate derivative product from Vegetation Indices - quarterly timeseries
# -*- coding: utf-8 -*-
"""
NAME
12_mxd13q1_viproducts_quarter.py
Generate derivative product from Vegetation Indices
DESCRIPTION
Input data for this script will use MXD13Q1 quarterly data generate by 05_mxd13q1_8day2quarter.py
from NASA. This script can do calculation for ratio, difference, standardize anomaly
and vegetation condition index.
The calculation required timeseries VI and the long-term statistics (min, mean, max, std)
@bennyistanto
bennyistanto / 11_mxd13q1_viproducts_monthly.py
Created March 13, 2024 08:22
Generate derivative product from Vegetation Indices - monthly timeseries
# -*- coding: utf-8 -*-
"""
NAME
11_mxd13q1_viproducts_monthly.py
Generate derivative product from Vegetation Indices
DESCRIPTION
Input data for this script will use MXD13Q1 monthly data generate by 04_mxd13q1_8day2monthly.py
This script can do calculation for ratio, difference, standardize anomaly
and vegetation condition index.
The calculation required timeseries VI and the long-term statistics (min, mean, max, std)