Package: wordcloud-mapper
WordCloud_MapperWordCloud_Mapperis a Python package that allows one tocreate wordclouds shaped like regions on a map.Such visualisations are especially useful when communicating sets of data that consist of many different observations and each observation is attributed to a specific region and size of occurrence. Take the example below, a dataset containing the name of the biggest companies (in terms of estimated number of employees in 2019) for each state in Germany.InstallationTo installWordCloud_Mapper, run in your terminal:pip install wordcloud_mapperorpip install wordcloud-mapperFeatures and usageCreate a wordcloud mapfrom data stored in a DataFrame object usingwordcloud_map().Easily resize a mapby any desired scaling factor usingresize_map().Load dummy datasetsto test out the package’s features usingload_companies().Calculate how unique a word isto a particular region in comparison to other regions by calculating the Term Frequency â€” Inverse Document Frequency (TF-IDF) score for each word in each region usingcalc_tfidf().See thedocumentationfor more information on how to use the package and its functions.Notes on geographical nomenclatureThe classification of regions used here follows the European Union’s Nomenclature of Territorial Units for Statistics (NUTS), a geocode standard for referencing the subdivisions of countries. The advantage of using this system is that the classification of regions across countries isstandardised and hierarchically structured. For instance, Germany has the base codeDE(NUTS 0), the state of Bavaria has the codeDE2(NUTS 1), its subregion of Oberbayern has the codeDE21(NUTS 2) and the city of Munich has the codeDE212(NUTS 3). Since each region is given a unique identifier which is directly linked to the regional level above it, it is fairly easy to identify and match any dataset to these regions.However, this means thatthis package currently only works for creating wordcloud maps for EU countries. For an overview of the NUTS regions and levels, you can browse the availablemaps for each EU countryor usethis interactive mapinstead. If you have a dataset containing postcodes and want to convert these to NUTS regions, you can find thecorrespondence tables here.In a future release, support nor non-NUTS regional referencing systems will be implemented.Feedback and contributionsThis package is under active development, so any feedback, recommendations, suggestions or contribution requests are more than welcome!Please read the contribution instructions or emailg.dev@posteo.netif you would like to provide any feedback.History0.1.0 (2022-07-27)First release on PyPI.0.2.0 (2022-09-11)New functionality:Add new functioncalc_tfidf()to calculate TF-IDF score of each word in each region in a dataframe.Add wordcloud colour generating function based on rank of words.Add colour_hue parameter to wordcloud_map() allowing users to choose one specific colour hue for all regions.Parameters exposed to users:Allow users to change the parameters when downloading NUTS shapefiles from Eurostat’s API in wordcloud_map().Allow users to change the sharpness of the regional border lines by channging the DPI value used when creating the masks.Allow users to use shapefiles form a local filepath instead of downloading from GISCO’s online database.Others:Change default coordination system when downloading shapefiles.