forestgeo / bciex

Easy access to data for examples -- from Barro Colorado Island, Panama.
https://forestgeo.github.io/bciex/
Other
1 stars 1 forks source link

What column name should habitat data have, habitat or habitats? #8

Open maurolepore opened 7 years ago

maurolepore commented 7 years ago

Hi @laosuz,

Should habitat data have column name habitat or habitats?

I noticed that the habitat data you sent me (which is here in bciex has column name habitat. But that is different compared to habitat data I saw from the Pasoh plot, which has column name habitats (ends in s).

names(bciex::bci_habitat)
#> [1] "x"       "y"       "habitat"

names(pasoh::pasoh_hab_index20)
#> [1] "x"        "y"        "habitats" "index5"   "index20"

Luckily, this small detail broke some code so I could notice the issue.

laosuz commented 7 years ago

Hi Mauro,

The file I sent you was not created by R functions, instead the habitats there were field observations done by Robin Foster/Rick/Rolando, which I entered into a text file. I just put “habitat” as the column name,

I believe that the one from Pasoh was probably created using the topography functions in R (i.e. slope?). However, I don’t think there are any R functions that decide what the habitat is, the user is the one who defines the habitat categories based on slope, convexity and mean elevation. Therefore, the user puts in the column name that he/she wants, whether habitat, Habitat, or habname, etc. You may want to put the name as a function parameter for the user to define? For example, “habname=habitat”, and the user changes it if his column name is ‘habitats’: habname=habitats.

Let me know if you have further questions.

Suzanne

From: Mauro Lepore [mailto:notifications@github.com] Sent: Thursday, September 07, 2017 11:02 AM To: forestgeo/bciex bciex@noreply.github.com Cc: Lao, Suzanne LAOZ@si.edu; Mention mention@noreply.github.com Subject: [forestgeo/bciex] What column name should habitat data have, habitat or habitats? (#8)

Hi @laosuzhttps://github.com/laosuz,

Should habitat data have column name habitat or habitats?

I noticed that the habitat data you sent me (which is here in bciex has column name habitat. But that is different compared to habitat data I saw from the Pasoh plot, which has column name habitats (ends in s).

names(bciex::bci_habitat)

> [1] "x" "y" "habitat"

names(pasoh::pasoh_hab_index20)

> [1] "x" "y" "habitats" "index5" "index20"

Luckily, this small detail broke some code so I could notice the issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/forestgeo/bciex/issues/8, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ac9rrlX2-G_wfs8ufwex66BZQ-SvCjQ2ks5sfpzFgaJpZM4POXWy.

maurolepore commented 7 years ago

@laosuz

Thanks Suzanne, This helps a lot. Now I know that the name is not rigidly defined and therefore the functions that use that name should be flexible enough or informative enough (i.e. the user gets a message saying what the name should be).

M