Skip to content

Instantly share code, notes, and snippets.

@defuneste
Created May 12, 2026 16:33
Show Gist options
  • Select an option

  • Save defuneste/bfd2b759bffb5e6bd4b0e96170b7bfbb to your computer and use it in GitHub Desktop.

Select an option

Save defuneste/bfd2b759bffb5e6bd4b0e96170b7bfbb to your computer and use it in GitHub Desktop.
touch AMF_AR-CCG_FLUXNET_ERA5_MM_1981-2024_v1.3_r1.csv
echo "bob" >> AMF_AR-CCG_FLUXNET_ERA5_MM_1981-2024_v1.3_r1.csv
echo "42" >> AMF_AR-CCG_FLUXNET_ERA5_MM_1981-2024_v1.3_r1.csv
 select 
  split_part(filename, '_', 1 ) as data_hub, 
  split_part(filename, '_', 2) as site_id, 
  split_part(filename, '_', 4) as dataset,
  split_part(filename, '_',  5) as resolution
from
  read_csv('AMF_AR-CCG_FLUXNET_ERA5_MM_1981-2024_v1.3_r1.csv', filename = TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment