Lahman
Lahman copied to clipboard
Entity-Relationship (ER) diagram for Lahman
Many people find it hard to see how the various Lahman data frames are related: what are the keys that link the different data sets? One possibility is an ER diagram, commonly used to describe relational data bases.
A quick Google search turned up the datamodler package. Perhaps this could be used here in some way:
- In a vignette
- In the README.md as a package overview
I hope this tutorial will help: http://bergant.github.io/datamodelr/lahman.html
@bergant -- that's a great candidate for the vignette project! I had no idea that sort of functionality was available in R, but shouldn't have been surprised.
Perhaps we could use {dm} to both present the ER diagram and offer a data structure that has the keys integrated?
https://krlmlr.github.io/dm/
An example ER diagram or proof of concept would be welcomed
Looks interesting after a rather quick glance. I'd encourage anyone wanting to try this out in the short term to do so against the annual data update branch as there will be added data frames and potentially some (looking at you Master table..) removed.
I'm hoping to bring work on the annual data update to a close this weekend, and I'll update here as to where the best target branch is when it changes in a meaningful way.
I just added a graphic of the database schema I got from Sean Lahman to the README.md. Maybe this is sufficient
I think that the schema image addresses this issue nicely.
We don't want to lose the {datamodelr} example by @bergant, so I'll add it to the Vignette Introduction.
We don't want to lose the {datamodelr} example by @bergant, so I'll add it to the Vignette Introduction.
I just followed the {datamodelr} web connections, and see that the package has evolved/been incorporated into {dm}, which makes no mention of {Lahman}. I have a supplementary purpose for tackling this, so I'll put together a vignette demonstrating {dm} functions.
FYI: the {dm} page is here https://cynkra.github.io/dm/