File:Geolocated images in Wikimedia Commons 2014-02-21.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Geolocated_images_in_Wikimedia_Commons_2014-02-21.png(720 × 360 pixels, file size: 24 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Geolocated images in Wikimedia Commons. United Kingdom is overpopulated of geolocated images from the Geograph British Isles project.
Español: Imágenes geolocalizadas en Wikimedia Commons. Reino Unido está superpoblado de imágenes provenientes de Geograph British Isles project.
Français : Images géolocalisées sur Wikimedia Commons.
Date
Source Own work
Author Zhuyifei1999
Other versions

Generator
# Quad-licensed under CC-BY-SA 3.0, GNU AGPL v3, MIT/Expat License, NCSA Open Source License
# Use and distribution are permitted as long as any one of the above licenses is satisfied.
from PIL import Image, ImageDraw

im = Image.new("L", (720, 360))
draw = ImageDraw.Draw(im)

query = """
SELECT 180-ROUND(gt_lat*2),
    ROUND(gt_lon*2)+360,
    ROUND(LOG2(COUNT(gt_page_id))*16)
FROM geo_tags
INNER JOIN page
    ON page_id = gt_page_id
WHERE gt_globe = "earth"
    AND NOT (
        gt_lat = 0
        AND gt_lon = 0
    )
    AND page_namespace = 6
GROUP BY ROUND(gt_lat*2),
    ROUND(gt_lon*2)
ORDER BY COUNT(gt_page_id) DESC
;"""

import MySQLdb

connection = MySQLdb.connect(
    host = "commonswiki.labsdb",
    db = "commonswiki_p",
    read_default_file = "~/replica.my.cnf"
)
cursor = connection.cursor()
cursor.execute(query)

for y, x, c in cursor.fetchall():
    draw.point((x,y), fill=c)

im.save("File:Geolocated_images_in_Wikimedia_Commons_2014-02-21.png", "PNG")

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current13:07, 21 February 2014Thumbnail for version as of 13:07, 21 February 2014720 × 360 (24 KB)Zhuyifei1999 (talk | contribs)User created page with UploadWizard

File usage on other wikis

The following other wikis use this file: