Index: /other-projects/maori-lang-detection/MoreReading/mongodb.txt
===================================================================
--- /other-projects/maori-lang-detection/MoreReading/mongodb.txt	(revision 33799)
+++ /other-projects/maori-lang-detection/MoreReading/mongodb.txt	(revision 33800)
@@ -479,18 +479,18 @@
 
 # Number of sites with URLs containing /mi(/)
-db.getCollection('Websites').find({urlContainsLangCodeInpath:true}).count()
+db.getCollection('Websites').find({urlContainsLangCodeInPath:true}).count()
 153
 
 # Number of websites that are outside NZ that contain /mi(/) in any of its sub-urls
-0db.getCollection('Websites').find({urlContainsLangCodeInpath:true, geoLocationCountryCode: {$ne : "NZ"} }).count()
+db.getCollection('Websites').find({urlContainsLangCodeInPath:true, geoLocationCountryCode: {$ne : "NZ"} }).count()
 148
 
 # 5 sites with URLs containing /mi(/) that are in NZ
-db.getCollection('Websites').find({urlContainsLangCodeInpath:true, geoLocationCountryCode: "NZ"}).count()
+db.getCollection('Websites').find({urlContainsLangCodeInPath:true, geoLocationCountryCode: "NZ"}).count()
 5
 
 # sort websites that contain /mi(/) in path by geoLocationCountryCode
 #    https://www.quackit.com/mongodb/tutorial/mongodb_sort_query_results.cfm
-db.getCollection('Websites').find({urlContainsLangCodeInpath:true}).sort({geoLocationCountryCode: 1})
+db.getCollection('Websites').find({urlContainsLangCodeInPath:true}).sort({geoLocationCountryCode: 1})
 
 Actually, I want to sort by count. See https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/
@@ -498,5 +498,5 @@
 
 # PROJECTION:
-db.getCollection('Websites').find({geoLocationCountryCode: {$ne:"nz"}}, {geoLocationCountryCode:1, urlContainsLangCodeInpath: 1})
+db.getCollection('Websites').find({geoLocationCountryCode: {$ne:"nz"}}, {geoLocationCountryCode:1, urlContainsLangCodeInPath: 1})
 
 https://docs.mongodb.com/manual/aggregation/
Index: /other-projects/maori-lang-detection/conf/url-blacklist-filter.txt
===================================================================
--- /other-projects/maori-lang-detection/conf/url-blacklist-filter.txt	(revision 33799)
+++ /other-projects/maori-lang-detection/conf/url-blacklist-filter.txt	(revision 33800)
@@ -66,4 +66,5 @@
 xxxblacknudes.com
 bigsexymelons.com
+mi.thebestmasturbators.com
 
 # more adult sites
Index: /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java
===================================================================
--- /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java	(revision 33799)
+++ /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java	(revision 33800)
@@ -248,5 +248,4 @@
     }
 
-
     // create rectangular "histogram" for each country code
     private Geometry toPolygon(JsonObject json, int count, int HISTOGRAM_WIDTH) {
@@ -337,9 +336,4 @@
 	     Writer writer = new BufferedWriter(new FileWriter(outFile));
 	     ) {
-
-	    
-	    //multiPointGeojsonString = multiPointGeojsonString.replace("[[", "\n[\n\t[");
-	    //multiPointGeojsonString = multiPointGeojsonString.replace("],[", "],\n\t[");
-	    //multiPointGeojsonString = multiPointGeojsonString.replace("]]", "]\n]");
 	    
 	    writer.write(featuresGeojsonString + "\n");
@@ -356,4 +350,15 @@
 
     
+    public int getTotalCount() {
+	int total = 0;
+	for(JsonElement obj : this.countryCountsJsonArray) {
+	    JsonObject json = obj.getAsJsonObject();
+	    int count = json.get("count").getAsInt();
+	    total += count;	    
+	}
+	return total;
+    }
+
+    
     // Unfinished and unused
     public void parseCSVFile(String filename) throws Exception {
@@ -381,10 +386,7 @@
 	    CountryCodeCountsMapData mapData = new CountryCodeCountsMapData(args[0], args[1]);
 
-	    //Geometry geometry = mapData.toMultiPointGeoJSON();
-	    //String multiPointGeojsonString = FeatureConverter.toStringValue(geometry);
-	    //System.err.println("geometry: " + multiPointGeojsonString);
-
 	    String multipointOutFileName = mapData.writeMultiPointGeoJsonToFile(parentFolder);	    
 	    String featuresOutFileName = mapData.writeFeaturesGeoJsonToFile(parentFolder);
+	    
 	    System.err.println("***********\nWrote mapdata to files " + multipointOutFileName
 			       + " and " + featuresOutFileName);
@@ -392,4 +394,6 @@
 			       + "editor at http://geojson.tools/ to see the data arranged on a world map");
 
+	    System.err.println("Total count for query: " + mapData.getTotalCount());
+	    
 	} catch(Exception e) {
 	    logger.error(e.getMessage(), e);
Index: /other-projects/maori-lang-detection/src/org/greenstone/atea/NutchTextDumpToMongoDB.java
===================================================================
--- /other-projects/maori-lang-detection/src/org/greenstone/atea/NutchTextDumpToMongoDB.java	(revision 33799)
+++ /other-projects/maori-lang-detection/src/org/greenstone/atea/NutchTextDumpToMongoDB.java	(revision 33800)
@@ -291,5 +291,5 @@
 	File geoLiteCityDatFile = new File(this.getClass().getClassLoader().getResource("GeoLiteCity.dat").getFile());
 	try {
-	    if(this.domainOfSite.equals("UNKNOWN")) {
+	    if(this.domainOfSite.equals("UNKNOWN")) { // for sites that had 0 webpages downloaded, we have no domain
 		this.geoLocationCountryCode = "UNKNOWN";
 	    } else {
@@ -298,5 +298,5 @@
 	} catch(Exception e) {	    
 	    logger.error("*** For SiteID " + siteID + ", got exception: "  + e.getMessage(), e);
-	    this.geoLocationCountryCode = null;
+	    this.geoLocationCountryCode = "UNKNOWN"; // couldn't get the country code, so should also be UNKNOWN not null
 	}
 
