Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/
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(sf) | |
library(tidyverse) | |
projections <- c("+proj=laea", | |
"+proj=moll", | |
"+proj=adams_ws2", | |
"+proj=urm5 +n=0.9", | |
"+proj=wintri", | |
"+proj=bonne +lat_1=10", | |
"+proj=eck1", |
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(rayshader) | |
library(rayrender) | |
popdata = raster::raster("gpw_v4_population_density_rev11_2020_15_min.tif") | |
population_mat = rayshader:::flipud(raster_to_matrix(popdata)) | |
above1 = population_mat > 1 | |
above5 = population_mat > 5 | |
above10 = population_mat > 10 |
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
## ----setup,include=FALSE,message=FALSE,warning=FALSE----------------------------------------------------------------------------------------------------------------------------------------------------- | |
library("here") # 1.0.1 | |
library("sf") # 1.0-14 | |
library("rgl") # 1.2.1 | |
library("geoviz") # 0.2.2 | |
library("raster") # 3.6-26 | |
library("rayshader") # 0.35.7 | |
library("osmdata") # 0.2.5 | |
library("tidyverse") # 2.0.0 |
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
# start_time: %Y-%m-%dT%H:%M:%SZ | |
# end_time: %Y-%m-%dT%H:%M:%SZ | |
# needs jsonlite and httr | |
# next_token can be obtained from meta$next_token to paginate through results | |
get_tweets <- function(q="",n=10,start_time,end_time,token,next_token=""){ | |
if(n>500){ | |
warning("n too big. Using 500 instead") | |
n <- 500 | |
} | |
if(n<5){ |
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
_ _ _ ____ _ _ | |
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| | | |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / | | |
| _ | (_| | (__| < | |_) | (_| | (__| <|_| | |
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_) | |
A DIY Guide | |
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
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location https://api.github.com/repos/owner/repo/contents/path | |
# Example... | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" |