This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myPop = population; | |
| var myCrime = crime.features; | |
| var myBoundary = boundaries.features; | |
| for(var i =0; i < myCrime.length; i++){ | |
| var dataState = myCrime[i].properties.community_area; | |
| var dataValue = +myCrime[i].properties.offence; | |
| for(var k= 0; k < myPop.length; k++){ | |
| var popArea = myPop[k].Community_Area_Num; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function main() { | |
| $('.form-control').change(function(e) { | |
| e.preventDefault(); | |
| /* Act on the event */ | |
| var offence= $("#crimeType").val(); | |
| var arrest= $("#arrest").val(); | |
| var domestic= $("#domestic").val(); | |
| var startDate= $("#startDate").val(); | |
| var endDate= $("#endDate").val(); | |
| // console.log(offence, arrest, domestic, startDate,endDate); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.ajax({ | |
| url: 'https://data.cityofchicago.org/resource/ijzp-q8t2.geojson', | |
| method: "GET", | |
| dataType: "json", | |
| data: formData, | |
| }).done(function (crime) { | |
| $.ajax({ | |
| url: 'https://raw.githubusercontent.com/RandomFractals/ChicagoCrimes/master/data/chicago-community-areas.geojson', | |
| type: 'GET', | |
| dataType: 'json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Crime Dashboards</title> |