langcog / childes-db

A SQL interface for the CHILDES child language corpora
13 stars 5 forks source link

add token table in frequency app #25

Closed ebergelson closed 5 years ago

ebergelson commented 7 years ago

this is more of a feature request than a bug, but would be super cool be able to go from a graph of frequency in ppm to a table where each line tells you word, speaker, corpus, age, name_of_file, timestamp_in_file, e.g. happiness, ethan, providence, 3y8m, recording_whatever, 5m42s.

amsan7 commented 7 years ago

Hi, thanks for the feature request! If I understand correctly, you'd like to see another "Table" tab alongside "Plot" with the above information?

If you know R, you can use our childesr package to get something similar:

> get_tokens(token="happiness", role="Target_Child") %>%
+     select(gloss, speaker_name, corpus_id, target_child_age, transcript_id)
Getting data from 633 children in 64 corpora...
# A tibble: 25 x 5
       gloss speaker_name corpus_id target_child_age transcript_id
       <chr>        <chr>     <int>            <dbl>         <int>
 1 happiness          Eve         9           635.25          1172
 2 happiness          Eve         9           635.25          1172
 3 happiness          Eve         9           635.25          1172
 4 happiness          Eve         9           635.25          1172
 5 happiness          Eve         9           730.50          1178
 6 happiness          Eve         9           790.50          1182
 7 happiness          Eve         9           790.50          1182
 8 happiness          Eve         9           790.50          1182
 9 happiness          Eve         9           790.50          1182
10 happiness          Eve         9           790.50          1182
# ... with 15 more rows
ebergelson commented 7 years ago

Hi, Thanks! Yeah I could definitely just work with childesr to get that tibble directly; thought it might be a nice complementary output table for your shiny stuff. Glad you all are doing this! best, e

On Sat, Oct 21, 2017 at 5:28 PM Alessandro notifications@github.com wrote:

Hi, thanks for the feature request! If I understand correctly, you'd like to see another "Table" tab alongside "Plot" with the above information?

If you know R, you can use our childesr https://langcog.github.io/childesr//index.html package to get something similar:

get_tokens(token="happiness", role="Target_Child") %>%

  • select(gloss, speaker_name, corpus_id, target_child_age, transcript_id) Getting data from 633 children in 64 corpora...

    A tibble: 25 x 5

    gloss speaker_name corpus_id target_child_age transcript_id

    1 happiness Eve 9 635.25 1172 2 happiness Eve 9 635.25 1172 3 happiness Eve 9 635.25 1172 4 happiness Eve 9 635.25 1172 5 happiness Eve 9 730.50 1178 6 happiness Eve 9 790.50 1182 7 happiness Eve 9 790.50 1182 8 happiness Eve 9 790.50 1182 9 happiness Eve 9 790.50 1182 10 happiness Eve 9 790.50 1182 # ... with 15 more rows

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/smeylan/childes-db/issues/25#issuecomment-338433668, or mute the thread https://github.com/notifications/unsubscribe-auth/AKknNBk9wYZ-SkBSLyeRC7IGsFUuGDHxks5sumH8gaJpZM4QBqzm .

-- Elika Bergelson, PhD Assistant Professor, Duke University Psychology and Neuroscience Dept.

smeylan commented 5 years ago

moving to shiny repo issues