Git Product home page Git Product logo

spotcrime's Introduction

NPM version

Information

Packagespotcrime
Description API client for crime statistics
Node Version >= 6

Breakage Notice

SpotCrime doesn't really like people using their API, so this module is certainly not something you should build more than a prototype on top of. The keys change constantly and they purposefully try to break this module on a regular basis.

The current workaround for an api key is to use the SpotCrime map web interface and inspect the network traffic for a key. The request will be to https://spotcrime.com/crimes.json and you will need the spotcrime-api-token header. Replace the example key in lib\getCrimes.js with this token.

If you need a consistent source of 911 call / police report / other municipal data, you should use https://municipal.systems/ instead.

Usage

const spotcrime = require('spotcrime');

// somewhere near phoenix, az
const loc = {
  lat: 33.39657,
  lon: -112.03422
};

const radius = 0.01; // this is miles

// using callbacks
spotcrime.getCrimes(loc, radius, function(err, crimes){

});

// using async await
await spotcrime.getCrimes(loc, radius);

// using promises
spotcrime.getCrimes(loc, radius).then((crimes) => {

});

Example Crimes

[ { cdid: 46846473,
    type: 'Assault',
    date: '12/04/13 06:52 PM',
    address: '2200 BLOCK OF E SCHOOL DR',
    link: 'http://spotcrime.com/crime/46846473-bf48f72ccce82295caf2aee6aedca3e1',
    lat: 33.4037116,
    lon: -112.0341417 },
  { cdid: 46845797,
    type: 'Burglary',
    date: '12/03/13 12:00 PM',
    address: '2000 BLOCK OF E ST ANNE AV',
    link: 'http://spotcrime.com/crime/46845797-82cbf298a022813edcee81e0a7ec827b',
    lat: 33.3880011,
    lon: -112.0387037 },
  { cdid: 46846182,
    type: 'Theft',
    date: '12/01/13 08:00 AM',
    address: '2200 BLOCK OF E ALTA VISTA RD',
    link: 'http://spotcrime.com/crime/46846182-818423ce25e8e193cf531e769e0e4c30',
    lat: 33.3892497,
    lon: -112.0344112 },
  { cdid: 46039372,
    type: 'Arrest',
    date: '11/29/13 01:18 AM',
    address: '2000 BLOCK OF E BURGESS LA',
    link: 'http://spotcrime.com/crime/46039372-bb0eb5147f7f6ab63f30ce7298ff2de2',
    lat: 33.3902173,
    lon: -112.0386689 },
  { cdid: 46846219,
    type: 'Assault',
    date: '11/28/13 09:00 AM',
    address: '6000 BLOCK OF S 25TH LA',
    link: 'http://spotcrime.com/crime/46846219-cbe45d070a76520090147ac862b8eae4',
    lat: 33.3933088,
    lon: -112.0272747 },
  { cdid: 46038235,
    type: 'Arrest',
    date: '11/26/13 09:45 PM',
    address: '2100 BLOCK OF E MOBILE LA',
    link: 'http://spotcrime.com/crime/46038235-61f1ce3ad5a5f259b95ca709b7e42700',
    lat: 33.4015345,
    lon: -112.0368315 },
  { cdid: 45526778,
    type: 'Assault',
    date: '11/23/13 12:29 PM',
    address: '2200 BLOCK OF E NANCY LA',
    link: 'http://spotcrime.com/crime/45526778-aacdddd8c5fd83edee8aee7b55ce7cba',
    lat: 33.3907383,
    lon: -112.0343804 },
  { cdid: 45526648,
    type: 'Arrest',
    date: '11/22/13 12:45 AM',
    address: '00 BLOCK OF S 18TH PL',
    link: 'http://spotcrime.com/crime/45526648-8c6523cf0f2ede15fa06ee8ba43ff7a9',
    lat: 33.3996538,
    lon: -112.0425118 },
  { cdid: 45525295,
    type: 'Burglary',
    date: '11/19/13 06:00 PM',
    address: '2000 BLOCK OF E ALTA VISTA RD',
    link: 'http://spotcrime.com/crime/45525295-ac2846846772b7295d08b11c122b764f',
    lat: 33.3894736,
    lon: -112.0386812 },
  { cdid: 45526055,
    type: 'Assault',
    date: '11/17/13 07:00 PM',
    address: '2000 BLOCK OF E SOUTHERN AV',
    link: 'http://spotcrime.com/crime/45526055-2226a1b74f9c35f93eea4f05e8790b8c',
    lat: 33.3928994,
    lon: -112.038771 },
  { cdid: 45526002,
    type: 'Assault',
    date: '11/17/13 01:20 PM',
    address: '1800 BLOCK OF E SUNLAND AV',
    link: 'http://spotcrime.com/crime/45526002-7e8696518721e503edc21b66d681f69a',
    lat: 33.3952706,
    lon: -112.0419982 },
  { cdid: 45399939,
    type: 'Assault',
    date: '11/14/13 06:26 PM',
    address: '1800 BLOCK OF E CHIPMAN RD',
    link: 'http://spotcrime.com/crime/45399939-60fe48fae1b88a8bb13a3f8da1321913',
    lat: 33.4021139,
    lon: -112.0425066 },
  { cdid: 45399867,
    type: 'Theft',
    date: '11/14/13 02:50 AM',
    address: '1800 BLOCK OF E WIER AV',
    link: 'http://spotcrime.com/crime/45399867-16eec0ec24e8826e280f76e3cf3d5960',
    lat: 33.4028975,
    lon: -112.0419515 },
  { cdid: 45399736,
    type: 'Arrest',
    date: '11/13/13 03:48 PM',
    address: '2200 BLOCK OF E ALTA VISTA RD',
    link: 'http://spotcrime.com/crime/45399736-8ad39cd813c9b532c36b067fdc33f389',
    lat: 33.3892497,
    lon: -112.0344112 },
  { cdid: 45399857,
    type: 'Theft',
    date: '11/13/13 09:00 AM',
    address: '2400 BLOCK OF E CHIPMAN RD',
    link: 'http://spotcrime.com/crime/45399857-ebab1be3c66ca74d188fd1a837dc12dc',
    lat: 33.4023596,
    lon: -112.0298543 },
  { cdid: 45399981,
    type: 'Theft',
    date: '11/12/13 10:00 PM',
    address: '2200 BLOCK OF E SOUTHERN AV',
    link: 'http://spotcrime.com/crime/45399981-e45f253643e6738ceb002d476c86bd78',
    lat: 33.393055,
    lon: -112.0343692 },
  { cdid: 45398534,
    type: 'Burglary',
    date: '11/12/13 09:40 PM',
    address: '6000 BLOCK OF S 24TH ST',
    link: 'http://spotcrime.com/crime/45398534-1dd99d3647e293f6e85c3e59e40d1224',
    lat: 33.3931883,
    lon: -112.0300853 },
  { cdid: 45398249,
    type: 'Burglary',
    date: '11/12/13 11:00 AM',
    address: '2500 BLOCK OF E MOBILE LA',
    link: 'http://spotcrime.com/crime/45398249-464b7a13198f081a547b7d3c5df7e3e3',
    lat: 33.4014647,
    lon: -112.0269926 },
  { cdid: 45398125,
    type: 'Burglary',
    date: '11/11/13 05:00 PM',
    address: '2200 BLOCK OF E SUNLAND AV',
    link: 'http://spotcrime.com/crime/45398125-ed1c0ef761d15dc49c5073dcfbde7d65',
    lat: 33.3963898,
    lon: -112.0342238 },
  { cdid: 45397891,
    type: 'Burglary',
    date: '11/10/13 05:00 PM',
    address: '1900 BLOCK OF E ROESER RD',
    link: 'http://spotcrime.com/crime/45397891-d0d1e497c806f4e1141363fa44d2ec33',
    lat: 33.3996718,
    lon: -112.0409278 },
  { cdid: 45397831,
    type: 'Burglary',
    date: '11/10/13 09:00 AM',
    address: '2200 BLOCK OF E ALTA VISTA RD',
    link: 'http://spotcrime.com/crime/45397831-a3069cd4985acc7f10d81e7253717da8',
    lat: 33.3892497,
    lon: -112.0344112 },
  { cdid: 45398680,
    type: 'Assault',
    date: '11/10/13 03:47 AM',
    address: '2200 BLOCK OF E ST CATHERINE AV',
    link: 'http://spotcrime.com/crime/45398680-5042b57e3c8b382023f3b1d8f502f175',
    lat: 33.3885581,
    lon: -112.0344187 },
  { cdid: 45397854,
    type: 'Burglary',
    date: '11/09/13 02:00 AM',
    address: '5700 BLOCK OF S 21ST TE',
    link: 'http://spotcrime.com/crime/45397854-78d4b817012ae47dbd87c52761d7fc24',
    lat: 33.3946717,
    lon: -112.0350565 },
  { cdid: 45286939,
    type: 'Arrest',
    date: '11/05/13 10:58 PM',
    address: '2500 BLOCK OF E MOBILE LA',
    link: 'http://spotcrime.com/crime/45286939-0f5d31616ac37df9341c0a64c2201a0b',
    lat: 33.4014647,
    lon: -112.0269926 },
  { cdid: 45286601,
    type: 'Assault',
    date: '11/04/13 08:27 AM',
    address: '2100 BLOCK OF E CARVER DR',
    link: 'http://spotcrime.com/crime/45286601-6cf7b1a49862dbb04cdf5f1a09a56044',
    lat: 33.4035415,
    lon: -112.0374932 },
  { cdid: 45286385,
    type: 'Arrest',
    date: '11/03/13 12:18 AM',
    address: '1900 BLOCK OF E MOBILE LA',
    link: 'http://spotcrime.com/crime/45286385-93710be743ce7ffbafd083a91eeb59a3',
    lat: 33.4013553,
    lon: -112.0405715 },
  { cdid: 45171443,
    type: 'Arrest',
    date: '11/02/13 12:55 PM',
    address: '2200 BLOCK OF E NANCY LA',
    link: 'http://spotcrime.com/crime/45171443-c035e100285bc17fe5e0db4829037106',
    lat: 33.3907383,
    lon: -112.0343804 },
  { cdid: 45171359,
    type: 'Assault',
    date: '11/02/13 12:38 AM',
    address: '2500 BLOCK OF E ATLANTA AV',
    link: 'http://spotcrime.com/crime/45171359-fe024ee261e9a7ca74d580ade7d75af0',
    lat: 33.400552,
    lon: -112.0270119 },
  { cdid: 45171362,
    type: 'Assault',
    date: '11/02/13 12:20 AM',
    address: '2500 BLOCK OF E MOBILE LA',
    link: 'http://spotcrime.com/crime/45171362-85a51c7741e699a7a75dbea0ab2234e4',
    lat: 33.4014647,
    lon: -112.0269926 },
  { cdid: 45286756,
    type: 'Theft',
    date: '11/01/13 01:00 AM',
    address: '2100 BLOCK OF E HUNTINGTON DR',
    link: 'http://spotcrime.com/crime/45286756-061412908c91bc0eb281c94a2c25849d',
    lat: 33.3935261,
    lon: -112.0361545 },
  { cdid: 45169993,
    type: 'Burglary',
    date: '10/31/13 01:00 PM',
    address: '1100 BLOCK OF E FRAKTUR RD',
    link: 'http://spotcrime.com/crime/45169993-10af575a29849fb468f16ab54c6b1466',
    lat: 33.3957776,
    lon: -112.035973 },
  { cdid: 45286658,
    type: 'Theft',
    date: '10/30/13 06:38 AM',
    address: '2000 BLOCK OF E BURGESS LA',
    link: 'http://spotcrime.com/crime/45286658-e9de501f4c2fe13bbf6bffc1c84fccc6',
    lat: 33.3902173,
    lon: -112.0386689 },
  { cdid: 45170421,
    type: 'Theft',
    date: '10/28/13 12:48 PM',
    address: '2400 BLOCK OF E SOUTHERN AV',
    link: 'http://spotcrime.com/crime/45170421-9025f8a35bc99276306dc893dddae0ce',
    lat: 33.3932169,
    lon: -112.0300395 },
  { cdid: 45169901,
    type: 'Arrest',
    date: '10/27/13 06:29 AM',
    address: '6600 BLOCK OF S 22ND ST',
    link: 'http://spotcrime.com/crime/45169901-7ca79c121712ddf1ecb769379ee8375f',
    lat: 33.3874058,
    lon: -112.0344249 },
  { cdid: 45038273,
    type: 'Burglary',
    date: '10/23/13 04:30 PM',
    address: '5000 BLOCK OF S 24TH ST',
    link: 'http://spotcrime.com/crime/45038273-a640b6bac5b0016d71082887679606a0',
    lat: 33.4014265,
    lon: -112.0299195 },
  { cdid: 45039443,
    type: 'Assault',
    date: '10/23/13 09:00 AM',
    address: '2500 BLOCK OF E MOBILE LA',
    link: 'http://spotcrime.com/crime/45039443-4f2ba90a57a63d75cead4a851b6ed0bf',
    lat: 33.4014647,
    lon: -112.0269926 },
  { cdid: 45038782,
    type: 'Theft',
    date: '10/21/13 03:00 PM',
    address: '2400 BLOCK OF E SOUTHERN AV',
    link: 'http://spotcrime.com/crime/45038782-5db5b9cd7bd5b7417dd1137f845b7204',
    lat: 33.3932169,
    lon: -112.0300395 },
  { cdid: 44894183,
    type: 'Shooting',
    date: '10/18/13 03:39 PM',
    address: '6400 BLOCK OF S 21ST ST',
    link: 'http://spotcrime.com/crime/44894183-5d0b413f7e4c3a28d48610cb028d7d78',
    lat: 33.387732,
    lon: -112.036577 },
  { cdid: 44911288,
    type: 'Assault',
    date: '10/18/13 02:18 PM',
    address: '6400 BLOCK OF S 21ST ST',
    link: 'http://spotcrime.com/crime/44911288-c1efbbd1542fce8a7493223228763555',
    lat: 33.3892406,
    lon: -112.0363713 },
  { cdid: 44911226,
    type: 'Assault',
    date: '10/17/13 09:03 AM',
    address: '4600 BLOCK OF S 21ST ST',
    link: 'http://spotcrime.com/crime/44911226-a5da6b4674cce468c13441e5b5d72ac0',
    lat: 33.4048519,
    lon: -112.0374933 },
  { cdid: 44911141,
    type: 'Assault',
    date: '10/16/13 07:22 PM',
    address: '6400 BLOCK OF S 21ST PL',
    link: 'http://spotcrime.com/crime/44911141-08029f307406e3dad33f2067e09ad97f',
    lat: 33.3892621,
    lon: -112.0355023 },
  { cdid: 45171089,
    type: 'Assault',
    date: '10/16/13 06:00 PM',
    address: '1900 BLOCK OF E HIDALGO AV',
    link: 'http://spotcrime.com/crime/45171089-28227b4f9c26be35690c8dbfef697635',
    lat: 33.3937439,
    lon: -112.0403549 },
  { cdid: 45399029,
    type: 'Theft',
    date: '10/16/13 12:00 PM',
    address: '2300 BLOCK OF E HUNTINGTON DR',
    link: 'http://spotcrime.com/crime/45399029-c3330abb26eae61b51ac7e827197cd3c',
    lat: 33.3934823,
    lon: -112.0324101 },
  { cdid: 44910717,
    type: 'Robbery',
    date: '10/15/13 01:00 PM',
    address: '2200 BLOCK OF E SOUTHERN AV',
    link: 'http://spotcrime.com/crime/44910717-f9f834daa00f8191456c3125296b5112',
    lat: 33.393055,
    lon: -112.0343692 },
  { cdid: 44910713,
    type: 'Assault',
    date: '10/15/13 01:00 PM',
    address: '2300 BLOCK OF E SHERATON LA',
    link: 'http://spotcrime.com/crime/44910713-e41ea41b532986798080e6446812cc90',
    lat: 33.4011662,
    lon: -112.0320788 },
  { cdid: 44909910,
    type: 'Burglary',
    date: '10/14/13 10:25 PM',
    address: '2400 BLOCK OF E SOUTHERN AV',
    link: 'http://spotcrime.com/crime/44909910-0d6137ab2d47cf823ec67430d66d1108',
    lat: 33.3932169,
    lon: -112.0300395 },
  { cdid: 45039181,
    type: 'Robbery',
    date: '10/12/13 04:25 PM',
    address: '2400 BLOCK OF E SOUTHERN AV',
    link: 'http://spotcrime.com/crime/45039181-881d5c4a2b7d3fc1803607ccbcf4be4c',
    lat: 33.3932169,
    lon: -112.0300395 },
  { cdid: 44782000,
    type: 'Assault',
    date: '10/12/13 10:00 AM',
    address: '6400 BLOCK OF S 21ST ST',
    link: 'http://spotcrime.com/crime/44782000-b1495fa097bab2b2b7c06a8daa8f7662',
    lat: 33.3892406,
    lon: -112.0363713 },
  { cdid: 44781985,
    type: 'Theft',
    date: '10/12/13 02:30 AM',
    address: '5100 BLOCK OF S 18TH PL',
    link: 'http://spotcrime.com/crime/44781985-b77fdb76e43f57c8b6923955c1f40a60',
    lat: 33.4001492,
    lon: -112.0425218 },
  { cdid: 44781895,
    type: 'Arrest',
    date: '10/11/13 04:28 PM',
    address: '2000 BLOCK OF E BURGESS LA',
    link: 'http://spotcrime.com/crime/44781895-2a9588f327c3234480e1a276882f3372',
    lat: 33.3902173,
    lon: -112.0386689 } ]

LICENSE

(MIT License)

Copyright (c) 2018 Contra [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

spotcrime's People

Contributors

jake-watkins avatar joshuajharris avatar shreyashirday avatar simeg avatar tareqx2 avatar yocontra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spotcrime's Issues

Documentation on Available Query Parameters

Are key, lat, lon, and radius the only query parameters that are available on the crimes.json endpoint? Is there, for instance, any way to query a date range, or to get more than (or fewer than) 50 results? Obviously as this is not a public API, there is no readily-available documentation (at least none I could locate), so I understand this question may be unanswerable.

I noticed that many of the incident pages linked in each event hash in the response array point to incidentpage.net as the source, so it's even conceivable that spotcrime doesn't store any historical data and only keeps a rolling tally of the past few days or weeks of events, dropping older records as new ones roll in from IPN, making my question moot.

Publish new version to npm

  • Recently someone made a PR that included the new api-key to use this module. Can you publish this new version to npm.

401 unauthorized

when I tried this api, I got such issue
{
"errors": [
"Invalid API Key"
]
}

how can I fix this issue?

api key system change

If you want to use this API now, instead of passing a key as a url param, you now pass it as a header called spotcrime-api-token and if you use the website you can get one that you can use for a little bit if you look at the headers for the request. I'm not sure how long they last on the website though.

What's your data source?

I'm in Wichita, KS and trying to figure out where the reports listed here are coming from. Any info would be helpful!

Thanks :)

API key

I receive response:
{"errors":["Invalid API Key"]}

Do you know where to get this API key?

Thanks

Webpack 3 dependencies

I am getting an error when trying to add this package via NPM to my angular app

in doing some research, it looks like some of Spotcrime's dependencies are built in to webpack now (crypto, net, tls, etc). is there hope for an update?

Error

ERROR in ./node_modules/aws-sign2/index.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\aws-sign2'
[ng] ERROR in ./node_modules/aws4/aws4.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\aws4'
[ng] ERROR in ./node_modules/ecc-jsbn/index.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\ecc-jsbn'
[ng] ERROR in ./node_modules/http-signature/lib/signer.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\http-signature\lib'
[ng] ERROR in ./node_modules/http-signature/lib/verify.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\http-signature\lib'
[ng] ERROR in ./node_modules/oauth-sign/index.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\oauth-sign'
[ng] ERROR in ./node_modules/request/lib/hawk.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\request\lib'
[ng] ERROR in ./node_modules/request/lib/oauth.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\request\lib'
[ng] ERROR in ./node_modules/request/lib/helpers.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\request\lib'
[ng] ERROR in ./node_modules/sshpk/lib/key.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/dhe.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/utils.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/fingerprint.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/signature.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/private-key.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/certificate.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/identity.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib'
[ng] ERROR in ./node_modules/sshpk/lib/formats/pem.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib\formats'
[ng] ERROR in ./node_modules/sshpk/lib/formats/ssh-private.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib\formats'
[ng] ERROR in ./node_modules/sshpk/lib/formats/openssh-cert.js
[ng] Module not found: Error: Can't resolve 'crypto' in 'Z:\ionic\app\node_modules\sshpk\lib\formats'
[ng] ERROR in ./node_modules/request/lib/har.js
[ng] Module not found: Error: Can't resolve 'fs' in 'Z:\ionic\app\node_modules\isstream'
[ng] ERROR in ./node_modules/request/request.js
[ng] Module not found: Error: Can't resolve 'zlib' in 'Z:\ionic\app\node_modules\request'
[ng] i 「wdm」: Failed to compile.

package.json

"dependencies": {
"@angular/common": "~7.0.2",
"@angular/core": "~7.0.2",
"@angular/forms": "~7.0.2",
"@angular/http": "~7.0.2",
"@angular/platform-browser": "~7.0.2",
"@angular/platform-browser-dynamic": "~7.0.2",
"@angular/router": "~7.0.2",
"@ionic-native/core": "5.0.0-beta.21",
"@ionic-native/splash-screen": "5.0.0-beta.21",
"@ionic-native/status-bar": "5.0.0-beta.21",
"@ionic/angular": "4.0.0-beta.15",
"core-js": "^2.5.7",
"rxjs": "6.3.3",
"spotcrime": "^1.0.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/architect": "~0.10.4",
"@angular-devkit/build-angular": "~0.10.4",
"@angular-devkit/core": "~7.0.4",
"@angular-devkit/schematics": "~7.0.4",
"@angular/cli": "~7.0.4",
"@angular/compiler": "~7.0.2",
"@angular/compiler-cli": "~7.0.2",
"@angular/language-service": "~7.0.2",
"@ionic/angular-toolkit": "^1.0.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.0",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.1.6"
},

Poor Documentation

Heyo, new to node and JS in general, having trouble trying to figure out how to use this properly. Any tips? Just a general documentation on how to. the example below seemingly isn't pulling anything in node

Incorrect area for coordinates

I am getting very few (5-10ish) crime reports that are 10+ miles away from the coordinates I am using. However, when I check the browser at spotcrime.com with the same coords, it shows over 50+ crimes in a span of 2 miles.

API Key Unauthorized Again

I saw that there was an issue with the API key in the past, and I believe it is back.

I am getting:
Unhandled rejection Error: Unauthorized

when processing the example

const spotcrime = require('spotcrime');

const loc = {
      lat: 33.39657,
      lon: -112.03422
    };
    
const radius = 0.01;

spotcrime.getCrimes(loc, radius).then((crimes) => {
     debugger
});

thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.