Skip to content

Instantly share code, notes, and snippets.

library(tidyverse)
library(tigris)
library(maptools)
library(rgeos)
library(leaflet)
# Number of Hexagons
n_hex <- 3300
# Get state map
@dKvale
dKvale / EC2_web_server.md
Last active February 22, 2024 08:01
Quick setup for hosting a static website on Amazon EC2 server.

Github pages -> Amazon EC2 server

0) Login to the EC2 Amazon Console

https://console.aws.amazon.com/console/home

1) In the EC2's Security group section add an inbound rule to open ports 80 and 443

Type: HTTP, Protocol: TCP, Port: 80, Source: 0.0.0.0/0
Type: HTTPS, Protocol: TCP, Port: 443, Source: 0.0.0.0/0

2) Copy the Public DNS for your EC2 instance

---
title: "Coordinate conversion in R"
output: html_document
---
## R Script for converting coordinates (e.g., UTM to Lat/Long).
### Required packages
@dKvale
dKvale / NOAA_weather.R
Created August 31, 2016 17:36
Grab MET data for MSP, MN.
library(worldmet)
getMeta(site = "msp")
getMeta(lat = 45, lon = -93.5)
dat <- importNOAA(code = "726580-14922", year = 2016, precip = T)
---
title: "Non-detect method examples"
output:
html_document:
highlight: tango
theme: readable
toc: yes
toc_depth: 3
---