Out: Friday March 3, 2017
Due: Friday March 17, 2017 at 11:59pm
Work in groups of up to 4
In this programming assignment, you will implement a visualization tool for a dataset consisting of the population, GDP per capita, and life expectancy of 195 countries from 1800 to 2015. We took this dataset from Gapminder, a web site created by Swedish professor Hans Rosling and his son Ola Rosling. (It's very unfortunate that Hans passed away early in February.) What we ask you to do in this assignment is to reproduce a number of functionalities of the visualization software hosted on the Gapminder site, using WebGL and Javascript.
WARNING: WE THINK THIS ASSIGNMENT IS LONGER THAN THE LAST ONE. START EARLY.
First, clone the CS 4620 web repository.
You will find the template code for this assignment in the cs4621/ppa02_student
directory.
Inside the directory, open index.html
, and you should see a web page with only the page's
header and some text asking you to list your team members.
Please modify index.html
so that it visualizes the data in a way similar to what you saw
in the video. You may also add other code to the directory. However, do not use any 3D rendering
framework such as three.js. Linear algebra libraries such as
glMatrix are fine. Our solution code, however, does not use any
extra code besides what is already in the ZIP file.
Once you're done writing your solution, ZIP the cs4621/ppa02_student
, and submit
the ZIP file to CMS.
Your submission will be graded by features that it implements. More features, more points. You do not have to implement the features exactly as we did in the videos to get the points. Think of the course staff as customers who want to use your software to look at the data. We'll be satisfied if you implement features that satisfy the requirements, work out of the box, and are easy to use. The features are as follows.
The features below are not implemented by the reference solution. Implement them to get extra credits.
The dataset is contained in the following 4 Javascript files:
ppa02_student/data/country_list.js
ppa02_student/data/population.js
ppa02_student/data/gdp_per_capita.js
ppa02_student/data/life_expectancy.js
ppa02_student/index.html
file.
They define the following functions:
getCountryList()
getPopulation()
getGdpPerCapita()
getLifeExpectancy()
The return value of getCountryList()
is an array containing Javascript objects,
each corresponding to a country and having the following fields:
name
: the name of the country.region
: the name of the region of the country, which can be "Asia", "Europe",
"Africa" or "America".
abbreviation
: a three-lettered abbreviation of the country's name.
The return values of the three other functions have the same format. Each of them is a
mapping from country names to arrays containing 2015−1800+1=2162015−1800+1=216 numerical values,
which are either the population, GDP per capita, or life expectancy from 1800 to 2015.
Some of the entries might be null
, indicating that there's no data point
for that particular year.
We implemented the reference solution with heavy help from jQuery and jQuery UI, and we could imagine how life would be much more difficult without them. We recommend that you take advantage of these libraries too. The template code we distribute already has them, so you don't have to figure out how to set them up.
Past exhibits have code that demonstrate how to use a number of UI widgets.
select
tag.
1800 |
|||
|
George Washington
John Adams Thomas Jefferson James Madison James Monroe John Quincy Adams Andrew Jackson Martin Van Buren William Henry Harrison John Tyler James Knox Polk Zachary Taylor Millard Fillmore Franklin Pierce James Buchanan Abraham Lincoln Andrew Johnson Ulysses S. Grant Rutherford Birchard Hayes James Abram Garfield Chester Alan Arthur Grover Cleveland Benjamin Harrison Grover Cleveland William McKinley Theodore Roosevelt William Howard Taft Woodrow Wilson Warren Gamaliel Harding Calvin Coolidge Herbert Clark Hoover Franklin Delano Roosevelt Harry S. Truman Dwight David Eisenhower John Fitzgerald Kennedy Lyndon Baines Johnson Richard Milhous Nixon Gerald Rudolph Ford James Earl Carter, Jr. Ronald Wilson Reagan George Herbert Walker Bush William Jefferson Clinton George Walker Bush Barack Hussein Obama Donald John Trump |
SRC_ALPHA
and
ONE_MINUS_SRC_ALPHA
as our blend functions.