library(sf)
#> Linking to GEOS 3.6.2, GDAL 2.2.3, proj.4 4.9.3
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
test_input <- "8231753674683997878179259195565332579493378483264978184143341284379682788518559178822225126625428318115396632681141871952894291898364781898929292614792884883249356728741993224889167928232261325123447569829932951268292953928766755779761837993812528527484487298117739869189415599461746944992651752768158611996715467871381527675219481185217357632445748912726487669881876129192932995282777848496561259839781188719233951619188388532698519298142112853776942545211859134185231768952888462471642851588368445761489225786919778983848113833773768236969923939838755997989537648222217996381757542964844337285428654375499359997792679256881378967852376848812795761118139288152799921176874256377615952758268844139579622754965461884862647423491918913628848748756595463191585555385849335742224855473769411212376446591654846168189278959857681336724221434846946124915271196433144335482787432683848594487648477532498952572515118864475621828118274911298396748213136426357769991314661642612786847135485969889237193822718111269561741 |
- R and RStudio installed
- Git installed
- GitHub account, with 2FA enabled and both personal and work email on account (or just work email)
- Read the BC Policy Framework cheatsheet
- Read Git and GitHub are not the same thing
- what is git, how is it different from GitHub
- BCGov Github Policy Framework (cheatsheet)
I am on a Mac (2016 MBP 15" with 16GB memory) and am testing out the development version of ggplot2
with sf
plotting support.
Overall I am loving it, but I am finding geom_sf
to be very slow when plotting larger sf
polygons objects. I think I've narrowed it down to the quartz
graphics device, which is much slower than X11
on these large objects (however quartz
produces nicer graphics than X11
).
I would be happy to just use X11
but I do like having plots appear in the plot pane in RStudio, and I believe the RStudio Graphics Device uses quartz
on Mac OS and I don't think there's a way to change that. So I'm not sure if this is really a ggplot2/sf issue or if it's a Mac quartz
issue... or possibly even an RStudio issue, but I thought I would post it here first to see if others are experiencing the same thing.
I also did the same comparison with sf
's plot
method - there is still a large difference between X11
and quartz
, however overall it is faster than ggplot2::geom_sf
.
Inte
# install gdal, python, postgresql/postgis on Ubuntu 16.04 | |
# install dependencies | |
sudo apt install unzip | |
sudo apt-get update | |
sudo apt-get install python-pip | |
sudo add-apt-repository ppa:ubuntugis/ppa | |
sudo apt-get update | |
sudo apt-get install gdal-bin libgdal-dev | |
pip install --upgrade pip |
function git() { | |
for i do | |
lastArgument=$i # last argument can be the directory or the repository url | |
done | |
command git $@ | |
if [[ $? -eq 0 ]] # only show prompt if git command was successful | |
then |
#!/bin/bash | |
# bash prompt which asks for email address | |
# to configure for current git repository | |
# set your available emails | |
MAILS=([email protected] [email protected] [email protected]) | |
# prompt for email | |
echo |
library(leaflet) | |
leaflet() %>% addTiles() %>% | |
setView(-127, 52, 6) %>% | |
addWMSTiles("https://openmaps.gov.bc.ca/geo/pub/WHSE_FOREST_VEGETATION.BEC_BIOGEOCLIMATIC_ZONE_2M_SPG/ows", | |
layers = "pub:WHSE_FOREST_VEGETATION.BEC_BIOGEOCLIMATIC_ZONE_2M_SPG", | |
options = WMSTileOptions( | |
format = "image/png", | |
transparent=TRUE, | |
styles = "BEC_Cartographic_Zones_2M_Colour_Themed")) |
In RStudio View(iris)
is very slow - it locks up RStudio for ~5-10s or more. I have no idea why this difference exists.
I ran the following to find out my HOME directory:
$ echo $HOME
This returns /h/
- my Home drive on the network
library(ggplot2)
library(viridis)
#> Loading required package: viridisLite
my_data <- data.frame(val = rnorm(15),
cat = rep(letters[1:5], 3),
x = 1:15)
my_viridis_scale <- scale_color_viridis(discrete = TRUE,