Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using AMDB
  2. using DataStructures
  3. using GZip
  4. using UnicodePlots
  5.  
  6. # if we want to pass around code, extend it with your own machine name
  7. # (gethostname# ()) and path
  8. AMDB_path = get(Dict("tamas" =>
  9. "/home/tamas/research/AMDB/data/AMDB_subsample.jls.gz"),
  10. gethostname(),
  11. "/Users/emmamckeown/Documents/Thesis/AMDB_subsample.jls.gz")
  12. records = GZip.open(deserialize, AMDB_path, "r")
  13.  
  14. long_samples = [data for (id,data) in records if length(data.AMP_spells) > 1000]
  15.  
  16. length(long_samples) # 6
  17.  
  18. # let's look at the first one
  19. f = long_samples[1].VMZ_spells
  20. unique(spell.status for spell in f) # about 3 stauses
  21. # let's count them
  22. c1 = counter(Tuple{VMZ.Spell,VMZ.Einstellgrund}) # CHANGED HERE
  23. for spell in f
  24. push!(c1, (spell.status, spell.discontinuation))
  25. end
  26. c1.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement