Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting for new feature #288

Open
RollaHamza opened this issue May 26, 2022 · 3 comments
Open

Requesting for new feature #288

RollaHamza opened this issue May 26, 2022 · 3 comments

Comments

@RollaHamza
Copy link

RollaHamza commented May 26, 2022

map
Greeting,
I wonder if it possible to extract data from map figure

@nbehrnd
Copy link
Contributor

nbehrnd commented May 26, 2022

You do not clarify what kind of data you want to extract. Since it is a map with discrete color levels (as antonym to continuous), perhaps you are interested to count the countries associated to gray vs. countries associated with different tints of blue. In terms of resolution, you might run into troubles: Apparently (e.g., Egypt, Libya, Chad, Sudan) share one level of a property and still are discernible as individual countries by a gray line marking their frontiers. Possibly, this line might be too thick to allow the recognition of countries of smaller surface (e.g., Slovenia, Croatia, Kuwait, Singapore, Maldives to mention a few).

In case you were interested in the area; an implementation of a planimetry-like approach has been suggested earlier (here and here). At present, I speculate this is a task perhaps better resolved with ImageMagick (note there is a dedicated tag for questions about this program e.g., on stackoverflow). However -- a big however -- one would need to correct for the distortion the map introduces when displaying a 3D object in 2D.

@RollaHamza
Copy link
Author

I want to know for example which countries is shaded in certain color another example is below
1Capture
i want to know the name of countries that is in red color

@nbehrnd
Copy link
Contributor

nbehrnd commented May 26, 2022

Multiple options are available but (likely) neither one is in the scope of the digitizer's design.

  • the map with tints of blue looks like generated by R/ggplot2. Identify the corresponding author(s) of the illustration, justify your interest to access the underlying .csv data. In case of a scientific publication, authors often share these in the supplementary material of a publication on the servers of the publishers, a public repository (like zenodo, or figshare), or their institution.

  • ImageMagick may substitute the color of pixels of one specific color by black (an example), so if the individual tints used in the chloropleth map differ enough in their hue, one may extract the individual levels. One could then use these «stencils» to attribute the countries manually by visual comparison with maps about larger regions/continents. It is achievable to recognize them e.g. with anki decks about geography like this one.

    In case there are many chloropleth maps, one may use the data from wikipedia e.g., the admin 0 maps (a brief how to) to 1) generate illustrations for training, i.e.: same projection, orientation and scale as in the maps you want to analyze where the shape of one country after an other is filled black (like in the illustrations to analyze, but already processed by ImageMagick). Then 2), one would train a computer program with the data derived from the wikipedia data. (I'm not versed in this topic, but Python/opencv is one of the environments reportedly used with success for pattern and face recognition.) Eventually 3), the trained computer program could be able to recover the assignments ("0.8 units: Poland, Slovakia, Czech Republic ; 0.2 units: Slovenia, Croatia", etc) at faster rate than spot by eye. Obviously, this third option requires the most initial investment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants