Package: pygal-maps-ua
pygal_maps_uaUkraine maps for pygal🇺🇦Читати українськоюUkraine map plugin forPygalAllows you to create first level division administrative map of UkraineAt the first level Ukraine is divided into27regions:24oblasts (regions),1autonomous republic (Crimea) and2cities with special status (Kyiv, Sevastopol)Installpip install pygal_maps_uaUsageThis package is a plugin for an open-source data visualization library Pygal, so please refer thePygalandPygal / Chart types / Mapsdocumentation for deeper understanding of the code belowfrompygal.maps.uaimportRegionsmap=Regions()map.title='Regions with highly confused name'map.add('Cherkasy',['cherkasy'])map.add('Сhernihiv',['chernihiv'])map.add('Сhernivtsi',['chernivtsi'])map.render_to_png('chart.png')Result:You can also specify a value for the regionfrompygal_maps_ua.mapsimportRegions,REGIONS_UAmap=Regions()map.title='Number of letters in the region name'map.add("Letters count",{x:len(y)forx,yinREGIONS_UA.items()})map.render_to_png('chart.png')Result:Temporarily occupied territoriesIt is possible to render a map with theschematic visualizationof temporarily occupied territories of Donetsk and Luhansk regions (known as ORDLO). This area refers to territoriesoccupied by Russia in the 2014 year) and don't refer to territories, occupied by Russia during full-scaleRussian invasion of Ukraine in 2022You can use such a template by calling theRegionsOrdloclass and refer the occupied regions area andordlokey respectivelyfrompygal.maps.uaimportRegionsOrdlomap=RegionsOrdlo()⚠ WarningIt should be avalid reasonto use such a map template instead of Regions templateThe straight use-case is to visualize some statistical data from 2014 and clearly display that you have no data from the temporarily occupied territoriesIt isstrictly forbiddento use this map template to dispute in any way the sovereignty and territorial integrity of Ukraine (including marking occupied territories as "disputed", "unrecognised", "self-proclaimed" or using any other formulations except "occupied" or "temporarily occupied" according to the UN resolutions73/194,ES-11/4and common sense).The example of using theRegionsOrdlofor the use-case of visualizing the population of Ukraine on 1 Jan 2020 is provided below:(data source)frompygal.maps.uaimportRegionsOrdlopopulation_2020_by_region={"vinnytsia":1545416,"volyn":1031421,"dnipropetrovsk":3176648,"donetsk":4131808,"zhytomir":1208212,"zakarpattia":1253791,"zaporizhzhia":1687401,"ivano-frankivsk":1368097,"kyiv":1781044,"kirovohrad":933109,"luhansk":2135913,"lviv":2512084,"mykolaiv":1119862,"odesa":2377230,"poltava":1386978,"rivne":1152961,"sumy":1068247,"ternopil":1038695,"kharkiv":2658461,"kherson":1027913,"khmelnitskyi":1254702,"cherkasy":1192137,"chernivtsi":901632,"chernihiv":991294,"kyivcity":2967360,}map=RegionsOrdlo(legend_at_bottom=True)map.title='Population by region on 01 Jan 2020'map.add('Population',population_2020_by_region)map.add('Temporarily occupied territories',['ordlo','crimea','sevastopolcity'])map.render_to_png('chart.png')Result:List of available regionsList of available regions is set as variablesREGIONS_UAandREGIONS_ENGrespectively and listed below:keydescription [ua]description [en]cherkasyЧеркаська областьCherkasy OblastchernihivЧернігівська областьChernihiv OblastchernivtsiЧернівецька областьChernivtsi OblastcrimeaАвтономна Республіка КримAutonomous Republic of CrimeadnipropetrovskДніпропетровська областьDnipropetrovsk OblastdonetskДонецька областьDonetsk Oblastivano-frankivskІвано-Франківська областьIvano-Frankivsk OblastkharkivХарківська областьKharkiv OblastkhersonХерсонська областьKherson OblastkhmelnitskyiХмельницька областьKhmelnytskyi OblastkyivКиївська областьKyiv OblastkyivcityКиївKyivkirovohradКіровоградська областьKirovohrad OblastlvivЛьвівська областьLviv OblastluhanskЛуганська областьLuhansk OblastmykolaivМиколаївська областьMykolaiv OblastodesaОдеська областьOdesa OblastpoltavaПолтавська областьPoltava OblastrivneРівненська областьRivne OblastsevastopolcityСевастопольSevastopolsumyСумська областьSumy OblastternopilТернопільська областьTernopil OblastvinnytsiaВінницька областьVinnytsia OblastvolynВолинська областьVolyn OblastzakarpattiaЗакарпатська областьZakarpattia OblastzaporizhzhiaЗапорізька областьZaporizhzhia OblastzhytomirЖитомирська областьZhytomyr OblastIf you need to update the region names for your purposes (e.g. use only city names), use theset_regionsorset_regions_engfunctionsIf you would like to support the author consider donating to theUnited24charity foundationData Source for Ukraine ADM1 borders:Hijmans, Robert J.. University of California, Berkeley. Museum of Vertebrate Zoology. First-level Administrative Divisions, Ukraine, 2015. [Shapefile]. University of California, Berkeley. Museum of Vertebrate Zoology. Retrieved fromhttps://maps.princeton.edu/catalog/stanford-gg870xt4706