We are clearly living in an era where data is crucial and significant. When I refer to data, I mean big data. Throughout history, various factors have defined powerful individuals, such as wealth, military strength, and loyal followers. In today’s context, I believe that those who have access to big data can be considered leaders. We are currently in an AI era that permeates our daily lives, highlighting the importance of data more than ever before.

If you enjoy math and statistics, working with data can be a fulfilling experience. You can derive various insights from it, depending on your perspective. Each individual can have a unique understanding of data analysis, highlighting the significance of data that cannot be overlooked.

For instance, if you are working on a scientific research project aimed at finding a treatment for a specific type of cancer, you likely recognize the critical role that data plays in your work. Accessing the records of millions of people who have faced that particular cancer can provide valuable insights to help guide your project more effectively.

Considering the aforementioned preamble, I want to address my curiosity about the US presidential election in 2024. I’ve often heard that states with a higher number of universities tend to lean towards the Democratic Party. To explore this idea, I decided to create both a choropleth map and a bar chart for visualization. Plotly Graphing Libraries offers a variety of excellent tools for creating visualizations and diagrams.

First, I extracted the latest updates of the USA 2024 presidential election for each county and state. You can access it in the this GitHub repository.

I compiled a list of the top U.S. universities based on the QS ranking from universityrankings.ch. To enhance this data, I need to add new columns for each university, including their states, the number of graduate and undergraduate students (to indicate the size of the university), and the percentage of domestic students. For this information, I referred to the API provided by the U.S. Department of Education. This API offers valuable data on all U.S. universities and colleges. I extracted the total number of students and the percentage of U.S.-born students from it.

The final stage involves data cleaning and data engineering to prepare the data for visualization. Since I am not proficient in data engineering, I received support from Clause, which provided me with the necessary code to obtain the final dataset before visualizing it.

Now you can see the results (To see the details, save the picture). The darker the color, the more top universities are found in that state. It appears that states with the best universities tend to lean more toward the Democratic Party. However, some states have shifted towards the Republican Party in recent elections. This suggests that we cannot apply the general trend observed in previous elections with complete certainty to the recent one.

In this analysis, I examine two different visual representations of data. The first visualization considers the number of domestic students at each university as a weight, reflecting the size of the university, when calculating the total number of universities per state. The second visualization, on the other hand, does not take university size into account. Both diagrams are illustrated below. It is clear that the size of the universities can significantly impact the results.

USA 2024 presidential election Vs Top US Universities and their size

USA 2024 presidential election Vs Top US Universities and their size

USA 2024 presidential election Vs Top US Universities without considering their size

USA 2024 presidential election Vs Top US Universities without considering their size

Certainly, by incorporating additional factors and visualizing them, you might derive different interpretations. Therefore, in data analysis, it is crucial to wisely select the parameters and entries.

You can look at the code and the university data below.