Typologies Spain#37
Conversation
98fb05d to
46b433d
Compare
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
air
[air] reported by reviewdog 🐶
Line 585 in 2daf52f
[air] reported by reviewdog 🐶
Lines 623 to 627 in 2daf52f
[air] reported by reviewdog 🐶
Line 642 in 2daf52f
[air] reported by reviewdog 🐶
Lines 678 to 682 in 2daf52f
[air] reported by reviewdog 🐶
Line 56 in 2daf52f
[air] reported by reviewdog 🐶
Lines 66 to 68 in 2daf52f
[air] reported by reviewdog 🐶
Line 104 in 2daf52f
[air] reported by reviewdog 🐶
Line 109 in 2daf52f
[air] reported by reviewdog 🐶
Lines 148 to 150 in 2daf52f
[air] reported by reviewdog 🐶
Line 157 in 2daf52f
[air] reported by reviewdog 🐶
Line 162 in 2daf52f
[air] reported by reviewdog 🐶
Line 165 in 2daf52f
[air] reported by reviewdog 🐶
Lines 177 to 186 in 2daf52f
[air] reported by reviewdog 🐶
Lines 219 to 220 in 2daf52f
[air] reported by reviewdog 🐶
Lines 238 to 241 in 2daf52f
[air] reported by reviewdog 🐶
Lines 259 to 262 in 2daf52f
[air] reported by reviewdog 🐶
Lines 322 to 325 in 2daf52f
[air] reported by reviewdog 🐶
Lines 341 to 344 in 2daf52f
[air] reported by reviewdog 🐶
Lines 362 to 365 in 2daf52f
[air] reported by reviewdog 🐶
Line 383 in 2daf52f
[air] reported by reviewdog 🐶
Line 388 in 2daf52f
[air] reported by reviewdog 🐶
Lines 409 to 412 in 2daf52f
[air] reported by reviewdog 🐶
Lines 436 to 439 in 2daf52f
[air] reported by reviewdog 🐶
Lines 443 to 446 in 2daf52f
[air] reported by reviewdog 🐶
Line 481 in 2daf52f
[air] reported by reviewdog 🐶
Lines 509 to 510 in 2daf52f
[air] reported by reviewdog 🐶
Line 520 in 2daf52f
[air] reported by reviewdog 🐶
Line 522 in 2daf52f
[air] reported by reviewdog 🐶
Line 524 in 2daf52f
[air] reported by reviewdog 🐶
Line 527 in 2daf52f
[air] reported by reviewdog 🐶
Line 530 in 2daf52f
[air] reported by reviewdog 🐶
Line 566 in 2daf52f
[air] reported by reviewdog 🐶
Line 568 in 2daf52f
[air] reported by reviewdog 🐶
Line 570 in 2daf52f
[air] reported by reviewdog 🐶
Line 573 in 2daf52f
[air] reported by reviewdog 🐶
Line 576 in 2daf52f
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
Reset non-typology files (bilateral_trade, gapfilling, production, livestock, etc.) to main's version. Restore files deleted by stale sub-branch merges (calculate_lmdi, harmonize, toy_examples). Keep typology-specific work in n_prov_destiny, n_soil_inputs_nue, utils. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restore example=FALSE parameter to create_n_prov_destiny, create_n_nat_destiny, create_n_soil_inputs, create_n_production, calculate_nue_crops, calculate_nue_livestock, calculate_system_nue to match main's API. Remove non-existent linear_fill, proxy_fill, sum_fill exports from NAMESPACE. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Accept remote updates to typology plot files (typologies_kgN_ha, typologies_spain_plot, typologies_spain_stacked_bar). Merge both sides for DESCRIPTION, _pkgdown.yml, .Rbuildignore, and whep-package.R. All 473 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These datasets were part of the old version= API approach. The current example=TRUE pattern uses toy_examples.R instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add rename_with(tolower) at the end of create_n_prov_destiny() and create_n_soil_inputs() to output snake_case column names (year, province_name, item, irrig_cat, box, origin, destiny, mg_n) matching main's API. Update all 15 downstream files (typology classifiers, grafs_plot, NUE functions, plots) to use snake_case column references. Add @param example and @examples documentation to all 7 exported N flow functions. Regenerate man pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update roxygen @return docs to use snake_case column names matching the actual output. Remove decorative dashes from exported function titles. Add detailed column docs to create_n_nat_destiny and irrig_cat to create_n_soil_inputs. Fix stray character at start of n_prov_destiny.R. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Match main's roxygen style: @param before @return, no decorative dashes in exported function titles, remove duplicate @param. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merge origin/main into alice/typologies. Keep rename_with(tolower) only at the public create_n_prov_destiny() boundary, not inside internal .add_n_soil_inputs. Take main's version for non-typology files. Add branch-specific typology section to _pkgdown.yml. Add mipfp, ggpattern, patchwork, sf, readxl, stringi deps for typology code. 679/684 tests pass (5 pre-existing failures on main). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove linear_fill, proxy_fill, sum_fill from _pkgdown.yml (renamed to fill_linear, fill_sum, fill_proxy_growth on main). Remove mipfp from Imports as it is no longer used. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace non-ASCII chars (en-dashes, superscripts) with ASCII in intensification_specialization_plot.R and land_use_typology_panel.R. - Add scales to Imports in DESCRIPTION. - Add missing globalVariables() for all typology NSE variables. - Remove Rplots.pdf and typology_kgha_agricultural.jpg from repo. - Add both to .gitignore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove explicit return() calls (use implicit returns). - Shorten function names exceeding 30 chars. - Fix T symbol to t_ratio (avoids shadowing TRUE). - Rename recycled_N to recycled_n (snake_case). - Add spaces after commas in tribble definitions. - Replace 1:nrow() with seq_len(nrow()). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove explicit return() in land_use_typology_panel.R, Typologies_Josette.R, typologies_spain_plot.R, typologies_spain.R. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pin names on the board were re-uploaded in kebab-case, so all whep_read_file() call sites and inst/extdata/whep_inputs.csv aliases are renamed to match. Also adapt .add_feed() to the new intake-ygiac schema (item_cbs, intake_MgFM) and rename Excr_MgN to N_excr_MgN in .create_livestock_gas_loss_df() for n-excretion-ygs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| "text", | ||
| x = -Inf, | ||
| y = Inf, | ||
| label = if (system == "Cropland") "Cropland" else "Semi-natural agroecosystems", |
There was a problem hiding this comment.
[air] reported by reviewdog 🐶
| label = if (system == "Cropland") "Cropland" else "Semi-natural agroecosystems", | |
| label = if (system == "Cropland") { | |
| "Cropland" | |
| } else { | |
| "Semi-natural agroecosystems" | |
| }, |
| ) | ||
|
|
||
| df <- .build_area_totals( | ||
| .sum_area_by_prov(npp_ygpit), typologies_df, typology_colors |
There was a problem hiding this comment.
[air] reported by reviewdog 🐶
| .sum_area_by_prov(npp_ygpit), typologies_df, typology_colors | |
| .sum_area_by_prov(npp_ygpit), | |
| typologies_df, | |
| typology_colors |
| df, year_breaks, "Mha", | ||
| "Total land area by typology", "Total area (Mha)", |
There was a problem hiding this comment.
[air] reported by reviewdog 🐶
| df, year_breaks, "Mha", | |
| "Total land area by typology", "Total area (Mha)", | |
| df, | |
| year_breaks, | |
| "Mha", | |
| "Total land area by typology", | |
| "Total area (Mha)", |
| df, year_breaks, "Percent_ha", | ||
| "Land area by typology (%)", "Share of total area (%)", |
There was a problem hiding this comment.
[air] reported by reviewdog 🐶
| df, year_breaks, "Percent_ha", | |
| "Land area by typology (%)", "Share of total area (%)", | |
| df, | |
| year_breaks, | |
| "Percent_ha", | |
| "Land area by typology (%)", | |
| "Share of total area (%)", |
|
|
||
| .sum_area_by_prov <- function(npp_ygpit, land_uses = NULL) { | ||
| df <- npp_ygpit | ||
| if (!is.null(land_uses)) df <- dplyr::filter(df, LandUse %in% land_uses) |
There was a problem hiding this comment.
[air] reported by reviewdog 🐶
| if (!is.null(land_uses)) df <- dplyr::filter(df, LandUse %in% land_uses) | |
| if (!is.null(land_uses)) { | |
| df <- dplyr::filter(df, LandUse %in% land_uses) | |
| } |
| ggplot2::scale_x_discrete(breaks = as.character(year_breaks)) + | ||
| ggplot2::scale_fill_manual(values = colors) + | ||
| ggplot2::labs( | ||
| title = title, x = "Year", y = y_label, fill = "Typology" |
There was a problem hiding this comment.
[air] reported by reviewdog 🐶
| title = title, x = "Year", y = y_label, fill = "Typology" | |
| title = title, | |
| x = "Year", | |
| y = y_label, | |
| fill = "Typology" |
No description provided.