Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
clementmiao committed Mar 13, 2014
1 parent 47692c0 commit 06fa57a
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 382 deletions.
2 changes: 1 addition & 1 deletion chicago_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

# Parse database configuration from $DATABASE_URL
import dj_database_url
# DATABASES['default'] = dj_database_url.config()p
# DATABASES['default'] = dj_database_url.config()



Expand Down
138 changes: 0 additions & 138 deletions chicago_api/settings.py.orig

This file was deleted.

1 change: 0 additions & 1 deletion chicago_api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
urlpatterns = patterns('',
# Examples:
url(r'^$', 'chicago_api.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^gmap/', include('gmap.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^social_data/',include('social_data.urls')),
Expand Down
Binary file modified db.sqlite3
Binary file not shown.
6 changes: 0 additions & 6 deletions gmap/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
from django.contrib import admin
# from gmap.models import Location

# class LocationAdmin(admin.ModelAdmin):
# fields = ['longitude','latitude']

# admin.site.register(Location, LocationAdmin)
11 changes: 0 additions & 11 deletions gmap/models.py
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
from django.db import models

# class Location(models.Model):

# longitude = models.CharField(max_length=200)
# latitude = models.CharField(max_length=200)
# # summary = models.CharField(max_length=200)

# def __unicode__(self):
# string = "longitude: %s; latitude: %s" % (self.longitude, self.latitude)
# return string

67 changes: 0 additions & 67 deletions gmap/templates/gmap/map_sentiment.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

var myParser;

// window.onload = function() {
function initialize() {
var lat_long = new google.maps.LatLng({{latitude}}, {{longitude}});
var mapOptions = {
Expand All @@ -32,49 +31,6 @@
myParser.parse(kml);

heat_data = []
{% if data %}

function createMarker(latitude, longitude, string, icon, image) {
var marker = new google.maps.Marker({
position: new google.maps.LatLng(latitude, longitude),
map: map,
icon: icon,
animation: google.maps.Animation.DROP,
})
var contentString = string;

if (image != "") {
contentString = '<IMG BORDER="0" ALIGN="Left" SRC=' + image + '>' + contentString
}

var infoWindow = new google.maps.InfoWindow({
content: contentString
});

google.maps.event.addListener(marker, 'click', function() {
infoWindow.open(map,marker);
});
}



// myParser.parse(kml);


// {% for p in data %}

// createMarker({{p.latitude}},{{p.longitude}}, "{{p.title|escapejs}}", "{{p.icon}}", "{{p.image}}");

// var item = new google.maps.LatLng({{p.latitude}}, {{p.longitude}});
// heat_data.push(item);

// {% endfor %}

// var pointArray = new google.maps.MVCArray(heat_data);



{% endif %}


}
Expand All @@ -93,9 +49,6 @@
if (sentiment == "positive") {
counter = counter + 1
}
// polygon.setOptions({fillColor: "blue", fillOpacity: 0.20});
// window.alert("hello world");

}


Expand All @@ -120,23 +73,6 @@
polygon.setOptions({fillColor: "red", fillOpacity: 0.30})
}
}

// {% for p in data %}
// var latitude = {{p.latitude}}
// var longitude = {{p.longitude}}
// var sentiment = "{{p.sentiment}}"

// var position = new google.maps.LatLng(latitude, longitude)

// if (google.maps.geometry.poly.containsLocation(position, polygon)) {

// polygon.setOptions({fillColor: "blue", fillOpacity: 0.30});
// // window.alert("hello world");

// }
// // polygon.setMap(map);

// {% endfor %}
}

function sentiment(){
Expand All @@ -146,9 +82,6 @@
for (var i = 0; i < arrayLength; i++) {
var polygon = myParser.docs[0].gpolygons[i];
getSentiment(polygon);
// polygon.setMap(null);
// polygon.setOptions({fillColor: "blue", fillOpacity: 0.20})
// polygon.setMap(map);
}


Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ tweepy==2.2
wsgiref==0.1.2
nltk==2.0.4
python-instagram==0.8.0
facepy==0.9.0
requests==2.1.0
facepy==0.9.0
70 changes: 0 additions & 70 deletions social_data/insta.py.orig

This file was deleted.

Loading

0 comments on commit 06fa57a

Please sign in to comment.