diff --git a/server/api/alembic/seeds/councils.csv b/server/api/alembic/seeds/councils.csv index ef9fe4385..6a2a0b0ff 100644 --- a/server/api/alembic/seeds/councils.csv +++ b/server/api/alembic/seeds/councils.csv @@ -2,41 +2,41 @@ council_id,council_name,full_name,website,twitter,date_certified,region_id,regio 0,No council,Not represented by a council,http://empowerla.org/,EmpowerLA,,0,,,0,0,0 1,Arleta,Arleta,http://www.arletanc.org/,ANC,2002-10-22T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.4315728171109 34.24101484950965),34.2410156,-118.4315742,6 2,Arroyo Seco,Arroyo Seco,http://www.asnc.us/,ASNC,2002-10-02T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2065373221429 34.09882706073255),34.0988273,-118.2065382,42 -3,Atwater Village,Atwater Village,http://www.atwatervillage.org/,AVNC,2003-02-11T00:00:00,7,REGION 7 - EAST,POINT (-118.2654037665078 34.12595764634551),34.12595919,-118.2654058,37 -4,Bel Air-Beverly Crest,Bel Air-Beverly Crest,http://babcnc.org/,BABCNC,2002-10-08T00:00:00,11,REGION 11 - WEST LA,POINT (-118.4336115726619 34.1062984158306),34.1062971,-118.4336104,64 -5,Boyle Heights,Boyle Heights,http://bhnc.net/,BHNC,2002-05-21T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2096791355992 34.03587461444661),34.03587596,-118.2096796,50 -6,CANNDU,Community And Neighbors For Ninth District Unity (Canndu),http://www.canndunc.org/,CANNDU,2003-03-11T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.2686005783438 33.97592737752986),33.97592787,-118.2686005,86 -7,Canoga Park,Canoga Park,http://www.canogaparknc.org/,CPNC,2002-06-18T00:00:00,3,REGION 3 - SOUTH WEST VALLEY,POINT (-118.6002334786793 34.21233979560296),34.21234113,-118.600233,13 -8,Central Alameda,Central Alameda,https://centralalameda.com/,CANC,2003-09-30T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.2477168236647 33.9989324482445),33.9989327,-118.2477169,110 -9,Central Hollywood,Central Hollywood,http://www.chnc.org/,CHNC,2002-04-09T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.3335608490099 34.09378251567064),34.09378259,-118.333561,32 -10,Central San Pedro,Central San Pedro,http://centralsanpedro.org/,CENTRALSPNC,2002-02-12T00:00:00,12,REGION 12 - HARBOR,POINT (-118.288111555924 33.74121993371068),33.7412204,-118.2881112,95 -11,Chatsworth,Chatsworth,http://chatsworthcouncil.org/,CNC,2003-04-29T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5978593008302 34.25464677931477),34.25464651,-118.59786,99 -12,Coastal San Pedro,Coastal San Pedro,http://www.cspnc.org/,CSPNC,2001-12-11T00:00:00,12,REGION 12 - HARBOR,POINT (-118.3009313450807 33.72051091444131),33.72051041,-118.3009318,96 -13,Del Rey,Del Rey,http://delreync.org/,DRNC,2003-10-28T00:00:00,11,REGION 11 - WEST LA,POINT (-118.4215895905524 33.98825424087101),33.98825418,-118.4215891,70 -14,Downtown Los Angeles,Downtown Los Angeles,http://dlanc.com/,DLANC,2002-04-27T00:00:00,6,REGION 6 - CENTRAL 2,POINT (-118.2491559958716 34.03748402516608),34.03748498,-118.2491577,52 -15,Eagle Rock,Eagle Rock,http://www.eaglerockcouncil.org/,ERNC,2002-04-02T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2078457711403 34.1366110205896),34.13661101,-118.2078452,40 -16,East Hollywood,East Hollywood,http://easthollywood.net/,EHNC,2007-04-19T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.2954965949871 34.09162983082791),34.09163007,-118.295497,34 -17,Echo Park,Echo Park,http://gepenc.org/,GEPENC,2002-04-16T00:00:00,7,REGION 7 - EAST,POINT (-118.2513717943964 34.07865609836914),34.07865641,-118.2513711,44 -18,Elysian Valley Riverside,Elysian Valley Riverside,NULL,EVRNC,2002-07-09T00:00:00,7,REGION 7 - EAST,POINT (-118.2424182757755 34.09806114190395),34.09806147,-118.2424194,43 -19,Empowerment Congress Central Area,Empowerment Congress Central Area,https://www.eccandc.org/,ECCANDC,2002-03-23T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.3076754373353 33.99140052791966),33.99140177,-118.3076759,81 -20,Empowerment Congress North Area,Empowerment Congress North Area,http://www.nandc.org/,ECNANDC,2002-04-27T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.2956686038892 34.02378537341639),34.02378552,-118.295668,77 -21,Empowerment Congress Southeast Area,Empowerment Congress Southeast Area,NULL,ECSEANDE,2002-03-23T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.2734709764274 33.94937740806039),33.94937779,-118.2734713,87 -22,Empowerment Congress Southwest Area,Empowerment Congress Southwest Area,http://southwestnc.org/,ECSWANDC,2002-03-23T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.3066635334216 33.96036829142113),33.96036912,-118.3066631,84 -23,Empowerment Congress West Area,Empowerment Congress West Area,http://www.ecwandc.org/,ECWANDC,2002-03-23T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.3454704031887 34.01277145945697),34.01277074,-118.3454709,79 -24,Encino,Encino,http://www.encinonc.org/,ENC,2002-10-08T00:00:00,3,REGION 3 - SOUTH WEST VALLEY,POINT (-118.5002480995365 34.15721217090179),34.15721416,-118.5002473,18 -25,Foothill Trails District,Foothill Trails District,http://www.ftdnc.org/,FTDNC,2003-03-25T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.3437870787592 34.25558075210353),34.25558179,-118.3437947,9 -26,Glassell Park,Glassell Park,http://glassellparknc.org/,GPNC,2002-01-08T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2356312250754 34.11698847894176),34.11698885,-118.2356312,39 -27,Granada Hills North,Granada Hills North,http://ghnnc.org/,GHNNC,2002-09-10T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5053471867159 34.29805179063455),34.2980528,-118.50535,4 -28,Granada Hills South,Granada Hills South,http://ghsnc.org/,GHSNC,2006-01-17T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5009638269794 34.26400002446011),34.26399968,-118.500965,118 -29,Greater Cypress Park,Greater Cypress Park,https://www.cypressparknc.com/,GCPNC,2002-11-19T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2270029562134 34.09422027305074),34.09422055,-118.2270035,102 -30,Greater Toluca Lake,Greater Toluca Lake,http://www.gtlnc.org/,GTLNC,2002-09-10T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.3596529513454 34.15260014395083),34.15260031,-118.3596532,28 -31,Greater Valley Glen,Greater Valley Glen,http://greatervalleyglencouncil.org/,GVGC,2002-08-27T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.4190990702779 34.18315131466198),34.18315125,-118.4190995,21 -32,Greater Wilshire,Greater Wilshire,http://www.greaterwilshire.org/,GWNC,2003-12-02T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.3270892879138 34.07003858858983),34.07003908,-118.3270896,119 -33,Harbor City,Harbor City,http://www.harborcitync.com/index.html,HARBORCITYNC,2002-03-26T00:00:00,12,REGION 12 - HARBOR,POINT (-118.2981554325133 33.79295234187936),33.79295324,-118.2981564,92 -34,Harbor Gateway North,Harbor Gateway North,http://www.harborgatewaynorth.org/,HGNNC,2002-11-12T00:00:00,12,REGION 12 - HARBOR,POINT (-118.2817834323391 33.91092758009806),33.91093128,-118.2817815,90 -35,Harbor Gateway South,Harbor Gateway South,http://www.harborgatewaysouth.org/,HGSNC,2003-04-08T00:00:00,12,REGION 12 - HARBOR,POINT (-118.2990452440352 33.84814616007689),33.84814882,-118.2990437,91 -36,Hermon,Hermon,https:/www./hermonnc.org/,hnc/,2017-05-25T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.1839477804204 34.10501556906247),34.10501566,-118.1839476,126 -37,Historic Cultural,Historic Cultural,http://www.hcncla.org/,HCNC,2002-04-27T00:00:00,6,REGION 6 - CENTRAL 2,POINT (-118.234921310926 34.04479522136338),34.04479553,-118.2349215,46 +3,Arts District Little Tokyo,Historic Cultural,http://www.hcncla.org/,HCNC,2002-04-27T00:00:00,6,REGION 6 - CENTRAL 2,POINT (-118.234921310926 34.04479522136338),34.04479553,-118.2349215,46 +4,Atwater Village,Atwater Village,http://www.atwatervillage.org/,AVNC,2003-02-11T00:00:00,7,REGION 7 - EAST,POINT (-118.2654037665078 34.12595764634551),34.12595919,-118.2654058,37 +5,Bel Air-Beverly Crest,Bel Air-Beverly Crest,http://babcnc.org/,BABCNC,2002-10-08T00:00:00,11,REGION 11 - WEST LA,POINT (-118.4336115726619 34.1062984158306),34.1062971,-118.4336104,64 +6,Boyle Heights,Boyle Heights,http://bhnc.net/,BHNC,2002-05-21T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2096791355992 34.03587461444661),34.03587596,-118.2096796,50 +7,CANNDU,Community And Neighbors For Ninth District Unity (Canndu),http://www.canndunc.org/,CANNDU,2003-03-11T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.2686005783438 33.97592737752986),33.97592787,-118.2686005,86 +8,Canoga Park,Canoga Park,http://www.canogaparknc.org/,CPNC,2002-06-18T00:00:00,3,REGION 3 - SOUTH WEST VALLEY,POINT (-118.6002334786793 34.21233979560296),34.21234113,-118.600233,13 +9,Central Alameda,Central Alameda,https://centralalameda.com/,CANC,2003-09-30T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.2477168236647 33.9989324482445),33.9989327,-118.2477169,110 +10,Central Hollywood,Central Hollywood,http://www.chnc.org/,CHNC,2002-04-09T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.3335608490099 34.09378251567064),34.09378259,-118.333561,32 +11,Central San Pedro,Central San Pedro,http://centralsanpedro.org/,CENTRALSPNC,2002-02-12T00:00:00,12,REGION 12 - HARBOR,POINT (-118.288111555924 33.74121993371068),33.7412204,-118.2881112,95 +12,Chatsworth,Chatsworth,http://chatsworthcouncil.org/,CNC,2003-04-29T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5978593008302 34.25464677931477),34.25464651,-118.59786,99 +13,Coastal San Pedro,Coastal San Pedro,http://www.cspnc.org/,CSPNC,2001-12-11T00:00:00,12,REGION 12 - HARBOR,POINT (-118.3009313450807 33.72051091444131),33.72051041,-118.3009318,96 +14,Del Rey,Del Rey,http://delreync.org/,DRNC,2003-10-28T00:00:00,11,REGION 11 - WEST LA,POINT (-118.4215895905524 33.98825424087101),33.98825418,-118.4215891,70 +15,Downtown Los Angeles,Downtown Los Angeles,http://dlanc.com/,DLANC,2002-04-27T00:00:00,6,REGION 6 - CENTRAL 2,POINT (-118.2491559958716 34.03748402516608),34.03748498,-118.2491577,52 +16,Eagle Rock,Eagle Rock,http://www.eaglerockcouncil.org/,ERNC,2002-04-02T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2078457711403 34.1366110205896),34.13661101,-118.2078452,40 +17,East Hollywood,East Hollywood,http://easthollywood.net/,EHNC,2007-04-19T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.2954965949871 34.09162983082791),34.09163007,-118.295497,34 +18,Echo Park,Echo Park,http://gepenc.org/,GEPENC,2002-04-16T00:00:00,7,REGION 7 - EAST,POINT (-118.2513717943964 34.07865609836914),34.07865641,-118.2513711,44 +19,Elysian Valley Riverside,Elysian Valley Riverside,NULL,EVRNC,2002-07-09T00:00:00,7,REGION 7 - EAST,POINT (-118.2424182757755 34.09806114190395),34.09806147,-118.2424194,43 +20,Empowerment Congress Central,Empowerment Congress Central Area,https://www.eccandc.org/,ECCANDC,2002-03-23T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.3076754373353 33.99140052791966),33.99140177,-118.3076759,81 +21,Empowerment Congress North,Empowerment Congress North Area,http://www.nandc.org/,ECNANDC,2002-04-27T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.2956686038892 34.02378537341639),34.02378552,-118.295668,77 +22,Empowerment Congress Southeast,Empowerment Congress Southeast Area,NULL,ECSEANDE,2002-03-23T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.2734709764274 33.94937740806039),33.94937779,-118.2734713,87 +23,Empowerment Congress Southwest,Empowerment Congress Southwest Area,http://southwestnc.org/,ECSWANDC,2002-03-23T00:00:00,9,REGION 9 - SOUTH LA 2,POINT (-118.3066635334216 33.96036829142113),33.96036912,-118.3066631,84 +24,Empowerment Congress West,Empowerment Congress West Area,http://www.ecwandc.org/,ECWANDC,2002-03-23T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.3454704031887 34.01277145945697),34.01277074,-118.3454709,79 +25,Encino,Encino,http://www.encinonc.org/,ENC,2002-10-08T00:00:00,3,REGION 3 - SOUTH WEST VALLEY,POINT (-118.5002480995365 34.15721217090179),34.15721416,-118.5002473,18 +26,Foothill Trails District,Foothill Trails District,http://www.ftdnc.org/,FTDNC,2003-03-25T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.3437870787592 34.25558075210353),34.25558179,-118.3437947,9 +27,Glassell Park,Glassell Park,http://glassellparknc.org/,GPNC,2002-01-08T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2356312250754 34.11698847894176),34.11698885,-118.2356312,39 +28,Granada Hills North,Granada Hills North,http://ghnnc.org/,GHNNC,2002-09-10T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5053471867159 34.29805179063455),34.2980528,-118.50535,4 +29,Granada Hills South,Granada Hills South,http://ghsnc.org/,GHSNC,2006-01-17T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5009638269794 34.26400002446011),34.26399968,-118.500965,118 +30,Greater Cypress Park,Greater Cypress Park,https://www.cypressparknc.com/,GCPNC,2002-11-19T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.2270029562134 34.09422027305074),34.09422055,-118.2270035,102 +31,Greater Toluca Lake,Greater Toluca Lake,http://www.gtlnc.org/,GTLNC,2002-09-10T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.3596529513454 34.15260014395083),34.15260031,-118.3596532,28 +32,Greater Valley Glen,Greater Valley Glen,http://greatervalleyglencouncil.org/,GVGC,2002-08-27T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.4190990702779 34.18315131466198),34.18315125,-118.4190995,21 +33,Greater Wilshire,Greater Wilshire,http://www.greaterwilshire.org/,GWNC,2003-12-02T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.3270892879138 34.07003858858983),34.07003908,-118.3270896,119 +34,Harbor City,Harbor City,http://www.harborcitync.com/index.html,HARBORCITYNC,2002-03-26T00:00:00,12,REGION 12 - HARBOR,POINT (-118.2981554325133 33.79295234187936),33.79295324,-118.2981564,92 +35,Harbor Gateway North,Harbor Gateway North,http://www.harborgatewaynorth.org/,HGNNC,2002-11-12T00:00:00,12,REGION 12 - HARBOR,POINT (-118.2817834323391 33.91092758009806),33.91093128,-118.2817815,90 +36,Harbor Gateway South,Harbor Gateway South,http://www.harborgatewaysouth.org/,HGSNC,2003-04-08T00:00:00,12,REGION 12 - HARBOR,POINT (-118.2990452440352 33.84814616007689),33.84814882,-118.2990437,91 +37,Hermon,Hermon,https:/www./hermonnc.org/,hnc/,2017-05-25T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.1839477804204 34.10501556906247),34.10501566,-118.1839476,126 38,Historic Cultural North,Historic Cultural North,HCNNC,HCNNC,2018-10-29T00:00:00,6,REGION 6 - CENTRAL 2,POINT (-118.236006323693 34.06441207862523),34.0644123,-118.2360063,128 39,Historic Highland Park,Historic Highland Park,http://highlandparknc.com/,HHPNC,2002-05-28T00:00:00,8,REGION 8 - NORTH EAST LA,POINT (-118.1931931941714 34.11438088625195),34.11438159,-118.1931928,41 40,Hollywood Hills West,Hollywood Hills West,http://www.hhwnc.org/,HHWNC,2002-05-07T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.343962528015 34.1241531982548),34.12415483,-118.3439591,29 @@ -52,10 +52,10 @@ council_id,council_name,full_name,website,twitter,date_certified,region_id,regio 50,Mid City West,Mid City West,http://www.midcitywest.org/,MCWCC,2002-06-25T00:00:00,5,REGION 5 - CENTRAL 1,POINT (-118.361084483703 34.07270867467082),34.07270911,-118.3610847,58 51,Mission Hills,Mission Hills,http://mhnconline.org/,MHNC,2005-04-19T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.4579592716846 34.26736181684345),34.26736254,-118.4579591,101 52,Noho,Noho,http://www.midtownnoho.org/,NOHONC,2002-09-24T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.3764662155099 34.17782595734782),34.17782678,-118.3764672,24 -53,Noho West,Noho West,http://nohowest.org/,NOHOWESTNC,2011-01-11T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.4153182878103 34.20759149743712),34.20759208,-118.4153182,22 -54,North Hills East,North Hills East,http://www.northhillseastnc.org/,NHENC,2010-09-14T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.4652193326845 34.23552548330465),34.23552642,-118.4652189,112 -55,North Hills West,North Hills West,http://www.nhwnc.net/,NHWNC,2003-02-25T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.4841452405758 34.23389407063686),34.23389459,-118.4841449,111 -56,North Hollywood Northeast,North Hollywood Northeast,http://www.nhnenc.org/,NHNENC,2002-09-24T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.390762933733 34.20608871520223),34.20608912,-118.3907635,23 +53,North Hills East,North Hills East,http://www.northhillseastnc.org/,NHENC,2010-09-14T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.4652193326845 34.23552548330465),34.23552642,-118.4652189,112 +54,North Hills West,North Hills West,http://www.nhwnc.net/,NHWNC,2003-02-25T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.4841452405758 34.23389407063686),34.23389459,-118.4841449,111 +55,North Hollywood Northeast,North Hollywood Northeast,http://www.nhnenc.org/,NHNENC,2002-09-24T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.390762933733 34.20608871520223),34.20608912,-118.3907635,23 +56,North Hollywood West,Noho West,http://nohowest.org/,NOHOWESTNC,2011-01-11T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.4153182878103 34.20759149743712),34.20759208,-118.4153182,22 57,North Westwood,North Westwood,https://empowerla.org/nwwnc/,NWWNC,2010-01-19T00:00:00,11,REGION 11 - WEST LA,POINT (-118.4460755154948 34.06712308385536),34.06712341,-118.4460756,127 58,Northridge East,Northridge East,http://nenc-la.org/,NENC,2004-11-30T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5171666464766 34.24943938587247),34.24943975,-118.5171679,120 59,Northridge South,Northridge South,http://www.northridgesouth.org/,NSNC,2010-05-04T00:00:00,2,REGION 2 - NORTH WEST VALLEY,POINT (-118.5289975667231 34.22686431821182),34.22686322,-118.5289979,124 @@ -80,7 +80,7 @@ council_id,council_name,full_name,website,twitter,date_certified,region_id,regio 78,Sunland-Tujunga,Sunland-Tujunga,http://stnc.org/,STNC,2003-05-27T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.2866666166133 34.2603659251053),34.260366,-118.2866652,10 79,Sylmar,Sylmar,http://www.sylmarneighborhoodcouncil.org/,SNC,2003-05-06T00:00:00,1,REGION 1 - NORTH EAST VALLEY,POINT (-118.4485575662035 34.31291423045551),34.31291286,-118.4485591,5 80,Tarzana,Tarzana,http://www.tarzananc.org/,TNC,2003-01-14T00:00:00,3,REGION 3 - SOUTH WEST VALLEY,POINT (-118.5473571788664 34.15824713342111),34.1582499,-118.5473562,17 -81,UNNC,"United Neighborhoods Of The Historic Arlington Heights, West Adams, And Jefferson Park Community",http://www.unnc.org/index.html,UNNC,2002-05-14T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.319530115848 34.03453663232251),34.03453703,-118.3195294,74 +81,United Neighborhoods,"United Neighborhoods Of The Historic Arlington Heights, West Adams, And Jefferson Park Community",http://www.unnc.org/index.html,UNNC,2002-05-14T00:00:00,10,REGION 10 - SOUTH LA 1,POINT (-118.319530115848 34.03453663232251),34.03453703,-118.3195294,74 82,Valley Village,Valley Village,http://www.myvalleyvillage.com/,NCVV,2002-09-10T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.3964306513365 34.16345622002988),34.16345619,-118.396431,25 83,Van Nuys,Van Nuys,http://www.vnnc.org/,VNNC,2002-07-23T00:00:00,4,REGION 4 - SOUTH EAST VALLEY,POINT (-118.4543316659152 34.19402890472718),34.19402999,-118.4543316,20 84,Venice,Venice,http://www.venicenc.org/,VNC,2002-03-12T00:00:00,11,REGION 11 - WEST LA,POINT (-118.4613984067937 33.99155093177755),33.99155165,-118.4613983,68 diff --git a/server/api/code/lacity_data_api/routers/service_requests.py b/server/api/code/lacity_data_api/routers/service_requests.py index 812a9f8f2..cc9b3c7d7 100644 --- a/server/api/code/lacity_data_api/routers/service_requests.py +++ b/server/api/code/lacity_data_api/routers/service_requests.py @@ -1,5 +1,5 @@ import datetime -from typing import Optional, List +from typing import Optional from fastapi import APIRouter, HTTPException, Query @@ -15,6 +15,21 @@ router = APIRouter() +def createFeature(row): + item = dict(row) + return { + "type": "Feature", + "properties": { + "request_id": item['request_id'], + "type_id": item['type_id'], + }, + "geometry": { + "type": "Point", + "coordinates": [item['longitude'], item['latitude']] + } + } + + # TODO: need more tests @router.get("", response_model=schemas.ServiceRequestList) async def get_all_service_requests( @@ -83,22 +98,6 @@ async def get_open_request_counts_by_type(): return result -@router.get("/pins", response_model=schemas.PinList) -async def get_filtered_service_request_pins( - start_date: datetime.date = None, - end_date: datetime.date = None, - type_ids: Optional[List[int]] = None, - council_ids: Optional[List[int]] = None -): - result = await get_filtered_requests( - start_date=start_date, - end_date=end_date, - type_ids=type_ids, - council_ids=council_ids - ) - return result - - @router.post("/pins", response_model=schemas.PinList) async def post_filtered_service_request_pins(filters: schemas.Filters): result = await get_filtered_requests( @@ -116,6 +115,20 @@ async def get_open_service_request_pins(): return result +@router.get("/pins/open/geojson") +async def get_open_service_request_pin_geojson(): + result = await get_open_requests() + + features = [] + for i in result: + features.append(createFeature(i)) + + return { + "type": "FeatureCollection", + "features": features + } + + # @router.post("/points") # , response_model=PointList) # async def get_filtered_service_request_points(filters: schemas.Filters): # result = await ServiceRequest.select( diff --git a/server/api/code/lacity_data_api/services/status.py b/server/api/code/lacity_data_api/services/status.py index d4eb10045..222c8a431 100644 --- a/server/api/code/lacity_data_api/services/status.py +++ b/server/api/code/lacity_data_api/services/status.py @@ -4,7 +4,7 @@ from ..config import CACHE_MAXMEMORY -@cached(key="status:last_updated", alias="default") +@cached(key="Status.last_updated", alias="default") async def get_last_updated(): query = db.text("SELECT max(created_time) as last_pulled FROM log WHERE status = 'INFO'") # noqa result = await db.first(query) diff --git a/server/api/tests/integration/test_api_requests.py b/server/api/tests/integration/test_api_requests.py index b1454cd54..219d9863d 100644 --- a/server/api/tests/integration/test_api_requests.py +++ b/server/api/tests/integration/test_api_requests.py @@ -28,14 +28,14 @@ def test_service_requests_type(client): def test_service_requests_council(client): - url = "/requests?start_date=2020-01-01&end_date=2020-01-02&council_id=27" + url = "/requests?start_date=2020-01-01&end_date=2020-01-02&council_id=28" response = client.get(url) assert response.status_code == 200 assert len(response.json()) == 39 def test_service_requests_all(client): - url = "/requests?start_date=2020-01-01&end_date=2020-01-02&type_id=2&council_id=27" + url = "/requests?start_date=2020-01-01&end_date=2020-01-02&type_id=2&council_id=28" response = client.get(url) assert response.status_code == 200 assert len(response.json()) == 3 @@ -49,7 +49,7 @@ def test_updated_service_requests(client): def test_updated_service_requests_council(client): - url = "/requests/updated?start_date=2020-01-01&end_date=2020-01-02&council_id=27" + url = "/requests/updated?start_date=2020-01-01&end_date=2020-01-02&council_id=28" response = client.get(url) assert response.status_code == 200 assert len(response.json()) == 39 @@ -115,7 +115,7 @@ def test_service_request_pins_multiple(client): "startDate": "2020-01-01", "endDate": "2020-01-03", "councilIds": [ - 1, 2, 3, 4 + 1, 2, 4, 5 ], "typeIds": [ 1, 2 diff --git a/server/api/tests/integration/test_api_shim.py b/server/api/tests/integration/test_api_shim.py index 7812635f9..5101b6572 100644 --- a/server/api/tests/integration/test_api_shim.py +++ b/server/api/tests/integration/test_api_shim.py @@ -18,11 +18,11 @@ def test_map_pins(client): "startDate": "01/01/2020", "endDate": "01/02/2020", "ncList": [ - 9, - 14, - 16, - 32, - 37, + 3, + 10, + 15, + 17, + 33, 38, 40, 41,