Database Reference
In-Depth Information
for(DateInfo dinfo:dateinfos)
{
intsum+=Math.pow((dinfo.count - mean),2);
}
return Math.sqrt((double)intsum/numperiods);
}
public double GetMean(ArrayList<DateInfo> dateinfos) {
int numperiods = dateinfos.size();
int sum = 0;
for(DateInfo dinfo:dateinfos)
{
sum +=dinfo.count;
}
return ((double)sum/numperiods);
}
Source: Chapter5/trends/ControlChartExample.java
monitoring the times at which the traffic exceeds the upper control limit or falls
below the lower control limit. A user can then be notified, so the event can be further
investigated. In Fig. 5.8 , one such instance occurred in the first few hours when the
traffic exceeded the upper control limit.
5.3
Visualizing Geospatial Information
Geospatial visualization can help us answer the following two questions:
￿
Where are events occurring?
￿
Where are new events likely to occur?
Location information of a Tweet can be identified using two techniques as explained
in Chap. 2 :
￿
Accurately through the geotagging feature available on Twitter.
￿
Approximately using the location in the user's profile.
The location information is typically used to gain insight into the prominent
locations discussing an event. Maps are an obvious choice to visualize location
information. In this section, we will discuss how maps can be used to effectively
summarize location information and aid in the analysis of Tweets. A first attempt
at creating a map identifying Tweet locations would be to simply highlight the
individual Tweet locations. Each Tweet is identified by a dot on the map, and such
dots are referred to as markers. Typically, the shape, color, and style of a marker
can be customized to match the application requirements. Maps are rendered as
a collection of images, called tiles. An example of the “dots on map” approach
is presented in Fig. 5.9 . The map uses OpenStreetMaps tiles and presents two
differently colored dots. The blue dots are plotted using the location field in the
user's Twitter profile, while the green dots represent geotagged Tweets.
 
Search WWH ::




Custom Search