Package: italy-geopop
🗺️ 🇮🇹 Italy-geopop🗺️ 🇮🇹 Italy-geopop🧐 What is it?🚀 Main features🏪 Where to get it🔌 Example of use📖 License🔎 Full docs reference👩‍💻 Contributes🐛 Bugs and issues🧐 What is it?Italy-geopopis a python library that provides instant access toitalian geospatial and population data.🚀 Main featuresEasy access to italian geospatial and population dataEasy geospatial plot made possible by the usage ofgeopandasMultiple years of population and geospatial data available (2022, 2023)Population data available by age and sex with customable age rangesEasy linkage of italy-geopop data with your data made possible by usingpandasand the registration of italy-geopop aspandas accessorYou only need a list ofmunicipalities(or municipality ISTAT codes),provinces(or province ISTAT codes or province abbreviations (e.g.Torino->TO)) andregions(or region ISTAT codes).
ISTAT codes can be foundhereorhere.🏪 Where to get itPyPipip install italy-geopop, as simple as that.GitHub - specific version (e.g. 0.1.1)pip install git+https://github.com/zenodallavalle/italy-geopop.git@v0.1.1GitHub - latest (main branch)pip install git+https://github.com/zenodallavalle/italy-geopop.git@mainGitHub - development branchpip install git+https://github.com/zenodallavalle/italy-geopop.git@dev🔌 Example of use>>> from italy_geopop.pandas_extension import pandas_activate
>>> pandas_activate(include_geometry=False, data_year=2022)>>> pd.Series(["Torino", "Agliè", "Airasca"]).italy_geopop.from_municipality(population_limits='total')municipality_codemunicipalityprovince_codeprovinceprovince_shortregionregion_codecadastral_codegeometrypopulation_Fpopulation_Mpopulation01272Torino1TorinoTOPiemonte1L219MULTIPOLYGON441686.0407062.0848748.011001Agliè1TorinoTOPiemonte1A074MULTIPOLYGON1347.01215.02562.021002Airasca1TorinoTOPiemonte1A109MULTIPOLYGON1793.01867.03660.0>>> pd.Series(["Torino", "Milano", "Venezia"]).italy_geopop.from_province(population_limits=[50], population_labels=['below_50', 'above_equal_50'])province_codeprovinceprovince_shortmunicipalitiesregionregion_codegeometrybelow_50_Fabove_equal_50_Fbelow_50_Mabove_equal_50_Mbelow_50above_equal_5001TorinoTO[{'cadastral_code': 'A074'Piemonte1POLYGON550793.0586366.0572143.0499068.01122936.01085434.0115MilanoMI[{'cadastral_code': 'A010'Lombardia3MULTIPOLYGON857481.0792711.0898004.0666434.01755485.01459145.0227VeneziaVE[{'cadastral_code': 'A302'Veneto5POLYGON205100.0224401.0214116.0193299.0419216.0417700.0> > > pd.Series(["Piemonte", "Lombardia", "Veneto"]).italy_geopop.from_region()region_coderegionprovincesgeometry<3_F3-11_F11-19_F19-25_F25-50_F50-65_F65-75_F>=75_F<3_M3-11_M11-19_M19-25_M25-50_M50-65_M65-75_M>=75_M<33-1111-1919-2525-5050-6565-75>=7501Piemonte[{'municipalities': arrayPOLYGON40122.0131269.0149768.0112474.0614252.0506764.0279224.0348632.042361.0138788.0159618.0123911.0629878.0490464.0251918.0236907.082483.0270057.0309386.0236385.01244130.0997228.0531142.0585539.013Lombardia[{'municipalities': arrayMULTIPOLYGON103867.0336353.0378153.0274455.01520576.01144338.0586818.0716916.0109087.0356547.0403719.0303888.01572013.01135834.0524720.0475720.0212954.0692900.0781872.0578343.03092589.02280172.01111538.01192636.025Veneto[{'municipalities': arrayPOLYGON48285.0157284.0182441.0136850.0718105.0578543.0291166.0354328.051390.0166176.0194064.0149055.0737009.0573454.0267403.0242192.099675.0323460.0376505.0285905.01455114.01151997.0558569.0596520.0> > > pd.Series(["Regione Lombardia", "Regione del Veneto", "Veneto o Lombardia", 15]).italy_geopop.smart_from_region()region_coderegionprovincesgeometry<3_F3-11_F11-19_F19-25_F25-50_F50-65_F65-75_F>=75_F<3_M3-11_M11-19_M19-25_M25-50_M50-65_M65-75_M>=75_M<33-1111-1919-2525-5050-6565-75>=7503.0Lombardia[{'municipalities': arrayMULTIPOLYGON103867.0336353.0378153.0274455.01520576.01144338.0586818.0716916.0109087.0356547.0403719.0303888.01572013.01135834.0524720.0475720.0212954.0692900.0781872.0578343.03092589.02280172.01111538.01192636.015.0Veneto[{'municipalities': arrayPOLYGON48285.0157284.0182441.0136850.0718105.0578543.0291166.0354328.051390.0166176.0194064.0149055.0737009.0573454.0267403.0242192.099675.0323460.0376505.0285905.01455114.01151997.0558569.0596520.02nannannannannannannannannannannannannannannannannannannannannannannannannannannannan315.0Campania[{'municipalities': arrayMULTIPOLYGON65798.0201345.0239653.0185798.0909861.0641838.0320637.0311913.069298.0213525.0253444.0200452.0907541.0602405.0288497.0212415.0135096.0414870.0493097.0386250.01817402.01244243.0609134.0524328.0📖 LicenseItaly-geopop is distributed under Creative Commons license (CC-BY-4.0). Full license can be read atLICENSE.Italy-geopop includes data from:openpolis/geojson-italy, at the dime of writing distributed under Creative Commons license (CC-BY-4.0)ISTATdata, at the time of writing distributed under Creative Commons license (CC-BY-3.0), more infohere🔎 Full docs referenceYou can find full docs onitaly-geopop.readthedocs.io.👩‍💻 ContributesZeno Dalla Valle- creator and mantainer🐛 Bugs and issuesIf you experience an issue using this library first check the FAQ, you may find an immediate solution to your problem.If your problem is not listed or the proposed solution did not worked for you, please report bugs via GitHub issueshereproviding also a minimum reproducible example.