Posts Tagged ‘country’

Flickr Shapefiles browser (MapToPixel)

Wednesday, June 16th, 2010

europe-300x222

[Editor’s note: Also check out Aaron’s WOE ID browser (the geography behind Flickr). The Flickr API returns both ESRI format shapefiles and XML / JSON. The monster dump of all Flickr shapes is just XML, however. Thanks GeoPDX!]

Republished from MapToPixel.

Flickr Shapefiles are a set of polygons generated from the geo-tags of photos on Flickr. Using the names assigned by people to their own images the dataset offers boundaries of loads of places around the world. The code.flickr blog has more info and details of their generation. The idea is that using people’s tags of locations to form boundaries gives a large dataset of where people think particular places are.

The Boundaries project uses Flick Shapefiles to show neighbourhoods and their neighbouring places. Other than that there isn’t a huge amount of examples on the web.  I’ve put together an example that uses ModestMaps and the Flickr API to display the Shapefiles in Flash. The polygons are retrieved using a bounding box query to the Flickr API, decoded from JSON, drawn and may be identified with a mouse hover.

Continue reading at MapToPixel . . .

Natural Earth 1.1 update + 1.2 preview

Friday, March 26th, 2010

The 60+ individual themes that received edits in the 1.1 update of Natural Earth are now available for ala cart downloading on the NaturalEarthData.com site. The 110m country boundary lines theme is now available in 1.1 (somehow it was left out of the original release). The combo 110m-cultural download has been updated to include that missing file. In case you’re wondering, there is no 50m country boundary lines update, even though the 50m admin-0 polygons were updated as their boundaries did not change, only the attribute tables were updated to version 1.1.

Jill finished editing ~1,900 or half of the 10m admin-1 polygon data attributes for name and thematic codes for the larger, more populous countries. We’ll start merging that with the new, topologically valid linework in April.

Tom got a cache of old hand drawn relief and is busy nudging it in Photoshop to align to Natural Earth drains.

Preston finished adding tapers to the North America drains. Those will go live on the site in early April and will quadruple (4x) the amount of hydrological data there. We’re about 50% done with Europe.

If you have a few hours to help out, please drop me a line at nathaniel@kelsocartography.com.

Limitations on Passport Use (Wikipedia)

Monday, September 14th, 2009

[Editor’s note: I dug up this interesting list of sovereign states who have passport problems at Wikipedia while working on Natural Earth.]

Most countries accept passports of other countries as valid for international travel and valid for entry. There are exceptions, such as when a country does not recognise the passport-issuing country as a sovereign state. Likewise, the passport-issuing country may also stamp restrictions on the passports of its citizens not to go to certain countries due to poor or non-existent foreign relations, or security or health risks.

Continue reading at Wikipedia . . .

Travellr: Behind the Scenes of our Region-Based Clusters (Google GeoDev)

Monday, July 6th, 2009

[Editor’s note: The age-old rule for cloropleth mapping that suggests aggregation by multi-scale areal units based on the map’s zoom level is slowly seeping into “clustering” for the point-based mashup geo community. This overview from Travellr published on the Google GeoDevelopers blog includes two illustrations that show the power of this technique. I used such a technique (different implementation) on The Washington Post’s recent swine flu mapping.]

Republished from Google GeoDevelopers Blog.
Monday, June 22, 2009

Recently, there has been a lot of interest in clustering algorithms. The client-side grid-based MarkerClusterer was released in the open source library this year, and various server-side algorithms were discussed in the Performance Tips I/O talk. We’ve invited the Travellr development team to give us insight on their unique regional clustering technique.

Travellr is a location aware answers service where people can ask travel-related questions about anywhere in the world. One of its features is a map-based interface to questions on the site using Google Maps.

dxjmnbf_4t5qkqpfw_b1
Figure 1. An example of the Travellr Map, showing question markers for Australia.

Clustering for usability
We learned that the best way to display markers without cluttering our map was to cluster our questions depending on how far you zoom in. If the user was looking at a map of the continents, we would cluster our questions into a marker for each continent. If the user zoomed-in to France we would then cluster our questions into a marker for each region or city that had questions. By clustering our data into cities, regions/states, countries, and continents, we could display relevant markers on the map depending on what zoom level the user was looking at.

Optimizing for Clustering
Our next challenge was how to extract clustered data from our database without causing excessive server load. Every time the user pans and zooms on the map, we need to query and fetch new clustered data in order to display the markers on the map. We also might have to limit the data if the user has selected a tag, as we’re only interested in a questions related to a topic (ie: “surfing”). To execute this in real-time would be painstakingly slow, as you would need to to cluster thousands of questions in thousands of locations with hundreds of tags on the fly. The answer? Pre-cluster your data of course!

Step 1. Structure your location data
When a question is asked about a city on Travellr, we also know its region/state, country and continent. We store more than 55,000 location points as a hierarchy, with each location “owning” its descendent nodes (and all of their data). Our locations are stored in a Modified Preorder Tree (also called Nested Sets). Modified Preorder Trees are a popular method of storing hierarchical data in a flat database table, having a focus on efficient data retrieval, and easy handling of sub trees. For each location we also keep a record of its depth within the tree, its location type (continent, country, region/state, or city), and its co-ordinates (retrieved using the Google Maps geocoder).

Step 2. Aggregate your data
We calculate aggregate data for every branch of our locations tree ahead of time. By storing aggregate data for cities, regions/states, countries, and continents, we provide an extremely fast and inexpensive method to query our locations database for any information regarding questions asked about a particular location. This data is updated every few minutes by a server-side task.

Our aggregations include:

  • Total question count for a location
  • Most popular tags for that location
  • Number of questions associated with each of those tags.

How we query our structured, aggregate data on the map
Whenever the user zooms or pans the map we fire off a query to our (unpublished ;) API with the tags they are searching for, the current zoom level, and the edge co-ordinates of the map’s bounding box. Based on the zoom level (Figure 2) we work out whether we want to display markers for continents, countries, states, or cities. We then send back the data for these markers and display them on the map.

dc287ncr_29cb84v7ct_b
Figure 2. Clustering at different zoom levels (blue = continents, countries, pink = states, cities)

Everyone Wins
So what is the result of structuring and aggregating our data in such a way? It means that we have nicely organized, pre-clustered data that can be read from cheaply and easily. This allows us to provide a super-fast map interface for Travellr that puts minimal load on our infrastructure. Everyone is happy!

Comments or Questions?
We’d love to hear from you if you have any questions on how we did things, or suggestions or comments about Travellr’s map. This article was written by Travellr’s performance and scalability expert Michael Shaw (from Insight4) and our client-side scripting aficionado Jaidev Soin.

You can visit Travellr at www.travellr.com, or follow us on Twitter at twitter.com/travellr.

Greenland Gains Self-Government from the Kingdom of Denmark, Kinda (Economist)

Wednesday, July 1st, 2009

2609ww2[Editor’s note: What is a country? A nation? A nation-state? By some counts, there are about 195 “countries” or 194 (US State Department) in the world, but by others like the ISO and United Nations, about 245 which includes extra “regions” for statistical reasons or FIPS code assignments. The World Bank (2) says 186 or 210. How can there be such a wide spectrum of valid answers? The issue is complicated by historic colonial relationships with overseas dependencies and affiliated political administrative units, and by the non-uniform way different “countries” sub-divide themselves.

For instance, France considers all it’s “dependencies” unitary parts of France, while the U.S. does not view it’s own territories equal to states vis-a-vis constitutional rights. But some unitary parts of France outside mainland Europe get treated differently from Metropolitan France by the European Union (they don’t necessarily get an E.U. passport).

This week, Greenland steps closer to becoming one of the club of 195 “countries” in the world, but really it’s just getting more quasi-self-government (sticking in the 245 bracket) within the Kingdom of Denmark’s administrative umbrella (which is and is not the same as the “country” of Denmark) for defense and foreign policy.

The higher number doesn’t even address sub-national semi-autonomous entities like the United Kingdom’s England, Scotland, Wales, and Northern Ireland which fall somewhere between what we in the U.S. think of as “states” and “provinces” (1st order admin units) and those top level countries and nations. Nor does it address disputed or break away regions like Abkhazia.

For Natural Earth Vector, we will include groupings at both “top-level” views (about 195 and 245), and at the 1st order admin (state, province, over 3,000). We will also include a sample of sub-national areas and disputed, breakaway areas.]

Republished from the Economist.

Two tonnes of rare whale meat were distributed in Greenland as part of celebrations to mark the start of an era of self-government. After nearly three centuries of rule by Denmark, Greenland’s 56,000 people will gradually take control of most domestic affairs, although defence and foreign policy remain in Danish hands. Greenlandic is now the official language. Photo by: Adam Roberts.

Continue reading related story, “Greenland’s future: Divorce up north?” from Nov. 27, 2008 . . .

Leveraging Iconic Photos to Augument Names in Graphics

Monday, May 4th, 2009

[Editor's note: Augmenting textual names with iconic faces can liven up a graphic. Same goes for flags with country names. This graphic from The Washington Post's Karen Yourish and Laura Stanton does exactly that.]

Republished from The Washington Post, April 2009.

The Confirmation Race

A look at presidential transitions from Reagan to Obama. President Obama needs to fill about 500 government-agency positions that require Senate confirmation.

Related: Heat Count–Tracking Obama’s Appointees.

confirmationrace

Self-Colored Map Graphics (Free Geography Tools)

Friday, March 13th, 2009

[Editor's note: Mike bugged me back in January to cover his free tool to easily color a world map by country and download the resulting PNG image file. I notice that the Free Geography Tools blog has covered the same. Check it out below. Would be nice if the world map were projected (like Winkle Tripel).]

Republished from Free Geography Tools.
Originally published Feb. 5, 2009.

A while back, I covered a web app that lets you color in countries on a world map, then download the resulting graphic. Since then, it’s added more features, including the ability to add text, lines and labels. Mike Piaget writes to tell me of a similar app he’s created, the Customizable Map Of The World. Not as many options as the other app, but easier to use:

2-4-2009-1.48.12 PM

Click on a color next to the country name, then click “Update Map Colors” to color the country on the map; here, I’ve colored all world countries that start with the letter “A”. There’s only six colors available for country colors (including the default), plus one for water, but you can modify those colors with the appropriate hex code at upper right. To save a copy of the map to your computer, right-click on the image and choose the “Save Picture As ..” option (or the equivalent in your browser):

chart

Unfortunately, you’re limited to the single on-screen size; however, there are closeup maps available for the subregions Africa, Europe, Asia, the Middle East and South America (links at the bottom of the web app page).

Continue to Aneki to use the tool . . .