ensignlee / ssbook

ssbook
5 stars 3 forks source link

Abbreviate Team Names #164

Closed ensignlee closed 10 years ago

ensignlee commented 13 years ago

To save horizontal space in our table, let's abbreviate team names with displaying them in the /view page. We can use the ones that ESPN uses.

So instead of Astros, it'd be HOU, etc. I think people are smart enough to figure out that HOU can also be Texans, UofH, etc and that HOU with MLB next to is Astros while HOU with NFL next to it is Texans.

For pitcher names, there are abbreviations for those as well, so we can use those too.

Again, this is a smaller thing. We can give it to the person that we hire.

camerondavison commented 13 years ago

SELECT * FROMsource_sport_name``

Just FYI. I wrote a script to attempt to correlate a list of sports names. To be honest I cannot even remember where I got the original list from, I want to say ESPN. And that table has the results. I had to write a series of scripts that I then manually picked the correct team from and just iterated over for I want to say hours one day. It would be nice to work out a nice team name service or something. It is kind of hacky at this point. Since I have tried to do this even since the SS days I kinda keep thinking that it must be really hard.

If you do
SELECT * FROMsource_sport_nameWHEREgiven_nameIS NULL you can see the 200 something that still are not correlated. I am pretty sure that most of these are teams that do not have espn pages for them.

I think that I remember now that I took all the team names that I had seen for the past couple months then I used that name to lookup the team info page on ESPN by clicking the link for the team name and then reading the content of the page to see what the full name that ESPN gave them was.

All of the games then store the name of the team with the "score". I did this to minimize having to create a lookup table for the team names when searching for a game. And also it just kept more data in the score table for searching. Search was as easy as find where this team matches this character sequence.

This may need to be re worked if we want a team to be an entity rather than just a name. When I say entity I mean, Houston Astros Baseball Team is -> HOU, MLB and the such. Rather than now it is just "Astros v Reds" if that makes sense to you at all.

ensignlee commented 13 years ago

And just to make sure that we're clear, I think I'd just like a new column added to each team for abbreviation rather than actually replacing the team names. Obviously, this wouldn't be unique, as HOU could be Houston Astros, Houston Texans, Houston Rockets depending on league.

For now, let's not worry about abbreviating pitcher names unless you think that's easily incorporated (though I assume it would not be).