This page is to represent the work related to assignements for course Social Data Analysis and Visualization.
These exercises has been performed by DTU students:
This page is to represent the work related to assignements for course Social Data Analysis and Visualization.
These exercises has been performed by DTU students:
Put something simple on the web. For this exercise, I want you to modify a bit of code from IDV Chapter 5.
- Create an new version of the 5 SVG squares in example 3-22. Make the following modifications
- Add a gray boundary of width 2 around each square.
- Make the squares increasingly transparant from left to right.
- Make the squares 80 by 80 instead of 30 by 30.
- Make the squares go from bottom of the SVG element to the top instead of the other way around.
Below you'll find the simple svg implementation derived from the above description. Please note that partying hard for too long may cause dizziness.
This scatter plot visualization should pull data from an associated CSV/JSON file (it's easiest to use Python to generate a nicely formatted file that contains only the data you need for the visualization). You should use appropriate dynamic scales (see chapter 7 of IDV). Additional requirements for the visualizations are listed below
- Each point should correspond to a district
- Points should be labeled
- The radius of a point should be proportional to total number of crimes in that district
- The xx-axis should correspond to total number of PROSTITUTION incidents
- The yy-axis should correspond to total number of VEHICLE THEFT incidents
- Click on something (your choice) to toggle between data from 2003 and 2015 - there must be a smooth transition.
- Axes should not change but fit data from both years.
Below you'll find the scatter plot visualized as described above.
Some interesting notes to take a way is much progress has been made in regard to both vehicle theft and prostitution from 2003 to 2015. For example, the Mission district has experienced a rise in prostitution which peaked in 2009, at a relative low point in prostitution and vehicle theft crimes for every other district.
Use the dropdown below to switch between years:
- Explain in your own words why you think I want the axes to be the same for both years? (Even though you know how to make axes adapt to the data values.)
It really depends on what we want to compare. If we want the relative distance between each district for a given year, we maybe would like to fit the axes. However, it is implied we want to compare two different years. Therefore it makes sense to show how big a change that have occurred during period. This would be hidden with fitting axes.
Even though the X and Y's do tell the actual number of crimes of each type, it becomes difficult from a visualization point-of-view to determine the absolute change.
This barchart visualization should also pull data from an associated CSV/JSON file. Here, Once again, you should use appropriate dynamic scales (see chapter 7 of IDV). Additional requirements for the visualizations are listed below
- This visualization consists of one histogram, which is able to switch between at least two datasets. You get to choose something interesting from Week 3.
- Click on something to toggle between the two (or more) datasets.
- Feel free to color and label according to your own taste.
The histogram below shows crimes reported on the hour in the period between 2003 and 2015. For example at 1AM in the period 2003 to 2015 about 8000 assault crimes were recorded.
Use the dropdown to change the crime category:
For this final sub-assignment we will visualize your results from the KK-means exercise from week 5.
- We try our luck with an geospatial visualization displaying results for K=2,…,6. The overall idea is each value of KK has an associated view (you should be able to toggle between these) where each of the KK centroids is shown as a large colored dot (you choose the color scheme), and all GPS points belonging to that centroid are colored using a related RGB value. My plot looks like this.
- Also please add a link to your IPython notebook containing only the solution to the KK-means exercise from week 5 so we can check it out, if necessary.
Below we visualize prostitutions in San Francisco. The data visulization shows every crime of this type from 2003 to 2015. The dataset is divided in clusters, that are defined by the K-nearest neighbors. Additionally we also show the centroids, that are the center of the given cluster. The datasets used in this visualization can be found here.
Here you can choose the different sizes of K