Skip to content

Instantly share code, notes, and snippets.

@andrewbt
Created June 1, 2015 23:51
Show Gist options
  • Save andrewbt/ad553ea50079b69d5f25 to your computer and use it in GitHub Desktop.
Save andrewbt/ad553ea50079b69d5f25 to your computer and use it in GitHub Desktop.
Vis with great circle lines and leaflet q-cluster plugin
[{"name":101,"address":"5022 Hartley Peavey Dr","city":"Meridian","state":"MS","zip":39305,"loan_balance":750000,"payoff_date":2017,"interest_rate":null,"consumer_commercial":"Commercial ","type_of_loan":null,"employer":"C","the_geom":"0101000020E6100000F901FEDFC72C56C0BE9B1320AF344040","created_at":"2015-05-29T17:17:26Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00007DF9DCAB4AD562C17B27E370FA1F4D41","cartodb_georef_status":true,"cartodb_id":101,"lng":-88.6996994,"lat":32.4115944},{"name":19,"address":"1211 University Blvd","city":"Tuscaloosa","state":"AL","zip":35401,"loan_balance":750000,"payoff_date":2040,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Mortgage ","employer":"C","the_geom":"0101000020E61000007EDC234072E355C053AD2AA0F59A4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000A273E939029762C17C18E8ECAEEE4D41","cartodb_georef_status":true,"cartodb_id":19,"lng":-87.5538483,"lat":33.2106209},{"name":3,"address":"205 University Blvd E","city":"Tuscaloosa","state":"AL","zip":35401,"loan_balance":75000,"payoff_date":2020,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Home Equity ","employer":"C","the_geom":"0101000020E6100000669824E021E255C0020CCB9F6F9A4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000A037F78AE49562C18A4F79E19EED4D41","cartodb_georef_status":true,"cartodb_id":3,"lng":-87.5333176,"lat":33.2065315},{"name":17,"address":"415 15th Street","city":"Tuscaloosa","state":"AL","zip":35401,"loan_balance":1000000,"payoff_date":2035,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Mortgage ","employer":"C","the_geom":"0101000020E6100000A937FE9F9EE255C0FEC753A060994040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000076DC177E4E9662C1ECC7FCBF78EB4D41","cartodb_georef_status":true,"cartodb_id":17,"lng":-87.5409317,"lat":33.1982613},{"name":18,"address":"5000 Oscar Baxter Dr","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":900000,"payoff_date":2040,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Mortgage ","employer":"C","the_geom":"0101000020E61000003EB324404DE355C059445E2052954040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00009F9557CDE29662C1FCB38B0E3DE34D41","cartodb_georef_status":true,"cartodb_id":18,"lng":-87.55159,"lat":33.1665688},{"name":8,"address":"6000 Old Greensboro Rd ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":35000,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Home Equity ","employer":"C","the_geom":"0101000020E6100000568AD3FF28E355C0385D60A0B5934040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000082E29003C49662C1EEC0A013F8DF4D41","cartodb_georef_status":true,"cartodb_id":8,"lng":-87.5493774,"lat":33.1539803},{"name":51,"address":"1004 20th Ave ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":21000,"payoff_date":2021,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Personal ","employer":"C","the_geom":"0101000020E6100000A41C27E0B22C56C086AE44A0FA2E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000233B29D638D562C157CB819680144D41","cartodb_georef_status":true,"cartodb_id":51,"lng":-88.6984177,"lat":32.3670235},{"name":76,"address":"1010 19th Ave ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":1000000,"payoff_date":2040,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E610000017091280A42C56C09D216640072F4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000A37DAAA02CD562C1466E7AFA99144D41","cartodb_georef_status":true,"cartodb_id":76,"lng":-88.6975403,"lat":32.3674088},{"name":81,"address":"1108 19th Ave ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":6925780,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E61000000B19D9DFA32C56C0669824E0212F4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000EFCA96182CD562C164365C85CF144D41","cartodb_georef_status":true,"cartodb_id":81,"lng":-88.6975021,"lat":32.3682213},{"name":88,"address":"1460 39th Ave E ","city":"Tuscaloosa","state":"AL","zip":35404,"loan_balance":250000,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000E053EF5F0FDF55C0EBDC596034994040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000FC384491489362C11B8F3FED1EEB4D41","cartodb_georef_status":true,"cartodb_id":88,"lng":-87.4853134,"lat":33.1969109},{"name":97,"address":"1520 Queen City Ave ","city":"Tuscaloosa","state":"AL","zip":35401,"loan_balance":2458879,"payoff_date":2025,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E610000022B8DB3FE0E355C03510262081994040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000D22CF8A55F9762C1CF7BADB8BAEB4D41","cartodb_georef_status":true,"cartodb_id":97,"lng":-87.5605621,"lat":33.1992531},{"name":33,"address":"1625 Gardner Blvd ","city":"Columbus ","state":"MS","zip":39702,"loan_balance":10000,"payoff_date":2021,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Auto ","employer":"C","the_geom":"0101000020E6100000BD5DE5BFF61856C0538149E0C5C14040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000622E7A1076C462C112EF01B79E3D4E41","cartodb_georef_status":true,"cartodb_id":33,"lng":-88.3900604,"lat":33.5138512},{"name":52,"address":"1709 23rd Ave ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":10000,"payoff_date":2016,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Personal ","employer":"C","the_geom":"0101000020E6100000E9F92E00E82C56C0A90E5E60FB2F4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000068E2ABF465D562C1720C58F284164D41","cartodb_georef_status":true,"cartodb_id":52,"lng":-88.7016602,"lat":32.3748589},{"name":59,"address":"1803 24th Ave ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":6000,"payoff_date":2017,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Personal ","employer":"C","the_geom":"0101000020E6100000D9EE1EA0FB2C56C0A165DD3F16304040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000026C3809F76D562C1093994FEBA164D41","cartodb_georef_status":true,"cartodb_id":59,"lng":-88.702858,"lat":32.375679},{"name":34,"address":"1809 Bell Ave ","city":"Columbus ","state":"MS","zip":39701,"loan_balance":12000,"payoff_date":2019,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Auto ","employer":"C","the_geom":"0101000020E6100000B804E09F521A56C0B524F6BF12BF4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000B791BF839DC562C1286680DB1E384E41","cartodb_georef_status":true,"cartodb_id":34,"lng":-88.411293,"lat":33.4927597},{"name":95,"address":"1813 41st Ave NE","city":"Tuscaloosa","state":"AL","zip":35404,"loan_balance":6258000,"payoff_date":2045,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000B2DAFCBFEADE55C0B8713040479E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00001E894576299362C117ED0A196CF54D41","cartodb_georef_status":true,"cartodb_id":95,"lng":-87.483078,"lat":33.2365494},{"name":50,"address":"1821 Highway 39 N","city":"Meridian ","state":"MS","zip":39301,"loan_balance":25999,"payoff_date":2021,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Auto ","employer":"C","the_geom":"0101000020E6100000FE86E4BF9B2B56C026AD534035304040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000343F56C64BD462C14E34C458F9164D41","cartodb_georef_status":true,"cartodb_id":50,"lng":-88.6813812,"lat":32.3766251},{"name":53,"address":"1821 Highway 39 N","city":"Meridian ","state":"MS","zip":39301,"loan_balance":5000,"payoff_date":2015,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Personal ","employer":"C","the_geom":"0101000020E6100000FE86E4BF9B2B56C026AD534035304040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000343F56C64BD462C14E34C458F9164D41","cartodb_georef_status":true,"cartodb_id":53,"lng":-88.6813812,"lat":32.3766251},{"name":71,"address":"203 5th Ave South ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":9879,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Personal ","employer":"C","the_geom":"0101000020E61000005E5CF45FB12B56C033970AE01C2F4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000041B01D245ED462C1E2CCFC76C5144D41","cartodb_georef_status":true,"cartodb_id":71,"lng":-88.6827011,"lat":32.3680687},{"name":63,"address":"2110 Front Street ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":12000,"payoff_date":2020,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Personal ","employer":"C","the_geom":"0101000020E6100000E0EC20C0B32C56C0A0C0E03F822E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00000441629439D562C1C635A5828E134D41","cartodb_georef_status":true,"cartodb_id":63,"lng":-88.6984711,"lat":32.3633499},{"name":79,"address":"2110 Front Street ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":600000,"payoff_date":2047,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000E0EC20C0B32C56C0A0C0E03F822E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00000441629439D562C1C635A5828E134D41","cartodb_georef_status":true,"cartodb_id":79,"lng":-88.6984711,"lat":32.3633499},{"name":72,"address":"2121 5th Street ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":8497,"payoff_date":2021,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Personal ","employer":"C","the_geom":"0101000020E610000011DF2EA0BC2C56C0D257EB1F9F2E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000B9560A1E41D562C14CCAD593C8134D41","cartodb_georef_status":true,"cartodb_id":72,"lng":-88.6990128,"lat":32.3642311},{"name":100,"address":"2255 17th Street ","city":"Tuscaloosa","state":"AL","zip":35401,"loan_balance":987000,"payoff_date":2025,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000B2DAFCBFEAE355C0A1FE0EA03A994040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000B0A4FF90689762C175047C9C2BEB4D41","cartodb_georef_status":true,"cartodb_id":100,"lng":-87.561203,"lat":33.1971016},{"name":77,"address":"2306 6th Street","city":"Meridian ","state":"MS","zip":39301,"loan_balance":5000000,"payoff_date":2050,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000AD293520E72C56C0F6245580942E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000087DC723665D562C16D12CE36B3134D41","cartodb_georef_status":true,"cartodb_id":77,"lng":-88.7016068,"lat":32.3639069},{"name":86,"address":"2315 Old North Hills Street ","city":"Meridian ","state":"MS","zip":39305,"loan_balance":1500000,"payoff_date":2034,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000CDFEE5FFFA2C56C08FB81160A2344040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000071106D1776D562C1764099C9E01F4D41","cartodb_georef_status":true,"cartodb_id":86,"lng":-88.7028198,"lat":32.4112053},{"name":90,"address":"2502 Skyland Blvd E ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":250000,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E61000005F97E13F5DE055C0A654D33FD2954040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000F50C9E20649462C1438F500C41E44D41","cartodb_georef_status":true,"cartodb_id":90,"lng":-87.5056915,"lat":33.1704788},{"name":82,"address":"2505 7th Street","city":"Meridian ","state":"MS","zip":39301,"loan_balance":25000000,"payoff_date":2055,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000DCA227C00B2D56C08014D09F912E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000658C715184D562C1EAD6AE6DAD134D41","cartodb_georef_status":true,"cartodb_id":82,"lng":-88.7038422,"lat":32.3638191},{"name":89,"address":"2519 McFarland Blvd E ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":250000,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E61000003748D27FA0E155C0D9C23DE0CB974040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00007BBFDDA9769562C11DE32B3243E84D41","cartodb_georef_status":true,"cartodb_id":89,"lng":-87.5254211,"lat":33.1859093},{"name":84,"address":"2698 23rd Ave ","city":"Meridian ","state":"MS","zip":39305,"loan_balance":10000000,"payoff_date":2021,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000AE26F49FDA2C56C047270120DD314040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00005BD478985AD562C1019C58ED4D1A4D41","cartodb_georef_status":true,"cartodb_id":84,"lng":-88.7008438,"lat":32.3895607},{"name":94,"address":"2816 McFarland Blvd E ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":687528,"payoff_date":2019,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000F19C2D20B4E155C094AA48E06A974040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00009CD10D55879562C1FD352D537EE74D41","cartodb_georef_status":true,"cartodb_id":94,"lng":-87.526619,"lat":33.1829491},{"name":96,"address":"3025 McFarland Blvd E ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":24587158,"payoff_date":2045,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000C3B6EADF9AE155C06E90A4FF40974040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000186EF4E2719562C1B906115529E74D41","cartodb_georef_status":true,"cartodb_id":96,"lng":-87.5250778,"lat":33.1816711},{"name":91,"address":"3121 Skyland Blvd E ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":658725,"payoff_date":2020,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000D2F01C80C3DF55C0C2233B808F954040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000F2995A8CE19362C145163899B9E34D41","cartodb_georef_status":true,"cartodb_id":91,"lng":-87.4963074,"lat":33.1684418},{"name":93,"address":"3702 Greensboro Ave ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":354937,"payoff_date":2019,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E61000009578E51F22E355C0D3BEB9BF7A964040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00001B5DDB2CBE9662C108C6A9FD96E54D41","cartodb_georef_status":true,"cartodb_id":93,"lng":-87.5489578,"lat":33.175621},{"name":87,"address":"409 University Blvd E ","city":"Tuscaloosa","state":"AL","zip":35401,"loan_balance":150000,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E610000008CFDFDFFBE155C059DA4E006A9A4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000C478BE44C49562C1FE37287793ED4D41","cartodb_georef_status":true,"cartodb_id":87,"lng":-87.5309982,"lat":33.2063599},{"name":92,"address":"4115 Greensboro Ave ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":958257,"payoff_date":2021,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E610000020A9CF1FE4E255C00D9535A094954040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F000024A0B084899662C1889C87FFC3E34D41","cartodb_georef_status":true,"cartodb_id":92,"lng":-87.5451736,"lat":33.1685982},{"name":80,"address":"4206 Highway 39 N ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":6000000,"payoff_date":2055,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E61000009298FB3F622B56C09858CFFF61334040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000937AB6F01AD462C16DC884375C1D4D41","cartodb_georef_status":true,"cartodb_id":80,"lng":-88.6778717,"lat":32.4014282},{"name":85,"address":"4206 Highway 39 N ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":12000000,"payoff_date":2035,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E61000009298FB3F622B56C09858CFFF61334040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000937AB6F01AD462C16DC884375C1D4D41","cartodb_georef_status":true,"cartodb_id":85,"lng":-88.6778717,"lat":32.4014282},{"name":98,"address":"5000 Skyland Blvd E ","city":"Tuscaloosa","state":"AL","zip":35405,"loan_balance":215873,"payoff_date":2016,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E610000086D7E4DF1DDE55C035CFB63FBC964040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000C3CD16767B9262C140F8F9EA1BE64D41","cartodb_georef_status":true,"cartodb_id":98,"lng":-87.4705734,"lat":33.1776199},{"name":99,"address":"5220 University Blvd E ","city":"Tuscaloosa","state":"AL","zip":35404,"loan_balance":2255760,"payoff_date":2018,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000A8D02F00C3DD55C039549D1F90984040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000961D37482E9262C1734A5285D1E94D41","cartodb_georef_status":true,"cartodb_id":99,"lng":-87.4650269,"lat":33.1918983},{"name":35,"address":"812 2nd Ave N","city":"Columbus ","state":"MS","zip":39701,"loan_balance":15890,"payoff_date":2019,"interest_rate":"","consumer_commercial":"Consumer ","type_of_loan":"Auto ","employer":"C","the_geom":"0101000020E610000077483140221B56C05455682096BF4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F0000AB3907DA4DC662C14DBBA6732A394E41","cartodb_georef_status":true,"cartodb_id":35,"lng":-88.4239655,"lat":33.496769},{"name":78,"address":"823 2nd Ave ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":500000,"payoff_date":2045,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E6100000CD94D6DF922B56C0FC4E3860FC304040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00007F29AE3C44D462C12323E0D989184D41","cartodb_georef_status":true,"cartodb_id":78,"lng":-88.6808395,"lat":32.3827019},{"name":83,"address":"906 20th Ave ","city":"Meridian ","state":"MS","zip":39301,"loan_balance":14000000,"payoff_date":2055,"interest_rate":"","consumer_commercial":"Commercial ","type_of_loan":"","employer":"","the_geom":"0101000020E61000003AFCDA9FB02C56C03819B03FE42E4040","created_at":"2015-04-22T21:23:03Z","updated_at":"2015-06-01T23:08:04Z","the_geom_webmercator":"0101000020110F00004626B6EC36D562C17F5F1F9653144D41","cartodb_georef_status":true,"cartodb_id":83,"lng":-88.6982803,"lat":32.3663406}]
<html>
<head>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.js"></script>
<link rel="stylesheet" href="//spatialdev.github.io/q-cluster/demo/css/normalize.css">
<link rel="stylesheet" href="//spatialdev.github.io/q-cluster/demo/css/main.css">
<link rel="stylesheet" href="//spatialdev.github.io/q-cluster/css/q-cluster.css">
<script src="//spatialdev.github.io/q-cluster/demo/js/vendor/modernizr-2.7.1.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<!--<script src="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.js"></script>-->
<script src="//spatialdev.github.io/q-cluster/src/utils.js"></script>
<script src="//spatialdev.github.io/q-cluster/src/clustering.js"></script>
<script src="//spatialdev.github.io/q-cluster/src/point-clusterer.js"></script>
<script src="//spatialdev.github.io/q-cluster/src/make-donuts.js"></script>
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v2/themes/css/cartodb.ie.css" />
<![endif]-->
<style>
html, body {width:100%; height:100%; padding: 0; margin: 0;}
#cartodb-map { width: 100%; height:100%; background: black;}
</style>
<script>
var map;
function init(){
// initiate leaflet map
/*map = new L.Map('cartodb-map', {
center: [40,-98],
zoom: 4
})
L.tileLayer('https://dnv9my2eseobd.cloudfront.net/v3/cartodb.map-4xtxp73f/{z}/{x}/{y}.png', {
attribution: 'Mapbox <a href="http://mapbox.com/about/maps" target="_blank">Terms &amp; Feedback</a>'
}).addTo(map);*/
map = new L.Map('cartodb-map', {
center: [32.9, -88.3],
zoom: 9
})
L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>'
}).addTo(map);
var layerUrl = 'https://team.cartodb.com/u/athompson/api/v2_1/viz/f0cf16f4-0647-11e5-9fc4-0e9d821ea90d/viz.json';
// change the query for the first layer
var subLayerOptions = {
sql: "SELECT * FROM example_cartodbjs_1 where adm0_a3 = 'USA'",
cartocss: "#example_cartodbjs_1{marker-fill: #109DCD; marker-width: 5; marker-line-color: white; marker-line-width: 0;}"
}
cartodb.createLayer(map, layerUrl)
.addTo(map)
.on('done', function(layer) {
//layer.getSubLayer(0).set(subLayerOptions);
}).on('error', function() {
//log the error
});
$.ajax({
context: this,
type: 'GET',
dataType: "json",
url: 'commercial_data.json',
success: function(data, textStatus, jqXHR){
var pointClusterer = new QCluster.PointClusterer(data, 'loans', map, 'loan-layer',
{
reportingProperty: 'consumer_commercial',
backgroundColor: '#0099dd'
});
},
error: function(jqXHR, textStatus, errorThrown){
}
});
}
</script>
</head>
<body onload="init()">
<div id='cartodb-map'></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment