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

Entity-Relationship (ER) diagram for Lahman #35

Open
friendly opened this issue Oct 9, 2017 · 8 comments
Open

Entity-Relationship (ER) diagram for Lahman #35

friendly opened this issue Oct 9, 2017 · 8 comments

Comments

@friendly
Copy link
Collaborator

friendly commented Oct 9, 2017

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
@bergant
Copy link

bergant commented Oct 13, 2017

I hope this tutorial will help: https://bergant.github.io/datamodelr/lahman.html

@MonkmanMH
Copy link
Collaborator

@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.

@krlmlr
Copy link

krlmlr commented Mar 27, 2020

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/

@friendly
Copy link
Collaborator Author

An example ER diagram or proof of concept would be welcomed

@cdalzell
Copy link
Owner

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.

@friendly
Copy link
Collaborator Author

I just added a graphic of the database schema I got from Sean Lahman to the README.md. Maybe this is sufficient

@MonkmanMH
Copy link
Collaborator

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.

@MonkmanMH
Copy link
Collaborator

MonkmanMH commented Mar 30, 2022

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants