diff --git a/LICENSE.html b/LICENSE.html index 9d329f5..6e2e0e7 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -29,7 +29,7 @@
diff --git a/authors.html b/authors.html index 50ff745..f98cd92 100644 --- a/authors.html +++ b/authors.html @@ -42,7 +42,7 @@

Authors

Citation

-

Source: DESCRIPTION

+

Source: DESCRIPTION

Taudière A (2024). greenAlgoR: Compute ecological footprint in R. diff --git a/news/index.html b/news/index.html index 711307c..b4ca229 100644 --- a/news/index.html +++ b/news/index.html @@ -29,7 +29,7 @@

diff --git a/pkgdown.yml b/pkgdown.yml index d7b4148..cddfca8 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-11-19T06:37Z +last_built: 2024-11-19T06:47Z urls: reference: https://adrientaudiere.github.io/greenAlgoR/reference article: https://adrientaudiere.github.io/greenAlgoR/articles diff --git a/reference/csv_from_url_ga.html b/reference/csv_from_url_ga.html index a1f6d65..6da6ec4 100644 --- a/reference/csv_from_url_ga.html +++ b/reference/csv_from_url_ga.html @@ -35,7 +35,7 @@
diff --git a/reference/ga_footprint.html b/reference/ga_footprint.html index 3f4c68c..156ef08 100644 --- a/reference/ga_footprint.html +++ b/reference/ga_footprint.html @@ -93,7 +93,7 @@
@@ -345,7 +345,7 @@

Examples#> [1] 1.1376 #> #> $power_draw_for_memory_kWh -#> [1] 0.0749053 +#> [1] 0.07490532 #> #> $energy_needed_kWh #> [1] 1.212505 @@ -354,16 +354,16 @@

Examples#> [1] 58.33613 #> #> $carbon_footprint_memory -#> [1] 3.841144 +#> [1] 3.841145 #> #> $carbon_footprint_total_gCO2 #> [1] 62.17727 #> #> $ref_value #> variable value -#> 1 Total 62.1772718537736 +#> 1 Total 62.1772727926653 #> 2 Cores 1.1376 -#> 3 Memory 0.07490530136064 +#> 3 Memory 0.07490531966976 #> 4 memoryPower 0.3725 #> 5 google_search 10 #> 6 streaming_netflix_perhour 36 @@ -395,7 +395,7 @@

Examples#> prop_footprint #> 1 1.000000e+00 #> 2 1.829607e-02 -#> 3 1.204705e-03 +#> 3 1.204706e-03 #> 4 5.990935e-03 #> 5 1.608305e-01 #> 6 5.789897e-01 @@ -405,7 +405,7 @@

Examples#> 10 4.036845e+00 #> 11 1.474815e+01 #> 12 1.769135e+02 -#> 13 8.041524e+02 +#> 13 8.041523e+02 #> 14 9.167337e+03 #> 15 3.715184e+04 #> @@ -415,8 +415,8 @@

Examples PUE = 1, ) #> $runtime_h -#> user.self -#> 0.001775833 +#> user.self +#> 0.0018375 #> #> $location_code #> [1] "WORLD" @@ -450,45 +450,45 @@

Examples#> #> $power_draw_for_cores_kWh #> user.self -#> 2.131e-05 +#> 2.205e-05 #> #> $power_draw_for_memory_kWh #> user.self -#> 1.108494e-05 +#> 1.146988e-05 #> #> $energy_needed_kWh #> user.self -#> 3.239494e-05 +#> 3.351988e-05 #> #> $carbon_footprint_cores #> user.self -#> 0.01012225 +#> 0.01047375 #> #> $carbon_footprint_memory #> user.self -#> 0.005265349 +#> 0.005448192 #> #> $carbon_footprint_total_gCO2 -#> user.self -#> 0.0153876 +#> user.self +#> 0.01592194 #> #> $ref_value -#> variable value -#> 1 Total 0.0153875985187343 -#> 2 Cores 2.131e-05 -#> 3 Memory 1.10849442499669e-05 -#> 4 memoryPower 0.3725 -#> 5 google_search 10 -#> 6 streaming_netflix_perhour 36 -#> 7 train_perkm 41 -#> 8 flight_economy_perkm 171 -#> 9 passengerCar_EU_perkm 175 -#> 10 passengerCar_US_perkm 251 -#> 11 tree_month 917 -#> 12 treeYear 11000 -#> 13 flight_PAR-LON 50000 -#> 14 flight_NY-SF 570000 -#> 15 flight_NYC-MEL 2310000 +#> variable value +#> 1 Total 0.0159219416103552 +#> 2 Cores 2.205e-05 +#> 3 Memory 1.1469877074432e-05 +#> 4 memoryPower 0.3725 +#> 5 google_search 10 +#> 6 streaming_netflix_perhour 36 +#> 7 train_perkm 41 +#> 8 flight_economy_perkm 171 +#> 9 passengerCar_EU_perkm 175 +#> 10 passengerCar_US_perkm 251 +#> 11 tree_month 917 +#> 12 treeYear 11000 +#> 13 flight_PAR-LON 50000 +#> 14 flight_NY-SF 570000 +#> 15 flight_NYC-MEL 2310000 #> source #> 1 <NA> #> 2 <NA> @@ -508,19 +508,19 @@

Examples#> prop_footprint #> 1 1.000000e+00 #> 2 1.384881e-03 -#> 3 7.203817e-04 -#> 4 2.420781e+01 -#> 5 6.498740e+02 -#> 6 2.339546e+03 -#> 7 2.664483e+03 -#> 8 1.111285e+04 -#> 9 1.137279e+04 -#> 10 1.631184e+04 -#> 11 5.959344e+04 -#> 12 7.148614e+05 -#> 13 3.249370e+06 -#> 14 3.704282e+07 -#> 15 1.501209e+08 +#> 3 7.203818e-04 +#> 4 2.339539e+01 +#> 5 6.280641e+02 +#> 6 2.261031e+03 +#> 7 2.575063e+03 +#> 8 1.073990e+04 +#> 9 1.099112e+04 +#> 10 1.576441e+04 +#> 11 5.759348e+04 +#> 12 6.908705e+05 +#> 13 3.140321e+06 +#> 14 3.579965e+07 +#> 15 1.450828e+08 #> res_ga <- ga_footprint( diff --git a/reference/ga_targets-1.png b/reference/ga_targets-1.png index cdbf646..b77628d 100644 Binary files a/reference/ga_targets-1.png and b/reference/ga_targets-1.png differ diff --git a/reference/ga_targets.html b/reference/ga_targets.html index fad1ce7..1250135 100644 --- a/reference/ga_targets.html +++ b/reference/ga_targets.html @@ -39,7 +39,7 @@
@@ -189,10 +189,10 @@

Examples ylab("Modality") }) #> ▶ dispatched target x -#> ● completed target x [0 seconds, 44 bytes] +#> ● completed target x [0.001 seconds, 44 bytes] #> ▶ dispatched target waiting #> ● completed target waiting [2.002 seconds, 44 bytes] -#> ▶ ended pipeline [2.064 seconds] +#> ▶ ended pipeline [2.067 seconds] #> diff --git a/reference/greenAlgoR-package.html b/reference/greenAlgoR-package.html index 59ac73d..f72bc7c 100644 --- a/reference/greenAlgoR-package.html +++ b/reference/greenAlgoR-package.html @@ -31,7 +31,7 @@
diff --git a/reference/round_conditionaly.html b/reference/round_conditionaly.html index 7597e81..4c32641 100644 --- a/reference/round_conditionaly.html +++ b/reference/round_conditionaly.html @@ -29,7 +29,7 @@
diff --git a/reference/session_runtime.html b/reference/session_runtime.html index 6e82562..62a80c4 100644 --- a/reference/session_runtime.html +++ b/reference/session_runtime.html @@ -37,7 +37,7 @@
@@ -77,42 +77,42 @@

Examples
session_runtime()
 #> $cpu_times_users
 #> user.self 
-#>     7.666 
+#>       7.9 
 #> 
 #> $cpu_times_system
 #> user.child 
-#>      1.929 
+#>      2.054 
 #> 
 #> $time_elapsed
 #> elapsed 
-#>  13.789 
+#>  13.381 
 #> 
 #> $cpu_times
 #> user.self 
-#>     9.595 
+#>     9.954 
 #> 
 #> $mass_storage_used
 #> [1] 236
 #> 
 #> $mass_storage_max
-#> [1] 357.8
+#> [1] 358.4
 #> 
 session_runtime(compute_mass_storage = FALSE)
 #> $cpu_times_users
 #> user.self 
-#>     8.122 
+#>      8.39 
 #> 
 #> $cpu_times_system
 #> user.child 
-#>      1.929 
+#>      2.054 
 #> 
 #> $time_elapsed
 #> elapsed 
-#>  14.245 
+#>  13.871 
 #> 
 #> $cpu_times
 #> user.self 
-#>    10.051 
+#>    10.444 
 #> 
 

diff --git a/search.json b/search.json index 92e423a..f3226c4 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://adrientaudiere.github.io/greenAlgoR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Adrien Taudière. Author, maintainer, copyright holder.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Taudière (2024). greenAlgoR: Compute ecological footprint R. R package version 0.1, https://adrientaudiere.github.io/greenAlgoR/, https://github.com/adrientaudiere/greenAlgoR.","code":"@Manual{, title = {greenAlgoR: Compute ecological footprint in R}, author = {Adrien Taudière}, year = {2024}, note = {R package version 0.1, https://adrientaudiere.github.io/greenAlgoR/}, url = {https://github.com/adrientaudiere/greenAlgoR}, }"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"greenalgor","dir":"","previous_headings":"","what":"Compute ecological footprint in R","title":"Compute ecological footprint in R","text":"package computes ecological footprint R (based green-algorithms, Lannelongue, Grealey, Inouye (2021)). aim facilitate programmatic used green-algorithms using function ga_footprint(). Moreover, greenAlgoR made simple compute ecological footprint {targets} pipelines using function ga_targets(). beta-version. Please submit issues found problems want contribute.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Compute ecological footprint in R","text":"greenAlgoR available CRAN moment. can install stable development version GitHub :","code":"if (!require(\"devtools\", quietly = TRUE)) { install.packages(\"devtools\") } devtools::install_github(\"adrientaudiere/greenAlgoR\")"},{"path":[]},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"the-algorithm-from-lannelongue-grealey-and-inouye-2021","dir":"","previous_headings":"Scientific foundation","what":"The algorithm from Lannelongue, Grealey, and Inouye (2021)","title":"Compute ecological footprint in R","text":"can refer green-algorithms Lannelongue, Grealey, Inouye (2021) understand algorithm. short description green-algorithms carbon footprint calculated estimating energy draw algorithm carbon intensity producing energy given location: energy needed : power draw computing cores depends model number cores, memory power draw depends size memory available. usage factor corrects real core usage (default 1, .e. full usage). PUE (Power Usage Effectiveness) measures much extra energy needed operate data centre (cooling, lighting etc.). PSF (Pragmatic Scaling Factor) used take account multiple identical runs (e.g. testing optimisation). Carbon Intensity depends location technologies used produce electricity.","code":"carbon footprint = energy needed * carbon intensity runtime * (power draw for cores * usage + power draw for memory) * PUE * PSF"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"basic-use","dir":"","previous_headings":"","what":"Basic use","title":"Compute ecological footprint in R","text":"","code":"devtools::load_all() library(\"greenAlgoR\")"},{"path":[]},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"using-explicit-input","dir":"","previous_headings":"Basic use > In classical workflow","what":"Using explicit input","title":"Compute ecological footprint in R","text":"","code":"# Your model must match exactly a name in TDP_cpu_internal$model fp_12h <- ga_footprint(runtime_h = 12, cpu_model = \"Core i3-10300\") fp_12h$carbon_footprint_total_gCO2 #> [1] 829.0232 fp_12h$energy_needed_kWh #> [1] 1.745312 ggplot(fp_12h$ref_value, aes( y = variable, x = as.numeric(value), fill = log10(prop_footprint) )) + geom_col() + geom_col( data = data.frame( variable = \"Total\", value = fp_12h$carbon_footprint_total_gCO2 ), fill = \"grey30\" ) + geom_col( data = data.frame( variable = \"Cores\", value = fp_12h$carbon_footprint_cores ), fill = \"darkred\" ) + geom_col( data = data.frame( variable = \"Memory\", value = fp_12h$carbon_footprint_memory ), fill = \"orange\" ) + scale_x_continuous( trans = \"log1p\", breaks = c(0, 10^c(1:max(log1p(as.numeric(fp_12h$ref_value$value))))) ) + geom_vline( xintercept = fp_12h$carbon_footprint_total_gCO2, col = \"grey30\", lwd = 1.2 ) + geom_label( aes(label = round_conditionaly(prop_footprint)), fill = \"grey90\", position = position_stack(vjust = 1.1) ) + labs( title = \"Carbon footprint of the analysis\", subtitle = paste0(\"(\", fp_12h$carbon_footprint_total_gCO2, \" g CO2\", \")\"), caption = \"Please cite Lannelongue et al. 2021 (10.1002/advs.202100707)\" ) + xlab(\"Carbon footprint (g CO2) in log10\") + ylab(\"Modality\") + theme(legend.position = \"none\")"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"based-on-the-r-session","dir":"","previous_headings":"Basic use > In classical workflow","what":"Based on the R session","title":"Compute ecological footprint in R","text":"","code":"fp_session <- ga_footprint(runtime_h = \"session\", add_storage_estimation = TRUE) fp_session$carbon_footprint_total_gCO2 #> user.self #> 0.01989738 fp_session$energy_needed_kWh #> user.self #> 4.188922e-05"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"based-on-a-targets-pipeline","dir":"","previous_headings":"Basic use","what":"Based on a targets pipeline","title":"Compute ecological footprint in R","text":"","code":"ga_targets()"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"roadmap","dir":"","previous_headings":"","what":"Roadmap","title":"Compute ecological footprint in R","text":"Automatically find cpu model using benchmarkme::get_cpu() Submit CRAN?","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":null,"dir":"Reference","previous_headings":"","what":"Load csv files from green algo github repositories — csv_from_url_ga","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"Mainly internal use","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"","code":"csv_from_url_ga(url, remove_first_line = TRUE)"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"url url raw csv file remove_first_line (logical, default TRUE): remove first line csv file.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"data.frame","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"","code":"carbon_intensity_internal <- csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/green-algorithms-tool/refs/heads/master/data/v2.2/CI_aggregated.csv\")"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"Please cite Lannelongue, L., Grealey, J., Inouye, M., Green Algorithms: Quantifying Carbon Footprint Computation. Adv. Sci. 2021, 2100707. https://doi.org/10.1002/advs.202100707 Default value https://github.com/GreenAlgorithms/green-algorithms-tool: PUE: https://github.com/GreenAlgorithms/green-algorithms-tool/blob/master/data/v2.2/defaults_PUE.csv TDP_per_core: https://raw.githubusercontent.com/GreenAlgorithms/green-algorithms-tool/refs/heads/master/data/v2.2/TDP_cpu.csv power_draw_per_gb: https://onlinelibrary.wiley.com/doi/10.1002/advs.202100707 Description algorithm green-algorithms website: \"\"\" carbon footprint calculated estimating energy draw algorithm carbon intensity producing energy given location: $$carbon footprint = energy needed * carbon intensity$$ energy needed : $$runtime * (power draw cores * usage + power draw memory) * PUE * PSF$$ power draw computing cores depends model number cores, memory power draw depends size memory available. usage factor corrects real core usage (default 1, .e. full usage). PUE (Power Usage Effectiveness) measures much extra energy needed operate data centre (cooling, lighting etc.). PSF (Pragmatic Scaling Factor) used take account multiple identical runs (e.g. testing optimisation). Carbon Intensity depends location technologies used produce electricity. note \"energy needed\" [...] independent location. \"\"\"","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"","code":"ga_footprint( runtime_h = NULL, location_code = \"WORLD\", PUE = 1.67, TDP_per_core = 12, n_cores = 1, cpu_model = \"Any\", memory_ram = NULL, power_draw_per_gb = 0.3725, PSF = 1, usage_core = 1, add_ref_values = TRUE, add_storage_estimation = FALSE, mass_storage = NULL, carbon_intensity = NULL, TDP_cpu = NULL, ref_value = NULL )"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"runtime_h Run time hours (int). runtime_h == \"session\", runtime compute using actual R session location_code (character list country region available ) PUE (int) Power usage effectiveness server. See https://github.com/GreenAlgorithms/green-algorithms-tool/blob/master/data/v2.2/defaults_PUE.csv example values. using personal computer, set PUE 1. TDP_per_core (int. Watt, default 12). Find cpu TDP nb cpu https://www.techpowerup.com/cpu-specs/ http://calculator.green-algorithms.org/ available. Owerwrite cpu_model param. n_cores (int, default 1) Number cores. Owerwrite cpu_model param. cpu_model Must present list http://calculator.green-algorithms.org/. CPU set, parameter TPD_per_core n_cores overwriting info cpu_model. \"auto\" modality (find cpu using benchmarkme::get_cpu()$model_name) running moment. memory_ram (int. GB) memory RAM. memory_ram NULL, use benchmarkme::get_ram() get RAM. power_draw_per_gb (int. Watt, default 0.3725) power draw GB RAM PSF (int, default 1) Pragmatic Scaling Factor. Citation Lannelongue et al. 2021: \"Many analyses presented single run particular algorithm software tool; however, computations rarely performed . Algorithms run multiple times, sometimes hundreds, systematically manually, different parameterizations. Statistical models may include number combinations covariates, fitting procedures, etc. important include repeats carbon footprint. take account number times computation performed practice, PSF defined, scaling factor estimated GHG emissions multiplied.\" usage_core (int, default 1). usage factor corrects real core usage (default 1, .e. full usage). add_ref_values (logical, default TRUE) compute return reference values compare footprint ? add_storage_estimation (logical, default FALSE) compute footprint mass storage ? default FALSE far less important cpu memory usage. Note green-algorithms website compute mass storage usage. mass_storage (int. GB, default NULL) size mass_storage. used add_storage_estimation set TRUE. set NULL, use base::gc() function estimate storage used. carbon_intensity (default NULL). Advanced users . dataframe location carbonIntensity columns. Set carbon_intensity_internal NULL. carbon_intensity_internal set using command line csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/ green-algorithms-tool/refs/heads/master/data/v2.2/CI_aggregated.csv\") TDP_cpu (default NULL). Advanced users . dataframe model, n_cores TDP_per_core columns. Set TDP_cpu_internal NULL. TDP_cpu_internal set using command line csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/ green-algorithms-tool/refs/heads/master/data/v2.2/TDP_cpu.csv\") ref_value (default NULL). Advanced users . dataframe variable value columns. Set ref_value_internal NULL. ref_value_internal set using command line csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/ green-algorithms-tool/refs/heads/master/data/v2.2/referenceValues.csv\")","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"list values runtime_h: input run time hours location_code: input location code TDP_per_core: input TDP_per_core (cpu_model set, correspond TDP_per_core cpu) n_cores: input n_cores (cpu_model set, correspond n_cores cpu) cpu_model: input cpu model. set \"\", TDP_per_core ncore used memory_ram: input memory ram GB power_draw_per_gb: input power draw per GB usage_core: input usage core carbon_intensity: input carbon intensity (depend location code) PUE: input PUE PSF: input PUE power_draw_for_cores_kWh: output power draw cores kWh power_draw_for_memory_kWh: output power draw RAM memory kWh energy_needed_kWh: output energy needed kWh carbon_footprint_cores: output carbon footprint grams CO2 cores usage carbon_footprint_memory: output carbon footprint grams CO2 memory usage carbon_footprint_total_gCO2: total output carbon footprint grams CO2 ref_value: (optionnal, return add_ref_values TRUE) : dataframe power_draw_storage_kWh: (optionnal, return add_storage_estimation TRUE) output power draw mass storage kWh","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"","code":"ga_footprint( runtime_h = 12, n_cores = 6, TDP_per_core = 15.8, location_code = \"FR\", PUE = 1, cpu_model = \"Core i5-9600KF\" ) #> $runtime_h #> [1] 12 #> #> $location_code #> [1] \"FR\" #> #> $TDP_per_core #> [1] 15.8 #> #> $n_cores #> [1] 6 #> #> $cpu_model #> [1] \"Core i5-9600KF\" #> #> $memory_ram #> [1] 16.75734 #> #> $power_draw_per_gb #> [1] 0.3725 #> #> $`usage core` #> [1] 1 #> #> $carbon_intensity #> [1] 51.28 #> #> $PUE #> [1] 1 #> #> $PSF #> [1] 1 #> #> $power_draw_for_cores_kWh #> [1] 1.1376 #> #> $power_draw_for_memory_kWh #> [1] 0.0749053 #> #> $energy_needed_kWh #> [1] 1.212505 #> #> $carbon_footprint_cores #> [1] 58.33613 #> #> $carbon_footprint_memory #> [1] 3.841144 #> #> $carbon_footprint_total_gCO2 #> [1] 62.17727 #> #> $ref_value #> variable value #> 1 Total 62.1772718537736 #> 2 Cores 1.1376 #> 3 Memory 0.07490530136064 #> 4 memoryPower 0.3725 #> 5 google_search 10 #> 6 streaming_netflix_perhour 36 #> 7 train_perkm 41 #> 8 flight_economy_perkm 171 #> 9 passengerCar_EU_perkm 175 #> 10 passengerCar_US_perkm 251 #> 11 tree_month 917 #> 12 treeYear 11000 #> 13 flight_PAR-LON 50000 #> 14 flight_NY-SF 570000 #> 15 flight_NYC-MEL 2310000 #> source #> 1 #> 2 #> 3 #> 4 in W/GB from http://dl.acm.org/citation.cfm?doid=3076113.3076117 and https://www.tomshardware.com/uk/reviews/intel-core-i7-5960x-haswell-e-cpu,3918-13.html #> 5 gCO2 from http://www.janavirgin.com/CO2/CO2GLE_about.html #> 6 gCO2 from https://www.carbonbrief.org/factcheck-what-is-the-carbon-footprint-of-streaming-video-on-netflix (update) #> 7 in gCO2/km, but more like 5-37g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 8 in gCO2/km, but more like 139-244g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 9 in gCO2/km from http://www.sciencedirect.com/science/article/pii/S1352231018307295 and https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019 #> 10 in gCO2/km from https://www.epa.gov/greenvehicles/greenhouse-gas-emissions-typical-passenger-vehicle #> 11 gCO2 same source as treeYear #> 12 in gCO2/tree/year from http://www.sciencedirect.com/science/article/pii/S0269749101002640 #> 13 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 14 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 15 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> prop_footprint #> 1 1.000000e+00 #> 2 1.829607e-02 #> 3 1.204705e-03 #> 4 5.990935e-03 #> 5 1.608305e-01 #> 6 5.789897e-01 #> 7 6.594049e-01 #> 8 2.750201e+00 #> 9 2.814533e+00 #> 10 4.036845e+00 #> 11 1.474815e+01 #> 12 1.769135e+02 #> 13 8.041524e+02 #> 14 9.167337e+03 #> 15 3.715184e+04 #> ga_footprint( runtime_h = \"session\", PUE = 1, ) #> $runtime_h #> user.self #> 0.001775833 #> #> $location_code #> [1] \"WORLD\" #> #> $TDP_per_core #> [1] 12 #> #> $n_cores #> [1] 1 #> #> $cpu_model #> [1] \"Any\" #> #> $memory_ram #> [1] 16.75734 #> #> $power_draw_per_gb #> [1] 0.3725 #> #> $`usage core` #> [1] 1 #> #> $carbon_intensity #> [1] 475 #> #> $PUE #> [1] 1 #> #> $PSF #> [1] 1 #> #> $power_draw_for_cores_kWh #> user.self #> 2.131e-05 #> #> $power_draw_for_memory_kWh #> user.self #> 1.108494e-05 #> #> $energy_needed_kWh #> user.self #> 3.239494e-05 #> #> $carbon_footprint_cores #> user.self #> 0.01012225 #> #> $carbon_footprint_memory #> user.self #> 0.005265349 #> #> $carbon_footprint_total_gCO2 #> user.self #> 0.0153876 #> #> $ref_value #> variable value #> 1 Total 0.0153875985187343 #> 2 Cores 2.131e-05 #> 3 Memory 1.10849442499669e-05 #> 4 memoryPower 0.3725 #> 5 google_search 10 #> 6 streaming_netflix_perhour 36 #> 7 train_perkm 41 #> 8 flight_economy_perkm 171 #> 9 passengerCar_EU_perkm 175 #> 10 passengerCar_US_perkm 251 #> 11 tree_month 917 #> 12 treeYear 11000 #> 13 flight_PAR-LON 50000 #> 14 flight_NY-SF 570000 #> 15 flight_NYC-MEL 2310000 #> source #> 1 #> 2 #> 3 #> 4 in W/GB from http://dl.acm.org/citation.cfm?doid=3076113.3076117 and https://www.tomshardware.com/uk/reviews/intel-core-i7-5960x-haswell-e-cpu,3918-13.html #> 5 gCO2 from http://www.janavirgin.com/CO2/CO2GLE_about.html #> 6 gCO2 from https://www.carbonbrief.org/factcheck-what-is-the-carbon-footprint-of-streaming-video-on-netflix (update) #> 7 in gCO2/km, but more like 5-37g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 8 in gCO2/km, but more like 139-244g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 9 in gCO2/km from http://www.sciencedirect.com/science/article/pii/S1352231018307295 and https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019 #> 10 in gCO2/km from https://www.epa.gov/greenvehicles/greenhouse-gas-emissions-typical-passenger-vehicle #> 11 gCO2 same source as treeYear #> 12 in gCO2/tree/year from http://www.sciencedirect.com/science/article/pii/S0269749101002640 #> 13 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 14 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 15 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> prop_footprint #> 1 1.000000e+00 #> 2 1.384881e-03 #> 3 7.203817e-04 #> 4 2.420781e+01 #> 5 6.498740e+02 #> 6 2.339546e+03 #> 7 2.664483e+03 #> 8 1.111285e+04 #> 9 1.137279e+04 #> 10 1.631184e+04 #> 11 5.959344e+04 #> 12 7.148614e+05 #> 13 3.249370e+06 #> 14 3.704282e+07 #> 15 1.501209e+08 #> res_ga <- ga_footprint( runtime_h = 12, n_cores = 6, memory_ram = 64, PUE = 1, add_storage_estimation = TRUE, mass_storage = 1 ) ggplot(res_ga$ref_value, aes(y = variable, x = as.numeric(value), fill = log10(prop_footprint))) + geom_col() + geom_col(data = data.frame( variable = \"Total\", value = res_ga$carbon_footprint_total_gCO2 ), fill = \"grey30\") + geom_col(data = data.frame( variable = \"Cores\", value = res_ga$carbon_footprint_cores ), fill = \"darkred\") + geom_col(data = data.frame( variable = \"Memory\", value = res_ga$carbon_footprint_memory ), fill = \"orange\") + geom_col(data = data.frame( variable = \"Mass storage\", value = res_ga$carbon_footprint_storage ), fill = \"violet\") + scale_x_continuous( trans = \"log1p\", breaks = c(0, 10^c(1:max(log1p(as.numeric(res_ga$ref_value$value))))) ) + geom_vline( xintercept = res_ga$carbon_footprint_total_gCO2, col = \"grey30\", lwd = 1.2 ) + geom_label(aes(label = round_conditionaly(prop_footprint)), fill = \"grey90\", position = position_stack(vjust = 1.1) ) + labs( title = \"Carbon footprint of the analysis\", subtitle = paste0( \"(\", res_ga$carbon_footprint_total_gCO2, \" g CO2\", \")\" ), caption = \"Please cite Lannelongue et al. 2021 (10.1002/advs.202100707)\" ) + xlab(\"Carbon footprint (g CO2) in log10\") + ylab(\"Modality\") + theme(legend.position = \"none\")"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"mainly wrapper function ga_footprint() compute run time mass_storage (used add_storage_estimation = TRUE) using targets::tar_meta().","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"","code":"ga_targets( names = NULL, fields = NULL, targets_only = TRUE, complete_only = FALSE, store = targets::tar_config_get(\"store\"), tar_meta_raw = NULL, ... )"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"names Optional, names targets. See ?targets::tar_meta() fields Optional, names columns/fields select. See ?targets::tar_meta() targets_only Logical, whether just show information targets also return metadata functions global objects. complete_only Logical, whether return complete rows (NA values). store Character length 1, path targets data store. See ?targets::tar_meta() tar_meta_raw Optional, NULL, listed options (params targets::tar_meta() used. ... args passed ga_footprint()","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"list value. See ?ga_footprint details.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"","code":"# In a targets folder, just run function ga_targets() # with the options you want # The next exemple emulate a mini-targets before to ask for tar_meta tar_dir({ # tar_dir() runs code from a temp dir for CRAN. tar_script( { list( tar_target( name = waiting, command = Sys.sleep(2), description = \"Sleep 2 seconds\" ), tar_target(x, writeLines( targets::tar_option_get(\"error\"), \"error.txt\" )) ) }, ask = FALSE ) tar_make() tm <- tar_meta() res_gat <- ga_targets( tar_meta_raw = tm, n_cores = 6, TDP_per_core = 15.8, location_code = \"FR\", PUE = 2, add_storage_estimation = TRUE ) ggplot(res_gat$ref_value, aes( y = reorder(variable, as.numeric(value)), x = as.numeric(value), fill = log10(prop_footprint) )) + geom_col() + geom_col(data = data.frame( variable = \"Total \", value = res_gat$carbon_footprint_total_gCO2 ), fill = \"grey30\") + geom_col( data = data.frame( variable = \"Cores\", value = res_gat$carbon_intensity * res_gat$power_draw_for_cores_kWh ), fill = \"darkred\" ) + geom_col( data = data.frame( variable = \"Memory\", value = res_gat$carbon_intensity * res_gat$power_draw_for_memory_kWh ), fill = \"orange\" ) + geom_col( data = data.frame( variable = \"Storage\", value = res_gat$carbon_intensity * res_gat$power_draw_per_gb ), fill = \"violet\" ) + scale_x_continuous(trans = \"log1p\") + geom_vline( xintercept = res_gat$carbon_footprint_total_gCO2, col = \"grey30\", lwd = 1.2 ) + geom_label(aes(label = round(prop_footprint, 1)), fill = \"grey90\") + xlab(\"g CO^2\") + ylab(\"Modality\") }) #> ▶ dispatched target x #> ● completed target x [0 seconds, 44 bytes] #> ▶ dispatched target waiting #> ● completed target waiting [2.002 seconds, 44 bytes] #> ▶ ended pipeline [2.064 seconds] #>"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/greenAlgoR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"greenAlgoR package — greenAlgoR-package","title":"greenAlgoR package — greenAlgoR-package","text":"package computes ecological footprint R (based green-algorithms. greenAlgoR also made simple compute ecological footprint targets pipelines..","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":null,"dir":"Reference","previous_headings":"","what":"Round numeric vector conditionaly — round_conditionaly","title":"Round numeric vector conditionaly — round_conditionaly","text":"Round numeric vector conditionaly","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round numeric vector conditionaly — round_conditionaly","text":"","code":"round_conditionaly( vec, cond = cbind(c(1e-05, 5), c(0.001, 3), c(0.01, 3), c(1, 2), c(10, 1), c(100, 0)) )"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round numeric vector conditionaly — round_conditionaly","text":"vec numeric vector cond : matrix 2 row n column first row defining condition second row defining number round. cond order decreasing order 1 row internally. Thus order cond rows important","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Round numeric vector conditionaly — round_conditionaly","text":"numeric vector length vec","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Round numeric vector conditionaly — round_conditionaly","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Round numeric vector conditionaly — round_conditionaly","text":"","code":"round_conditionaly(vec = c(1000.27890, 10.87988, 1.769869, 0.99796, 0.000179)) #> [1] 1000.27890 10.87988 1.76987 0.99796 0.00018 round_conditionaly( vec = c(1000.27890, 0.000179, 10e-11), cond = cbind(c(10e-5, 5), c(10, 2)) ) #> [1] 1.000279e+03 1.800000e-04 1.000000e-10"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute session run time and mass storage use (based on gc()) — session_runtime","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"Compute cpu times using base::proc.time() mass storage using base::gc()","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"","code":"session_runtime(compute_mass_storage = TRUE)"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"compute_mass_storage (logical, default TRUE) mass storage computed base::gc() function","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"list values","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"","code":"session_runtime() #> $cpu_times_users #> user.self #> 7.666 #> #> $cpu_times_system #> user.child #> 1.929 #> #> $time_elapsed #> elapsed #> 13.789 #> #> $cpu_times #> user.self #> 9.595 #> #> $mass_storage_used #> [1] 236 #> #> $mass_storage_max #> [1] 357.8 #> session_runtime(compute_mass_storage = FALSE) #> $cpu_times_users #> user.self #> 8.122 #> #> $cpu_times_system #> user.child #> 1.929 #> #> $time_elapsed #> elapsed #> 14.245 #> #> $cpu_times #> user.self #> 10.051 #>"},{"path":"https://adrientaudiere.github.io/greenAlgoR/news/index.html","id":"greenalgor-01","dir":"Changelog","previous_headings":"","what":"greenAlgoR 0.1","title":"greenAlgoR 0.1","text":"Initial github submission. Creation function ga_footprint() ga_targets()","code":""}] +[{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://adrientaudiere.github.io/greenAlgoR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Adrien Taudière. Author, maintainer, copyright holder.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Taudière (2024). greenAlgoR: Compute ecological footprint R. R package version 0.1, https://adrientaudiere.github.io/greenAlgoR/, https://github.com/adrientaudiere/greenAlgoR.","code":"@Manual{, title = {greenAlgoR: Compute ecological footprint in R}, author = {Adrien Taudière}, year = {2024}, note = {R package version 0.1, https://adrientaudiere.github.io/greenAlgoR/}, url = {https://github.com/adrientaudiere/greenAlgoR}, }"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"greenalgor","dir":"","previous_headings":"","what":"Compute ecological footprint in R","title":"Compute ecological footprint in R","text":"package computes ecological footprint R (based green-algorithms, Lannelongue, Grealey, Inouye (2021)). aim facilitate programmatic used green-algorithms using function ga_footprint(). Moreover, greenAlgoR made simple compute ecological footprint {targets} pipelines using function ga_targets(). beta-version. Please submit issues found problems want contribute.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Compute ecological footprint in R","text":"greenAlgoR available CRAN moment. can install stable development version GitHub :","code":"if (!require(\"devtools\", quietly = TRUE)) { install.packages(\"devtools\") } devtools::install_github(\"adrientaudiere/greenAlgoR\")"},{"path":[]},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"the-algorithm-from-lannelongue-grealey-and-inouye-2021","dir":"","previous_headings":"Scientific foundation","what":"The algorithm from Lannelongue, Grealey, and Inouye (2021)","title":"Compute ecological footprint in R","text":"can refer green-algorithms Lannelongue, Grealey, Inouye (2021) understand algorithm. short description green-algorithms carbon footprint calculated estimating energy draw algorithm carbon intensity producing energy given location: energy needed : power draw computing cores depends model number cores, memory power draw depends size memory available. usage factor corrects real core usage (default 1, .e. full usage). PUE (Power Usage Effectiveness) measures much extra energy needed operate data centre (cooling, lighting etc.). PSF (Pragmatic Scaling Factor) used take account multiple identical runs (e.g. testing optimisation). Carbon Intensity depends location technologies used produce electricity.","code":"carbon footprint = energy needed * carbon intensity runtime * (power draw for cores * usage + power draw for memory) * PUE * PSF"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"basic-use","dir":"","previous_headings":"","what":"Basic use","title":"Compute ecological footprint in R","text":"","code":"devtools::load_all() library(\"greenAlgoR\")"},{"path":[]},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"using-explicit-input","dir":"","previous_headings":"Basic use > In classical workflow","what":"Using explicit input","title":"Compute ecological footprint in R","text":"","code":"# Your model must match exactly a name in TDP_cpu_internal$model fp_12h <- ga_footprint(runtime_h = 12, cpu_model = \"Core i3-10300\") fp_12h$carbon_footprint_total_gCO2 #> [1] 829.0232 fp_12h$energy_needed_kWh #> [1] 1.745312 ggplot(fp_12h$ref_value, aes( y = variable, x = as.numeric(value), fill = log10(prop_footprint) )) + geom_col() + geom_col( data = data.frame( variable = \"Total\", value = fp_12h$carbon_footprint_total_gCO2 ), fill = \"grey30\" ) + geom_col( data = data.frame( variable = \"Cores\", value = fp_12h$carbon_footprint_cores ), fill = \"darkred\" ) + geom_col( data = data.frame( variable = \"Memory\", value = fp_12h$carbon_footprint_memory ), fill = \"orange\" ) + scale_x_continuous( trans = \"log1p\", breaks = c(0, 10^c(1:max(log1p(as.numeric(fp_12h$ref_value$value))))) ) + geom_vline( xintercept = fp_12h$carbon_footprint_total_gCO2, col = \"grey30\", lwd = 1.2 ) + geom_label( aes(label = round_conditionaly(prop_footprint)), fill = \"grey90\", position = position_stack(vjust = 1.1) ) + labs( title = \"Carbon footprint of the analysis\", subtitle = paste0(\"(\", fp_12h$carbon_footprint_total_gCO2, \" g CO2\", \")\"), caption = \"Please cite Lannelongue et al. 2021 (10.1002/advs.202100707)\" ) + xlab(\"Carbon footprint (g CO2) in log10\") + ylab(\"Modality\") + theme(legend.position = \"none\")"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"based-on-the-r-session","dir":"","previous_headings":"Basic use > In classical workflow","what":"Based on the R session","title":"Compute ecological footprint in R","text":"","code":"fp_session <- ga_footprint(runtime_h = \"session\", add_storage_estimation = TRUE) fp_session$carbon_footprint_total_gCO2 #> user.self #> 0.01989738 fp_session$energy_needed_kWh #> user.self #> 4.188922e-05"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"based-on-a-targets-pipeline","dir":"","previous_headings":"Basic use","what":"Based on a targets pipeline","title":"Compute ecological footprint in R","text":"","code":"ga_targets()"},{"path":"https://adrientaudiere.github.io/greenAlgoR/index.html","id":"roadmap","dir":"","previous_headings":"","what":"Roadmap","title":"Compute ecological footprint in R","text":"Automatically find cpu model using benchmarkme::get_cpu() Submit CRAN?","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":null,"dir":"Reference","previous_headings":"","what":"Load csv files from green algo github repositories — csv_from_url_ga","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"Mainly internal use","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"","code":"csv_from_url_ga(url, remove_first_line = TRUE)"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"url url raw csv file remove_first_line (logical, default TRUE): remove first line csv file.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"data.frame","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/csv_from_url_ga.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load csv files from green algo github repositories — csv_from_url_ga","text":"","code":"carbon_intensity_internal <- csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/green-algorithms-tool/refs/heads/master/data/v2.2/CI_aggregated.csv\")"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"Please cite Lannelongue, L., Grealey, J., Inouye, M., Green Algorithms: Quantifying Carbon Footprint Computation. Adv. Sci. 2021, 2100707. https://doi.org/10.1002/advs.202100707 Default value https://github.com/GreenAlgorithms/green-algorithms-tool: PUE: https://github.com/GreenAlgorithms/green-algorithms-tool/blob/master/data/v2.2/defaults_PUE.csv TDP_per_core: https://raw.githubusercontent.com/GreenAlgorithms/green-algorithms-tool/refs/heads/master/data/v2.2/TDP_cpu.csv power_draw_per_gb: https://onlinelibrary.wiley.com/doi/10.1002/advs.202100707 Description algorithm green-algorithms website: \"\"\" carbon footprint calculated estimating energy draw algorithm carbon intensity producing energy given location: $$carbon footprint = energy needed * carbon intensity$$ energy needed : $$runtime * (power draw cores * usage + power draw memory) * PUE * PSF$$ power draw computing cores depends model number cores, memory power draw depends size memory available. usage factor corrects real core usage (default 1, .e. full usage). PUE (Power Usage Effectiveness) measures much extra energy needed operate data centre (cooling, lighting etc.). PSF (Pragmatic Scaling Factor) used take account multiple identical runs (e.g. testing optimisation). Carbon Intensity depends location technologies used produce electricity. note \"energy needed\" [...] independent location. \"\"\"","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"","code":"ga_footprint( runtime_h = NULL, location_code = \"WORLD\", PUE = 1.67, TDP_per_core = 12, n_cores = 1, cpu_model = \"Any\", memory_ram = NULL, power_draw_per_gb = 0.3725, PSF = 1, usage_core = 1, add_ref_values = TRUE, add_storage_estimation = FALSE, mass_storage = NULL, carbon_intensity = NULL, TDP_cpu = NULL, ref_value = NULL )"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"runtime_h Run time hours (int). runtime_h == \"session\", runtime compute using actual R session location_code (character list country region available ) PUE (int) Power usage effectiveness server. See https://github.com/GreenAlgorithms/green-algorithms-tool/blob/master/data/v2.2/defaults_PUE.csv example values. using personal computer, set PUE 1. TDP_per_core (int. Watt, default 12). Find cpu TDP nb cpu https://www.techpowerup.com/cpu-specs/ http://calculator.green-algorithms.org/ available. Owerwrite cpu_model param. n_cores (int, default 1) Number cores. Owerwrite cpu_model param. cpu_model Must present list http://calculator.green-algorithms.org/. CPU set, parameter TPD_per_core n_cores overwriting info cpu_model. \"auto\" modality (find cpu using benchmarkme::get_cpu()$model_name) running moment. memory_ram (int. GB) memory RAM. memory_ram NULL, use benchmarkme::get_ram() get RAM. power_draw_per_gb (int. Watt, default 0.3725) power draw GB RAM PSF (int, default 1) Pragmatic Scaling Factor. Citation Lannelongue et al. 2021: \"Many analyses presented single run particular algorithm software tool; however, computations rarely performed . Algorithms run multiple times, sometimes hundreds, systematically manually, different parameterizations. Statistical models may include number combinations covariates, fitting procedures, etc. important include repeats carbon footprint. take account number times computation performed practice, PSF defined, scaling factor estimated GHG emissions multiplied.\" usage_core (int, default 1). usage factor corrects real core usage (default 1, .e. full usage). add_ref_values (logical, default TRUE) compute return reference values compare footprint ? add_storage_estimation (logical, default FALSE) compute footprint mass storage ? default FALSE far less important cpu memory usage. Note green-algorithms website compute mass storage usage. mass_storage (int. GB, default NULL) size mass_storage. used add_storage_estimation set TRUE. set NULL, use base::gc() function estimate storage used. carbon_intensity (default NULL). Advanced users . dataframe location carbonIntensity columns. Set carbon_intensity_internal NULL. carbon_intensity_internal set using command line csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/ green-algorithms-tool/refs/heads/master/data/v2.2/CI_aggregated.csv\") TDP_cpu (default NULL). Advanced users . dataframe model, n_cores TDP_per_core columns. Set TDP_cpu_internal NULL. TDP_cpu_internal set using command line csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/ green-algorithms-tool/refs/heads/master/data/v2.2/TDP_cpu.csv\") ref_value (default NULL). Advanced users . dataframe variable value columns. Set ref_value_internal NULL. ref_value_internal set using command line csv_from_url_ga(\"https://raw.githubusercontent.com/GreenAlgorithms/ green-algorithms-tool/refs/heads/master/data/v2.2/referenceValues.csv\")","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"list values runtime_h: input run time hours location_code: input location code TDP_per_core: input TDP_per_core (cpu_model set, correspond TDP_per_core cpu) n_cores: input n_cores (cpu_model set, correspond n_cores cpu) cpu_model: input cpu model. set \"\", TDP_per_core ncore used memory_ram: input memory ram GB power_draw_per_gb: input power draw per GB usage_core: input usage core carbon_intensity: input carbon intensity (depend location code) PUE: input PUE PSF: input PUE power_draw_for_cores_kWh: output power draw cores kWh power_draw_for_memory_kWh: output power draw RAM memory kWh energy_needed_kWh: output energy needed kWh carbon_footprint_cores: output carbon footprint grams CO2 cores usage carbon_footprint_memory: output carbon footprint grams CO2 memory usage carbon_footprint_total_gCO2: total output carbon footprint grams CO2 ref_value: (optionnal, return add_ref_values TRUE) : dataframe power_draw_storage_kWh: (optionnal, return add_storage_estimation TRUE) output power draw mass storage kWh","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_footprint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute footprint in grams of CO2 using Lannelongue et al. 2021 algorithm — ga_footprint","text":"","code":"ga_footprint( runtime_h = 12, n_cores = 6, TDP_per_core = 15.8, location_code = \"FR\", PUE = 1, cpu_model = \"Core i5-9600KF\" ) #> $runtime_h #> [1] 12 #> #> $location_code #> [1] \"FR\" #> #> $TDP_per_core #> [1] 15.8 #> #> $n_cores #> [1] 6 #> #> $cpu_model #> [1] \"Core i5-9600KF\" #> #> $memory_ram #> [1] 16.75734 #> #> $power_draw_per_gb #> [1] 0.3725 #> #> $`usage core` #> [1] 1 #> #> $carbon_intensity #> [1] 51.28 #> #> $PUE #> [1] 1 #> #> $PSF #> [1] 1 #> #> $power_draw_for_cores_kWh #> [1] 1.1376 #> #> $power_draw_for_memory_kWh #> [1] 0.07490532 #> #> $energy_needed_kWh #> [1] 1.212505 #> #> $carbon_footprint_cores #> [1] 58.33613 #> #> $carbon_footprint_memory #> [1] 3.841145 #> #> $carbon_footprint_total_gCO2 #> [1] 62.17727 #> #> $ref_value #> variable value #> 1 Total 62.1772727926653 #> 2 Cores 1.1376 #> 3 Memory 0.07490531966976 #> 4 memoryPower 0.3725 #> 5 google_search 10 #> 6 streaming_netflix_perhour 36 #> 7 train_perkm 41 #> 8 flight_economy_perkm 171 #> 9 passengerCar_EU_perkm 175 #> 10 passengerCar_US_perkm 251 #> 11 tree_month 917 #> 12 treeYear 11000 #> 13 flight_PAR-LON 50000 #> 14 flight_NY-SF 570000 #> 15 flight_NYC-MEL 2310000 #> source #> 1 #> 2 #> 3 #> 4 in W/GB from http://dl.acm.org/citation.cfm?doid=3076113.3076117 and https://www.tomshardware.com/uk/reviews/intel-core-i7-5960x-haswell-e-cpu,3918-13.html #> 5 gCO2 from http://www.janavirgin.com/CO2/CO2GLE_about.html #> 6 gCO2 from https://www.carbonbrief.org/factcheck-what-is-the-carbon-footprint-of-streaming-video-on-netflix (update) #> 7 in gCO2/km, but more like 5-37g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 8 in gCO2/km, but more like 139-244g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 9 in gCO2/km from http://www.sciencedirect.com/science/article/pii/S1352231018307295 and https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019 #> 10 in gCO2/km from https://www.epa.gov/greenvehicles/greenhouse-gas-emissions-typical-passenger-vehicle #> 11 gCO2 same source as treeYear #> 12 in gCO2/tree/year from http://www.sciencedirect.com/science/article/pii/S0269749101002640 #> 13 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 14 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 15 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> prop_footprint #> 1 1.000000e+00 #> 2 1.829607e-02 #> 3 1.204706e-03 #> 4 5.990935e-03 #> 5 1.608305e-01 #> 6 5.789897e-01 #> 7 6.594049e-01 #> 8 2.750201e+00 #> 9 2.814533e+00 #> 10 4.036845e+00 #> 11 1.474815e+01 #> 12 1.769135e+02 #> 13 8.041523e+02 #> 14 9.167337e+03 #> 15 3.715184e+04 #> ga_footprint( runtime_h = \"session\", PUE = 1, ) #> $runtime_h #> user.self #> 0.0018375 #> #> $location_code #> [1] \"WORLD\" #> #> $TDP_per_core #> [1] 12 #> #> $n_cores #> [1] 1 #> #> $cpu_model #> [1] \"Any\" #> #> $memory_ram #> [1] 16.75734 #> #> $power_draw_per_gb #> [1] 0.3725 #> #> $`usage core` #> [1] 1 #> #> $carbon_intensity #> [1] 475 #> #> $PUE #> [1] 1 #> #> $PSF #> [1] 1 #> #> $power_draw_for_cores_kWh #> user.self #> 2.205e-05 #> #> $power_draw_for_memory_kWh #> user.self #> 1.146988e-05 #> #> $energy_needed_kWh #> user.self #> 3.351988e-05 #> #> $carbon_footprint_cores #> user.self #> 0.01047375 #> #> $carbon_footprint_memory #> user.self #> 0.005448192 #> #> $carbon_footprint_total_gCO2 #> user.self #> 0.01592194 #> #> $ref_value #> variable value #> 1 Total 0.0159219416103552 #> 2 Cores 2.205e-05 #> 3 Memory 1.1469877074432e-05 #> 4 memoryPower 0.3725 #> 5 google_search 10 #> 6 streaming_netflix_perhour 36 #> 7 train_perkm 41 #> 8 flight_economy_perkm 171 #> 9 passengerCar_EU_perkm 175 #> 10 passengerCar_US_perkm 251 #> 11 tree_month 917 #> 12 treeYear 11000 #> 13 flight_PAR-LON 50000 #> 14 flight_NY-SF 570000 #> 15 flight_NYC-MEL 2310000 #> source #> 1 #> 2 #> 3 #> 4 in W/GB from http://dl.acm.org/citation.cfm?doid=3076113.3076117 and https://www.tomshardware.com/uk/reviews/intel-core-i7-5960x-haswell-e-cpu,3918-13.html #> 5 gCO2 from http://www.janavirgin.com/CO2/CO2GLE_about.html #> 6 gCO2 from https://www.carbonbrief.org/factcheck-what-is-the-carbon-footprint-of-streaming-video-on-netflix (update) #> 7 in gCO2/km, but more like 5-37g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 8 in gCO2/km, but more like 139-244g, from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2020 #> 9 in gCO2/km from http://www.sciencedirect.com/science/article/pii/S1352231018307295 and https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019 #> 10 in gCO2/km from https://www.epa.gov/greenvehicles/greenhouse-gas-emissions-typical-passenger-vehicle #> 11 gCO2 same source as treeYear #> 12 in gCO2/tree/year from http://www.sciencedirect.com/science/article/pii/S0269749101002640 #> 13 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 14 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> 15 gCO2e from https://calculator.carbonfootprint.com/calculator.aspx?tab=3 #> prop_footprint #> 1 1.000000e+00 #> 2 1.384881e-03 #> 3 7.203818e-04 #> 4 2.339539e+01 #> 5 6.280641e+02 #> 6 2.261031e+03 #> 7 2.575063e+03 #> 8 1.073990e+04 #> 9 1.099112e+04 #> 10 1.576441e+04 #> 11 5.759348e+04 #> 12 6.908705e+05 #> 13 3.140321e+06 #> 14 3.579965e+07 #> 15 1.450828e+08 #> res_ga <- ga_footprint( runtime_h = 12, n_cores = 6, memory_ram = 64, PUE = 1, add_storage_estimation = TRUE, mass_storage = 1 ) ggplot(res_ga$ref_value, aes(y = variable, x = as.numeric(value), fill = log10(prop_footprint))) + geom_col() + geom_col(data = data.frame( variable = \"Total\", value = res_ga$carbon_footprint_total_gCO2 ), fill = \"grey30\") + geom_col(data = data.frame( variable = \"Cores\", value = res_ga$carbon_footprint_cores ), fill = \"darkred\") + geom_col(data = data.frame( variable = \"Memory\", value = res_ga$carbon_footprint_memory ), fill = \"orange\") + geom_col(data = data.frame( variable = \"Mass storage\", value = res_ga$carbon_footprint_storage ), fill = \"violet\") + scale_x_continuous( trans = \"log1p\", breaks = c(0, 10^c(1:max(log1p(as.numeric(res_ga$ref_value$value))))) ) + geom_vline( xintercept = res_ga$carbon_footprint_total_gCO2, col = \"grey30\", lwd = 1.2 ) + geom_label(aes(label = round_conditionaly(prop_footprint)), fill = \"grey90\", position = position_stack(vjust = 1.1) ) + labs( title = \"Carbon footprint of the analysis\", subtitle = paste0( \"(\", res_ga$carbon_footprint_total_gCO2, \" g CO2\", \")\" ), caption = \"Please cite Lannelongue et al. 2021 (10.1002/advs.202100707)\" ) + xlab(\"Carbon footprint (g CO2) in log10\") + ylab(\"Modality\") + theme(legend.position = \"none\")"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"mainly wrapper function ga_footprint() compute run time mass_storage (used add_storage_estimation = TRUE) using targets::tar_meta().","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"","code":"ga_targets( names = NULL, fields = NULL, targets_only = TRUE, complete_only = FALSE, store = targets::tar_config_get(\"store\"), tar_meta_raw = NULL, ... )"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"names Optional, names targets. See ?targets::tar_meta() fields Optional, names columns/fields select. See ?targets::tar_meta() targets_only Logical, whether just show information targets also return metadata functions global objects. complete_only Logical, whether return complete rows (NA values). store Character length 1, path targets data store. See ?targets::tar_meta() tar_meta_raw Optional, NULL, listed options (params targets::tar_meta() used. ... args passed ga_footprint()","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"list value. See ?ga_footprint details.","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/ga_targets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute footprint in grams of CO2 for {targets} pipelines — ga_targets","text":"","code":"# In a targets folder, just run function ga_targets() # with the options you want # The next exemple emulate a mini-targets before to ask for tar_meta tar_dir({ # tar_dir() runs code from a temp dir for CRAN. tar_script( { list( tar_target( name = waiting, command = Sys.sleep(2), description = \"Sleep 2 seconds\" ), tar_target(x, writeLines( targets::tar_option_get(\"error\"), \"error.txt\" )) ) }, ask = FALSE ) tar_make() tm <- tar_meta() res_gat <- ga_targets( tar_meta_raw = tm, n_cores = 6, TDP_per_core = 15.8, location_code = \"FR\", PUE = 2, add_storage_estimation = TRUE ) ggplot(res_gat$ref_value, aes( y = reorder(variable, as.numeric(value)), x = as.numeric(value), fill = log10(prop_footprint) )) + geom_col() + geom_col(data = data.frame( variable = \"Total \", value = res_gat$carbon_footprint_total_gCO2 ), fill = \"grey30\") + geom_col( data = data.frame( variable = \"Cores\", value = res_gat$carbon_intensity * res_gat$power_draw_for_cores_kWh ), fill = \"darkred\" ) + geom_col( data = data.frame( variable = \"Memory\", value = res_gat$carbon_intensity * res_gat$power_draw_for_memory_kWh ), fill = \"orange\" ) + geom_col( data = data.frame( variable = \"Storage\", value = res_gat$carbon_intensity * res_gat$power_draw_per_gb ), fill = \"violet\" ) + scale_x_continuous(trans = \"log1p\") + geom_vline( xintercept = res_gat$carbon_footprint_total_gCO2, col = \"grey30\", lwd = 1.2 ) + geom_label(aes(label = round(prop_footprint, 1)), fill = \"grey90\") + xlab(\"g CO^2\") + ylab(\"Modality\") }) #> ▶ dispatched target x #> ● completed target x [0.001 seconds, 44 bytes] #> ▶ dispatched target waiting #> ● completed target waiting [2.002 seconds, 44 bytes] #> ▶ ended pipeline [2.067 seconds] #>"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/greenAlgoR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"greenAlgoR package — greenAlgoR-package","title":"greenAlgoR package — greenAlgoR-package","text":"package computes ecological footprint R (based green-algorithms. greenAlgoR also made simple compute ecological footprint targets pipelines..","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":null,"dir":"Reference","previous_headings":"","what":"Round numeric vector conditionaly — round_conditionaly","title":"Round numeric vector conditionaly — round_conditionaly","text":"Round numeric vector conditionaly","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round numeric vector conditionaly — round_conditionaly","text":"","code":"round_conditionaly( vec, cond = cbind(c(1e-05, 5), c(0.001, 3), c(0.01, 3), c(1, 2), c(10, 1), c(100, 0)) )"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round numeric vector conditionaly — round_conditionaly","text":"vec numeric vector cond : matrix 2 row n column first row defining condition second row defining number round. cond order decreasing order 1 row internally. Thus order cond rows important","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Round numeric vector conditionaly — round_conditionaly","text":"numeric vector length vec","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Round numeric vector conditionaly — round_conditionaly","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/round_conditionaly.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Round numeric vector conditionaly — round_conditionaly","text":"","code":"round_conditionaly(vec = c(1000.27890, 10.87988, 1.769869, 0.99796, 0.000179)) #> [1] 1000.27890 10.87988 1.76987 0.99796 0.00018 round_conditionaly( vec = c(1000.27890, 0.000179, 10e-11), cond = cbind(c(10e-5, 5), c(10, 2)) ) #> [1] 1.000279e+03 1.800000e-04 1.000000e-10"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute session run time and mass storage use (based on gc()) — session_runtime","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"Compute cpu times using base::proc.time() mass storage using base::gc()","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"","code":"session_runtime(compute_mass_storage = TRUE)"},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"compute_mass_storage (logical, default TRUE) mass storage computed base::gc() function","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"list values","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"Adrien Taudière","code":""},{"path":"https://adrientaudiere.github.io/greenAlgoR/reference/session_runtime.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute session run time and mass storage use (based on gc()) — session_runtime","text":"","code":"session_runtime() #> $cpu_times_users #> user.self #> 7.9 #> #> $cpu_times_system #> user.child #> 2.054 #> #> $time_elapsed #> elapsed #> 13.381 #> #> $cpu_times #> user.self #> 9.954 #> #> $mass_storage_used #> [1] 236 #> #> $mass_storage_max #> [1] 358.4 #> session_runtime(compute_mass_storage = FALSE) #> $cpu_times_users #> user.self #> 8.39 #> #> $cpu_times_system #> user.child #> 2.054 #> #> $time_elapsed #> elapsed #> 13.871 #> #> $cpu_times #> user.self #> 10.444 #>"},{"path":"https://adrientaudiere.github.io/greenAlgoR/news/index.html","id":"greenalgor-01","dir":"Changelog","previous_headings":"","what":"greenAlgoR 0.1","title":"greenAlgoR 0.1","text":"Initial github submission. Creation function ga_footprint() ga_targets()","code":""}]