View plotCovidRiskGraph.py
This file contains 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
# Antti Lipponen, 18 December 2021 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.ndimage import zoom | |
import seaborn as sns | |
from matplotlib import rcParams | |
from matplotlib.colors import Normalize | |
import matplotlib as mpl | |
from matplotlib.colors import ListedColormap | |
import matplotlib.patheffects as PathEffects |
View Tdata.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 143 columns, instead of 43. in line 1.
This file contains 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
Country,ISOA3,Continent,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019 | |
"Afghanistan","AFG","Asia",-0.325,-0.160,-0.814,-0.773,-0.971,-1.133,-1.123,-0.478,0.088,-0.679,-0.617,-1.107,-0.323,-0.914,-1.006,-0.286,-0.299,-0.759,-0.959,0.192,-0.560,-0.291,0.206,-1.049,-0.403,-0.859,-0.386,-0.973,-0.615,-0.069,-0.620,-0.842,-0.251,-0.432,0.256,0.886,-0.614,-0.067,-0.513,-0.38 |
View makeSnowdepthFig.py
This file contains 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
""" | |
Snow depth figure | |
version 6 April 2018 | |
by Antti Lipponen | |
Copyright (c) 2018 Antti Lipponen | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including |
View readWriteNetCDF.py
This file contains 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
""" | |
DEMO TO WRITE AND READ NETCDF FILES | |
version 27 March 2018 | |
by Antti Lipponen | |
Copyright (c) 2018 Antti Lipponen | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including |
View runZonalTempViz.py
This file contains 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
# | |
# Hi all, | |
# this is the Python code I used to make the visualization | |
# "Temperature anomalies, zonal means, 1900 - 2016" | |
# (https://twitter.com/anttilip/status/921809347658895361). | |
# Please be aware that originally I wrote this just to see how this type | |
# of visualization would work. The code was not ment to be published | |
# and therefore has only a couple of/no comments and is most likely | |
# not written in the most optimal way. | |
# |
View oceanTemperatureAnomalies.py
This file contains 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
# | |
# Hi, | |
# this is the Python code I used to make the sea surface temperature anomaly | |
# visualization https://twitter.com/anttilip/status/899005930141921280. | |
# This is a version in which the AREA of the circle represents the temperature | |
# anomaly (not radius). | |
# The data is included in this file but I plan to write some kind of tutorial | |
# in the near future how the average temperatures were computed (using GDAL | |
# and suitable masks). | |
# Feel free to improve, modify, do whatever you want with this code. If you decide |
View temperatureCircle.py
This file contains 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
# | |
# Hi all, | |
# this is the Python code I used to make the visualization "Temperature circle" | |
# (https://twitter.com/anttilip/status/892318734244884480). | |
# Please be aware that originally I wrote this for my tests only so the | |
# code was not ment to be published and is a mess and has no comments. | |
# Feel free to improve, modify, do whatever you want with it. If you decide | |
# to use the code, make an improved version of it, or it is useful for you | |
# in some another way I would be happy to know about it. You can contact me | |
# for example in Twitter (@anttilip). Unchecked demo data (no quarantees) |
View solarzenithazimuthdemo.py
This file contains 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
""" | |
DEMO TO COMPUTE SOLAR ZENITH ANGLE | |
version 6 April 2017 | |
by Antti Lipponen | |
Copyright (c) 2017 Antti Lipponen | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including |
View SentinelChangeTest.sh
This file contains 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
#!/bin/bash | |
# | |
# A quick test script for analyzing changes in Sentinel-2 R, G, and B bands | |
# Made by Antti Lipponen (Twitter @anttilip) | |
# 12 February 2017 | |
# | |
# keywords: satellite, Sentinel-2, remote sensing, data processing, gdal, imagemagick | |
# | |
######################## |
View spatialresolution.sh
This file contains 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
#!/bin/bash | |
# | |
# Script for generating spatial resolution test images | |
# Made by Antti Lipponen (Twitter @anttilip) | |
# | |
# | |
# Imagemagick and gdal used for processing | |
# | |
# | |
# Test cases: |
NewerOlder