Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create plot_daisie_data #42

Closed
Tracked by #59
richelbilderbeek opened this issue Dec 29, 2021 · 11 comments
Closed
Tracked by #59

Create plot_daisie_data #42

richelbilderbeek opened this issue Dec 29, 2021 · 11 comments
Assignees

Comments

@richelbilderbeek
Copy link
Collaborator

richelbilderbeek commented Dec 29, 2021

Currently, we can plot the mainland and the island, i.e. data types mainland and island. However, the daisie_data cannot be plotted yet, which would be useful to verify the format_to_daisie_data function works nice.

It is easy to get a daisy_data from a daisie_mainland_data:

  daisie_mainland_data <- sim_island_with_mainland(
    total_time = 1,
    m = 10,
    island_pars = c(1, 1, 10, 0.1, 1),
    mainland_ex = 1,
    mainland_sample_prob = 1,
    mainland_sample_type = "undiscovered",
    replicates = 10,
    verbose = FALSE
  )
  ideal_daisie_data <- daisie_mainland_data$ideal_multi_daisie_data[[1]] # a daisie_data
  empirical_daisie_data <- daisie_mainland_data$empirical_multi_daisie_data[[1]] # a daisie_data

Plot each of these using plot_daisie_data

@richelbilderbeek richelbilderbeek self-assigned this Dec 29, 2021
@joshwlambert
Copy link
Owner

@richelbilderbeek given the function format_to_data_data is not longer in the package, that we stop development of plot_daisie_data. What do you think?

@richelbilderbeek
Copy link
Collaborator Author

richelbilderbeek commented Jan 10, 2022

[edit: removed my confused comment]
Hmmm, I am getting confused here. I understood the structure called daisie_data contains the info to make nice plots of the islands, for both the observed and ideal data.

What is the name of data structure I can use to plot the history of the island histories, for the observed and ideal data?

@joshwlambert
Copy link
Owner

I thought the new plan was:

  • island_tbl to ideal_island_tbl and empirical_island_tbl
  • ideal_island_tbl is plotted by plot_ideal_island_tbl
  • empirical_island_tbl is plotted by plot_empirical_island_tbl

Would be the only plotting functions for the plotting the island?

@richelbilderbeek
Copy link
Collaborator Author

Hi @joshwlambert, thanks for clearing that one up!

I still would enjoy plotting the DAISIE data: it allows one to verify that the conversion from DAISIEmainland data to DAISIE has gone

However, I will focus on plotting the ideal_island_tbl and empirical_island_tblfirst (i.e. #51)

@richelbilderbeek richelbilderbeek changed the title Create plot on daisie_data Create plot on daisie_data in next release Jan 11, 2022
@richelbilderbeek
Copy link
Collaborator Author

This is something for after the next release. I will ruthlessly close it for now.

@richelbilderbeek
Copy link
Collaborator Author

Nope, it appears this is what #59 actually depends on; to be able to plot a daisie_data, so I reopen this one, as I am now working on it :-)

@richelbilderbeek richelbilderbeek changed the title Create plot on daisie_data in next release Create plot_daisie_data Jan 13, 2022
richelbilderbeek pushed a commit that referenced this issue Jan 13, 2022
@richelbilderbeek richelbilderbeek changed the title Create plot_daisie_data Create plot_daisie_data Jan 13, 2022
@richelbilderbeek
Copy link
Collaborator Author

Screenshot from 2022-01-13 18-11-12
Screenshot from 2022-01-13 18-14-07

@richelbilderbeek
Copy link
Collaborator Author

Beautiful in a base-functionality-appreciated way:

Screenshot from 2022-01-14 11-22-56

@richelbilderbeek
Copy link
Collaborator Author

More clades works great too:

Screenshot from 2022-01-14 11-28-33

@richelbilderbeek
Copy link
Collaborator Author

An example when the two data sets differ:

Screenshot from 2022-01-14 11-30-04

test_that("much branching", {
  set.seed(
    1018,
    kind = "Mersenne-Twister",
    normal.kind = "Inversion",
    sample.kind = "Rejection"
  )
  daisie_mainland_data <- sim_island_with_mainland(
    total_time = 1,
    m = 10,
    island_pars = c(1, 1, 10, 0.1, 1),
    mainland_ex = 1,
    mainland_sample_prob = 1,
    mainland_sample_type = "complete",
    replicates = 1,
    verbose = FALSE
  )
  plot_daisie_mainland_data(daisie_mainland_data, replicate_index = 1)
})

@richelbilderbeek
Copy link
Collaborator Author

Done!

Screenshot from 2022-01-14 17-08-13

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

No branches or pull requests

2 participants