Hmm, I'm curious to see if this will work. Say someone has a long list of every MP in parliament with their party affiliation, i.e. column 1 is name and column 2 is party....
Can we still use parliament_data() to find the x and y coordinates, providing they specify the row numbers and type? It might be something to look into and in theory should be easy to implement (famous last words, right?!) as the data doesn't need to expand, we just need to map the x and y coordinates to each parliamentarian.
Provided the user writes seats = NULL, or even seats = "long_format" in parliament_data(), we could then say if (object$seats == NULL / "long_format") { calc_coordinates ... } .
For example...
data <- data.frame(
name <- c(...),
party <- c(...)
)
seats <- parliament_data(type = 'semicircle',
parl_rows = 8,
seats = "long_format",
election_data = data)
This should spit out the same data frame plus x, y, row, theta -- basically everything we get from calc_coordinates anyway. The user can then add whatever additional data they want, like colours, gender, etc.
Hmm, I'm curious to see if this will work. Say someone has a long list of every MP in parliament with their party affiliation, i.e. column 1 is name and column 2 is party.... Can we still use parliament_data() to find the x and y coordinates, providing they specify the row numbers and type? It might be something to look into and in theory should be easy to implement (famous last words, right?!) as the data doesn't need to expand, we just need to map the x and y coordinates to each parliamentarian. Provided the user writes seats = NULL, or even seats = "long_format" in parliament_data(), we could then say if (object$seats == NULL / "long_format") { calc_coordinates ... } .
For example...
This should spit out the same data frame plus x, y, row, theta -- basically everything we get from calc_coordinates anyway. The user can then add whatever additional data they want, like colours, gender, etc.