Fun with Python for Geodata

Personal practices in geodata analysis with python.

1. Data Visulization

2. Automation

3. geopyfsn

1. Data Visulization

1.1 covid-19 and Benford’s law

Benford’s law is an interesting theory so I did some experiment with covid-19 data. It’s out of my specialization so there’s no gurantee in the accuracy and quality of this analysis. Be doubtful and just for fun. Here the screenshot is confirmed cases from three countries that I had lived.

Note: After made the first test in April, I later found a correspondence article that support my assumption in May. (Sambridge, M. and Jackson, A., 2020. National COVID numbers-Benford’s law looks for errors. Nature, 581(7809), pp.384-384. doi: 10.1038/d41586-020-01565-5).

1.2 data visualization exercise

Open In Colab

Scripts (part1) or jupyter notebooks for processing, visualizing and analyzing data.Some are exported as interactive html files in dataVisualization folder or for preview in the links given.

The raw ipynb file contains contents of custom JavaScript plots will be rendered as static html (see GitHub help), same for exported html files.

Interactive figures or maps for:

1.2.1 Global Annual Temperature Anomaly Interactive scatter plots with lowess trendlines

1.2.3 Time series plots

python4

1.2.4 Mapping the World

1.3 Raster Data Visualization

Open In Colab

1.3.1 Interactive DEM viewer

rapid flood spreading method (RFSM) practice

2. Automation

2.1 EarthdataDownload.py

This is used to bulk download data from earthdata.nasa.gov. Input required is the link list.

2.2 mosaic.py

This is practice to do mosaic and subset by roi for geotiff data. The process is done with rasterio library.

3. geopyfsn

This is a collection of some functions used for myself.

import rasterio 
from geopyfsn import getxy

src = rasterio.open('image.tif')
x, y = getxy(src)

###