Last active
March 30, 2020 18:56
-
-
Save mukhtyar/9958903 to your computer and use it in GitHub Desktop.
Revisions
-
Shruti Mukhtyar revised this gist
Mar 2, 2019 . 6 changed files with 3 additions and 549 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Map of 2014 Parliamentary Constituencies in India ==== This is a d3 map using topojson files derived from shapefiles from the <a href="https://github.com/datameet/maps"> datameet/maps repo</a>. 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 charactersOriginal file line number Diff line number Diff line change @@ -90,7 +90,7 @@ <h1>Parliamentary Constituencies, 2014</h1> <div class='legend-title'>Reservation Status</div> <div class='legend-scale'> </div> <div class='legend-source'>Source: <a href="http://projects.datameet.org/maps/">Data{Meet}</a></div> </div> </div> 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 charactersOriginal file line number Diff line number Diff line change @@ -1,545 +0,0 @@ LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
mukhtyar revised this gist
Apr 4, 2014 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ India - Map of Parliamentary Constituencies, 2014 ==== This is a d3 map using topojson files derived from shapefiles from the <a href="https://github.com/datameet/maps"> datameet/maps repo</a>. Many thanks to authors of these awesome code samples. * <a href="http://suffenus.wordpress.com/2014/01/07/making-interactive-maps-with-d3-for-total-beginners/">Making a Simple Interactive Map Prototype with D3</a> * <a href="http://bl.ocks.org/jczaplew/4444770">Responsive TopoJSON Sizing with d3.js</a> * <a href="https://www.mapbox.com/tilemill/docs/guides/advanced-legends/">Mapbox Advanced Legends</a> -
mukhtyar revised this gist
Apr 4, 2014 . 4 changed files with 547 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,545 @@ ST_NAME,PC_NAME,ST_CODE,PC_CODE,Res AN,Andaman & Nicobar Islands,U01,1,GEN AP,Zahirabad,S01,5,GEN AP,Araku,S01,18,ST AP,Khammam,S01,17,GEN AP,Medak,S01,6,GEN AP,Anakapalli,S01,22,GEN AP,Bhongir,S01,14,GEN AP,Chevella,S01,10,GEN AP,Srikakulam,S01,19,GEN AP,Eluru,S01,27,GEN AP,Secunderabad,S01,8,GEN AP,Peddapalle,S01,2,SC AP,Rajahmundry,S01,25,GEN AP,Nalgonda,S01,13,GEN AP,Narsapuram,S01,26,GEN AP,Nagarkurnool,S01,12,SC AP,Amlapuram,S01,24,SC AP,Narasaraopet,S01,31,GEN AP,Machilipatnam,S01,28,GEN AP,Guntur,S01,30,GEN AP,Ongole,S01,33,GEN AP,Bapatla,S01,32,SC AP,Kurnool,S01,35,GEN AP,Karimnagar,S01,3,GEN AP,Nizamabad,S01,4,GEN AP,Vizianagaram,S01,20,GEN AP,Kakinada,S01,23,GEN AP,Adilabad,S01,1,ST AP,Rajampet,S01,41,GEN AP,Nellore,S01,39,GEN AP,Anantapur,S01,36,GEN AP,Kadapa,S01,38,GEN AP,Nandyal,S01,34,GEN AP,Mahabubabad,S01,16,ST AP,Chittoor,S01,42,SC AP,Tirupati,S01,40,SC AP,Hindupur,S01,37,GEN AP,Mahbubnagar,S01,11,GEN AP,Vijayawada,S01,29,GEN AP,Visakhapatnam,S01,21,GEN AP,Warangal,S01,15,SC AP,Hyderabad,S01,9,GEN AP,Malkajgiri,S01,7,GEN AR,Arunachal West,S02,1,GEN AR,Arunachal East,S02,2,GEN AS,Lakhimpur,S03,14,GEN AS,Dibrugarh,S03,13,GEN AS,Jorhat,S03,12,GEN AS,Tezpur,S03,9,GEN AS,Kaliabor,S03,11,GEN AS,Mangaldoi,S03,8,GEN AS,Nagaon,S03,10,GEN AS,Autonomous District,S03,3,ST AS,Dhubri,S03,4,GEN AS,Karimganj,S03,1,SC AS,Silchar,S03,2,GEN AS,Kokrajhar,S03,5,ST AS,Guwahati,S03,7,GEN AS,Barpeta,S03,6,GEN BR,Muzaffarpur,S04,15,GEN BR,Valmiki Nagar,S04,1,GEN BR,Araria,S04,9,GEN BR,Gopalganj,S04,17,SC BR,Siwan,S04,18,GEN BR,Vaishali,S04,16,GEN BR,Jhanjharpur,S04,7,GEN BR,Supaul,S04,8,GEN BR,Pashchim Champaran,S04,2,GEN BR,Madhubani,S04,6,GEN BR,Kishanganj,S04,10,GEN BR,Darbhanga,S04,14,GEN BR,Purnia,S04,12,GEN BR,Maharajganj,S04,19,GEN BR,Madhepura,S04,13,GEN BR,Begusarai,S04,24,GEN BR,Arrah,S04,32,GEN BR,Sasaram,S04,34,SC BR,Nawada,S04,39,GEN BR,Banka,S04,27,GEN BR,Nalanda,S04,29,GEN BR,Katihar,S04,11,GEN BR,Samastipur,S04,23,SC BR,Khagaria,S04,25,GEN BR,Pataliputra,S04,31,GEN BR,Buxar,S04,33,GEN BR,Patna Sahib,S04,30,GEN BR,Bhagalpur,S04,26,GEN BR,Munger,S04,28,GEN BR,Purba Champaran,S04,3,GEN BR,Sheohar,S04,4,GEN BR,Sitamarhi,S04,5,GEN BR,Ujiapur,S04,22,GEN BR,Hajipur,S04,21,SC BR,Karakat,S04,35,GEN BR,Saran (Chhapra),S04,20,GEN BR,Jamui,S04,40,SC BR,Aurangabad,S04,37,GEN BR,Gaya,S04,38,SC BR,Jahanabad,S04,36,GEN CG,Janjgir-Champa,S26,3,SC CG,Raipur,S26,8,GEN CG,Surguja,S26,1,ST CG,Bilaspur,S26,5,GEN CG,Rajnandgaon,S26,6,GEN CG,Durg,S26,7,GEN CG,Mahasamund,S26,9,GEN CG,Raigarh,S26,2,ST CG,Kanker,S26,11,ST CG,Bastar,S26,10,ST CG,Korba,S26,4,GEN CH,Chandigarh,U02,1,GEN DD,Daman & Diu,U04,1,GEN DL,West Delhi,U05,6,GEN DL,North West Delhi,U05,5,SC DL,Chandni Chowk,U05,1,GEN DL,North East Delhi,U05,2,GEN DL,South Delhi,U05,7,GEN DL,East Delhi,U05,3,GEN DL,New Delhi,U05,4,GEN DN,Dadra & Nagar Haveli,U03,1,ST GA,South Goa,S05,2,GEN GA,North Goa,S05,1,GEN GJ,Bardoli,S06,23,ST GJ,Junagadh,S06,13,GEN GJ,Surat,S06,24,GEN GJ,Kheda,S06,17,GEN GJ,Ahmadabad (West),S06,8,SC GJ,Jamnagar,S06,12,GEN GJ,Sabar Kantha,S06,5,GEN GJ,Banas Kantha,S06,2,GEN GJ,Patan,S06,3,GEN GJ,Panch Mahals,S06,18,GEN GJ,Dohad,S06,19,ST GJ,Vadodara,S06,20,GEN GJ,Anand,S06,16,GEN GJ,Amreli,S06,14,GEN GJ,Ahmadabad (East),S06,7,GEN GJ,Rajkot,S06,10,GEN GJ,Surendranagar,S06,9,GEN GJ,Navsari,S06,25,GEN GJ,Bharuch,S06,22,GEN GJ,Chhota Udaipur,S06,21,ST GJ,Porbandar,S06,11,GEN GJ,Valsad,S06,26,ST GJ,Gandhinagar,S06,6,GEN GJ,Mahesana,S06,4,GEN GJ,Bhavnagar,S06,15,GEN HP,Hamirpur,S08,3,GEN HP,Kangra,S08,1,GEN HP,Shimla,S08,4,SC HP,Mandi,S08,2,GEN HR,Ambala,S07,1,SC HR,Krukshetra,S07,2,GEN HR,Sirsa,S07,3,SC HR,Karnal,S07,5,GEN HR,Sonipat,S07,6,GEN HR,Hisar,S07,4,GEN HR,Rohtak,S07,7,GEN HR,Bhiwani - Mahendragarh,S07,8,GEN HR,Gurgaon,S07,9,GEN HR,Faridabad,S07,10,GEN JH,Jamshedpur,S27,9,GEN JH,Singhbhum,S27,10,ST JH,Rajmahal,S27,1,ST JH,Dumka,S27,2,ST JH,Godda,S27,3,GEN JH,Palamu,S27,13,SC JH,Hazaribagh,S27,14,GEN JH,Dhanbad,S27,7,GEN JH,Kodarma,S27,5,GEN JH,Lohardaga,S27,12,ST JH,Khunti,S27,11,ST JH,Chatra,S27,4,GEN JH,Ranchi,S27,8,GEN JH,Giridih,S27,6,GEN JK,Leh (Ladakh),S09,4,GEN JK,Jammu,S09,6,GEN JK,Srinagar,S09,2,GEN JK,Anantnag,S09,3,GEN JK,Baramula,S09,1,GEN JK,Udhampur,S09,5,GEN JK,,,-1, KA,Gulbarga,S10,5,SC KA,Bijapur,S10,4,SC KA,Chikkodi,S10,1,GEN KA,Raichur,S10,6,ST KA,Koppal,S10,8,GEN KA,Haveri,S10,10,GEN KA,Davanagere,S10,13,GEN KA,Chikkaballapura,S10,27,GEN KA,Udupi Chikmagalur,S10,15,GEN KA,Tumkur,S10,19,GEN KA,Kolar,S10,28,SC KA,Bangalore Rural,S10,23,GEN KA,Dharwad,S10,11,GEN KA,Bangalore North,S10,24,GEN KA,Dakshina Kannada,S10,17,GEN KA,Mysore,S10,21,GEN KA,Chamrajnagar,S10,22,SC KA,Mandya,S10,20,GEN KA,Bellary,S10,9,ST KA,Chitradurga,S10,18,SC KA,Bidar,S10,7,GEN KA,Uttara Kannada,S10,12,GEN KA,Shimoga,S10,14,GEN KA,Hassan,S10,16,GEN KA,Belgaum,S10,2,GEN KA,Bangalore South,S10,26,GEN KA,Bangalore Central,S10,25,GEN KA,Bagalkot,S10,3,GEN KL,Malappuram,S11,6,GEN KL,Pathanamthitta,S11,17,GEN KL,Mavelikkara,S11,16,SC KL,Thiruvananthapuram,S11,20,GEN KL,Palakkad,S11,8,GEN KL,Thrissur,S11,10,GEN KL,Alathur,S11,9,SC KL,Kasaragod,S11,1,GEN KL,Attingal,S11,19,GEN KL,Vadakara,S11,3,GEN KL,Kozhikode,S11,5,GEN KL,Kannur,S11,2,GEN KL,Chalakudy,S11,11,GEN KL,Idukki,S11,13,GEN KL,Alappuzha,S11,15,GEN KL,Kottayam,S11,14,GEN KL,Kollam,S11,18,GEN KL,Ernakulam,S11,12,GEN KL,Wayanad,S11,4,GEN KL,Ponnani,S11,7,GEN MN,Inner Manipur,S14,1,GEN MN,Outer Manipur,S14,2,ST MP,Bhind,S12,2,SC MP,Balaghat,S12,15,GEN MP,Hoshangabad,S12,17,GEN MP,Dhar,S12,25,ST MP,Indore,S12,26,GEN MP,Gwalior,S12,3,GEN MP,Sidhi,S12,11,GEN MP,Rajgarh,S12,20,GEN MP,Sagar,S12,5,GEN MP,Damoh,S12,7,GEN MP,Shahdol,S12,12,ST MP,Dewas,S12,21,SC MP,Ujjain,S12,22,SC MP,Bhopal,S12,19,GEN MP,Vidisha,S12,18,GEN MP,Ratlam,S12,24,ST MP,Rewa,S12,10,GEN MP,Satna,S12,9,GEN MP,Mandsaur,S12,23,GEN MP,Guna,S12,4,GEN MP,Chhindwara,S12,16,GEN MP,Betul,S12,29,ST MP,Khargone,S12,27,ST MP,Jabalpur,S12,13,GEN MP,Mandla,S12,14,ST MP,Morena,S12,1,GEN MP,Tikamgarh,S12,6,SC MP,Khajuraho,S12,8,GEN MP,Khandwa,S12,28,GEN ML,Tura,S15,2,ST ML,Shillong,S15,1,ST MH,Buldana,S13,5,GEN MH,Madha,S13,43,GEN MH,Satara,S13,45,GEN MH,Jalgaon,S13,3,GEN MH,Akola,S13,6,GEN MH,Sangli,S13,44,GEN MH,Solapur,S13,42,SC MH,Amravati,S13,7,SC MH,Ramtek,S13,9,SC MH,Nandurbar,S13,1,ST MH,Bhandara - Gondiya,S13,11,GEN MH,Wardha,S13,8,GEN MH,Shirur,S13,36,GEN MH,Beed,S13,39,GEN MH,Maval,S13,33,GEN MH,Parbhani,S13,17,GEN MH,Raigarh,S13,32,GEN MH,Osmanabad,S13,40,GEN MH,Hatkanangle,S13,48,GEN MH,Dhule,S13,2,GEN MH,Garhchiroli - Chimur,S13,12,ST MH,Raver,S13,4,GEN MH,Biwandi,S13,23,GEN MH,Dindori,S13,20,ST MH,Jalna,S13,18,GEN MH,Aurangabad,S13,19,GEN MH,Chandrapur,S13,13,GEN MH,Nashik,S13,21,GEN MH,Shirdi,S13,38,SC MH,Hingoli,S13,15,GEN MH,Ahmadnagar,S13,37,GEN MH,Palghar,S13,22,ST MH,Latur,S13,41,SC MH,Baramati,S13,35,GEN MH,Ratnagiri - Sindhudurg,S13,46,GEN MH,Kolhapur,S13,47,GEN MH,Thane,S13,25,GEN MH,Mumbai North,S13,26,GEN MH,Mumbai North-West,S13,27,GEN MH,Mumbai North-East,S13,28,GEN MH,Mumbai North-Central,S13,29,GEN MH,Mumbai South,S13,31,GEN MH,Mumbai South-Central,S13,30,GEN MH,Kalyan,S13,24,GEN MH,Pune,S13,34,GEN MH,Nanded,S13,16,GEN MH,Yavatmal - Washim,S13,14,GEN MH,Nagpur,S13,10,GEN MZ,Mizoram,S16,1,ST NL,Nagaland,S17,1,GEN OD,Bhadrak,S18,7,SC OD,Jajapur,S18,8,SC OD,Sambalpur,S18,3,GEN OD,Baleshwar,S18,6,GEN OD,Kendujhar,S18,4,ST OD,Mayurbhanj,S18,5,ST OD,Sundargarh,S18,2,ST OD,Bargarh,S18,1,GEN OD,Dhenkanal,S18,9,GEN OD,Bolangir,S18,10,GEN OD,Kalahandi,S18,11,GEN OD,Kandhamal,S18,13,GEN OD,Kendrapara,S18,15,GEN OD,Cuttack,S18,14,GEN OD,Bhubaneswar,S18,18,GEN OD,Aska,S18,19,GEN OD,Jagatsinghpur,S18,16,SC OD,Nabarangapur,S18,12,ST OD,Koraput,S18,21,ST OD,Puri,S18,17,GEN OD,Berhampur.,S18,20,GEN PB,Jalandhar,S19,4,SC PB,Hoshiarpur,S19,5,SC PB,Fatehgarh Sahib,S19,8,SC PB,Firozpur,S19,10,GEN PB,Patiala,S19,13,GEN PB,Bathinda,S19,11,GEN PB,Gurdaspur,S19,1,GEN PB,Amritsar,S19,2,GEN PB,Khadoor Sahib,S19,3,GEN PB,Anandpur Sahib,S19,6,GEN PB,Sangrur,S19,12,GEN PB,Ludhiana,S19,7,GEN PB,Faridkot,S19,9,SC PY,Puducherry,U07,1,GEN RJ,Churu,S20,3,GEN RJ,Bikaner,S20,2,SC RJ,Jhunjhunun,S20,4,GEN RJ,Alwar,S20,8,GEN RJ,Jodhpur,S20,16,GEN RJ,Sikar,S20,5,GEN RJ,Nagaur,S20,14,GEN RJ,Tonk - Sawai Madhopur,S20,12,GEN RJ,Bharatpur,S20,9,SC RJ,Barmer,S20,17,GEN RJ,Ajmer,S20,13,GEN RJ,Karauli - Dhaulpur,S20,10,SC RJ,Jhalawar - Baran,S20,25,GEN RJ,Rajsamand,S20,22,GEN RJ,Jalore,S20,18,GEN RJ,Bhilwara,S20,23,GEN RJ,Kota,S20,24,GEN RJ,Pali,S20,15,GEN RJ,Ganganagar,S20,1,SC RJ,Dausa,S20,11,ST RJ,Chittaurgarh,S20,21,GEN RJ,Jaipur,S20,7,GEN RJ,Banswara,S20,20,ST RJ,Udaipur,S20,19,ST RJ,Jaipur Rural,S20,6,GEN SK,Sikkim,S21,1,GEN TN,Erode,S22,17,GEN TN,Tenkasi,S22,37,SC TN,Tirunelveli,S22,38,GEN TN,Kanniyakumari,S22,39,GEN TN,Coimbatore,S22,20,GEN TN,Mayiladuthurai,S22,28,GEN TN,Perambalur,S22,25,GEN TN,Dindigul,S22,22,GEN TN,Arakkonam,S22,7,GEN TN,Chennai South,S22,3,GEN TN,Krishnagiri,S22,9,GEN TN,Arani,S22,12,GEN TN,Tiruvannamalai,S22,11,GEN TN,Sriperumbudur,S22,5,GEN TN,Vellore,S22,8,GEN TN,Kancheepuram,S22,6,SC TN,Kallakurichi,S22,14,GEN TN,Nilgiris,S22,19,SC TN,Chidambaram,S22,27,SC TN,Chennai North,S22,2,GEN TN,Chennai Central,S22,4,GEN TN,Thoothukkudi,S22,36,GEN TN,Nagappattinam,S22,29,SC TN,Tiruvallur,S22,1,SC TN,Viluppuram,S22,13,SC TN,Cuddalore,S22,26,GEN TN,Shivaganga,S22,31,GEN TN,Theni,S22,33,GEN TN,Ramanathapuram,S22,35,GEN TN,Namakkal,S22,16,GEN TN,Thanjavur,S22,30,GEN TN,Tiruchirappalli,S22,24,GEN TN,Pollachi,S22,21,GEN TN,Karur,S22,23,GEN TN,Dharmapuri,S22,10,GEN TN,Madurai,S22,32,GEN TN,Virudunagar,S22,34,GEN TN,Tiruppur,S22,18,GEN TN,Salem,S22,15,GEN TR,Tripura East,S23,2,ST TR,Tripura West,S23,1,GEN UK,Almora,S28,3,SC UK,Hardwar,S28,5,GEN UK,Tehri Garhwal,S28,1,GEN UK,Garhwal,S28,2,GEN UK,Nainital - Udhamsingh Nagar,S28,4,GEN UP,Saharanpur,S24,1,GEN UP,Kairana,S24,2,GEN UP,Nagina,S24,5,SC UP,Muzaffarnagar,S24,3,GEN UP,Baghpat,S24,11,GEN UP,Amroha,S24,9,GEN UP,Sambhal,S24,8,GEN UP,Meerut,S24,10,GEN UP,Lalganj,S24,68,SC UP,Jalaun,S24,45,GEN UP,Rampur,S24,7,GEN UP,Ghaziabad,S24,12,GEN UP,Pilibhit,S24,26,GEN UP,Bulandshahr,S24,14,SC UP,Kheri,S24,28,GEN UP,Bareilly,S24,25,GEN UP,Aonla,S24,24,GEN UP,Budaun,S24,23,GEN UP,Shahjahanpur,S24,27,SC UP,Bahraich,S24,56,SC UP,Aligarh,S24,15,GEN UP,Dhaurahra,S24,29,GEN UP,Etah,S24,22,GEN UP,Mathura,S24,17,GEN UP,Farrukhabad,S24,40,GEN UP,Hardoi,S24,31,SC UP,Hathras,S24,16,SC UP,Domriaganj,S24,60,GEN UP,Sitapur,S24,30,GEN UP,Firozabad,S24,20,GEN UP,Maharajganj,S24,63,GEN UP,Mainpuri,S24,21,GEN UP,Kaisarganj,S24,57,GEN UP,Gonda,S24,59,GEN UP,Misrikh,S24,32,SC UP,Barabanki,S24,53,SC UP,Kushi Nagar,S24,65,GEN UP,Fatehpur Sikri,S24,19,GEN UP,Azamgarh,S24,69,GEN UP,Bansgaon,S24,67,SC UP,Amethi,S24,37,GEN UP,Akbarpur,S24,44,SC UP,Rae Bareli,S24,36,GEN UP,Mohanlalganj,S24,34,SC UP,Deoria,S24,66,GEN UP,Sant Kabir Nagar,S24,62,GEN UP,Faizabad,S24,54,GEN UP,Etawah,S24,41,SC UP,Sultanpur,S24,38,GEN UP,Salempur,S24,71,GEN UP,Ghosi,S24,70,GEN UP,Chandauli,S24,76,GEN UP,Allahabad,S24,52,GEN UP,Mirzapur,S24,79,GEN UP,Robertsganj,S24,80,SC UP,Fatehpur,S24,49,GEN UP,Jaunpur,S24,73,GEN UP,Pratapgarh,S24,39,GEN UP,Hamirpur,S24,47,GEN UP,Kaushambi,S24,50,SC UP,Ballia,S24,72,GEN UP,Jhansi,S24,46,GEN UP,Ghazipur,S24,75,GEN UP,Machhlishahr,S24,74,SC UP,Phulpur,S24,51,GEN UP,Sant Ravi Das Nagar (Bhadohi),S24,78,GEN UP,Ambedkar Nagar,S24,55,GEN UP,Banda,S24,48,GEN UP,Kanpur,S24,43,GEN UP,Unnao,S24,33,GEN UP,Kannauj,S24,42,GEN UP,Lucknow,S24,35,GEN UP,Varanasi,S24,77,GEN UP,Gorakhpur,S24,64,GEN UP,Basti,S24,61,GEN UP,Shrawasti,S24,58,GEN UP,Agra,S24,18,SC UP,Gautam Buddha Nagar,S24,13,GEN UP,Bijnor,S24,4,GEN UP,Moradabad,S24,6,GEN WB,Darjiling,S25,4,GEN WB,Arambag,S25,29,SC WB,Barasat,S25,17,GEN WB,Medinipur,S25,34,GEN WB,Tamluk,S25,30,GEN WB,Murshidabad,S25,11,GEN WB,Krishnanagar,S25,12,GEN WB,Birbhum,S25,42,GEN WB,Bolpur,S25,41,SC WB,Barddhaman - Durgapur,S25,39,GEN WB,Puruliya,S25,35,GEN WB,Barddhaman Purba,S25,38,SC WB,Bankura,S25,36,GEN WB,Asansol,S25,40,GEN WB,Ranaghat,S25,13,SC WB,Bishnupur,S25,37,SC WB,Jangipur,S25,9,GEN WB,Balurghat,S25,6,GEN WB,Maldah Uttar,S25,7,GEN WB,Kolkata Uttar,S25,24,GEN WB,Jhargram,S25,33,ST WB,Kolkata Dakshin,S25,23,GEN WB,Uluberiya,S25,26,GEN WB,Mathurapur,S25,20,SC WB,Jaynagar,S25,19,SC WB,Diamond Harbour,S25,21,GEN WB,Kanthi,S25,31,GEN WB,Basirhat,S25,18,GEN WB,Bangaon,S25,14,SC WB,Koch Bihar,S25,1,SC WB,Alipurduars,S25,2,ST WB,Jalpaiguri,S25,3,SC WB,Barakpur,S25,15,GEN WB,Haora,S25,25,GEN WB,Jadavpur,S25,22,GEN WB,Hugli,S25,28,GEN WB,Shrirampur,S25,27,GEN WB,Baharampur,S25,10,GEN WB,Maldah Dakshin,S25,8,GEN WB,Raiganj,S25,5,GEN WB,Ghatal,S25,32,GEN WB,Dum Dum,S25,16,GEN GJ,Kachchh,S06,1,SC LD,Lakshadweep,U06,1,ST LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
mukhtyar revised this gist
Apr 3, 2014 . 1 changed file with 76 additions and 45 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,10 +5,14 @@ <script src="http://d3js.org/d3.v3.min.js"></script> <script src="http://d3js.org/topojson.v1.js"></script> <script src="http://d3js.org/queue.v1.min.js"></script> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script> <style type="text/css"> body { font-family: Arial, sans-serif; } .pc { fill: #bdbdbd; stroke: #fff; @@ -28,26 +32,52 @@ border:2px solid #d0d0d0; border-radius: 5px; } div.tooltip { position: absolute; text-align: center; padding: 0.5em; font-size: 10px; color: #222; background: #FFF; border-radius: 2px; pointer-events: none; box-shadow: 0px 0px 2px 0px #a6a6a6; text-shadow:#f5f5f5 0 1px 0; } .legend .legend-title { text-align: left; margin-bottom: 5px; font-weight: bold; font-size: 90%; } .legend .legend-scale ul { margin: 0; margin-bottom: 5px; padding: 0; float: left; list-style: none; } .legend .legend-scale ul li { font-size: 80%; list-style: none; margin-left: 0; line-height: 18px; margin-bottom: 2px; } .legend ul.legend-labels li span { display: block; float: left; height: 20px; width: 20px; margin-right: 5px; margin-left: 0; } .legend .legend-source { font-size: 70%; color: #999; clear: both; } </style> @@ -56,23 +86,31 @@ <div id="container"> <h1>Parliamentary Constituencies, 2014</h1> <div class='legend'> <div class='legend-title'>Reservation Status</div> <div class='legend-scale'> </div> <div class='legend-source'>Source: <a href="#link to source">Name of source</a></div> </div> </div> <script type="text/javascript"> d3.select(window).on("resize", sizeChange); //Set d3 scale var color_domain = ['GEN','SC','ST']; var legend_labels = ['GEN','SC','ST']; var color = d3.scale.threshold() .domain(color_domain) .range(["", "#b2df8a", "#1f78b4","#a6cee3"]); //Set tooltip var div = d3.select("body").append("div") .attr("class", "tooltip") .style("opacity", 0); //Set d3 projection, path and svg var projection = d3.geo.mercator() .center([78, 27]) .scale(1200); @@ -82,29 +120,29 @@ <h1>Parliamentary Constituencies, 2014</h1> var svg = d3.select("#container") .append("svg") .attr("width", "100%") .attr("height","100%") .append("g"); //Wait for data files to download before drawing queue() .defer(d3.json, "india_pc_2014_simplified.topojson") .defer(d3.json, "india_state_2014_simplified.topojson") .defer(d3.csv, "results.csv") //sample data .await(ready); function ready(error, pc, state, data) { //Set up for visualizing sample data var pairResultWithId = {}; var pairNameWithId = {}; data.forEach(function(d) { pairResultWithId[d.ST_CODE + d.PC_CODE] = d.Res; pairNameWithId[d.ST_CODE + d.PC_CODE] = d.PC_NAME; }); //Drawing pc boundaries var pc_geojson = topojson.feature(pc, pc.objects.india_pc_2014); svg.selectAll(".pc") .data(pc_geojson.features) .enter().append("path") @@ -131,41 +169,34 @@ <h1>Parliamentary Constituencies, 2014</h1> div.transition().duration(300) .style("opacity", 0); }) ; //Drawing state boundaries var state_geojson = topojson.feature(state, state.objects.india_state_2014); svg.selectAll(".state") .data(state_geojson.features) .enter().append("path") .attr("class", "state") .attr("d", path); } //Set up for drawing html legend elements var legend = d3.select('.legend-scale') .append('ul') .attr('class', 'legend-labels'); var keys = legend.selectAll('li') .data(color_domain); keys.enter().append('li') .text(function(d, i){ return legend_labels[i];}) .append('span') .style('background', function(d) { return color(d); }) ; //Function called when window is resized function sizeChange() { d3.select("g").attr("transform", "scale(" + $("#container").width()/1000 + ")"); $("svg").height($("#container").width()*0.75); @@ -175,4 +206,4 @@ <h1>Parliamentary Constituencies, 2014</h1> </script> </body> </html> -
mukhtyar created this gist
Apr 3, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,178 @@ <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script src="http://d3js.org/d3.v3.min.js"></script> <script src="http://d3js.org/topojson.v1.js"></script> <script src="http://d3js.org/queue.v1.min.js"></script> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script> <style type="text/css"> .pc { fill: #bdbdbd; stroke: #fff; stroke-width: 0.5px; } .state { fill: none; stroke: #636363; stroke-width: 1px; stroke-linejoin: round; } #container { margin:2%; padding:20px; border:2px solid #d0d0d0; border-radius: 5px; } body { font-family: Arial, sans-serif; } .legend { font-size: 12px; } div.tooltip { position: absolute; text-align: center; width: 150px; height: 25px; padding: 2px; font-size: 10px; background: #FFFFE0; border: 1px; border-radius: 8px; pointer-events: none; } </style> </head> <body onload="sizeChange()"> <div id="container"> <h1>Parliamentary Constituencies, 2014</h1> </div> <script type="text/javascript"> d3.select(window).on("resize", sizeChange); var color_domain = ['GEN','SC','ST']; var legend_labels = ['GEN','SC','ST']; var color = d3.scale.threshold() .domain(color_domain) .range(["", "#b2df8a", "#1f78b4","#a6cee3"]); var div = d3.select("body").append("div") .attr("class", "tooltip") .style("opacity", 0); var projection = d3.geo.mercator() .center([78, 27]) .scale(1200); var path = d3.geo.path() .projection(projection); var svg = d3.select("#container") .append("svg") .append("g"); //NOTE: Because of topology issues in state boundaries in india_pc_2014, using cleaned up state boundaries in india_state_2014 queue() .defer(d3.json, "india_pc_2014_simplified.topojson") .defer(d3.json, "india_state_2014_simplified.topojson") .defer(d3.csv, "results.csv") .await(ready); function ready(error, pc, state, data) { //Set up for visualizing data table var pairResultWithId = {}; var pairNameWithId = {}; data.forEach(function(d) { pairResultWithId[d.ST_CODE + d.PC_CODE] = d.Res; pairNameWithId[d.ST_CODE + d.PC_CODE] = d.PC_NAME; }); var pc_geojson = topojson.feature(pc, pc.objects.india_pc_2014); var state_geojson = topojson.feature(state, state.objects.india_state_2014); svg.selectAll(".pc") .data(pc_geojson.features) .enter().append("path") .attr("class", "pc") .attr("d", path) .style ( "fill" , function (d) { var result = pairResultWithId[d.properties.ST_CODE + d.properties.PC_CODE]; if (result!='') {return color(result);} }) .style("opacity", 0.8) .on("mouseover", function(d) { d3.select(this).transition().duration(300).style("opacity", 1); div.transition().duration(300) .style("opacity", 1) div.text(pairNameWithId[d.properties.ST_CODE + d.properties.PC_CODE] + " : " + pairResultWithId[d.properties.ST_CODE + d.properties.PC_CODE]) .style("left", (d3.event.pageX) + "px") .style("top", (d3.event.pageY -30) + "px"); }) .on("mouseout", function() { d3.select(this) .transition().duration(300) .style("opacity", 0.8); div.transition().duration(300) .style("opacity", 0); }) ; svg.selectAll(".state") .data(state_geojson.features) .enter().append("path") .attr("class", "state") .attr("d", path); /*svg.append("path") .datum(topojson.mesh(pc_2014, pc_2014.objects.india_pc_2014, function(a, b) { return a.properties.ST_NAME !== b.properties.ST_NAME; })) .attr("d", path) .attr("class", "state-boundary");*/ } var legend = svg.selectAll("g.legend") .data(color_domain) .enter().append("g") .attr("class", "legend"); var ls_w = 20, ls_h = 20; legend.append("rect") .attr("x", 20) .attr("y", function(d, i){ return $("#container").height() - (i*ls_h) - 2*ls_h;}) .attr("width", ls_w) .attr("height", ls_h) .style("fill", function(d, i) { return color(d); }) .style("opacity", 0.8); legend.append("text") .attr("x", 50) .attr("y", function(d, i){ return $("#container").height() - (i*ls_h) - ls_h - 4;}) .text(function(d, i){ return legend_labels[i]; }); function sizeChange() { d3.select("g").attr("transform", "scale(" + $("#container").width()/1000 + ")"); $("svg").height($("#container").width()*0.75); } </script> </body> </html>