Permalink
Browse files

Merge branch 'master' of github.com:camillol/cs424p3

  • Loading branch information...
2 parents 03390a3 + 7cfeae0 commit 8e01a7195323ae403da92c932ccaebd053ab4891 @camillol committed Nov 1, 2011
View
@@ -35,7 +35,7 @@ class GraphView extends View {
List<Bucket> buckets;
int maxTotal;
- List<String> modes = Arrays.asList("Year", "Season","Month", "Time of day", "Airport distance", "Military Base distance", "Weather St. distance","County Population dens.");
+ List<String> modes = Arrays.asList("Year", "Season","Month", "Time of day", "Airport distance", "Military Base distance", "Weather Station dist.","County Population dens.");
String activeMode = "Year";
GraphView(float x_, float y_, float w_, float h_)
@@ -68,7 +68,7 @@ class GraphView extends View {
else if (activeMode.equals("Time of day")) buckets = data.sightingCountsByHour();
else if (activeMode.equals("Airport distance")) buckets = data.sightingCountsByAirportDistance();
else if (activeMode.equals("Military Base distance")) buckets = data.sightingCountsByMilitaryBaseDistance();
- else if (activeMode.equals("Weather St. distance")) buckets = data.sightingCountsByWeatherStDistance();
+ else if (activeMode.equals("Weather Station dist.")) buckets = data.sightingCountsByWeatherStDistance();
else if (activeMode.equals("County Population dens.")) buckets = data.sightingCountsByPopulationDensity();
maxTotal = 0;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -366,15 +366,15 @@ class SQLiteDataSource implements DataSource {
{
stopWatch();
print("Loading cities...");
- db.query("select cities.*, count(*) as sighting_count from cities join sightings on sightings.city_id = cities.id group by cities.id");
+ db.query("select cities.*, count(*) as sighting_count , cities.name||', '||states.name_abbreviation as city_name from cities join sightings on sightings.city_id = cities.id join states on cities.state_id = states.id group by cities.id");
cityMap = new HashMap<Integer,Place>();
minCountSightings = 1000;
maxCountSightings = 0;
while (db.next()) {
cityMap.put(db.getInt("id"), new City(
db.getInt("id"),
new Location(db.getFloat("lat"), db.getFloat("lon")),
- db.getString("name"),
+ db.getString("city_name"),
db.getInt("sighting_count"),
db.getInt("state_id"),
db.getInt("county_id")
@@ -612,7 +612,7 @@ class SQLiteDataSource implements DataSource {
float[] getLegendLabels(String activeMode){
if (activeMode.equals("Airport distance")) return airportsDistanceBreaks;
else if (activeMode.equals("Military Base distance")) return militaryBaseDistanceBreaks;
- else if (activeMode.equals("Weather St. distance")) return weatherStDistanceBreaks;
+ else if (activeMode.equals("Weather Station dist.")) return weatherStDistanceBreaks;
else if (activeMode.equals("County Population dens.")) return populationDensityBreaks;
return null;

0 comments on commit 8e01a71

Please sign in to comment.