Skip to content

Instantly share code, notes, and snippets.

View GMoncrieff's full-sized avatar
🌱

Glenn Moncrieff GMoncrieff

🌱
View GitHub Profile
@GMoncrieff
GMoncrieff / how_i_work.md
Last active April 27, 2024 10:46
How I do ML with geospatial data

How I do machine learning with geospatial data

I have a couple of AI/ML projects related to mapping things, often conservation related, with remote sensing data. Some details and packages will vary, but the process below describes how I generally approach these types of problems. Some of these tools I have only touched briefly, but I like them, and this is more an outline of how I would like to approach a new project than a retrospective look at my previous work.

We use AWS, so it makes sense to use datasets and services that are already hosted on AWS. The data discovery and loading part of this process would look somewhat different if we were using Azure and Planetary Computer, and very different if we were using GCP and Earth Engine.

Compute

All of my analysis will be done using python on an AWS VM in the same region as my data on S3, Probably using VSCode on Sagemaker or [JupyterLab](https://docs.aws.amazo

@GMoncrieff
GMoncrieff / README.md
Created April 14, 2023 08:53 — forked from clhenrick/README.md
PostgreSQL & PostGIS cheatsheet (a work in progress)
@GMoncrieff
GMoncrieff / xarray_label_and_extract.py
Created October 6, 2022 15:03
Utility functions for data extraction in multidimensional arrays with non-rectilinear grids
import xoak
import xarray as xr
import numpy as np
import pandas as pd
def select_points(data: xr.Dataset,
xc: str, yc: str,
xdat: np.array, ydat: np.array,
name: str = "points") -> xr.Dataset: