Skip to content

Instantly share code, notes, and snippets.

View kguidonimartins's full-sized avatar

Karlo Guidoni kguidonimartins

View GitHub Profile
# kguidonimartins@gmail.com
############################################################
# #
# CHECANDO DADOS COVID-19 #
# #
############################################################
############################################################
# #
# Os dados são atualizados diariamente pela Johns Hopkins #
@kguidonimartins
kguidonimartins / ages_for_issue.txt
Last active November 6, 2019 19:26
files for phylocomr issue
V1 V2
euphyllophyte 400
seedplants 325
angiosperm 179
nym2ast 171
aus2ast 165
monocotneudicot 161
eudicot 147
bux2ast 137
coreeudicot 127
@kguidonimartins
kguidonimartins / scrape_derramento_oleo_brasil_2019.R
Created October 30, 2019 03:16
Script para obtenção, limpeza e visualização dos dados sobre a presença de oléo em praias do Nordeste brasileiro
############################################################
# #
# instalação dos pacotes #
# #
############################################################
# ipak function: install and load multiple R packages.
# Check to see if packages are installed.
# Install them if they are not, then load them into the R session.
# Forked from: https://gist.github.com/stevenworthington/3178163
def donuts(count):
if count >= 10:
count = "many"
print('Number of donuts:', count)
donuts(2)
donuts(10)
@kguidonimartins
kguidonimartins / scraplinks.R
Last active March 21, 2020 16:52 — forked from paulrougieux/scraplinks.R
Extract link texts and urls from a web page into an R data frame
@kguidonimartins
kguidonimartins / stacked_map_R_ggplot2.md
Created May 3, 2019 21:42 — forked from rafapereirabr/stacked_map_R_ggplot2.md
Creating a stacked map in R using ggplot2

This gist shows in two steps how to tilt and stack maps using ggplot2 in order to create an image like this one: [![enter image description here][1]][1]

Let's load the necessary libraries and data to use a reproducible example:

# load libraries
  library(rgeos)
  library(UScensus2000tract)
  library(ggplot2)
ipak <- function(pkg) {
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg)){
install.packages(new.pkg, dependencies = TRUE)
}
suppressPackageStartupMessages(sapply(pkg, require, character.only = TRUE))
}
ipak(c("tidyverse", "leaflet"))
@kguidonimartins
kguidonimartins / onedrive-ubu.sh
Created February 9, 2019 11:41 — forked from glmdev/onedrive-ubu.sh
A bash script to setup OneDrive integration with GNOME on Ubuntu.
#!/bin/sh
# onedrive-ubu.sh
# A BASH script to set up OneDrive integration with GNOME on Ubuntu
# Copyright (C) 2018 Garrett Mills (garrett@glmdev.tech)
# This software is licensed under the MIT License.
# This sofware is provided without warranty or even any implied intent of purpose.
#
# OnedriveD: https://github.com/xybu/onedrived-dev
---
title: "World maps"
output:
html_document:
df_print: paged
---
```{r echo = FALSE, message = FALSE}
library(tidyverse)
library(sf)
@kguidonimartins
kguidonimartins / pacotes.R
Last active May 27, 2019 15:18
Pacotes para o curso de introdução ao RMarkdown
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
{
install.packages(new.pkg,
dependencies = TRUE,
repos = "https://cloud.r-project.org")
}
suppressPackageStartupMessages(sapply(pkg, require, character.only = TRUE))
}