Skip to content

Instantly share code, notes, and snippets.

View mjwestgate's full-sized avatar

Martin Westgate mjwestgate

View GitHub Profile
@mjwestgate
mjwestgate / National_Eucalypt_Day_2021.R
Created March 23, 2021 05:28
Plot showing amount of data in ALA for E. salubris, using a colour palette extracted from images of that species
# do a plot of E. salubris for National Eucalypt Day 2021
# Note: This script requires an image to build the colour palette from.
# I used a downscaled version of the image at this link:
# https://twitter.com/DeanNicolle1/status/1374112431782301698
# First, get observations of the Eucalypt of the Year 2021 from ALA
# remotes::install_github("AtlasOfLivingAustralia/galah")
library(galah)
@mjwestgate
mjwestgate / data_provider_count_script.R
Created January 12, 2021 02:49
Plot counts of ALA data providers
## ANALYSIS OF DATA PROVIDER COUNT SUMMARIES FOR SELECTED TAXA ##
# get latest version of R package for ALA
# remotes::install_github("AtlasOfLivingAustralia/koala") # current as at 15-12-2020
library(koala)
source("data_provider_functions.R")
# task: look up largest data providers for the following groups:
# plants (kingdom plantae)
# birds (class aves)
@mjwestgate
mjwestgate / Text_Mining_Westgate_2015_ConsBiol.R
Created March 28, 2018 06:18
Worked example to duplicate analyses from Westgate et al. (2015) Conservation Biology 29(6): 1606-1614
# Worked example to use revtools (https://github.com/mjwestgate/revtools)
# to duplicate analyses from the following paper:
# MJ Westgate, PS Barton, JC Pierson & DB Lindenmayer (2015) Text analysis tools
# for identification of emerging topics and research gaps in conservation science. 
# Conservation Biology 29(6): 1606-1614. http://doi.org/10.1111/cobi.12605
# NOTE: This has code has been re-written; it is NOT the code from the original paper.
# As a result there may be bugs here not present in the published version.
# This is a preliminary upload ahead of conversion to a tutorial for revtools.
@mjwestgate
mjwestgate / Frogwatch_2015_analysis.R
Last active November 18, 2015 23:48
Code for analysing the ACT Frogwatch dataset (2002-2014)
# This script analyses data from the ACT Frogwatch program, as described by Westgate et al. (2015)
# 'Citizen science program shows urban areas have lower occurrence of frog species, but not accelerated declines'
# PLOS ONE doi: 10.1371/journal.pone.0140973
# http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0140973
# Data for these analyses is available at Dryad:
# https://datadryad.org/resource/doi:10.5061/dryad.75s51
# Below I assume that relevant datasheets are available as .csv files
# Note: Section 2 onwards requires functions written specifically for this analysis