Skip to content

Conversation

josenino95
Copy link

@josenino95 josenino95 commented Aug 22, 2025

If this pull request addresses an open issue on the repository, please add 'Closes #NN' below, where NN is the issue number.
Closes #484, closes #302

Please briefly summarise the changes made in the pull request, and the reason(s) for making these changes.
Based on #484, and specifically this comment, changes were made in all .Rmd files inside the episodes/ directory to improve variable names following best practices: not using dots, use snake_case, and overall making them consistent across episodes.

To make sure I didn't break any part of the lesson, I compared side-by-side the current rendered lesson and my local rendered version with the name changes and made sure that everything was ok. It was relatively simple, as the Rmd integration let me know if there was an error in a code chunk or graph. And I made sure all the outputs of the code chunks (including plots) were being generated correctly in the rendered version of my changes.

The idea is that this PR is merged when the lesson is not being actively taught, which to our knowledge will be on Sept 2.

I preview of how the changes look like is here https://carpentry.library.ucsb.edu/r-raster-vector-geospatial/, if you'd like to also compare side-by-side

Here is a complete list of the 84 variable names that were changed, written in the format old_variable_name -> new_variable_name:

_HARV_dsmCrop_info -> harv_metadata DSM_HARV -> dsm_harv DSM_HARV_df -> dsm_harv_df RGB_stack -> rgb_stack DSM_highvals -> dsm_high mycolors -> my_colors DSM_hill_HARV -> dsm_hill_harv DSM_hill_HARV_df -> dsm_hill_harv_df DSM_SJER -> dsm_sjer DSM_SJER_df -> dsm_sjer_df DSM_hill_SJER -> dsm_hill_sjer DSM_hill_SJER_df -> dsm_hill_sjer_df DTM_SJER -> dtm_sjer DTM_SJER_df -> dtm_sjer_df DTM_hill_SJER -> dtm_hill_sjer DTM_hill_SJER_df -> dtm_hill_sjer_df DTM_HARV -> dtm_harv DTM_hill_HARV -> dtm_hill_harv DTM_HARV_df -> dtm_harv_df DTM_hill_HARV_df -> dtm_hill_harv_df DTM_hill_UTMZ18N_HARV -> dtm_hill_utm_harv DTM_hill_HARV_2_df -> dtm_hill_utm_harv_df DSM_hill_SJER_WGS -> dsm_hill_wgs_sjer DSM_hill_UTMZ18N_SJER -> dsm_hill_utm_sjer CHM_HARV -> chm_harv CHM_HARV_df -> chm_harv_df CHM_ov_HARV -> chm_ov_harv CHM_ov_HARV_df -> chm_ov_harv_df CHM_ov_SJER -> chm_ov_sjer CHM_ov_SJER_df -> chm_ov_sjer_df RGB_band1_HARV -> rgb_b_1_harv RGB_band1_HARV_df -> rgb_b_1_harv_df RGB_band2_HARV -> rgb_b_2_harv RGB_band2_HARV_df -> rgb_b_2_harv_df RGB_stack_HARV -> rgb_stack_harv RGB_stack_HARV_df -> rgb_stack_harv_df HARV_NA -> harv_na RGB_sds_HARV -> rgb_sds_harv aoi_boundary_HARV -> aoi_boundary_harv lines_HARV -> lines_harv point_HARV -> point_harv footpath_HARV -> footpath_harv boardwalk_HARV -> boardwalk_harv stoneWall_HARV -> stonewall_harv lines_showHarv -> roads_bike_horse state_boundary_US -> state_boundary_us roadColors -> road_colors country_boundary_US -> us_outline NE.States.Boundary.US -> ne_states_outline plot_locations_HARV -> plot_locations_harv utm18nCRS -> utm_18n_crs plot_locations_sp_HARV -> plot_locations_sp_harv newplot_locations_HARV -> newplot_locations_harv geogCRS -> wgs_84_crs newPlot.Sp.HARV -> newplot_sp_harv CHM_HARV_sp -> chm_harv_sp plots_HARV -> plots_harv CHM_HARV_Cropped -> chm_crop_harv CHM_HARV_Cropped_df -> chm_crop_harv_df CHM_plots_HARVcrop -> chm_crop_p_harv CHM_plots_HARVcrop_df -> chm_crop_p_harv_df CHM_plots_HARVcrop_sp -> chm_crop_p_harv_sp CHM_HARV_manual_cropped -> chm_crop_harv_custom CHM_HARV_manual_cropped_df -> chm_crop_harv_custom_df tree_height -> tree_ht mean_tree_height_AOI -> avg_tree_ht_aoi mean_tree_height_plots_HARV -> avg_tree_ht_p NDVI_HARV_path -> ndvi_harv_path all_NDVI_HARV -> all_ndvi_harv NDVI_HARV_stack -> ndvi_harv_stack NDVI_HARV_stack_df -> ndvi_harv_stack_df har_met_daily -> harv_met_daily RGB_133 -> rgb_133 avg_NDVI_HARV -> avg_ndvi_harv julianDays -> julian_days NDVI_path_SJER -> ndvi_path_sjer all_NDVI_SJER -> all_ndvi_sjer NDVI_stack_SJER -> ndvi_stack_sjer avg_NDVI_SJER -> avg_ndvi_sjer julianDays_SJER -> julian_days_sjer NDVI_HARV_SJER -> ndvi_harv_sjer rgb.allCropped.SJER -> rgb_allcropped_sjer NDVI.rastStack -> ndvi_raststack avg_NDVI_HARV_clean -> filtered_avg_ndvi_harv avg_NDVI_SJER_clean -> filtered_avg_ndvi_harv_

Copy link

github-actions bot commented Aug 22, 2025

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/datacarpentry/r-raster-vector-geospatial/compare/md-outputs..md-outputs-PR-495

The following changes were observed in the rendered markdown documents:

 01-raster-structure.md                             |  48 ++++-----
 02-raster-plot.md                                  |  78 +++++++--------
 03-raster-reproject-in-r.md                        | 108 ++++++++++-----------
 04-raster-calculations-in-r.md                     |  72 +++++++-------
 05-raster-multi-band-in-r.md                       |  52 +++++-----
 06-vector-open-shapefile-in-r.md                   |  42 ++++----
 07-vector-shapefile-attributes-in-r.md             |  90 ++++++++---------
 08-vector-plot-shapefiles-custom-legend.md         |  42 ++++----
 09-vector-when-data-dont-line-up-crs.md            |  44 ++++-----
 10-vector-csv-to-shapefile-in-r.md                 |  66 ++++++-------
 11-vector-raster-integration.md                    |  76 +++++++--------
 12-time-series-raster.md                           |  66 ++++++-------
 13-plot-time-series-rasters-in-r.md                |  26 ++---
 14-extract-ndvi-from-rasters-in-r.md               |  90 ++++++++---------
 chm_ov_sjer.tiff (new)                             | Bin 0 -> 6656567 bytes
 ...integration-rendered-compare-data-extents-1.png | Bin 35338 -> 35206 bytes
 ...tion-rendered-repeat-compare-data-extents-1.png | Bin 35338 -> 35206 bytes
 md5sum.txt                                         |  28 +++---
 18 files changed, 464 insertions(+), 464 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2025-08-22 21:02:48 +0000

github-actions bot pushed a commit that referenced this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve naming of variables use a different file naming system
1 participant