This file contains hidden or 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
print("Hello!") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
brew tap osgeo/osgeo4mac | |
brew install gdal2 | |
## Put in the PATH | |
echo 'export PATH=$(brew --prefix)/opt/gdal2/bin:$(brew --prefix)/bin:$PATH' >> ~/.bash_profile |
This file contains hidden or 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
# From Bob Rudis (@hrbmstr): https://rud.is/b/2015/10/22/installing-r-on-os-x-100-homebrew-edition/ | |
brew tap caskroom/cask | |
brew install brew-cask | |
brew install Caskroom/cask/xquartz | |
brew cask install java | |
brew tap homebrew/science | |
brew install R --with-openblas # added --with-openblas based on a spiffy comment by Lincoln Mullen | |
This file contains hidden or 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
Install Python (Anaconda is easiest) | |
As explained here: https://pythongisandstuff.wordpress.com/2016/04/13/installing-gdal-ogr-for-python-on-windows/, | |
download the compiled GDAL from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal | |
Then: | |
$ pip install GDAL-blah-blah.whl | |
If fiona (https://github.com/Toblerity/Fiona) is required, download it from http://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona and install it the same way. |
This file contains hidden or 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
### Usage: | |
# Copy this file into the directory containing the files, | |
# open a terminal/cmd prompt in that directory, and type: | |
# python move_files.py | |
import os | |
question = "Would you like to move all of the files in '" + os.getcwd() + "' into subfolders? (y/n)" | |
answer = raw_input(question) |
This file contains hidden or 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
library(xml2) | |
bc_dir <- read_xml("http://dir.gov.bc.ca/downloads/BCGOV_directory.xml") | |
find_person <- function(nm) { | |
search_string <- sprintf("//d1:PERSON/d1:NAME[contains(text(), \"%s\")]", nm) | |
matches <- xml_find_all(bc_dir, search_string) | |
if (length(matches) == 0) { | |
message("No matches found") |
This file contains hidden or 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
# http://api.bcdevexchange.org/api-console.html?swaggerUrl=https://raw.githubusercontent.com/bcgov/api-specs/master/geocoder/geocoder.json#/ | |
library(httr) | |
base_url <- function() "http://apps.gov.bc.ca/pub/geocoder" | |
endpoint <- "addresses" | |
format <- "json" |
This file contains hidden or 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
brew unlink gdal | |
brew tap osgeo/osgeo4mac && brew tap --repair | |
brew install gdal2 --with-armadillo \ | |
--with-complete --with-libkml --with-unsupported | |
brew link --force gdal2 | |
# Verify |