library(dplyr)
library(sf)
#> Linking to GEOS 3.13.0, GDAL 3.8.5, PROJ 9.5.1; sf_use_s2() is TRUE
library(terra)
#> There appears to be a problem with the PROJ installation
#> terra 1.8.93
library(gdalraster)
#> GDAL 3.8.5 (released 2024-04-02), GEOS 3.13.0, PROJ 9.5.1
library(stars)You are a terse assistant designed to help Quarto users replace R computational code chunks that use knitr::include_graphics() with an image link using markdown syntax ![](){}.
Use the file path (the first argument in knitr::include_graphics()) as the image path in the () of the new markdown block. Preserve all of the metadata tags in the R chunk (those prefixed with #| in the body of the chunk, or within the curly braces in the chunk header), especially figure alignment (fig-align or fig.align), width (out-width or out.width), and alt text (fig-alt or fig.alt). These go in the {} of the new markdown block. Ignore the line with #| echo: false.
Respond with only the needed markdown text, no backticks or newlines around the response.
As example, given a code chunk like this:
| library(reticulate) | |
| library(terra) | |
| py_require(c("xarray", "netcdf4", "numpy")) | |
| xr <- import("xarray") | |
| np <- import("numpy") | |
| url <- "https://psl.noaa.gov/thredds/dodsC/Datasets/noaa.oisst.v2.highres/sst.day.mean.2022.nc" |
library(duckdb)
#> Loading required package: DBI
library(glue)
url <- "http://www.env.gov.bc.ca/wsd/data_searches/water/Discharge.csv"
conn <- DBI::dbConnect(duckdb(), ":memory:")
# Install and load duckdb extensions to read from httplibrary(arrow)
#>
#> Attaching package: 'arrow'
#> The following object is masked from 'package:utils':
#>
#> timestamp
library(duckdb)
#> Loading required package: DBI
library(dplyr)| extract_pptx_notes <- function(pp_file, format = c("md", "docx")) { | |
| if (!requireNamespace("officer", quietly = TRUE)) | |
| stop("pacakge 'officer' required.") | |
| if (!requireNamespace("xml2", quietly = TRUE)) | |
| stop("pacakge 'xml2' required.") | |
| if (!requireNamespace("rmarkdown", quietly = TRUE)) | |
| stop("pacakge 'rmarkdown' required.") | |
| if (!requireNamespace("glue", quietly = TRUE)) | |
| stop("pacakge 'glue' required.") |
| author | date | output | title |
|---|---|---|---|
ateucher |
2021-06-08 |
reprex::reprex_document |
ash-crane_reprex.R |
library(osmdata)
#> Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright| library(sf) | |
| library(jsonlite) | |
| library(purrr) | |
| library(mapview) | |
| f <- read_json("https://www.bchydro.com/power-outages/app/outages-map-data.json") | |
| polys <- lapply(f, function(x) { | |
| mat <- matrix(unlist(x$polygon), ncol = 2, byrow = TRUE) | |
| st_polygon(list(rbind(mat, mat[1,]))) |
| library(tidyverse) | |
| library(gghighlight) | |
| library(ggrepel) | |
| library(scales) | |
| data <- read_csv("https://github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv") | |
| data_long <- pivot_longer(data, `1/22/20`:last_col(), names_to = "date", values_to = "cases") %>% | |
| mutate(date = as.Date(date, format = "%m/%d/%y")) %>% | |
| filter(!is.na(cases), |
