Baseball is America's game, so we wanted to see how it spread across America.

What it does

playerplaces is a vizualization tool that shows MLB player birth cities over time from the mid-1800s to the present day. Birth cities are indicated by dots on a map of the United States, showing how the geographic distribution of baseball players changed over time, from the early days in the Northeast, to the Great Lakes region and Southeast, and finally to the West Coast.

A second view on playerplaces allows the user to zoom in on a geographic place and drill down on a city and see information about the player(s) born there from any year. So playerplaces can be used both for overarching historical trends and for personal interest. (Which MLB players came from my hometown?)

How I built it

The data for playerplaces was collected from Sean Lahman's Baseball Archive ( We used SQL and Python to manipulate the data, CardoDB to create the maps, and HTML/CSS (with Bootstrap) for the webpage.

Challenges I ran into

The data source had city/state birth place, but did not provide lat/long, which was needed to create a map. We investigated several methods for adding lat/long to the data before settling on Open Geocode. Some players didn't have enough birth place data to display them on the map.

CardoDB would not display the year on the scroll bar when showing change over time.

Accomplishments that I'm proud of

What I learned

A lot about Cardo DB and Cardo CSS Different methods for pulling lat/long from city/state data. Even clean data sources can be difficult to work with.

What's next for MLB Player Birth Places Over Time

Take over the world; the sky is the limit!

Built With

  • bootstrap
  • cardodb
  • data-from-sean-lahman-main.csv
Share this project: