Skip to content

Instantly share code, notes, and snippets.

View williamlai2's full-sized avatar

William Lai williamlai2

View GitHub Profile
@alexfriant
alexfriant / set_global_layer_transparency.py
Created January 6, 2016 20:46
Change the transparency levels on all layers inside of your current ArcMap MXD document in one fell swoop!
##################################################################################################################
#
# Requirements: You'll need ArcGIS Desktop 10.1 or higher with Python 2.7+
#
# If you want to change Transparency for all the layers in your ArcMap MXD quickly, this will do the trick.
#
# 1. Copy / Paste the initial commands and function definitions below into an MXD's Python command shell, one-by-one
# 2. Use the command "setLayerTransparenciesTo(75)" to change every transparency to 75, or whatever you want
# (As a side note, notice that the Group Layers are set to 0 transparency. Play with this if you want!)
#
@DavZim
DavZim / map_projections.R
Created January 20, 2021 10:37
Creates a gif of the world in different map projections
library(tidyverse)
library(sf)
library(spData)
library(gganimate)
data(world)
# see also: https://proj.org/operations/projections/index.html
projs <- list(
"Mercator" = "+proj=merc",
@jimjam-slam
jimjam-slam / query.r
Last active November 2, 2022 21:53
Get ASGS geometry from ABS ArcGIS REST API #experiments
library(sf)
library(httr2)
library(ggplot2)
# based on https://community.esri.com/t5/gis-blog/
# accessing-arcgis-rest-services-using-r/ba-p/898451
api_query <- url_parse("https://geo.abs.gov.au")
api_root <- "/arcgis/rest/services"