Nothing
## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
## -----------------------------------------------------------------------------
# library(CodeCarbonR)
# setup_carbon_tracker()
## -----------------------------------------------------------------------------
# result <- with_emissions_tracked(
# {
# Sys.sleep(2)
# sum(1:1e7)
# },
# country_iso_code = "USA"
# )
## -----------------------------------------------------------------------------
# countries <- list_carbon_tracker_countries()
# head(countries)
# #> iso_code country_name
# #> 1 AFG Afghanistan
# #> 2 ALB Albania
# #> 3 DZA Algeria
# #> ...
## -----------------------------------------------------------------------------
# result
# #> Carbon emissions: 4.26e-06 kg CO2e
# #> Energy consumed: 1.15e-05 kWh
# #> Duration: 2.1 s
# #> CPU tracking: estimated (CPU load x TDP)
#
# result$result
# #> [1] 50000005000000
## -----------------------------------------------------------------------------
# data_tracker <- carbon_tracker(country_iso_code = "USA", output_dir = "emissions_log")
# data_tracker$start()
# # ... load/prepare data ...
# data_emissions <- data_tracker$stop()
#
# training_tracker <- carbon_tracker(country_iso_code = "USA", output_dir = "emissions_log")
# training_tracker$start()
# # ... train a model ...
# training_emissions <- training_tracker$stop()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.