-
Notifications
You must be signed in to change notification settings - Fork 103
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
New treemap dialog #5540
New treemap dialog #5540
Conversation
' You should have received a copy of the GNU General Public License | ||
' along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
Imports instat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed.
sdgPlots.tbpFacet.Enabled = True | ||
sdgPlots.tbpLayers.Enabled = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think these two can go into the else of the rdoPrimary.checked then the sdgplots.showdialog remains outside the if statement.
@rdstern A quick one here- if you could install - |
@maxwell ok will do |
@maxwellfundi could you quickly add the dialogue to the project. If we remain cautious then let's start by calling it Treemap and putting it at the bottom of Procurement > Describe > Categorical. I am happy to test then or for you to merge first - it can't do much harm sitting there! |
@rdstern Okay am adding it there. Thanks. |
@dannyparsons there seems not to have had vbproj file on this dialog? |
@dannyparsons I have followed your suggestions and - so far so good. On the individual data it seems to work ok, with and without a filter. The example above is for just the smallest contracts - using the forcats::lump faility to set up the data for the filter! Aha, my first problem: Then I tried the different colours - seems ok I wasn't sure what to expect from Fill, so I tried with a variable and got an error. (I was on summary) I tried again with a numeric variable and the fill worked: I wonder how to change the colour scales - do we have that yet in the Plot options? We do have it with the wind roses! Two minor points are: A more major point is that the treemaps are designed for hierarchical (factor) data. So, for example, having continent and country within continent. Or region and country. I tried to do this through the Plot sub-dialogue. I notice that facets and editing of layers is only possible from the summary data. Then I could add subgroups. Is that intentional, i.e. we can't edit the facets or layers with the primary data? |
@africanmathsinitiative/developers this is ready for review.
Implements the
treemap
graph from thetreemapify
package, see details here https://cran.r-project.org/web/packages/treemapify/vignettes/introduction-to-treemapify.htmlAn interesting test is to use the WorldBank97 data from the Procurement library and use
country
as the identifier. You could also weight by the contract value. This will test the "Primary data" option. Use the "country" sheet to test the "Summary data" option.treemapify
package to test as it's not yet included in R-Instat