Category: DataViz Turned-In Assignments

Final Project: Effect of Population Movement on US Co2 Emissions

If you took the residential location of every single person in the United States, and marked the single average location with a pencil head… THAT would be the mean population, or population centroid, of the United States.

Since the first U.S. Census in 1790, the mean population of the United States has moved progressively south and westward. The movement in the 19th century tracked predominantly west, as populations migrated westward across the US to settle in new states. The 20th century saw a shift southward, as the invention of Air Conditioners allowed for move livable environments in southern areas, as well as fast-growing hispanic populations and the growth of the Texas oil industry. Economists are able to calculate the mean population every 10 years, when the US Census collects its data.

Click on the points in the following map to view the population centroid of the United States from 1950 through 2010.

Now, what would have happened if the population centroid of the United States had not moved after 1980? Hypothetically, how would the level of Carbon Dioxide emissions be affected if the entire population of the United States stopped migrating internally, and every reproduced at the same rates where they were?

First, a few things to consider, in order to contextualize our exploration..

Currently, each state in the United States emits a different amount of carbon dioxide per resident. You can navigate the graphic below by hovering your mouse and clicking to get a better sense of which states emit the highest levels of carbon dioxide per resident.

A state may have a very high emissions rate per person, but a smaller population, and therefore less total emissions. A larger state, such as California, may emit the second largest amount of Co2, but have one of the smallest emissions rates per person because of the large population that lives there. Each state emits carbon dioxide through one of three primary modes which are shown below: Natural Gas, Coal and Petroleum.

You can look at the composition, and total emissions for each state below. They are ordered with the highest emissions per capita at the top, descending to the lowest emissions per capita at the bottom. The width of the bar at right shows the the total emissions of that state in 2014, broken up by fuel type (in Million Metric Tons (MMT) of Co2).

By taking the 1980 population data for each state, and dividing into the total population, we find a value representing the proportion of the total population for that state in 1980. We use this scale with current population data, and apply Carbon Emissions rates to the hypothetical population, in essence giving us the emissions of the US if the population had not moved. Each state responded differently, and we mapped the difference in emissions between the actual state emissions, and the hypothetical emissions, if there had been no population movement since 1980.

We can see the effect of this hypothetical scenario on the annual U.S. emissions from 1980 to the most recent emissions data in 2014.

The emissions are slightly higher in the hypothetical scenario, but how much higher? In the graph below, we can see the difference (in million metric tons of carbon dioxide) between actual US emissions, and US emissions had there had been no population movement after 1980.

If we add up all of the emitted carbon dioxide in both scenarios between 1980 and 2014, and calculate the difference, we find th

If there had been no population movement, we would have emitted an additional 2.94 Billion Metric Tons (BMT) of Carbon Dioxide beyond what we actually emitted.

How much is 2.94 BMT of Carbon Dioxide exactly?


While this is impressive, it is only 1.5% of the total amount emitted by the United States over the course of these 34 years (184.88 Billion Metric Tons of Co2).

US Census Bureau

U.S. Energy Information Agency

United States Environmental Protection Agency


What’s 2018 Bringing to Our Plates? Get your fill here.

Final Project, Dataviz: Divya Murthy


The quickest way to a person’s heart is through the stomach — but that’s if the stomach lets you pass. Food trends over the decades have never failed to touch a nerve or evoke awe, from the controversial, yet somehow persistent Jello-o salad (a relic, at this point) to the collective hoarding of kombucha bottles more recently.

Every year, extreme diets, food fads and quirky ingredients take culinary culture by surprise. In 2009, people tried dumping butter in their coffees, bacon-flavored ice cream edged its way into 2012 and cronuts (croissant-donuts) won best invention of the year in 2013.

Timeline Dark


Apart from new dishes, new ingredients like kale, matcha and anything black (for instance, squid ink) have also risen in popularity in recent years. Younger groups of people and the population in general are also more interested than ever in forming healthy food habits, be it through cutting sugar or calories.


This seems to be confirmed by a pattern of consumer expenditure in recent years — between 2013 and 2016, consumer spending on cereal, bakery products, sugar and sweets went up and down, but simultaneously, expenditure on fresh fruits and vegetables went up from $506 to $542 between 2013 and 2016. Be it through exercises, healthier food options or more affordable nutrition, consumers are opting to give trends a shot while remaining healthy.

And what trends are indulging taste buds this year? You’ll see a good sprinkling of leafy herbs, functional mushrooms and gut-pleasers in the form of probiotic, prebiotic and anti-inflammatory ingredients. The fascinating thing, as always with trends that cross borders, is how far an ingredient can come from its home to a lucky tummy. Check out the map at the bottom to see the journey that some of 2018’s hero ingredients have taken.

  1. Tastebuds on the Map:

Travel the world by going out to eat — localizing global cuisines and a growing appreciation for popular foods around the world will promote some experimenting and belly-rubbing this year. This plays well into other trends in the restaurant industry like the influx of prebiotic, anti-flammatory and probiotic ingredients from regions around the world — like turmeric (found in the Indian subcontinent), aloe (native first to the Arabian peninsula) and skyr (a type of cheese grown for a thousand years in Iceland).


  1. Hunger for humane food:

People want to know that the food they are eating is fairly sourced and traded and is cruelty-free. They want to know that the protein they’re eating has had a good life — from farm-raised eggs to pasture-fed meats with no cruelty or factory-processing cutting through the process.


  1. Edible flowers:

We’ve all heard of jasmine tea and rose tea by now, but get ready for pansies, geraniums and nasturtiums to shift from the Food Network to your plates. Middle Eastern, Asian and European cuisines are home to edible flowers, according to Consumer Reports, and that trend is becoming mainstream across the pond as well.


4. Midas touch:

If you ever wanted a sit-down dinner to feel like royalty, 2018 is the closest you can come to it — the report believes that all dishes will turn to gold this year with dustings and 24-karat edible leaf inclusions atop pastries and cakes.




Top Food Trends 2018

Food Trends to Know in 2018

Consumer Expenditure Survey, Bureau of Labor Statistics

45 Years and More of Food Crazes

9 Ways Millennials are Changing the Way We Eat

7 Trends that will Shape Restaurants in 2018


Independent Learning: Stefan Oliva

For our independent learning requirement, I watched a tutorial about sublime text 3 to enhance the highcharts chart I used in my final project. I was struggling with the x-axis because there were categories that showed up as numbers instead of what I wanted. But after looking through another piece of code that I did earlier in the semester and doing a side by side comparison, I realized that I was did not pay close enough attention to punctuation, which makes a huge difference in coding.

I sometimes struggled with using sublime earlier in the semester because I was unfamiliar with code and this video showed a few useful short cuts and techniques to make the experience a little easier. One of the tricks that was used in the video was how to do a side by side comparison of multiple tabs. The way to do that is to click the view tab, then layout and from there you can select the number of columns you want depending on how many projects you’re working on and how big your screen is. I only did two because that’s all I needed. In addition to having multiple tabs open, you can also go to the file tab and select new view into file, which creates a new tab of the same file you’re working on. That allows you to work on different parts of the same file simultaneously.

I also learned that you can switch through tabs without overcomplicating the process or risking closing something. The two ways to do so are by typing shift, command followed by either the left or right bracket or simply hit the number on the keyboard of the tab you want to access. Conversely, if you want less clutter on your project, you can close a tab by typing shift, command, t.

Final Assignment: The red numbers of suicide in Cuba

Every day in Cuba four people end their lives by committing suicide, according to Cuban official records.

In 2016 the number of death due to this cause was 1429, according to the National Office of Statistics and Information of Cuba (ONEI, in Spanish) and the “Anuario Estadistico del Ministerio de Salud de Cuba 2016”.

If you google “suicide” and “Cuba” the main articles are about the son of the deceased Cuban leader Fidel Castro Ruz, named Fidel Castro Diaz-Balart. In February,  Castro Diaz-Balart committed suicide in La Habana, as the official press published. That brought to the public agenda once again the sensitive topic of mental health issues and suicide in the island.

For several decades, suicide has been included in the 10 first main causes of death in Cuba, with almost the same number of death than the ones caused by cirrhosis.

Main causes of death in Cuba

To understand the real dimension of the numbers we need to compare them with other countries. In America and the Carribean, Cuba is the 8th country with the higher rate of suicides, only preceded by Argentina, United States of America, Trinidad and Tobago, Uruguay, Bolivia, Suriname and Guyana.

The data used on this regional map is from the World Health Statistics inform of the World Health Organization (WHO) in 2017. The numbers are from 2015 and are not the same that the official institutions in Cuba released in that year. The WHO stated Cuba had a rate of 14.0 per 100 000 individuals while the island said it was 13,3 in that year.

Despite that incongruence, if we analyze the suicide rate over the past years it seems to be pretty stable, which means that numbers aren’t worse, but also that the situation does not tend to make a major improvement.  Only in 2016 the rate was under 13 for the first time in more than 5 years.

Referring to sex, data shows an extremely difference of numbers that make men the most affected by suicide.


There are several questions that remain unknown as not all the data about the topic is public. However, a study from the Centro de Estudios Demográficos (CEDEM) (Demographic Studies Center) released an investigation in 2010 about suicide in Cuba in the period of 2004-2008. These are some of their conclusions based on data given directly to the authors from the Dirección Nacional de Registros Médicos y Estadísticas de Salud (National Direction of Medical Records and Health Statistics) :

– Historically, men suicide rate is several points higher than women.

– White people tend to commit suicide more than any other race in Cuba.

– Hanging is the principal method for self-injuries. In 2004 that was the method for 88,5 percent of all the suicide cases and in 2008 was 71,9 percent. Another methods are using a fire gun and jumping from a building.

– The principal age group affected by suicide is 60 years old or older.


Note: The graduate student publication requirement can be checked on this website about Cuba.

A Brief History of the Black Panther Party

I know the new movie Black Panther is very different from the Black Panther Party for Self Defense (BPP) but since the movie has everyone talking about Black Panther, I thought I would revisit the historical and legendary organization. I once photographed Bobby Seale, one of the founders and leaders of the BPP in Oakland in 2002 upon his return to his hometown after living on the East Coast for decades. He was disappointed at the state of affairs in the Black community after all of the work the BPP did to help. With the current situation of police killings of unarmed Black people and the structural divisiveness on many levels in society, there is a question of whether the community programs that the Black Panther Party implemented could work again today. With what we know now, how could we improve upon what the organization stood for? So, as we think about Wakanda in the recent Black Panther movie on the big screen, we can see that Wakanda is exactly what the Black Panther Party for Self Defense was trying to create.

The Black Panther Party for Self-Defense was co-founded by Huey P. Newton and Bobby Seale in 1966. There were six original members to begin with and the organization was created to patrol the streets of Oakland, protecting the Black community from police violence and harassment. The Panthers created their Ten-Point Program for what they wanted from society which included, freedoms, safety, education, jobs and above all equality and peace. They understood their right to bear arms and did so publicly protesting at rallies fully armed. However, that was not the only way they served and protected their communities “you just read about the guns, you don’t read about the survival programs we had going on for the people, the free children’s breakfast program, trying to feed some of these hungry kids before they go off to school..” Huey P. Newton pointed out during an interview. The BPP sold newspapers to fund their community survival programs which included the free breakfast program, education, the Liberation Schools, healthcare and clinics, legal help, clothing programs, food coops, housing programs, free ambulance service, teen and youth programs, arts and sports.

During the height of their popularity the Black Panther Party had 5,000 full-time members (they could have had more but one could only be a member full-time, there were no volunteers), was selling 200,000 papers per week, feeding 20,000 meals per week. The Panthers had more than 45 authorized chapters with members in Algeria, Cuba, United Kingdom and 68 cities in the United States.


The Black Panther Party was so powerful that the F.B.I. began specifically targeting them in 1969 with the COINTELPRO surveillance. Members were shot and killed during raids and showdowns and many were arrested. Both Huey Newton and Bobby Seale were jailed at the same time putting stress on the organization for leadership. Although there were external forces that lead to internal fighting and confusion, both eventually contributed to the demise of the BPP. By 1980 the membership could claim only 27 full-time members and was officially ended in 1982. A vertical timeline shows some of the poignant moments of the Panther history. Can this be done today? Let me know your thoughts.

BLACK PANTHER PARTY: Vanguard Of The Revolution

The Black Panther Party for Self-Defense

Final Project: Stefan Oliva

NBA basketball changed immensely between the 1979-80 season –the year the three-point line was implemented– and the 2016-17 campaign. Players are attempting (and making) many more triples and scoring less points around the basket, A.K.A. the paint or post. Most players who attempted three pointers were point guards, shooting guards and a few small forwards. Those players are usually smaller and quicker than power forwards and centers and score more points from the perimeter than the latter two positions.

The three-point line was unpopular among players when it was introduced because many had to adjust their approach to the game and weren’t comfortable taking a triple unless it was absolutely necessary. But as time passed, players developed a rhythm and realized its importance to the sport, so the number of triples sky rocketed. There are several reasons this transformation happened.

The game is a lot less physical than it used to be, mostly because of rule changes like eliminating hand checking, which let defenders have both of their hands on opposing players at all times. This rule was done away with in the 1994-95 season, which is roughly the time when the concept of the stretch 4, a power forward who can stretch defenses with three-point range, was becoming a staple in the NBA.

The Houston Rockets won the championship that season because they put four shooters on the court at the same time as their legendary center Hakeem Olajuwon, which opened up driving lanes for guards and allowed for Olajuwon to pass out of the post when he got double teamed. At the time, only a handful of teams played like this, but now, almost every squad implements this strategy.

To show just how important the three-point shot is to modern basketball, 12 of the 16 teams who made the playoffs (out of 30 total) in the 2016-17 season had the best percentage of three-point field goals in the league. And nine of those 16 teams led in three point makes. By comparison, only five playoff teams in 1979-80 were in the top 12 –that was how many teams made the post season that year because there were 22 teams in the NBA– for three-point percentage. And only five playoff teams were in the top 12 for most made three pointers. This trend is also reflected in averages.

Playoff Teams Three Point Impact

The league average for three point makes per team in the 1979-80 season was 64, which is 0.78 per game. To put that in perspective, that number in the 2016-17 campaign was 792, which translates to 9.65 triples a game. The chart below shows the league average for three pointers made per season and its percentage from that territory.

NBA Three Pointer Evolution

What’s interesting, though, is that the increase of three pointers has not affected overall scoring. In fact, in the 2016-17 season, teams averaged less points (8,658 for the year, roughly 105.6 points a game)  than in 1979-80 (8,965 for the season, 109.3 points a contest).

That’s because teams got more points closer to the basket and from the free throw line in the latter season.

The impact of the triple can also be seen on an individual level. When the three-point line made its debut, the league leader for made triples was Brian Taylor, who drained 90, which is 1.09 a contest. The leader in the 2016-17 season was Stephen Curry, who made 324 three pointers, which is 4.1 per game. Making 3s is crucial to having a successful team, but so is defending the three-point line.

The league average for three-point field goal percentage in the 2016-17 regular season was 35.8 percent. 12 of the teams that made the playoffs held squads below that mark, ranging from 32.4 percent to 35.7 percent in opponent’s three point field goal percentage.

To compare that, in 1979-80, the average three-point field goal percentage was 28 percent. And seven playoff teams were in the top 12 for defending the three-point line, ranging from 23.8 percent to 27.1 percent. The triple was not as much of a factor as it is now, so that’s also one reason the accuracy was much lower in the 1979-80 season.

Something to keep an eye out for is if teams eventually attempt more three pointers than two pointers. It might not be far off, as teams like the Houston Rockets and Cleveland Cavaliers took 46.1 percent and 40.1 percent of their shots from deep, respectively.

For season comparison statistics, I got my information from basketball reference here: and here:

For the amount of three pointers players made per game and for rule changes in the NBA, I went here: and here:

For how the game changed in the 1994-95 season, I went here:

For the teams’ rates of three pointers, I went here:

Independent Learning

-Amanda Dominguez

Something that stuck with me early on in the course was the comment that I needed to pick better graphs to match the data I select. Often, it can be difficult for me to visualize what typeof chart would be the easiest to look at it while providing the right information. The first graph  I made was too busy and made it hard to understand the data being displayed. From then on, I tried to be more careful with the charts I selected.

I chose to take this course, which is titled “Picking the Right Chart for Your Data.” This was incredibly helpful with my final project for a few reasons. I had such a large amount of data (every terrorist attack from 1970-2016) and was having trouble zoning in on the data i wanted to represent, and how to best display it.

This course went through the following topics: determining what to focus on, reviewing the standard chart categories, bars and columns, line charts, pie charts, histograms, using cumulative charts and finding alternatives to the standards. A lot of the points made matched what we learned in class, such as keeping the visualizations simple and not bombarding the audience with too much information at once.

I feel that this course helped me to put the skills we have learned to their best use. Many of my classes this semester involve final presentations on my own research.  I feel that the skills I learned in class combined with the ability to select the best way to visualize it will be a competitive advantage.

I would highly recommend everyone watch this!

CB Garrett– Independent Learning Assignment

For my independent learning assignment, I used Lynda to enhance my skills in Tableau and create the first chart in my final project, an area chart, which I embedded here.

The area chart does a really good job of showing the overall success of each of the seeds, but also allows you to view how each individual team did.

Personally, I like Tableau better than any of the data visualization tools we have used in class so far this year. While I will agreed that NVD3 can create higher quality visualizations, you need very strong coding skills to be able to put this into use at the highest level.

Tableau requires no coding an is just as interactive as all of the other visualization tools we used in class. It also allows you to import different pictures, maps, etc. and put it underneath to enhance your visualizations more for shot charts etc. Perhaps the best feature of Tableau is it can link straight to an Excel workbook. As you update the Excel workbook, by simply refreshing in Tableau your data is up to date. This is very useful for constantly updating datasources and makes it easy to make updates or corrections.

I also learned for this project how to upload graphs from Tableau Desktop to Tableau Public. This is useful because it creates almost like an online portfolio of your data visualization skills and also allows it to easily be embedded into an article, such as the final project. It is also cool because it allows an option for the data to be downloaded by users so they can check your work, see the methods you took, or create to visualizations with your data.

Breaking Down March Madness Bracket Trends — CB Garrett Final Assignment

The NCAA men’s basketball tournament field has been set. This means it is time for one of the most highly anticipated parts of the sporting year: filling out brackets NCAA Tourney Brackets. Filling out NCAA Tourney Brackets is one of the least exact sciences out there, as even with high level computer programs it is hard to predict the outcome of a NCAA basketball game. This is due to a variety of factors including a small season leading to a small sample size of data, the often lack of similar opponents, and simple variability of college basketball – with the three-point shot making this even more of the case.

So, while the odds of the predicting a perfect bracket sitting at 1 in over 9 quintillion, using some advanced statistics based on trends from the last five seasons worth of NCAA tournament teams I will try to show what types of teams might be more likely to make your bracket look good in March. All data is via the Massey Ratings Index and KenPom.

This first graph looks at the likelihood of each seed advancing to a specific round of the NCAA Tournament and by hovering over the graph you can take a look at the team and the season that made it to that round. The round is essentially the round that the team lost in, with the teams that reach the round of “1” being the national champions for that season. The round of 68 is a play-in game amongst seeds, and one of those teams. So for example, both teams playing in a play-in game amongst 16 seeds, one will lose, meaning that the number of teams that lost in the round of 68 is equal to the number of play-in games between 16 seeds.

A couple interesting trends begin to emerge. First, in the five-year sample, a 16 seed as never won a non-play-in game (and play-in games are not part of what you need to fill out on your bracket). This holds true not only in the five years, but in fact a 16 seed has never bested a one seed to move on to the second round, so it makes sense to just advance all 16 seeds in your bracket. If you are looking for upsets to add to your bracket, your best bets might be the 11 and 12 seeds. And if you are looking for a deep upset, 14 seeds have won in the first round 25% of the time.

Five seeds have also struggled to get deep into the tournament, as not a single five seed have advanced past the sweet 16 in the last five years. Three of the last five national champions have also been number one seeds.

Taking looking at some on court trends, this next graph looks at the average offensive and defensive efficiency of each team that makes it to each round. Offensive efficiency is the number of points you score per 100 possessions. Defensive efficiency is just the opposite; the number of points you allow per 100 possessions. So a lower defensive efficiency is good, while a higher offensive efficiency is good. All stats in the graph are for the team’s full season and like the last graph are broken up by the round a team makes it to.The graph shows as a general trend that further you get into the tournament, offensive and defensive efficiency improves. This makes sense because the teams that are better offensively and defensively move on. But what is interesting is as it gets later and later into the tournament. By the championship game, both offensive and defensive efficiency decline. This seems proves the age-old adage that defense wins championships and tends to suggest that you might want to lean toward a more defensive heavy team like Virginia or Cincinnati when picking your champion.

Another interesting thing to look at is the role of the in the NCAA Tournament. The rotations tend to get a little thinner in the Tournament, as one loss leads to the end of the season. This next graph shows percentage of a team’s minutes that are played by their bench during the whole season and is broken up by the round a team makes it to.

NCAA Tourney Bench Minutes by Round

The graph shows that teams that typically play their bench fewer minutes during the season tend to advance further. There is a steady decrease in the percentage of bench minutes played by teams that win, all the way up until the winner of the National Championship. This suggests that that teams that already play their starters more are more prepared for it come NCAA tournament time, but they could get tired out by the National Championship game. This could prove an advantage for Syracuse, as they play the fewest bench minutes in the country this year, as they try to make another surprise run to the Final Four.


Sources: KenPom and Massey Ratings

Final Project

Operation Lava-Jato turned Brazil upside down as almost every politician was involved in the corruption scheme. Below it is a timeline of the first twelve phases of the operation, which today has already 44 phases and it’s still ongoing.


The federal police uncovered the former president of Brazil Luiz Inacio Lula da Silva was one the chiefs of the corruption schemes when they found out a number of properties purchased using the name of shell companies or the former president foundation. Lula was condemned and it is appealing in court because he wants to run for president again later this year. If the Supreme Court rules against him, he will have to serve nine years in jail for the crimes of corruption and money laundering.

In the map below is where the operation has been taking place. Across the states of Rio de Janeiro, Sao Paulo and the country’s capital Brasilia


One of the most shocking turns of this operation was the impeachment of president Dilma Rousseff in 2016 as it was orchestrated by her rivals in order to turn the attention to her instead of the many members of Congress that were being investigated and would later be arrested.

Because of the political turmoil the economy has been as unstable as ever. The value of the dollar spiked in 2015 around the time where the investigations got into the heart of Petrobras. In the graph below you can see how unstable the dollar was.


NEW 300 Assignment 8

Unfortunately, the economic situation nowadays is still very much like it was in 2015. The dollar either spikes or goes down depending on new scandals.

Infogram information was taken from Folha de São Paulo.