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(gganimate) | |
library(magick) | |
library(scales) | |
library(sf) | |
library(tidyverse) | |
# Importing the India states shapefile into a simple feature, and reducing | |
# number of vertices for quick screen drawing | |
india = st_read("India/States.shp") %>% |
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
# MD Madhusudan, [email protected], Nature Conservation Foundation, 2017-03-02 | |
# Creates a subset of eBird data (.txt, after download and unzipping archive) that fall within a particular region of interest whose vertices are specified (see Arguments section below for how the vertices are to be specified) | |
eBirdData_SpatialSubset <- function(eBirdDataFileFullPath, AoIVertices, ReturnSpatialObject=FALSE){ | |
# ARGUMENTS | |
# eBirdDataFileFullPath: must be a full path to the filename, and placed within quotes | |
# AoIVertices: vertices of a POLYGON describing the area of interest in the form | |
# "76 12, 77 12, 77 13, 76 13, 76 12", where each comma-separated pair of | |
# values represents the longitude-latitude coordinates of each vertex. NOTE |
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
# MD Madhusudan, [email protected], Nature Conservation Foundation, 2016-04-10 | |
# Code to import waypoints from multiple GPX files in a folder, | |
# extract coordinates from each file into a single object, and | |
# export to CSV or some other format | |
# | |
# - initialisation steps | |
library(plotKML) | |
library(dplyr) | |
# Set working directory to folder where all the GPX Waypoint files are present |