Media Arts and Technology

Graduate Program

MAT Forums

3D Visualization

3D Visualization

Postby rluo » Tue Jan 02, 2018 6:10 pm

In this assignment, we are exploring interactive 3D volumetric visualization.

Use the full capabilities of 3D where each x,y,z location represents data. You may map data directly into 3D space based on the 4 datasets, or explore clustering algorithms as a means of organizing the data in 3D space.

Feb 15: Work-in-Progress
Feb 22: Project is Due

Query
Your query will need to have minimum 4 columns for x,y,z location and then to color or scale the pixel/voxel. Your MySQL query should be more complex then previous ones and cross the full spectrum of the database. As usual, you are expected to come up with an interesting question that will give interesting results! Your query should use MySQL syntax that goes beyond those presented in the demos, and the query should go for granular detail, so mapping main Dewey categories will not be sufficient, nor fulfill the expectation of an interesting query. "Change over Time", correlating data, or spatially distributing data based on algorithms can be interesting to explore. The important thing is that the x,y,z location of where the data is placed should have meaning.

--------------
Libraries to use:
3D spatial navigation and interactivity is introduced using the PeasyCam library: http://mrfeinberg.com/peasycam/

ControlP5 is a GUI and controller library that includes functions like Sliders, Buttons, Toggles, Knobs, Textfields, RadioButtons, etc. http://www.sojamo.de/libraries/controlP5/

OpenGL (Open Graphics Library), a cross-platform graphics interface is used in this demo. Translate, pushmatrix, popmatrix functions are introduced. Information about push, pop and translation can be found at:
https://www.processing.org/tutorials/transform2d/
http://processing.org/tutorials/p3d

--------------
Now that we have acquired all the necessary skills, the

EVALUATION CRITERIA will be the following:

Innovation in content : your query question and outcomes. How original, engaging, unusual, your query, or your approach to the query may be, and how interesting the data may be. The data has to be multivariate, and granular (meaning a lot of data) so that we can see patterns forming in the data.

Innovation in design/form : The design needs to go beyond our demos. Areas of exploration are in how you use space, form, colors, data organization, timing, interaction, coherence, elegance, etc.

Edward Tufte’s “Visual Display of Quantitative Information” https://www.amazon.com/Visual-Display-Q ... 1930824130 is a classic reference

https://www.edwardtufte.com/tufte/

Computation : The third evaluation is the computational component. First of all, the code needs to work. Special consideration will be for unusual, elegant expression, utilizing functions, algorithms, etc that you can introduce to the class.
rluo
 
Posts: 21
Joined: Tue Oct 14, 2014 10:57 am

Re: 3D Visualization

Postby zhenyuyang » Wed Feb 21, 2018 10:20 pm

SOUNDS BEHIND PICTURES - DATA VISUALIZATION IN 3D
SCORES BY BRIAN TYLER IN 20 YEARS
Zhenyu Yang

DESCRIPTION
This homework is a processing program that visualizes the numbers of scores written by Brian Tyler from 1997 to 2017. During this period, Brain wrote scores for 71 films, 8 TV films. 22 TV series, and 6 video games.

In this project, the previous 2D visualization is expanded into 3D. The colorful floating points are now moving in 3 degrees of freedoms. Points are gathered as clusters, and each cluster represents a year from 1997 to 2017. The 3D location of each cluster is decided by the total number of checkouts, the total number of media types and the total number of works of Brain Tyler's works from SPL.
1.png

2.png

3.png


COLOR CODING
Red – green- blue color system with transparency
PointShader implemented to render points in each cluster.
Points are in 4 different colors, representing 4 different categories of scores: Films, TV Films, TV Series, and video games.

SKETCH & IDEA

I was inspired by the beauty of the galaxy. A galaxy is a gravitationally bound system of stars, stellar remnants, interstellar gas, dust, and dark matter.

galaxy2.png


Galaxies come in three main types: ellipticals, spirals, and irregulars. A slightly more extensive description of galaxy types based on their appearance is given by the Hubble sequence. Since the Hubble sequence is entirely based upon visual morphological type (shape), it may miss certain important characteristics of galaxies such as star formation rate in starburst galaxies and activity in the cores of active galaxies. In this project, the data clusters are generated in forms of elliptical galaxies.

galaxy4.png


Some other pictures of galaxies:

galaxy1.jpg


galaxy3.jpg


galaxy5.jpg


galaxy6.jpg


galaxy7.jpg



Cluster:
All data in each year from 1997 to 2017 are presented as a cluster in the space. A cluster has points floating on a sphere surface. The radius of a cluster and the motion velocity of floating points of a cluster are proportional to the activity of Tyler, which measures how active Brain Tyler was in the corresponding year.

The activity is calculated by the equation below:
activity.jpg


Compare among axes:
The data clusters' locations in the 3D space are decided by three variables: The total number of checkouts of Tyler's works in a year, the total number of checked-out works in a year, and the total number of the types of checked-out works in a year. These three values are used as the coordinates of each cluster so that we can easily compare any two of them simply by viewing clusters against two axes(i.e. X and Y axes).

Compare the total number of checked-out works in a year and the total number of the types of checked-out works in a year:
axis1.png

Compare the total number of checkouts of Tyler's works in a year and the total number of works in a year:
axis2.png

Compare the total number of checkouts of Tyler's works in a year and the total number of the types of checked-out works in a year:
axis3.png



Spatial sound effect:
To further enhance the experience, I included a piece of Tyler's works of each year in the corresponding cluster. Each cluster is acting as a sound source when a user turns on colors for all clusters. The distance between each cluster and the camera is continuously calculated to decide the volume of each sound source.
spaceSound.png


Some notes during the design process:
note1.png

note2.png

note3.png


QUERY
My code only outputs the itemType, itemNumber, and the number of times that item has been checked out.

Code: Select all
SELECT
    bibNumber,
    itemType,
    title,
    COUNT(bibNumber) AS Counts,
    SUM(CASE
        WHEN (YEAR(cout) = 2006) THEN 1
        ELSE 0
    END) AS '2006',
    SUM(CASE
        WHEN (YEAR(cout) = 2007) THEN 1
        ELSE 0
    END) AS '2007',
    SUM(CASE
        WHEN (YEAR(cout) = 2008) THEN 1
        ELSE 0
    END) AS '2008',
    SUM(CASE
        WHEN (YEAR(cout) = 2009) THEN 1
        ELSE 0
    END) AS '2009',
    SUM(CASE
        WHEN (YEAR(cout) = 2010) THEN 1
        ELSE 0
    END) AS '2010',
    SUM(CASE
        WHEN (YEAR(cout) = 2011) THEN 1
        ELSE 0
    END) AS '2011',
    SUM(CASE
        WHEN (YEAR(cout) = 2012) THEN 1
        ELSE 0
    END) AS '2012',
    SUM(CASE
        WHEN (YEAR(cout) = 2013) THEN 1
        ELSE 0
    END) AS '2013',
    SUM(CASE
        WHEN (YEAR(cout) = 2014) THEN 1
        ELSE 0
    END) AS '2014',
    SUM(CASE
        WHEN (YEAR(cout) = 2015) THEN 1
        ELSE 0
    END) AS '2015',
    SUM(CASE
        WHEN (YEAR(cout) = 2016) THEN 1
        ELSE 0
    END) AS '2016',
    SUM(CASE
        WHEN (YEAR(cout) = 2017) THEN 1
        ELSE 0
    END) AS '2017'
FROM
    spl_2016.outraw
WHERE
    title = 'Bartender'
    OR title = 'Six string samurai'
    OR title = 'Settlement'
    OR title LIKE '%4th Floor%'
    OR title = 'Simon Sez'
    OR title = 'Panic'
    OR title = 'Shadow Hours'
    OR title = 'Four Dogs Playing Poker'
    OR title = 'Terror Tract'
    OR title = 'Frailty'
    OR title = 'offsite'
    OR title = 'Bubba Ho tep'
    OR title LIKE '%Vampires%' and title like '%Los Muertos%'
    OR title = 'Darkness Falls'
    OR title = 'hunted'
    OR title = 'Last Stand'
    OR title = 'big empty'
    OR title = 'Timeline'
    OR title = 'Perfect Opposites'
    OR title = 'Final Cut'
    OR title = 'Godsend'
    OR title = 'Paparazzi'
    OR title = 'Clair obscur'
    OR title = 'Constantine'
    OR title = 'Panic'
    OR title = 'Annapolis'
    OR title = 'Bug'
    OR title LIKE '%fast and the furious Tokyo drift%'
    OR title = 'Partition'
    OR title LIKE '%Finishing%' and title like '%Game%'
    OR title = 'War'
    OR title LIKE '%Aliens vs Predator Requiem%'
    OR title = 'rambo'
    OR title = 'Bangkok Dangerous'
    OR title = 'Eagle Eye'
    OR title = 'Lazarus Project'
    OR title = 'Killing Room'
    OR title = 'Dragonball Evolution'
    OR title = 'fast and the furious'
    OR title LIKE '%Middle Men%'
    OR title = 'Final Destination'
    OR title = 'Law Abiding Citizen'
    OR title = 'Skyline'
    OR title = 'Battle Los Angeles'
    OR title = 'Tattoo'
    OR title = 'Fast Five'
    OR title = 'Final Destination 5'
    OR title = 'John Dies at the End'
    OR title LIKE '%Columbus%' and title like '%Circle%'
    OR title = 'Brake'
    OR title = 'Iron Man three'
    OR title = 'Standing Up'
    OR title = 'Thor The dark world'
    OR title = 'Teenage Mutant Ninja Turtles'
    OR title = 'Expendables'
    OR title = 'Into the Storm'
    OR title LIKE '%All Hail the King%'
    OR title LIKE '%Furious 7%' or title = 'furious seven'
    OR title LIKE '%Age of Ultron%'
    OR title = 'Truth'
    OR title LIKE '%Disappointments Room%'
    OR title LIKE '%Return of Xander Cage%'
    OR title = 'Criminal'
    OR title = 'Now you see me 2'
    OR title = 'Now you see me'
    OR title = 'Power Rangers'
    OR title LIKE '%Fate of the Furious%'
    OR title = 'mummy'
   
    OR title = 'Final Justice'
    OR title = 'Sirens'
    OR title = 'Jane Doe'
    OR title = 'Trapped in a Purple Haze'
    OR title = 'Last Call'
    OR title = 'Thoughtcrimes'
    OR title = 'Painkiller Jane'
   
    OR title = 'Living in Captivity'
    OR title = 'Jenny'
    OR title = 'Level 9'
    OR title = 'Fear Itself'
    OR title like '%Star Trek Enterprise%'
    OR title like '%hawaii five%'
    OR title = 'Terra nova The complete series'
    OR title like '%Sleepy Hollow%' and title like '%season%'
    OR title like '%Scorpion%' and title like '%season%'
GROUP BY bibNumber , itemtype, title
ORDER BY Counts DESC

The results I obtained:
data_yearly.png


INTERACTION
By using a keyboard, users can browse the space from any point in any view angle.
Keyboard control:
Key "A": View the previous cluster
Key "D": View the next cluster
Key "S": Turn on/off colors of other clusters
Key "1": Go to pre-defined viewpoint 1
Key "2": Go to pre-defined viewpoint 2
Key "3": Go to pre-defined viewpoint 3

SCREEN RECORD
https://youtu.be/YGqdNBQCKn0
Last edited by zhenyuyang on Tue Mar 20, 2018 6:14 pm, edited 12 times in total.
zhenyuyang
 
Posts: 9
Joined: Fri Apr 01, 2016 2:34 pm

Re: 3D Visualization

Postby aprilcai » Wed Feb 21, 2018 10:48 pm

Rising AI

Concepts
According to World Economic Forum, the number of published academic papers featuring AI has risen dramatically. There were nine times as many papers published in 2016 than two decades ago.

For project 3, I am interested in looking into the trend of AI and its acceptance trend for the public. AI has been jumped into the new era for the past decade. As a city which has a booming tech industry, I want to look into people’s interests in AI field by the check out rates for the computer science books related to AI in SPL.

There are several terms related in this field, so I want to look into those keywords. artificial intelligence, machine learning, algorithms, data mining, python.
So I modified my query for the Computer Science dewery class. And searched for those keywords.

SQL Code
Code: Select all
SELECT
    cin, cout, title, deweyClass
FROM
    inraw
WHERE
    deweyClass > 0 && deweyClass < 7
        AND YEAR(cout) >= 2009
        AND YEAR(cout) <= 2017
        AND title LIKE '%python%'


Work in Progress
I wanted to visualize it as a inter-relationship between my key words in 3D. After working on it for couple of twists, I was inspired by the pagoda (tower) shape below. As the pagoda shape matches the topic as Rising AI.
pagoda.png

I also get inspired by Kaleidoscope, so my bottom to top it looks like the graphs in a Kaleidoscope.
kelo.png

How my 3D looks like from bottom to up
bot.png

Here are some screenshots of the 3D visualization.
s1.png

s2.png

I also recored a gif as well,
s4.gif


Analysis
As we can see from the visualization, books about machine learning, data mining, ai are getting more check out compared with classic computer science books like operating systems, which indicates that AI has gained more and more attention from the public as well.

---second edition-----
1. Added a title to the visualization
2. Reorganized the layout of the texts to prevent them overlaying with the 3D model.
Attachments
sketch_2D_hw3_draft1 2.zip
(49.55 KiB) Downloaded 5 times
sketch_2D_hw3_draft1.zip
(49.4 KiB) Downloaded 11 times
Last edited by aprilcai on Thu Mar 08, 2018 2:55 pm, edited 1 time in total.
aprilcai
 
Posts: 4
Joined: Fri Jan 19, 2018 11:06 am

Re: 3D Visualization

Postby qiaodong » Wed Feb 21, 2018 11:53 pm

Particle visualization of movie popularity & more

I’d like to visualize the popularity of movies in the database using particles. To add some more interesting data, I decided to use 16 different movies, grouped into 4 different genres. The four different genres are: Drama, Sci-Fi, History and fantasies. For each different genre, I find top 4 popular movies. To do this, first I ran a sql query to find the movies with top number of checkout from year 2012-2017. The query is:

Code: Select all
SELECT title, itemType, count(title) AS num from spl_2016.inraw
where year(cout) = 2012 or year(cout) = 2013 or year(cout) = 2014 or year(cout) = 2015 or year(cout)=2016 or year(cout) = 2017
group by title, itemType
order by num DESC
LIMIT 200


Image

Then, from the top list of the movies, I search each movie and assign them to appropriate generes. The final lis is:

Drama: American hustle, Grand Budapest Hotel, Great Gatsby, Silver Linings Playbook
Fantasy: Cinderella, Descendants, Frozen, Into the Woods
History: 12 Years a Slave, Imitation Game, Kings Speech, Lincoln
Sci-fi: Gravity, Hunger Games, Interstellar, Star Trek into Darkness

Some movie may belong to multiple genres, in this case, I’ll find the closest one. If a movie is too ambiguous to be assigned to an appropriate genre, I’ll just skip that one.

After that, for each of the 16 movies, I use a simple query to grab all the check in and check out records of that movie. The query is the follows:

Code: Select all
SELECT title, cout, cin from spl_2016.inraw
Where title = 'Great Gatsby' AND year(cout) >= 2012


Then I use the following python scripts to process all the 16 query results. Specifically, this python scripts would first compute the total number of checkout times for each movie, and zip all the data into a single csv file. So each movie will be a column, with total 12*6 = 72 rows. This script can also extract the borrow time for each checkout record, and output a txt file for this. I use this python scripts to preprocess the data, and then use processing to read the csv file and the txt file contains the borrow time for each checkouts.

Code: Select all
import csv
from datetime import datetime
from datetime import timedelta
import numpy as np

def computeDiffInMonth(date1, date2):
   yearDiff = date1.year - date2.year
   monthDiff = date1.month - date2.month
   return yearDiff*12 + monthDiff

# get check in and checkout time from a file.
def getCinCoutFromFile(FileName):
   cin = []
   cout = []
   with open(FileName, 'rb') as csvfile:
      spamreader = csv.reader(csvfile, delimiter=',')
      row1 = next(spamreader) # thrown away first row.
      for row in spamreader:
         cout.append(datetime.strptime(row[1], '%Y-%m-%d %H:%M:%S'))
         cin.append(datetime.strptime(row[2], '%Y-%m-%d %H:%M:%S'))
   return cin, cout

DramaFname = []
DramaFname.append("./dataN/Drama/American_hustle.csv")
DramaFname.append("./dataN/Drama/Grand_Budapest_Hotel.csv")
DramaFname.append("./dataN/Drama/great_Gatsby.csv")
DramaFname.append("./dataN/Drama/Silver_linings_playbook.csv")

FantasyFname = []
FantasyFname.append("./dataN/Fantasy/Cinderella.csv")
FantasyFname.append("./dataN/Fantasy/descendants.csv")
FantasyFname.append("./dataN/Fantasy/Frozen.csv")
FantasyFname.append("./dataN/Fantasy/Into_the_woods.csv")

HistoryFname = []
HistoryFname.append("./dataN/History/12_years_a_slave.csv")
HistoryFname.append("./dataN/History/imitation_game.csv")
HistoryFname.append("./dataN/History/kings_speech.csv")
HistoryFname.append("./dataN/History/Lincoln.csv")

ScifiFname=[]
ScifiFname.append("./dataN/Sci-fi/Gravity.csv")
ScifiFname.append("./dataN/Sci-fi/hunger_games.csv")
ScifiFname.append("./dataN/Sci-fi/Interstellar.csv")
ScifiFname.append("./dataN/Sci-fi/Star_trek_Into_darkness.csv")

BuckStart = datetime.strptime("2012-01-01 12:00:00", '%Y-%m-%d %H:%M:%S')
BuckEnd = datetime.strptime("2018-01-01 12:00:00", '%Y-%m-%d %H:%M:%S')
totalBucket = computeDiffInMonth(BuckEnd, BuckStart)

# total data_matrix,
data_matrix = np.zeros([totalBucket, 22])
header = ('month,American_hustle,Grand_Budapest_Hotel,great_Gatsby,Silver_linings_playbook,TotalDrama,Cinderella,'
   'descendants,Frozen,Into_the_woods,TotalFantasy,12_years_a_slave,imitation_game,kings_speech,Lincoln,'
   'TotalHistory,Gravity,hunger_games,Interstellar,Star_trek_Into_darkness,TotalSciFi,AllTotal')



def CountTotalFourStuff(FnameList):
   CurData = np.zeros([totalBucket, 5]).astype(np.int32)
   for i in range(0, len(FnameList)):
      fname = FnameList[i]
      cinP, coutP = getCinCoutFromFile(fname)
      for j in xrange(0, len(coutP)):
         diffM = computeDiffInMonth(coutP[j], BuckStart)
         CurData[diffM, i] += 1
   CurData[:, 4] = np.sum(CurData[:, 0:4], axis=1)
   return CurData

def AggrerageBorrowTimeToMonth(Fname):
   cinP, coutP = getCinCoutFromFile(Fname)
   bucketList = []
   for i in range(0, totalBucket):
      TimeDiffList = []
      bucketList.append(TimeDiffList)
   for i in range(0, len(coutP)):
      diffM = computeDiffInMonth(coutP[i], BuckStart)
      bucketList[diffM].append(cinP[i] - coutP[i])
   return bucketList

def WiteAggreBorrowTimeToFile(bucketList, fname):
   totalRec = 0
   fout = open(fname, "w")
   for i in range(0, len(bucketList)):
      #Month
      fout.write("%d " % i)
      for Tdiff in bucketList[i]:
         fout.write("%d " % Tdiff.days)
         totalRec += 1
      fout.write("\n")
   fout.close()
   print("TotalRec: " + fname + " : " + str(totalRec))

def ComputeCheckPerMonthALL():
   data_matrix[:,0] = np.arange(0, totalBucket)
   data_matrix[:, 1:6] = CountTotalFourStuff(DramaFname)
   data_matrix[:, 6:11] = CountTotalFourStuff(FantasyFname)
   data_matrix[:, 11:16] = CountTotalFourStuff(HistoryFname)
   data_matrix[:, 16:21] = CountTotalFourStuff(ScifiFname)
   data_matrix[:, 21] = data_matrix[:,5] + data_matrix[:, 10] + data_matrix[:,15] + data_matrix[:,20]
   print(np.sum(data_matrix , axis=0))

   fout = open("./AllCheckPerMonth.csv", "w")
   fout.write("%s\n" % header)
   np.savetxt(fout, data_matrix, fmt='%d',delimiter=',')

def CompuetBorrowTimeMonthALL():
   for i in range(0,4):
      bucketList = AggrerageBorrowTimeToMonth(DramaFname[i])
      WiteAggreBorrowTimeToFile(bucketList, "./AggreratedDay/Drama%d.txt" % i)
      bucketList = AggrerageBorrowTimeToMonth(FantasyFname[i])
      WiteAggreBorrowTimeToFile(bucketList, "./AggreratedDay/Fantasy%d.txt" % i)
      bucketList = AggrerageBorrowTimeToMonth(HistoryFname[i])
      WiteAggreBorrowTimeToFile(bucketList, "./AggreratedDay/History%d.txt" % i)
      bucketList = AggrerageBorrowTimeToMonth(ScifiFname[i])
      WiteAggreBorrowTimeToFile(bucketList, "./AggreratedDay/Scifi%d.txt" % i)

CompuetBorrowTimeMonthALL()

'''
cinP, coutP = getCinCoutFromFile(DramaFname[0])


bucketList = []

averageBorrowInDays = np.zeros([totalBucket])

for i in xrange(0, totalBucket):
   TimeDiffList = []
   bucketList.append(TimeDiffList)

for i in xrange(0, len(coutP)):
   diffM = computeDiffInMonth(coutP[i], BuckStart)
   bucketList[diffM].append(cinP[i] - coutP[i])

totalRecord = np.zeros([totalBucket])

cumRecord = 0
for i in xrange(0, totalBucket):
   numRecords = len(bucketList[i])
   #print (numRecords)
   cumRecord += numRecords
print (cumRecord)
'''
'''
for i in xrange(0, totalBucket):
   numRecords = len(bucketList[i])
   totalRecord[i] = numRecords
   averageT = 0
   #if (numRecords != 0):
   #   averageT = min(bucketList[i]).days
   for Tdiff in bucketList[i]:
      averageT += Tdiff.days
   if (numRecords != 0):
      averageT /= numRecords
   #ri, averageT)
   averageBorrowInDays[i] = averageT

fout = open("./Star_trek_AveDays.txt", "w")
for i in xrange(0, totalBucket):
   fout.write("%d\n" % (int)(averageBorrowInDays[i]))
fout.close()
'''


Visualization concept:
I’d like to use particles as the primitive for my visualization. I’d like to map one particle to one specific checkout record. To do this, first as the data is grouped into month, I draw a ground plane, where each cell represents the checking record for one specific movie for that month. So there are 12*6 cells for each record. Also, I’d like to display 4 movies on the screen at the same time. So I have four squares, each with 12*6 = 72 cells. This image shows the ground plane of my visualization:

Image

To map the particles to the data records for one specific movie for one specific month, I use a particle system to emit the particles from that cell, where the number of particles are proportional to the number of records of that movie in that month. The particles move upwards, driven by gravity forces which points upwards. To map the particle to a specific record, I map the life of the particle to one random selected checkout time from that month of that movie. Here is the visualization:

Image

After this, I thought it may be interesting to display the grouped 4 genres on the screen, and do a translation when the user choose to visualize a specific genre. To do this, first I aggregate the data from individual movies into the genre, and display 4 genres at the same time.

Image

I also designed a translation, when the user what to focus on a specific genre. To do this, the user can hit a key, and then the translation will smooth translate the visualization into the four movies that the specific genre contains.

Image

The code:
Attachments
33.gif
Vis3D.zip
(93.25 KiB) Downloaded 7 times
22.gif
11.gif
22.png
11.png
qiaodong
 
Posts: 4
Joined: Fri Jan 19, 2018 11:06 am

Re: 3D Visualization

Postby zhangweidilydia » Thu Feb 22, 2018 1:21 am

INDIE ROCK vs SOUL
20 YEARS AFTER NIRVANA’S NEVERMIND, DOES SEATTLE STILL ROCK?

DESCRIPTION
I USED THE SAME QUERY CODE WITH PREVIOUS PROJECT [2D VISUALIZATION]

This visualization compares the check out counts of two soul albums with two indie rock albums, which are ‘back to black’, ‘19’, ‘vampire weekend’ and 'fleetFoxes’. Examining the pattern of change of those four albums from 2008 - 2017 brings up analysis of correlation between soul album and indie rock, and push and pull between culture events and album checkout numbers.

In order to see the details, I separate the months from the original timeline, utilizing it as a new timeline presented on Z-Axis. In this visualization, I aim to present different social events that happens from 2008 - 2017 that affect the checkout numbers of those four albums. I also emphasize the minimum and maximum checkout numbers of all those albums by connecting them both visually and functionally.

VISUAL DEVELOPMENT
Since I am comparing the checkout numbers of four music albums, I used music notation as my visual motif. Music notation as a visual form can not only depict the dynamic feature of music itself, but also analyze music as a fluid and time-based art form. I checked different forms of music notation and did sketch below.
sketch.jpg
sketch


For this project, I also picked the same color palette because red represents rock while I used black to represent soul music.

I went through a hard time to balance the visual and function.
First ATTEMPT
IMG_1663.JPG
FIRST ATTEMPT

IMG_1662.JPG


THEN i realize this version does not make sense to present the individual data and my initial attempt to compare soul albums with indie rock albums.
So I plan to redo this project to make it more functional by emphasizing each data in a more specific way.

FINAL VERSION
Screen Shot 2018-02-22 at 1.04.09 AM.png

Screen Shot 2018-02-22 at 1.03.46 AM.png

Screen Shot 2018-02-22 at 1.02.48 AM.png

Screen Shot 2018-02-22 at 1.03.16 AM.png


[I have no idea why the saveFrame is so low Res....looks much better in Processing tho]

For this version, when press 'r' the model will rotate. Viewers can use mouse easily navigate the model. Viewers can check different events just by zooming in and zooming out. The different marks present different things. There're four tanks of music which represent four albums. The X-axis represents different years, while Z-axis represents months. The height and size of each mark is based on the checkout numbers of the different album at that specific time. I connected four maximum points for viewers to see the checkout trend easier. I animate each marks in order to represent the fluidness of the data.
Attachments
soulVSrock.zip
(4.55 MiB) Downloaded 14 times
Last edited by zhangweidilydia on Thu Feb 22, 2018 12:16 pm, edited 1 time in total.
zhangweidilydia
 
Posts: 4
Joined: Fri Jan 19, 2018 11:09 am

Re: 3D Visualization

Postby mingyulin » Thu Feb 22, 2018 3:04 am

Monthly total amount of checkout between different categories book

Description :

This 3D model shows the monthly amount of checkout from 2007 to 2016. For the first attempt for this assignment, I queried daily data to compute. However, there would be up to 36500 rows data and the dps became really low due to the large calculation in drawing. Also, the length of the model will be too long to fully presented. As a result, I changed back to query monthly data. The basic concept was inspired by the TreeMap model from the example. I changed the shape for each layer which showed the amount of the checkout. I just labeled out the year with several circular ring to show the time line. I used colored text to show the relationship between block color and categories' names. The location of the text is random.

Query Code:

Code: Select all
select t.Year as Year, t.Month as Month, t.dewey as dewey, count(t.dewey) as counts
FROM (
    select year(cout) as Year, date_format(cout, '%m') as Month, case 
    when itemType like '%bk' then 'book'
    else 'non-book' end as item,
    case when deweyClass >= 0 and deweyClass < 100 then '0'
       when deweyClass >= 100 and deweyClass < 200 then '100'
         when deweyClass >= 200 and deweyClass < 300 then '200'
       when deweyClass >= 300 and deweyClass < 400 then '300'
       when deweyClass >= 400 and deweyClass < 500 then '400'
         when deweyClass >= 500 and deweyClass < 600 then '500'
         when deweyClass >= 600 and deweyClass < 700 then '600'
         when deweyClass >= 700 and deweyClass < 800 then '700'
         when deweyClass >= 800 and deweyClass < 900 then '800'
         when deweyClass >= 900 and deweyClass < 1000 then '900' else '' end as dewey
     from spl_2016.inraw) t
where t.item = 'book' and t.dewey != '' and t.Year > 2006 and t.Year < 2017
group by t.Year,t.Month,t.dewey
ORDER BY t.Year, t.Month
LIMIT 1200;


In inner query, I generalized small categories to ten big categories and classified book and non-book for itemType. In outer query, I group the data to get the total counts for same deweyNumber in same month.
The query time was around 100 seconds. The query might be optimized to save more time.

Final Result:

Capture.PNG

Capture1.PNG

Capture3.PNG


There are still a lot of parts can be improved. Since the amount of checkout for Computer Science was really high, it was hard to scale the number for each category. The trade off is the bigger difference for the different categories would lead to smaller difference for the same category . Also, there is no interactive function in current code.
Attachments
HW3_category_visualization.zip
(167.36 KiB) Downloaded 8 times
mingyulin
 
Posts: 4
Joined: Wed Feb 07, 2018 1:31 pm

Re: 3D Visualization

Postby chengyuan » Thu Feb 22, 2018 10:34 am

Based on the 2D version of Trump's campaign, I converted the information on a flat surface to be shown on two surfaces and extended to three viewing angles to cover all four sections.

Since the theory is based on Seattle Public Library's checking records, now all three other sources of information - Google Trend, Campaign Events (including major events one year in office) and Time magazine covers, can be compared with the library's bar graph (which will be placed by more creative representation in the future).

Draft:
Screen Shot 2018-02-17 at 22.06.38.png
I tried different combinations of text and graph and picture, some have the text moving its angle with the mouse so the text is always on top of other content, which can be very confusing as user loose sense of the surfaces.


Final:
Screen Shot 2018-02-22 at 09.49.35.png
The app will start in this angle which looks just like the 2D version, but once the mouse is moved, the user will see the content actually extended to four direction in space.


Screen Shot 2018-02-22 at 09.49.19.png
The lower angle view provides major events during the year long campaign, plus other tops stories during his one year in office. We can vaguely see some pictures floating behind, this might help guide the user to view from different angle.


Screen Shot 2018-02-22 at 09.49.46.png
This overlooking angle provides a clear view of the entire structure. It shows how information from four different sources lies on two layers and extended into four directions. It's also the best view to see the correlation between Google Trend and Library records.


Screen Shot 2018-02-22 at 09.49.52.png
If the mouse moves higher the user will see from the top, where showed all the Time magazine covers that have Trump on it. To be seen on Time's cover is major, especially with such frequent appearance.


I found many projects using free-view mouse interaction often lead to confusion. The reason that I constrained the viewing angle is actually making the information easier to be shown. There is no learning curve since the user can only move the move in two directions, X and Y. So I designed three areas - the top 20% of the screen fix the viewing angle in the top view, the middle 30% fix the viewing angle in the overlook view and the bottom 20% fix the viewing angle in the lower angle. So that the user can move on the X axis stress free.

Video demo:
https://youtu.be/5sjIhI-btjU

Trump_3D_v2.zip
(1.71 MiB) Downloaded 10 times
chengyuan
 
Posts: 4
Joined: Fri Jan 19, 2018 11:03 am

Re: 3D Visualization

Postby christinalast » Thu Feb 22, 2018 12:23 pm

Innovation from content

For my 3D visualisation I aim to create a map of the world in 3D, with each of the locations of the travel guides being linked by a curve to the Seattle Public Library. The metaphor of information flows across the globe is used to show how cultures, traditions and histories unique to specific locations can become globalised through library books.

I have spatialised location-specific material (defined as books that occupy a Dewey class ranging from 910-919) from SPL will be spatialized into collections of objects (nodes which can be grouped into topic collections, and networks (global networks symbolising the global spread of traditions and cultures). Such spatializations convey how location-specific material is related not just through geographic location, but through similarity (e.g. complementary topic neighbourhoods). The expected result is the development of search spaces that situate location-specific material in much more powerful ways than library shelves, supporting multiple paradigms of data discovery, including querying and browsing.

For this assignment I altered my SQL query to deliver multidimensional data. I requested thr total number of times a library item had been checked out, its Dewey Classification, item number, and a breakdown of the number of checkouts for each month of each year for the location-specific library items.

Code: Select all
SELECT
    COUNT(itemNumber) AS NumberOfTimes,
    FLOOR(deweyClass) * 100 AS Dewey,
    title
    id, itemNumber,
    COUNT(bibNumber) AS Counts,
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2006-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2006-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2006-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2006-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2006-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2006-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2006-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2006-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2006-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2006-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2006-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2006 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2006-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2007-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2007-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2007-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2007-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2007-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2007-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2007-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2007-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2007-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2007-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2007-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2007 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2007-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2008-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2008-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2008-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2008-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2008-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2008-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2008-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2008-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2008-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2008-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2008-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2008 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2008-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2009-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2009-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2009-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2009-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2009-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2009-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2009-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2009-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2009-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2009-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2009-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2009 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2009-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2010-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2010-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2010-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2010-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2010-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2010-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2010-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2010-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2010-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2010-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2010-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2010 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2010-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2011-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2011-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2011-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2011-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2011-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2011-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2011-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2011-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2011-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2011-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2011-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2011 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2011-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2012-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2012-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2012-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2012-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2012-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2012-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2012-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2012-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2012-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2012-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2012-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2012 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2012-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2013-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2013-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2013-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2013-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2013-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2013-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2013-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2013-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2013-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2013-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2013-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2013 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2013-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2014-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2014-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2014-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2014-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2014-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2014-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2014-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2014-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2014-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2014-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2014-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2014 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2014-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2015-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2015-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2015-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2015-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2015-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2015-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2015-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2015-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2015-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2015-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2015-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2015 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2015-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2016-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2016-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2016-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2016-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2016-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2016-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2016-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2016-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2016-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2016-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2016-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2016 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2016-12',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 1) THEN 1
        ELSE 0
    END) AS '2017-1',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 2) THEN 1
        ELSE 0
    END) AS '2017-2',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 3) THEN 1
        ELSE 0
    END) AS '2017-3',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 4) THEN 1
        ELSE 0
    END) AS '2017-4',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 5) THEN 1
        ELSE 0
    END) AS '2017-5',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 6) THEN 1
        ELSE 0
    END) AS '2017-6',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 7) THEN 1
        ELSE 0
    END) AS '2017-7',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 8) THEN 1
        ELSE 0
    END) AS '2017-8',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 9) THEN 1
        ELSE 0
    END) AS '2017-9',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 10) THEN 1
        ELSE 0
    END) AS '2017-10',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 11) THEN 1
        ELSE 0
    END) AS '2017-11',
    SUM(CASE
        WHEN (YEAR(cout) = 2017 AND MONTH(cout) = 12) THEN 1
        ELSE 0
    END) AS '2017-12'
FROM
    spl_2016.inraw
WHERE
    deweyClass >= 910
   AND deweyClass <= 919
GROUP BY itemNumber, deweyClass , title
HAVING (COUNT(itemNumber) > 1)
ORDER BY NumberOfTimes DESC
LIMIT 100


The query took 115 seconds.

Innovation in design and form

Idea behind the visualisation is inspired by the New York Talk Exchange visualisation made by the Senseable City lab at MIT. This visualisation shows the flow of IP (Internet Protocol) data between locations. Volumes of Internet data flowing between New York and cities around the world. The size of the glow on a particular city location corresponds to the amount of IP traffic flowing between that place and New York City. A greater glow implies a greater IP flow.

Image

My visualisation strategy is inspired by the global networks locating cultures traditions and histories I aim to represent the flow of information from locations around the world to Seattle public library is To do this, each library item selected needed to be geocoded by the following query in R;

Code: Select all
google_api <- "https://maps.googleapis.com/maps/api/geocode/json"
geocode <- function(address, verbose=FALSE) {
  r <- GET(google_api, query=list(address=address))
  stop_for_status(r)
  result <- content(r)
  first <- result$results[[1]]
  df <- as.data.frame(list(lat=first$geometry$location$lat, lon=first$geometry$location$lng))
  return(df)
}
result[1,] <- geocode("Central America")

result[129,]<- geocode("Spanish Islands")
write.csv(result, "geocoded.csv", row.names=FALSE)


Innovation in Computation

The geocoded results were then read into a 3D space, and located on a sphere. These location mark the geographic region which a library item features. The location of these boxes was computationally demanding because the 3D processing environment directs the Z axis toward the processing screen, whereas other cartesian transform algorithm we find online: x/y horizontal, z vertical. An alternative transformation algorithm was applied to display the correct latitude and longitude for all locations.

From the locations of boxes I used a method of extruding the boxes to symbolise the number of checkouts each book had. This was done by using the angle between the x axis and the location vectors for all locations and multiplying by the cross positions of the location vectors from the x axis.

I also wanted to visualise the flows of knowledge and history of these locations being fed into SPL. This involved using the Bezier function to simulate ta link between each location and the SPL.

Overall, this project allowed by to explore how multi-dimensional data can occupy and inform 3D space. I have learnt how to reduce runtime by including more of my code in the setup() function and how to implement technically difficult geometric transformations into processing. For the final 3D visualisation I want to improve the interactivity of the map, and create a 2d space where titles and text can be displayed.

Final Visualisation

Image

Image

Image
Attachments
SPL_Library_locations.zip
(1 MiB) Downloaded 7 times
christinalast
 
Posts: 6
Joined: Fri Jan 19, 2018 11:15 am

Re: 3D Visualization

Postby sihwapark » Thu Feb 22, 2018 3:07 pm

Hans Zimmer's OST and Its Original Film Checkout Trend


Concept Description


1_concpet_sketch.jpg


Extending my previous 2D visualization work, this 3D visualization has an almost similar concept to the 2D version. Instead of using a circular timeline for showing an issue date of each item, it draws a 3D spiral timeline at the center.

2_concept_sketch.jpg


Moreover, it uses not only 3D bars but also 3D half-disc(cylinder) shapes to plot checkout data. What I am expecting in using 3D half-discs is that if a user see a graph from the top or bottom view of it, the user can compare the trend of DVD and OST checkouts in a different way that a DVD or OST checkout graph is hidden by the other one at some point thereby understanding one is more popular than the hidden one at the moment.

Screenshots of Draft
wip_2.png

wip_6.png


Final Version
wip_9.png

wip_12.png

wip_13.png


For controlling the camera's viewpoint according to each item and changing a graph mode between a bar and a disc, I added a GUI. By clicking each item, it animates the camera's location to the starting point of the item's linear timeline by translating and rotating so that a user can only focus on the item's graph.
Attachments
HansZimmer3D.zip
(61.31 KiB) Downloaded 9 times
sihwapark
 
Posts: 4
Joined: Fri Jan 19, 2018 11:05 am

3D Visualization based on Quentin Tarantino's Films

Postby yankong » Thu Feb 22, 2018 3:25 pm

DESCRIPTION
I still explore the potential to visualize data in 3D on Quentin Tarantino's Films. This project visualizes the movies directed by Quentin Tarantino in his whole life career. This time I introduce the number of formats each movie has, in terms of item types each movie has.

QUERY
My code is almost the same as the previous homework, only obtaining the itemType, itemNumber, and the number of times that item has been checked out.
Code: Select all
SELECT
    bibNumber,
    itemType,
    title,
    COUNT(bibNumber) AS Counts,
    SUM(CASE
        WHEN (YEAR(cout) = 2006) THEN 1
        ELSE 0
    END) AS '2006',
    SUM(CASE
        WHEN (YEAR(cout) = 2007) THEN 1
        ELSE 0
    END) AS '2007',
    SUM(CASE
        WHEN (YEAR(cout) = 2008) THEN 1
        ELSE 0
    END) AS '2008',
    SUM(CASE
        WHEN (YEAR(cout) = 2009) THEN 1
        ELSE 0
    END) AS '2009',
    SUM(CASE
        WHEN (YEAR(cout) = 2010) THEN 1
        ELSE 0
    END) AS '2010',
    SUM(CASE
        WHEN (YEAR(cout) = 2011) THEN 1
        ELSE 0
    END) AS '2011',
    SUM(CASE
        WHEN (YEAR(cout) = 2012) THEN 1
        ELSE 0
    END) AS '2012',
    SUM(CASE
        WHEN (YEAR(cout) = 2013) THEN 1
        ELSE 0
    END) AS '2013',
    SUM(CASE
        WHEN (YEAR(cout) = 2014) THEN 1
        ELSE 0
    END) AS '2014',
    SUM(CASE
        WHEN (YEAR(cout) = 2015) THEN 1
        ELSE 0
    END) AS '2015',
    SUM(CASE
        WHEN (YEAR(cout) = 2016) THEN 1
        ELSE 0
    END) AS '2016',
    SUM(CASE
        WHEN (YEAR(cout) = 2017) THEN 1
        ELSE 0
    END) AS '2017'
FROM
    spl_2016.outraw
WHERE
    title = 'Reservoir dogs'
      or title = 'Pulp fiction'
        OR title = 'Pulp fiction the complete story of Quentin Tarantinos masterpiece'
        OR title = 'Quentin Tarantinos Death proof original soundtrack'
        OR title = 'Kill Bill volume 1'
        OR title = 'Kill Bill Vol 2 original soundtrack'
        OR title = 'Kill Bill Vol 2'
        OR title = 'Kill Bill Vol 1 original soundtrack'
        OR title = 'Kill Bill diary the making of a Tarantino classic as seen through the eyes of a screen legend'
        OR title = 'Jackie Brown a screenplay'
        OR title = 'Jackie Brown a Quentin Tarantino film music from the Miramar motion picture'
        OR title = 'Jackie Brown'
        OR title = 'Inglourious Basterds'
        OR title = 'hateful eight'
        OR title = 'Django unchained original motion picture soundtrack'
        OR title LIKE '%Django Unchained%'
        OR title = 'Death proof'
        OR title = 'Death proof original soundtrack'
GROUP BY bibNumber , itemtype, title
ORDER BY Counts DESC


SKETCH & IDEA
WechatIMG1.jpeg

I was inspired by the solar system. Every planet represents a movie. And this planet is built via data distributed along longitude and latitude. For latitude, I exhibit the number of formats this movie has in SPL, in terms of item types. And for longitude, I use checkouts per year, from 2006 to 2016. For data on each movie's planet, the radius for every data point is mapped from the total of checkouts.
I tried different methods to visualize my data, to generate the planet.
first, mapping one single movie's data to a spherical coordinate system and connect each vertex:
Screen Shot 2018-02-20 at 1.17.05 PM.png

Or simply connecting data for one certain form:
Screen Shot 2018-02-20 at 1.17.53 PM.png

Or finding a polygon to wrapping the whole data:
Screen Shot 2018-02-21 at 9.07.37 PM.png

Or only connecting the points which generate the max polygon:
Screen Shot 2018-02-22 at 4.53.06 PM.png

None of them seemed to be satisfied. After a lot of attempts, I decided to map my data based on a fixed sphere, thus those points can always generate a convex polygon.
Now the system looks like this:
Screen Shot 2018-02-22 at 3.21.31 PM.png

Also I add coordinate system to view data more clearly:
Screen Shot 2018-02-22 at 3.22.00 PM.png
Attachments
HW3_3D_Visualization.zip
(15.83 KiB) Downloaded 6 times
Last edited by yankong on Thu Feb 22, 2018 5:56 pm, edited 5 times in total.
yankong
 
Posts: 4
Joined: Fri Jan 19, 2018 11:08 am

Next

Return to Winter 2018

Who is online

Users browsing this forum: No registered users and 1 guest

cron