2
$\begingroup$

Hi I am trying to make a map of Sierra Leone and am running into trouble.

SL has 4 provinces: Northern, Southern, Eastern, and Western, which are diced up into 14 districts as shown here:

http://en.wikipedia.org/wiki/Administrative_divisions_of_Sierra_Leone

I found I could create "Entity"s for 13 of the 14 districts via the following:

districts = {"Bo Sierra Leone", "Bombali", "Bonthe District", "Kailahun District", "Kambia District", "Kenema District", "Koinadugu District", "Kono District", "Moyamba District", "Port Loko District", "Pujehun District", "Tonkolili District", "Western Rural District", "Western Urban Sierra Leone"};

slDistricts = SemanticInterpretation /@ districts
GeoListPlot[slDistricts, ImageSize -> Large, GeoLabels -> True]

If you run the above code you'll notice two things. Thing 1: SemanticInterpretation fails to find the district of Bo and instead returns a city. Coaxing SemanticINterpretation into returning what you are looking for seems to be a bit of a black art. It took some trial and error for me to come up with "districts". I played around a fair bit trying to get an Entity for the district of Bo but nothing I tried worked. I suspect the information that SemanticInterpretation is searching doesn't know that the district of Bo exists. Thing 2: The GeoListPlot doesn't plot any of the districts in Southern. I also tried plotting single districts and it fails for all the ones in Southern. As you can see I could get maps of districts in Northern and Western, but the attempts to map the 4 districts in Southern failed. I have no idea how SemanticInterpretation and these Geo routines are doing what they are doing but I gather a great deal of information is hidden from the user. Apparently the information regarding Southern does not exist in Mathematica of the Wolfram Language? Is there a way to generate it somehow?

GeoGraphics[{EdgeForm[Black], FaceForm[Red],  Polygon[Entity["Country", "SierraLeone"]]}]
GeoGraphics[{EdgeForm[Black], FaceForm[Red],  Polygon[Entity["AdministrativeDivision", {"Kambia", "Northern", "SierraLeone"}]]}]
GeoGraphics[{EdgeForm[Black], FaceForm[Red],  Polygon[Entity["AdministrativeDivision", {"WesternRural", "Western", "SierraLeone"}]]}]
GeoGraphics[{EdgeForm[Black], FaceForm[Red],  Polygon[Entity["AdministrativeDivision", {"Moyamba", "Southern",      "SierraLeone"}]]}]
GeoGraphics[{EdgeForm[Black], FaceForm[Red],  Polygon[Entity["AdministrativeDivision", {"Bonthe", "Southern", "SierraLeone"}]]}]
GeoGraphics[{EdgeForm[Black], FaceForm[Red],  Polygon[Entity["AdministrativeDivision", {"Pujehun", "Southern",  "SierraLeone"}]]}]
GeoGraphics[{EdgeForm[Black], FaceForm[Red],  Polygon[Entity["AdministrativeDivision", {"Bo", "Southern", "SierraLeone"}]]}]
$\endgroup$

1 Answer 1

6
$\begingroup$

If you start with the topmost entity and then work your way down step by step you won't miss any data.

enter image description here

However, you are correct that some map coordinates appear to be missing:

divisions = CountryData["SierraLeone", "AdministrativeDivisions"];
subdivisions = AdministrativeDivisionData[#, "Subdivisions"] & /@ divisions;
GeoGraphics[{EdgeForm[Black], FaceForm[Red], Polygon[#]}] & /@ subdivisions;

enter image description here

I think you should report this as a bug to Wolfram Research. There is nothing we can do about it here. To report a bug you can use the "Give Feedback..." menu option under "Help" inside Mathematica.

$\endgroup$
2
  • 1
    $\begingroup$ I reported it. THanks for the tips. $\endgroup$
    – JEP
    Jan 16, 2015 at 4:52
  • 1
    $\begingroup$ In 12.0, only Sherbro Urban is missing polygon data. $\endgroup$
    – Carl Lange
    May 21, 2019 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.