Skip to content

Instantly share code, notes, and snippets.

@hrbrmstr
Forked from uribo/japan_one_twenty_map.topojson
Last active August 29, 2015 14:23
Show Gist options
  • Save hrbrmstr/a1bed76ce9f756935e9e to your computer and use it in GitHub Desktop.
Save hrbrmstr/a1bed76ce9f756935e9e to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"properties":{"num.one.twenty":"13","names.one.twenty":"shibetoro"},"geometry":{"type":"Polygon","coordinates":[[[148,46],[149,46],[149,45.33333],[148,45.33333],[148,46]]]}},{"type":"Feature","id":2,"properties":{"num.one.twenty":"14","names.one.twenty":"bettobu"},"geometry":{"type":"Polygon","coordinates":[[[148,45.33333],[149,45.33333],[149,44.66666],[148,44.66666],[148,45.33333]]]}},{"type":"Feature","id":3,"properties":{"num.one.twenty":"15","names.one.twenty":"shana"},"geometry":{"type":"Polygon","coordinates":[[[147,45.33333],[148,45.33333],[148,44.66666],[147,44.66666],[147,45.33333]]]}},{"type":"Feature","id":4,"properties":{"num.one.twenty":"16","names.one.twenty":"urumombekko"},"geometry":{"type":"Polygon","coordinates":[[[147,44.66666],[148,44.66666],[148,44],[147,44],[147,44.66666]]]}},{"type":"Feature","id":5,"properties":{"num.one.twenty":"25","names.one.twenty":"atoiyamisaki"},"geometry":{"type":"Polygon","coordinates":[[[146,44.66666],[147,44.66666],[147,44],[146,44],[146,44.66666]]]}},{"type":"Feature","id":6,"properties":{"num.one.twenty":"26","names.one.twenty":"shikotanto"},"geometry":{"type":"Polygon","coordinates":[[[146,44],[147,44],[147,43.33333],[146,43.33333],[146,44]]]}},{"type":"Feature","id":7,"properties":{"num.one.twenty":"27","names.one.twenty":"shiretokomisaki"},"geometry":{"type":"Polygon","coordinates":[[[145,44.66666],[146,44.66666],[146,44],[145,44],[145,44.66666]]]}},{"type":"Feature","id":8,"properties":{"num.one.twenty":"28","names.one.twenty":"shibetsu"},"geometry":{"type":"Polygon","coordinates":[[[145,44],[146,44],[146,43.33333],[145,43.33333],[145,44]]]}},{"type":"Feature","id":9,"properties":{"num.one.twenty":"29","names.one.twenty":"nemuro"},"geometry":{"type":"Polygon","coordinates":[[[145,43.33333],[146,43.33333],[146,42.66666],[145,42.66666],[145,43.33333]]]}},{"type":"Feature","id":10,"properties":{"num.one.twenty":"30","names.one.twenty":"abashiri"},"geometry":{"type":"Polygon","coordinates":[[[144,44.66666],[145,44.66666],[145,44],[144,44],[144,44.66666]]]}},{"type":"Feature","id":11,"properties":{"num.one.twenty":"31","names.one.twenty":"shari"},"geometry":{"type":"Polygon","coordinates":[[[144,44],[145,44],[145,43.33333],[144,43.33333],[144,44]]]}},{"type":"Feature","id":12,"properties":{"num.one.twenty":"32","names.one.twenty":"kushiro"},"geometry":{"type":"Polygon","coordinates":[[[144,43.33333],[145,43.33333],[145,42.66666],[144,42.66666],[144,43.33333]]]}},{"type":"Feature","id":13,"properties":{"num.one.twenty":"33","names.one.twenty":"mombetsu"},"geometry":{"type":"Polygon","coordinates":[[[143,44.66666],[144,44.66666],[144,44],[143,44],[143,44.66666]]]}},{"type":"Feature","id":14,"properties":{"num.one.twenty":"34","names.one.twenty":"kitami"},"geometry":{"type":"Polygon","coordinates":[[[143,44],[144,44],[144,43.33333],[143,43.33333],[143,44]]]}},{"type":"Feature","id":15,"properties":{"num.one.twenty":"35","names.one.twenty":"obihiro"},"geometry":{"type":"Polygon","coordinates":[[[143,43.33333],[144,43.33333],[144,42.66666],[143,42.66666],[143,43.33333]]]}},{"type":"Feature","id":16,"properties":{"num.one.twenty":"36","names.one.twenty":"hiro"},"geometry":{"type":"Polygon","coordinates":[[[143,42.66666],[144,42.66666],[144,42],[143,42],[143,42.66666]]]}},{"type":"Feature","id":17,"properties":{"num.one.twenty":"37","names.one.twenty":"esashi"},"geometry":{"type":"Polygon","coordinates":[[[142,45.33333],[143,45.33333],[143,44.66666],[142,44.66666],[142,45.33333]]]}},{"type":"Feature","id":18,"properties":{"num.one.twenty":"38","names.one.twenty":"nayoro"},"geometry":{"type":"Polygon","coordinates":[[[142,44.66666],[143,44.66666],[143,44],[142,44],[142,44.66666]]]}},{"type":"Feature","id":19,"properties":{"num.one.twenty":"39","names.one.twenty":"asahikawa"},"geometry":{"type":"Polygon","coordinates":[[[142,44],[143,44],[143,43.33333],[142,43.33333],[142,44]]]}},{"type":"Feature","id":20,"properties":{"num.one.twenty":"40","names.one.twenty":"yobaridake"},"geometry":{"type":"Polygon","coordinates":[[[142,43.33333],[143,43.33333],[143,42.66666],[142,42.66666],[142,43.33333]]]}},{"type":"Feature","id":21,"properties":{"num.one.twenty":"41","names.one.twenty":"urakawa"},"geometry":{"type":"Polygon","coordinates":[[[142,42.66666],[143,42.66666],[143,42],[142,42],[142,42.66666]]]}},{"type":"Feature","id":22,"properties":{"num.one.twenty":"42","names.one.twenty":"wakkanai"},"geometry":{"type":"Polygon","coordinates":[[[141,46],[142,46],[142,45.33333],[141,45.33333],[141,46]]]}},{"type":"Feature","id":23,"properties":{"num.one.twenty":"43","names.one.twenty":"teshio"},"geometry":{"type":"Polygon","coordinates":[[[141,45.33333],[142,45.33333],[142,44.66666],[141,44.66666],[141,45.33333]]]}},{"type":"Feature","id":24,"properties":{"num.one.twenty":"44","names.one.twenty":"haboro"},"geometry":{"type":"Polygon","coordinates":[[[141,44.66666],[142,44.66666],[142,44],[141,44],[141,44.66666]]]}},{"type":"Feature","id":25,"properties":{"num.one.twenty":"45","names.one.twenty":"rumoi"},"geometry":{"type":"Polygon","coordinates":[[[141,44],[142,44],[142,43.33333],[141,43.33333],[141,44]]]}},{"type":"Feature","id":26,"properties":{"num.one.twenty":"46","names.one.twenty":"sapporo"},"geometry":{"type":"Polygon","coordinates":[[[141,43.33333],[142,43.33333],[142,42.66666],[141,42.66666],[141,43.33333]]]}},{"type":"Feature","id":27,"properties":{"num.one.twenty":"47","names.one.twenty":"tomakomai"},"geometry":{"type":"Polygon","coordinates":[[[141,42.66666],[142,42.66666],[142,42],[141,42],[141,42.66666]]]}},{"type":"Feature","id":28,"properties":{"num.one.twenty":"48","names.one.twenty":"shiriyazaki"},"geometry":{"type":"Polygon","coordinates":[[[141,42],[142,42],[142,41.33333],[141,41.33333],[141,42]]]}},{"type":"Feature","id":29,"properties":{"num.one.twenty":"49","names.one.twenty":"iwanai"},"geometry":{"type":"Polygon","coordinates":[[[140,43.33333],[141,43.33333],[141,42.66666],[140,42.66666],[140,43.33333]]]}},{"type":"Feature","id":30,"properties":{"num.one.twenty":"50","names.one.twenty":"muroran"},"geometry":{"type":"Polygon","coordinates":[[[140,42.66666],[141,42.66666],[141,42],[140,42],[140,42.66666]]]}},{"type":"Feature","id":31,"properties":{"num.one.twenty":"51","names.one.twenty":"hakodate"},"geometry":{"type":"Polygon","coordinates":[[[140,42],[141,42],[141,41.33333],[140,41.33333],[140,42]]]}},{"type":"Feature","id":32,"properties":{"num.one.twenty":"52","names.one.twenty":"kudo"},"geometry":{"type":"Polygon","coordinates":[[[139,42.66666],[140,42.66666],[140,42],[139,42],[139,42.66666]]]}},{"type":"Feature","id":33,"properties":{"num.one.twenty":"53","names.one.twenty":"oshimaoshima"},"geometry":{"type":"Polygon","coordinates":[[[139,42],[140,42],[140,41.33333],[139,41.33333],[139,42]]]}},{"type":"Feature","id":34,"properties":{"num.one.twenty":"54","names.one.twenty":"noheji"},"geometry":{"type":"Polygon","coordinates":[[[141,41.33333],[142,41.33333],[142,40.66666],[141,40.66666],[141,41.33333]]]}},{"type":"Feature","id":35,"properties":{"num.one.twenty":"55","names.one.twenty":"hachinohe"},"geometry":{"type":"Polygon","coordinates":[[[141,40.66666],[142,40.66666],[142,40],[141,40],[141,40.66666]]]}},{"type":"Feature","id":36,"properties":{"num.one.twenty":"56","names.one.twenty":"morioka"},"geometry":{"type":"Polygon","coordinates":[[[141,40],[142,40],[142,39.33333],[141,39.33333],[141,40]]]}},{"type":"Feature","id":37,"properties":{"num.one.twenty":"57","names.one.twenty":"ichinoseki"},"geometry":{"type":"Polygon","coordinates":[[[141,39.33333],[142,39.33333],[142,38.66666],[141,38.66666],[141,39.33333]]]}},{"type":"Feature","id":38,"properties":{"num.one.twenty":"58","names.one.twenty":"ishinomaki"},"geometry":{"type":"Polygon","coordinates":[[[141,38.66666],[142,38.66666],[142,38],[141,38],[141,38.66666]]]}},{"type":"Feature","id":39,"properties":{"num.one.twenty":"59","names.one.twenty":"aomori"},"geometry":{"type":"Polygon","coordinates":[[[140,41.33333],[141,41.33333],[141,40.66666],[140,40.66666],[140,41.33333]]]}},{"type":"Feature","id":40,"properties":{"num.one.twenty":"60","names.one.twenty":"hirosaki"},"geometry":{"type":"Polygon","coordinates":[[[140,40.66666],[141,40.66666],[141,40],[140,40],[140,40.66666]]]}},{"type":"Feature","id":41,"properties":{"num.one.twenty":"61","names.one.twenty":"akita"},"geometry":{"type":"Polygon","coordinates":[[[140,40],[141,40],[141,39.33333],[140,39.33333],[140,40]]]}},{"type":"Feature","id":42,"properties":{"num.one.twenty":"62","names.one.twenty":"shinjo"},"geometry":{"type":"Polygon","coordinates":[[[140,39.33333],[141,39.33333],[141,38.66666],[140,38.66666],[140,39.33333]]]}},{"type":"Feature","id":43,"properties":{"num.one.twenty":"63","names.one.twenty":"sendai"},"geometry":{"type":"Polygon","coordinates":[[[140,38.66666],[141,38.66666],[141,38],[140,38],[140,38.66666]]]}},{"type":"Feature","id":44,"properties":{"num.one.twenty":"64","names.one.twenty":"fukushima"},"geometry":{"type":"Polygon","coordinates":[[[140,38],[141,38],[141,37.33333],[140,37.33333],[140,38]]]}},{"type":"Feature","id":45,"properties":{"num.one.twenty":"65","names.one.twenty":"shirakawa"},"geometry":{"type":"Polygon","coordinates":[[[140,37.33333],[141,37.33333],[141,36.66666],[140,36.66666],[140,37.33333]]]}},{"type":"Feature","id":46,"properties":{"num.one.twenty":"66","names.one.twenty":"mito"},"geometry":{"type":"Polygon","coordinates":[[[140,36.66666],[141,36.66666],[141,36],[140,36],[140,36.66666]]]}},{"type":"Feature","id":47,"properties":{"num.one.twenty":"67","names.one.twenty":"chiba"},"geometry":{"type":"Polygon","coordinates":[[[140,36],[141,36],[141,35.33333],[140,35.33333],[140,36]]]}},{"type":"Feature","id":48,"properties":{"num.one.twenty":"68","names.one.twenty":"otaki"},"geometry":{"type":"Polygon","coordinates":[[[140,35.33333],[141,35.33333],[141,34.66666],[140,34.66666],[140,35.33333]]]}},{"type":"Feature","id":49,"properties":{"num.one.twenty":"69","names.one.twenty":"fukaura"},"geometry":{"type":"Polygon","coordinates":[[[139,40.66666],[140,40.66666],[140,40],[139,40],[139,40.66666]]]}},{"type":"Feature","id":50,"properties":{"num.one.twenty":"70","names.one.twenty":"oga"},"geometry":{"type":"Polygon","coordinates":[[[139,40],[140,40],[140,39.33333],[139,39.33333],[139,40]]]}},{"type":"Feature","id":51,"properties":{"num.one.twenty":"71","names.one.twenty":"sakata"},"geometry":{"type":"Polygon","coordinates":[[[139,39.33333],[140,39.33333],[140,38.66666],[139,38.66666],[139,39.33333]]]}},{"type":"Feature","id":52,"properties":{"num.one.twenty":"72","names.one.twenty":"murakami"},"geometry":{"type":"Polygon","coordinates":[[[139,38.66666],[140,38.66666],[140,38],[139,38],[139,38.66666]]]}},{"type":"Feature","id":53,"properties":{"num.one.twenty":"73","names.one.twenty":"niigata"},"geometry":{"type":"Polygon","coordinates":[[[139,38],[140,38],[140,37.33333],[139,37.33333],[139,38]]]}},{"type":"Feature","id":54,"properties":{"num.one.twenty":"74","names.one.twenty":"nikko"},"geometry":{"type":"Polygon","coordinates":[[[139,37.33333],[140,37.33333],[140,36.66666],[139,36.66666],[139,37.33333]]]}},{"type":"Feature","id":55,"properties":{"num.one.twenty":"75","names.one.twenty":"utsunomiya"},"geometry":{"type":"Polygon","coordinates":[[[139,36.66666],[140,36.66666],[140,36],[139,36],[139,36.66666]]]}},{"type":"Feature","id":56,"properties":{"num.one.twenty":"76","names.one.twenty":"tokyo"},"geometry":{"type":"Polygon","coordinates":[[[139,36],[140,36],[140,35.33333],[139,35.33333],[139,36]]]}},{"type":"Feature","id":57,"properties":{"num.one.twenty":"77","names.one.twenty":"yokosuka"},"geometry":{"type":"Polygon","coordinates":[[[139,35.33333],[140,35.33333],[140,34.66666],[139,34.66666],[139,35.33333]]]}},{"type":"Feature","id":58,"properties":{"num.one.twenty":"78","names.one.twenty":"miyakejima"},"geometry":{"type":"Polygon","coordinates":[[[139,34.66666],[140,34.66666],[140,34],[139,34],[139,34.66666]]]}},{"type":"Feature","id":59,"properties":{"num.one.twenty":"79","names.one.twenty":"mikurajima"},"geometry":{"type":"Polygon","coordinates":[[[139,34],[140,34],[140,33.33333],[139,33.33333],[139,34]]]}},{"type":"Feature","id":60,"properties":{"num.one.twenty":"80","names.one.twenty":"aikawa"},"geometry":{"type":"Polygon","coordinates":[[[138,38.66666],[139,38.66666],[139,38],[138,38],[138,38.66666]]]}},{"type":"Feature","id":61,"properties":{"num.one.twenty":"81","names.one.twenty":"nagaoka"},"geometry":{"type":"Polygon","coordinates":[[[138,38],[139,38],[139,37.33333],[138,37.33333],[138,38]]]}},{"type":"Feature","id":62,"properties":{"num.one.twenty":"82","names.one.twenty":"takada"},"geometry":{"type":"Polygon","coordinates":[[[138,37.33333],[139,37.33333],[139,36.66666],[138,36.66666],[138,37.33333]]]}},{"type":"Feature","id":63,"properties":{"num.one.twenty":"83","names.one.twenty":"nagano"},"geometry":{"type":"Polygon","coordinates":[[[138,36.66666],[139,36.66666],[139,36],[138,36],[138,36.66666]]]}},{"type":"Feature","id":64,"properties":{"num.one.twenty":"84","names.one.twenty":"kofu"},"geometry":{"type":"Polygon","coordinates":[[[138,36],[139,36],[139,35.33333],[138,35.33333],[138,36]]]}},{"type":"Feature","id":65,"properties":{"num.one.twenty":"85","names.one.twenty":"shizoka"},"geometry":{"type":"Polygon","coordinates":[[[138,35.33333],[139,35.33333],[139,34.66666],[138,34.66666],[138,35.33333]]]}},{"type":"Feature","id":66,"properties":{"num.one.twenty":"86","names.one.twenty":"omaezaki"},"geometry":{"type":"Polygon","coordinates":[[[138,34.66666],[139,34.66666],[139,34],[138,34],[138,34.66666]]]}},{"type":"Feature","id":67,"properties":{"num.one.twenty":"87","names.one.twenty":"wajima"},"geometry":{"type":"Polygon","coordinates":[[[136.5,38],[137.5,38],[137.5,37.33333],[136.5,37.33333],[136.5,38]]]}},{"type":"Feature","id":68,"properties":{"num.one.twenty":"88","names.one.twenty":"toyama"},"geometry":{"type":"Polygon","coordinates":[[[137,37.33333],[138,37.33333],[138,36.66666],[137,36.66666],[137,37.33333]]]}},{"type":"Feature","id":69,"properties":{"num.one.twenty":"89","names.one.twenty":"takayama"},"geometry":{"type":"Polygon","coordinates":[[[137,36.66666],[138,36.66666],[138,36],[137,36],[137,36.66666]]]}},{"type":"Feature","id":70,"properties":{"num.one.twenty":"90","names.one.twenty":"iida"},"geometry":{"type":"Polygon","coordinates":[[[137,36],[138,36],[138,35.33333],[137,35.33333],[137,36]]]}},{"type":"Feature","id":71,"properties":{"num.one.twenty":"91","names.one.twenty":"toyohashi"},"geometry":{"type":"Polygon","coordinates":[[[137,35.33333],[138,35.33333],[138,34.66666],[137,34.66666],[137,35.33333]]]}},{"type":"Feature","id":72,"properties":{"num.one.twenty":"92","names.one.twenty":"iragomisaki"},"geometry":{"type":"Polygon","coordinates":[[[137,34.66666],[138,34.66666],[138,34],[137,34],[137,34.66666]]]}},{"type":"Feature","id":73,"properties":{"num.one.twenty":"93","names.one.twenty":"nanao"},"geometry":{"type":"Polygon","coordinates":[[[136,37.33333],[137,37.33333],[137,36.66666],[136,36.66666],[136,37.33333]]]}},{"type":"Feature","id":74,"properties":{"num.one.twenty":"94","names.one.twenty":"kanazawa"},"geometry":{"type":"Polygon","coordinates":[[[136,36.66666],[137,36.66666],[137,36],[136,36],[136,36.66666]]]}},{"type":"Feature","id":75,"properties":{"num.one.twenty":"95","names.one.twenty":"gifu"},"geometry":{"type":"Polygon","coordinates":[[[136,36],[137,36],[137,35.33333],[136,35.33333],[136,36]]]}},{"type":"Feature","id":76,"properties":{"num.one.twenty":"96","names.one.twenty":"nagoya"},"geometry":{"type":"Polygon","coordinates":[[[136,35.33333],[137,35.33333],[137,34.66666],[136,34.66666],[136,35.33333]]]}},{"type":"Feature","id":77,"properties":{"num.one.twenty":"97","names.one.twenty":"ise"},"geometry":{"type":"Polygon","coordinates":[[[136,34.66666],[137,34.66666],[137,34],[136,34],[136,34.66666]]]}},{"type":"Feature","id":78,"properties":{"num.one.twenty":"98","names.one.twenty":"kinomoto"},"geometry":{"type":"Polygon","coordinates":[[[136,34],[137,34],[137,33.33333],[136,33.33333],[136,34]]]}},{"type":"Feature","id":79,"properties":{"num.one.twenty":"99","names.one.twenty":"miyazu"},"geometry":{"type":"Polygon","coordinates":[[[135,36],[136,36],[136,35.33333],[135,35.33333],[135,36]]]}},{"type":"Feature","id":80,"properties":{"num.one.twenty":"100","names.one.twenty":"kyotoyobiosaka"},"geometry":{"type":"Polygon","coordinates":[[[135,35.33333],[136,35.33333],[136,34.66666],[135,34.66666],[135,35.33333]]]}},{"type":"Feature","id":81,"properties":{"num.one.twenty":"101","names.one.twenty":"wakayama"},"geometry":{"type":"Polygon","coordinates":[[[135,34.66666],[136,34.66666],[136,34],[135,34],[135,34.66666]]]}},{"type":"Feature","id":82,"properties":{"num.one.twenty":"102","names.one.twenty":"tanabe"},"geometry":{"type":"Polygon","coordinates":[[[135,34],[136,34],[136,33.33333],[135,33.33333],[135,34]]]}},{"type":"Feature","id":83,"properties":{"num.one.twenty":"103","names.one.twenty":"tottori"},"geometry":{"type":"Polygon","coordinates":[[[134,36],[135,36],[135,35.33333],[134,35.33333],[134,36]]]}},{"type":"Feature","id":84,"properties":{"num.one.twenty":"104","names.one.twenty":"himeji"},"geometry":{"type":"Polygon","coordinates":[[[134,35.33333],[135,35.33333],[135,34.66666],[134,34.66666],[134,35.33333]]]}},{"type":"Feature","id":85,"properties":{"num.one.twenty":"105","names.one.twenty":"tokushima"},"geometry":{"type":"Polygon","coordinates":[[[134,34.66666],[135,34.66666],[135,34],[134,34],[134,34.66666]]]}},{"type":"Feature","id":86,"properties":{"num.one.twenty":"106","names.one.twenty":"tsurugisan"},"geometry":{"type":"Polygon","coordinates":[[[134,34],[135,34],[135,33.33333],[134,33.33333],[134,34]]]}},{"type":"Feature","id":87,"properties":{"num.one.twenty":"107","names.one.twenty":"saigo"},"geometry":{"type":"Polygon","coordinates":[[[133,36.66666],[134,36.66666],[134,36],[133,36],[133,36.66666]]]}},{"type":"Feature","id":88,"properties":{"num.one.twenty":"108","names.one.twenty":"matsue"},"geometry":{"type":"Polygon","coordinates":[[[133,36],[134,36],[134,35.33333],[133,35.33333],[133,36]]]}},{"type":"Feature","id":89,"properties":{"num.one.twenty":"109","names.one.twenty":"takahashi"},"geometry":{"type":"Polygon","coordinates":[[[133,35.33333],[134,35.33333],[134,34.66666],[133,34.66666],[133,35.33333]]]}},{"type":"Feature","id":90,"properties":{"num.one.twenty":"110","names.one.twenty":"okayamaoyobimarugame"},"geometry":{"type":"Polygon","coordinates":[[[133,34.66666],[134,34.66666],[134,34],[133,34],[133,34.66666]]]}},{"type":"Feature","id":91,"properties":{"num.one.twenty":"111","names.one.twenty":"kochi"},"geometry":{"type":"Polygon","coordinates":[[[133,34],[134,34],[134,33.33333],[133,33.33333],[133,34]]]}},{"type":"Feature","id":92,"properties":{"num.one.twenty":"112","names.one.twenty":"kubokawa"},"geometry":{"type":"Polygon","coordinates":[[[133,33.33333],[134,33.33333],[134,32.66666],[133,32.66666],[133,33.33333]]]}},{"type":"Feature","id":93,"properties":{"num.one.twenty":"113","names.one.twenty":"taisha"},"geometry":{"type":"Polygon","coordinates":[[[132,36],[133,36],[133,35.33333],[132,35.33333],[132,36]]]}},{"type":"Feature","id":94,"properties":{"num.one.twenty":"114","names.one.twenty":"hamada"},"geometry":{"type":"Polygon","coordinates":[[[132,35.33333],[133,35.33333],[133,34.66666],[132,34.66666],[132,35.33333]]]}},{"type":"Feature","id":95,"properties":{"num.one.twenty":"115","names.one.twenty":"hiroshima"},"geometry":{"type":"Polygon","coordinates":[[[132,34.66666],[133,34.66666],[133,34],[132,34],[132,34.66666]]]}},{"type":"Feature","id":96,"properties":{"num.one.twenty":"116","names.one.twenty":"matsuyama"},"geometry":{"type":"Polygon","coordinates":[[[132,34],[133,34],[133,33.33333],[132,33.33333],[132,34]]]}},{"type":"Feature","id":97,"properties":{"num.one.twenty":"117","names.one.twenty":"uwajima"},"geometry":{"type":"Polygon","coordinates":[[[132,33.33333],[133,33.33333],[133,32.66666],[132,32.66666],[132,33.33333]]]}},{"type":"Feature","id":98,"properties":{"num.one.twenty":"118","names.one.twenty":"mishima"},"geometry":{"type":"Polygon","coordinates":[[[131,35.33333],[132,35.33333],[132,34.66666],[131,34.66666],[131,35.33333]]]}},{"type":"Feature","id":99,"properties":{"num.one.twenty":"119","names.one.twenty":"yamaguchi"},"geometry":{"type":"Polygon","coordinates":[[[131,34.66666],[132,34.66666],[132,34],[131,34],[131,34.66666]]]}},{"type":"Feature","id":100,"properties":{"num.one.twenty":"120","names.one.twenty":"nakatsu"},"geometry":{"type":"Polygon","coordinates":[[[131,34],[132,34],[132,33.33333],[131,33.33333],[131,34]]]}},{"type":"Feature","id":101,"properties":{"num.one.twenty":"121","names.one.twenty":"oita"},"geometry":{"type":"Polygon","coordinates":[[[131,33.33333],[132,33.33333],[132,32.66666],[131,32.66666],[131,33.33333]]]}},{"type":"Feature","id":102,"properties":{"num.one.twenty":"122","names.one.twenty":"nobeoka"},"geometry":{"type":"Polygon","coordinates":[[[131,32.66666],[132,32.66666],[132,32],[131,32],[131,32.66666]]]}},{"type":"Feature","id":103,"properties":{"num.one.twenty":"123","names.one.twenty":"miyazaki"},"geometry":{"type":"Polygon","coordinates":[[[131,32],[132,32],[132,31.33333],[131,31.33333],[131,32]]]}},{"type":"Feature","id":104,"properties":{"num.one.twenty":"124","names.one.twenty":"kogushi"},"geometry":{"type":"Polygon","coordinates":[[[130,34.66666],[131,34.66666],[131,34],[130,34],[130,34.66666]]]}},{"type":"Feature","id":105,"properties":{"num.one.twenty":"125","names.one.twenty":"fukoka"},"geometry":{"type":"Polygon","coordinates":[[[130,34],[131,34],[131,33.33333],[130,33.33333],[130,34]]]}},{"type":"Feature","id":106,"properties":{"num.one.twenty":"126","names.one.twenty":"kumamoto"},"geometry":{"type":"Polygon","coordinates":[[[130,33.33333],[131,33.33333],[131,32.66666],[130,32.66666],[130,33.33333]]]}},{"type":"Feature","id":107,"properties":{"num.one.twenty":"127","names.one.twenty":"yatsushiro"},"geometry":{"type":"Polygon","coordinates":[[[130,32.66666],[131,32.66666],[131,32],[130,32],[130,32.66666]]]}},{"type":"Feature","id":108,"properties":{"num.one.twenty":"128","names.one.twenty":"kagoshima"},"geometry":{"type":"Polygon","coordinates":[[[130,32],[131,32],[131,31.33333],[130,31.33333],[130,32]]]}},{"type":"Feature","id":109,"properties":{"num.one.twenty":"129","names.one.twenty":"kaimondake"},"geometry":{"type":"Polygon","coordinates":[[[130,31.33333],[131,31.33333],[131,30.66666],[130,30.66666],[130,31.33333]]]}},{"type":"Feature","id":110,"properties":{"num.one.twenty":"130","names.one.twenty":"izuhara"},"geometry":{"type":"Polygon","coordinates":[[[129,34.66666],[130,34.66666],[130,34],[129,34],[129,34.66666]]]}},{"type":"Feature","id":111,"properties":{"num.one.twenty":"131","names.one.twenty":"karatsu"},"geometry":{"type":"Polygon","coordinates":[[[129,34],[130,34],[130,33.33333],[129,33.33333],[129,34]]]}},{"type":"Feature","id":112,"properties":{"num.one.twenty":"132","names.one.twenty":"nagasaki"},"geometry":{"type":"Polygon","coordinates":[[[129,33.33333],[130,33.33333],[130,32.66666],[129,32.66666],[129,33.33333]]]}},{"type":"Feature","id":113,"properties":{"num.one.twenty":"133","names.one.twenty":"nomozaki"},"geometry":{"type":"Polygon","coordinates":[[[129,32.66666],[130,32.66666],[130,32],[129,32],[129,32.66666]]]}},{"type":"Feature","id":114,"properties":{"num.one.twenty":"134","names.one.twenty":"koshikijima"},"geometry":{"type":"Polygon","coordinates":[[[129,32],[130,32],[130,31.33333],[129,31.33333],[129,32]]]}},{"type":"Feature","id":115,"properties":{"num.one.twenty":"135","names.one.twenty":"kuroshima"},"geometry":{"type":"Polygon","coordinates":[[[129,31.33333],[130,31.33333],[130,30.66666],[129,30.66666],[129,31.33333]]]}},{"type":"Feature","id":116,"properties":{"num.one.twenty":"136","names.one.twenty":"fukue"},"geometry":{"type":"Polygon","coordinates":[[[128,33.33333],[129,33.33333],[129,32.66666],[128,32.66666],[128,33.33333]]]}},{"type":"Feature","id":117,"properties":{"num.one.twenty":"137","names.one.twenty":"tomie"},"geometry":{"type":"Polygon","coordinates":[[[128,32.66666],[129,32.66666],[129,32],[128,32],[128,32.66666]]]}},{"type":"Feature","id":118,"properties":{"num.one.twenty":"141","names.one.twenty":"hachijojima"},"geometry":{"type":"Polygon","coordinates":[[[139,33.33333],[140,33.33333],[140,32.66666],[139,32.66666],[139,33.33333]]]}},{"type":"Feature","id":119,"properties":{"num.one.twenty":"153","names.one.twenty":"yakushima"},"geometry":{"type":"Polygon","coordinates":[[[130,30.66666],[131,30.66666],[131,30],[130,30],[130,30.66666]]]}},{"type":"Feature","id":120,"properties":{"num.one.twenty":"154","names.one.twenty":"nakanoshima"},"geometry":{"type":"Polygon","coordinates":[[[129,30],[130,30],[130,29.33333],[129,29.33333],[129,30]]]}},{"type":"Feature","id":121,"properties":{"num.one.twenty":"155","names.one.twenty":"takarajima"},"geometry":{"type":"Polygon","coordinates":[[[129,29.33333],[130,29.33333],[130,28.66666],[129,28.66666],[129,29.33333]]]}},{"type":"Feature","id":122,"properties":{"num.one.twenty":"156","names.one.twenty":"amamioshima"},"geometry":{"type":"Polygon","coordinates":[[[129,28.66666],[130,28.66666],[130,28],[129,28],[129,28.66666]]]}},{"type":"Feature","id":123,"properties":{"num.one.twenty":"157","names.one.twenty":"tokunoshima"},"geometry":{"type":"Polygon","coordinates":[[[128,28],[129,28],[129,27.33333],[128,27.33333],[128,28]]]}},{"type":"Feature","id":124,"properties":{"num.one.twenty":"158","names.one.twenty":"yoronjima"},"geometry":{"type":"Polygon","coordinates":[[[127.5,27.33333],[128.5,27.33333],[128.5,26.66666],[127.5,26.66666],[127.5,27.33333]]]}},{"type":"Feature","id":125,"properties":{"num.one.twenty":"161","names.one.twenty":"naha"},"geometry":{"type":"Polygon","coordinates":[[[127.5,26.66666],[128.5,26.66666],[128.5,26],[127.5,26],[127.5,26.66666]]]}},{"type":"Feature","id":126,"properties":{"num.one.twenty":"162","names.one.twenty":"kumejima"},"geometry":{"type":"Polygon","coordinates":[[[126.5,26.66666],[127.5,26.66666],[127.5,26],[126.5,26],[126.5,26.66666]]]}},{"type":"Feature","id":127,"properties":{"num.one.twenty":"163","names.one.twenty":"miyakojima"},"geometry":{"type":"Polygon","coordinates":[[[124.5,25],[125.5,25],[125.5,24.33333],[124.5,24.33333],[124.5,25]]]}},{"type":"Feature","id":128,"properties":{"num.one.twenty":"164","names.one.twenty":"otsurijima"},"geometry":{"type":"Polygon","coordinates":[[[123,26],[124,26],[124,25.33333],[123,25.33333],[123,26]]]}},{"type":"Feature","id":129,"properties":{"num.one.twenty":"166","names.one.twenty":"ishigakijima"},"geometry":{"type":"Polygon","coordinates":[[[123.5,24.66666],[124.5,24.66666],[124.5,24],[123.5,24],[123.5,24.66666]]]}},{"type":"Feature","id":130,"properties":{"num.one.twenty":"170","names.one.twenty":"ogasawarashoto"},"geometry":{"type":"Polygon","coordinates":[[[142,27.33333],[143,27.33333],[143,26.66666],[142,26.66666],[142,27.33333]]]}}]}
# create map data ---------------------------------------------------------
library(rvest)
library(dplyr)
library(tidyr)
library(Nippon)
library(rgdal)
url <- "http://www.gsi.go.jp/MAP/HISTORY/20-index20.html" %>% html()
html(url)
names.one.twenty <- vector()
num.one.twenty <- vector()
html_nodes(url, css = "map area") %>% {
names.one.twenty <<- html_attr(., "alt") %>% kana2roma(.)
num.one.twenty <<- html_attr(., "href") %>% sub(pattern = "http://www.gsi.go.jp/cgi-bin/zureki/20man.cgi\\?", replacement = "", x = .)
}
res <- data.frame(num.one.twenty, names.one.twenty) # nrow(res)
## ---- --------------------------------------------------------------------
library(geojsonio)
library(sp)
poly13 <- Polygons(
list(Polygon(cbind(
c(148.0, 148.0, 149.0, 149.0, 148.0),
c(46.0, 45.33333, 45.33333, 46.0, 46.0)))), "1")
poly14 <- Polygons(
list(Polygon(cbind(
c(148.0, 148.0, 149.0, 149.0, 148.0),
c(45.33333, 44.66666, 44.66666, 45.33333, 45.33333)))), "2")
poly15 <- Polygons(
list(Polygon(cbind(
c(147.0, 147.0, 148.0, 148.0, 147.0),
c(45.33333, 44.66666, 44.66666, 45.33333, 45.33333)))), "3")
poly16 <- Polygons(
list(Polygon(cbind(
c(147.0, 147.0, 148.0, 148.0, 147.0),
c(44.66666, 44.0, 44.0, 44.66666, 44.66666)))), "4")
poly25 <- Polygons(
list(Polygon(cbind(
c(146.0, 146.0, 147.0, 147.0, 146.0),
c(44.66666, 44.0, 44.0, 44.66666, 44.66666)))), "5")
poly26 <- Polygons(
list(Polygon(cbind(
c(146.0, 146.0, 147.0, 147.0, 146.0),
c(44.0, 43.33333, 43.33333, 44.0, 44.0)))), "6")
poly27 <- Polygons(
list(Polygon(cbind(
c(145.0, 145.0, 146.0, 146.0, 145.0),
c(44.66666, 44.0, 44.0, 44.66666, 44.66666)))), "7")
poly28 <- Polygons(
list(Polygon(cbind(
c(145.0, 145.0, 146.0, 146.0, 145.0),
c(44.0, 43.33333, 43.33333, 44.0, 44.0)))), "8")
poly29 <- Polygons(
list(Polygon(cbind(
c(145.0, 145.0, 146.0, 146.0, 145.0),
c(43.33333, 42.66666, 42.66666, 43.33333, 43.33333)))), "9")
poly30 <- Polygons(
list(Polygon(cbind(
c(144.0, 144.0, 145.0, 145.0, 144.0),
c(44.66666, 44.0, 44.0, 44.66666, 44.66666)))), "10")
poly31 <- Polygons(
list(Polygon(cbind(
c(144.0, 144.0, 145.0, 145.0, 144.0),
c(44.0, 43.33333, 43.33333, 44.0, 44.0)))), "11")
poly32 <- Polygons(
list(Polygon(cbind(
c(144.0, 144.0, 145.0, 145.0, 144.0),
c(43.33333, 42.66666, 42.66666, 43.33333, 43.33333)))), "12")
poly33 <- Polygons(
list(Polygon(cbind(
c(143.0, 143.0, 144.0, 144.0, 143.0),
c(44.66666, 44.0, 44.0, 44.66666, 44.66666)))), "13")
poly34 <- Polygons(
list(Polygon(cbind(
c(143.0, 143.0, 144.0, 144.0, 143.0),
c(44.0, 43.33333, 43.33333, 44.0, 44.0)))), "14")
poly35 <- Polygons(
list(Polygon(cbind(
c(143.0, 143.0, 144.0, 144.0, 143.0),
c(43.33333, 42.66666, 42.66666, 43.33333, 43.33333)))), "15")
poly36 <- Polygons(
list(Polygon(cbind(
c(143.0, 143.0, 144.0, 144.0, 143.0),
c(42.66666, 42.0, 42.0, 42.66666, 42.66666)))), "16")
poly37 <- Polygons(
list(Polygon(cbind(
c(142.0, 142.0, 143.0, 143.0, 142.0),
c(45.33333, 44.66666, 44.66666, 45.33333, 45.33333)))), "17")
poly38 <- Polygons(
list(Polygon(cbind(
c(142.0, 142.0, 143.0, 143.0, 142.0),
c(44.66666, 44.0, 44.0, 44.66666, 44.66666)))), "18")
poly39 <- Polygons(
list(Polygon(cbind(
c(142.0, 142.0, 143.0, 143.0, 142.0),
c(44.0, 43.33333, 43.33333, 44.0, 44.0)))), "19")
poly40 <- Polygons(
list(Polygon(cbind(
c(142.0, 142.0, 143.0, 143.0, 142.0),
c(43.33333, 42.66666, 42.66666, 43.33333, 43.33333)))), "20")
poly41 <- Polygons(
list(Polygon(cbind(
c(142.0, 142.0, 143.0, 143.0, 142.0),
c(42.66666, 42.0, 42.0, 42.66666, 42.66666)))), "21")
poly42 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(46.0, 45.33333, 45.33333, 46.0, 46.0)))), "22")
poly43 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(45.33333, 44.66666, 44.66666, 45.33333, 45.33333)))), "23")
poly44 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(44.66666, 44.0, 44.0, 44.66666, 44.66666)))), "24")
poly45 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(44.0, 43.33333, 43.33333, 44.0, 44.0)))), "25")
poly46 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(43.33333, 42.66666, 42.66666, 43.33333, 43.33333)))), "26")
poly47 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(42.66666, 42.0, 42.0, 42.66666, 42.66666)))), "27")
poly48 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(42.0, 41.33333, 41.33333, 42.0, 42.0)))), "28")
poly49 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(43.33333, 42.66666, 42.66666, 43.33333, 43.33333)))), "29")
poly50 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(42.66666, 42.0, 42.0, 42.66666, 42.66666)))), "30")
poly51 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(42.0, 41.33333, 41.33333, 42.0, 42.0)))), "31")
poly52 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(42.66666, 42.0, 42.0, 42.66666, 42.66666)))), "32")
poly53 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(42.0, 41.33333, 41.33333, 42.0, 42.0)))), "33")
poly54 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(41.33333, 40.66666, 40.66666, 41.33333, 41.33333)))), "34")
poly55 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(40.66666, 40.0, 40.0, 40.66666, 40.66666)))), "35")
poly56 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(40.0, 39.33333, 39.33333, 40.0, 40.0)))), "36")
poly57 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(39.33333, 38.66666, 38.66666, 39.33333, 39.33333)))), "37")
poly58 <- Polygons(
list(Polygon(cbind(
c(141.0, 141.0, 142.0, 142.0, 141.0),
c(38.66666, 38.0, 38.0, 38.66666, 38.66666)))), "38")
poly59 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(41.33333, 40.66666, 40.66666, 41.33333, 41.33333)))), "39")
poly60 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(40.66666, 40.0, 40.0, 40.66666, 40.66666)))), "40")
poly61 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(40.0, 39.33333, 39.33333, 40.0, 40.0)))), "41")
poly62 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(39.33333, 38.66666, 38.66666, 39.33333, 39.33333)))), "42")
poly63 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(38.66666, 38.0, 38.0, 38.66666, 38.66666)))), "43")
poly64 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(38.0, 37.33333, 37.33333, 38.0, 38.0)))), "44")
poly65 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(37.33333, 36.66666, 36.66666, 37.33333, 37.33333)))), "45")
poly66 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(36.66666, 36.0, 36.0, 36.66666, 36.66666)))), "46")
poly67 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "47")
poly68 <- Polygons(
list(Polygon(cbind(
c(140.0, 140.0, 141.0, 141.0, 140.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "48")
poly69 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(40.66666, 40.0, 40.0, 40.66666, 40.66666)))), "49")
poly70 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(40.0, 39.33333, 39.33333, 40.0, 40.0)))), "50")
poly71 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(39.33333, 38.66666, 38.66666, 39.33333, 39.33333)))), "51")
poly72 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(38.66666, 38.0, 38.0, 38.66666, 38.66666)))), "52")
poly73 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(38.0, 37.33333, 37.33333, 38.0, 38.0)))), "53")
poly74 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(37.33333, 36.66666, 36.66666, 37.33333, 37.33333)))), "54")
poly75 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(36.66666, 36.0, 36.0, 36.66666, 36.66666)))), "55")
poly76 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "56")
poly77 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "57")
poly78 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "58")
poly79 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "59")
poly80 <- Polygons(
list(Polygon(cbind(
c(138.0, 138.0, 139.0, 139.0, 138.0),
c(38.66666, 38.0, 38.0, 38.66666, 38.66666)))), "60")
poly81 <- Polygons(
list(Polygon(cbind(
c(138.0, 138.0, 139.0, 139.0, 138.0),
c(38.0, 37.33333, 37.33333, 38.0, 38.0)))), "61")
poly82 <- Polygons(
list(Polygon(cbind(
c(138.0, 138.0, 139.0, 139.0, 138.0),
c(37.33333, 36.66666, 36.66666, 37.33333, 37.33333)))), "62")
poly83 <- Polygons(
list(Polygon(cbind(
c(138.0, 138.0, 139.0, 139.0, 138.0),
c(36.66666, 36.0, 36.0, 36.66666, 36.66666)))), "63")
poly84 <- Polygons(
list(Polygon(cbind(
c(138.0, 138.0, 139.0, 139.0, 138.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "64")
poly85 <- Polygons(
list(Polygon(cbind(
c(138.0, 138.0, 139.0, 139.0, 138.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "65")
poly86 <- Polygons(
list(Polygon(cbind(
c(138.0, 138.0, 139.0, 139.0, 138.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "66")
####
poly87 <- Polygons(
list(Polygon(cbind(
c(136.5, 136.5, 137.5, 137.5, 136.5),
c(38.0, 37.33333, 37.33333, 38.0, 38.0)))), "67") #####
poly88 <- Polygons(
list(Polygon(cbind(
c(137.0, 137.0, 138.0, 138.0, 137.0),
c(37.33333, 36.66666, 36.66666, 37.33333, 37.33333)))), "68")
poly89 <- Polygons(
list(Polygon(cbind(
c(137.0, 137.0, 138.0, 138.0, 137.0),
c(36.66666, 36.0, 36.0, 36.66666, 36.66666)))), "69")
poly90 <- Polygons(
list(Polygon(cbind(
c(137.0, 137.0, 138.0, 138.0, 137.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "70")
poly91 <- Polygons(
list(Polygon(cbind(
c(137.0, 137.0, 138.0, 138.0, 137.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "71")
poly92 <- Polygons(
list(Polygon(cbind(
c(137.0, 137.0, 138.0, 138.0, 137.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "72")
poly93 <- Polygons(
list(Polygon(cbind(
c(136.0, 136.0, 137.0, 137.0, 136.0),
c(37.33333, 36.66666, 36.66666, 37.33333, 37.33333)))), "73")
poly94 <- Polygons(
list(Polygon(cbind(
c(136.0, 136.0, 137.0, 137.0, 136.0),
c(36.66666, 36.0, 36.0, 36.66666, 36.66666)))), "74")
poly95 <- Polygons(
list(Polygon(cbind(
c(136.0, 136.0, 137.0, 137.0, 136.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "75")
poly96 <- Polygons(
list(Polygon(cbind(
c(136.0, 136.0, 137.0, 137.0, 136.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "76")
poly97 <- Polygons(
list(Polygon(cbind(
c(136.0, 136.0, 137.0, 137.0, 136.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "77")
poly98 <- Polygons(
list(Polygon(cbind(
c(136.0, 136.0, 137.0, 137.0, 136.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "78")
poly99 <- Polygons(
list(Polygon(cbind(
c(135.0, 135.0, 136.0, 136.0, 135.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "79")
poly100 <- Polygons(
list(Polygon(cbind(
c(135.0, 135.0, 136.0, 136.0, 135.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "80")
poly101 <- Polygons(
list(Polygon(cbind(
c(135.0, 135.0, 136.0, 136.0, 135.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "81")
poly102 <- Polygons(
list(Polygon(cbind(
c(135.0, 135.0, 136.0, 136.0, 135.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "82")
poly103 <- Polygons(
list(Polygon(cbind(
c(134.0, 134.0, 135.0, 135.0, 134.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "83")
poly104 <- Polygons(
list(Polygon(cbind(
c(134.0, 134.0, 135.0, 135.0, 134.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "84")
poly105 <- Polygons(
list(Polygon(cbind(
c(134.0, 134.0, 135.0, 135.0, 134.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "85")
poly106 <- Polygons(
list(Polygon(cbind(
c(134.0, 134.0, 135.0, 135.0, 134.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "86")
poly107 <- Polygons(
list(Polygon(cbind(
c(133.0, 133.0, 134.0, 134.0, 133.0),
c(36.66666, 36.0, 36.0, 36.66666, 36.66666)))), "87")
poly108 <- Polygons(
list(Polygon(cbind(
c(133.0, 133.0, 134.0, 134.0, 133.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "88")
poly109 <- Polygons(
list(Polygon(cbind(
c(133.0, 133.0, 134.0, 134.0, 133.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "89")
poly110 <- Polygons(
list(Polygon(cbind(
c(133.0, 133.0, 134.0, 134.0, 133.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "90")
poly111 <- Polygons(
list(Polygon(cbind(
c(133.0, 133.0, 134.0, 134.0, 133.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "91")
poly112 <- Polygons(
list(Polygon(cbind(
c(133.0, 133.0, 134.0, 134.0, 133.0),
c(33.33333, 32.66666, 32.66666, 33.33333, 33.33333)))), "92")
poly113 <- Polygons(
list(Polygon(cbind(
c(132.0, 132.0, 133.0, 133.0, 132.0),
c(36.0, 35.33333, 35.33333, 36.0, 36.0)))), "93")
poly114 <- Polygons(
list(Polygon(cbind(
c(132.0, 132.0, 133.0, 133.0, 132.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "94")
poly115 <- Polygons(
list(Polygon(cbind(
c(132.0, 132.0, 133.0, 133.0, 132.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "95")
poly116 <- Polygons(
list(Polygon(cbind(
c(132.0, 132.0, 133.0, 133.0, 132.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "96")
poly117 <- Polygons(
list(Polygon(cbind(
c(132.0, 132.0, 133.0, 133.0, 132.0),
c(33.33333, 32.66666, 32.66666, 33.33333, 33.33333)))), "97")
poly118 <- Polygons(
list(Polygon(cbind(
c(131.0, 131.0, 132.0, 132.0, 131.0),
c(35.33333, 34.66666, 34.66666, 35.33333, 35.33333)))), "98")
poly119 <- Polygons(
list(Polygon(cbind(
c(131.0, 131.0, 132.0, 132.0, 131.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "99")
poly120 <- Polygons(
list(Polygon(cbind(
c(131.0, 131.0, 132.0, 132.0, 131.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "100")
poly121 <- Polygons(
list(Polygon(cbind(
c(131.0, 131.0, 132.0, 132.0, 131.0),
c(33.33333, 32.66666, 32.66666, 33.33333, 33.33333)))), "101")
poly122 <- Polygons(
list(Polygon(cbind(
c(131.0, 131.0, 132.0, 132.0, 131.0),
c(32.66666, 32.0, 32.0, 32.66666, 32.66666)))), "102")
poly123 <- Polygons(
list(Polygon(cbind(
c(131.0, 131.0, 132.0, 132.0, 131.0),
c(32.0, 31.33333, 31.33333, 32.0, 32.0)))), "103")
poly124 <- Polygons(
list(Polygon(cbind(
c(130.0, 130.0, 131.0, 131.0, 130.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "104")
poly125 <- Polygons(
list(Polygon(cbind(
c(130.0, 130.0, 131.0, 131.0, 130.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "105")
poly126 <- Polygons(
list(Polygon(cbind(
c(130.0, 130.0, 131.0, 131.0, 130.0),
c(33.33333, 32.66666, 32.66666, 33.33333, 33.33333)))), "106")
poly127 <- Polygons(
list(Polygon(cbind(
c(130.0, 130.0, 131.0, 131.0, 130.0),
c(32.66666, 32.0, 32.0, 32.66666, 32.66666)))), "107")
poly128 <- Polygons(
list(Polygon(cbind(
c(130.0, 130.0, 131.0, 131.0, 130.0),
c(32.0, 31.33333, 31.33333, 32.0, 32.0)))), "108")
poly129 <- Polygons(
list(Polygon(cbind(
c(130.0, 130.0, 131.0, 131.0, 130.0),
c(31.33333, 30.66666, 30.66666, 31.33333, 31.33333)))), "109")
poly130 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(34.66666, 34.0, 34.0, 34.66666, 34.66666)))), "110")
poly131 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(34.0, 33.33333, 33.33333, 34.0, 34.0)))), "111")
poly132 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(33.33333, 32.66666, 32.66666, 33.33333, 33.33333)))), "112")
poly133 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(32.66666, 32.0, 32.0, 32.66666, 32.66666)))), "113")
poly134 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(32.0, 31.33333, 31.33333, 32.0, 32.0)))), "114")
poly135 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(31.33333, 30.66666, 30.66666, 31.33333, 31.33333)))), "115")
poly136 <- Polygons(
list(Polygon(cbind(
c(128.0, 128.0, 129.0, 129.0, 128.0),
c(33.33333, 32.66666, 32.66666, 33.33333, 33.33333)))), "116")
poly137 <- Polygons(
list(Polygon(cbind(
c(128.0, 128.0, 129.0, 129.0, 128.0),
c(32.66666, 32.0, 32.0, 32.66666, 32.66666)))), "117")
poly141 <- Polygons(
list(Polygon(cbind(
c(139.0, 139.0, 140.0, 140.0, 139.0),
c(33.33333, 32.66666, 32.66666, 33.33333, 33.33333)))), "118")
poly153 <- Polygons(
list(Polygon(cbind(
c(130.0, 130.0, 131.0, 131.0, 130.0),
c(30.66666, 30.0, 30.0, 30.66666, 30.66666)))), "119")
poly154 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(30.0, 29.33333, 29.33333, 30.0, 30.0)))), "120")
poly155 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(29.33333, 28.66666, 28.66666, 29.33333, 29.33333)))), "121")
poly156 <- Polygons(
list(Polygon(cbind(
c(129.0, 129.0, 130.0, 130.0, 129.0),
c(28.66666, 28.0, 28.0, 28.66666, 28.66666)))), "122")
poly157 <- Polygons(
list(Polygon(cbind(
c(128.0, 128.0, 129.0, 129.0, 128.0),
c(28.0, 27.33333, 27.33333, 28.0, 28.0)))), "123")
poly158 <- Polygons(
list(Polygon(cbind(
c(127.5, 127.5, 128.5, 128.5, 127.5),
c(27.33333, 26.66666, 26.66666, 27.33333, 27.33333)))), "124")
poly161 <- Polygons(
list(Polygon(cbind(
c(127.5, 127.5, 128.5, 128.5, 127.5),
c(26.66666, 26.0, 26.0, 26.66666, 26.66666)))), "125")
poly162 <- Polygons(
list(Polygon(cbind(
c(126.5, 126.5, 127.5, 127.5, 126.5),
c(26.66666, 26.0, 26.0, 26.66666, 26.66666)))), "126")
poly163 <- Polygons(
list(Polygon(cbind(
c(124.5, 124.5, 125.5, 125.5, 124.5),
c(25.0, 24.33333, 24.33333, 25.0, 25.0)))), "127")
poly164 <- Polygons(
list(Polygon(cbind(
c(123.0, 123.0, 124.0, 124.0, 123.0),
c(26.0, 25.33333, 25.33333, 26.0, 26.0)))), "128")
poly166 <- Polygons(
list(Polygon(cbind(
c(123.5, 123.5, 124.5, 124.5, 123.5),
c(24.66666, 24.0, 24.0, 24.66666, 24.66666)))), "129")
poly170 <- Polygons(
list(Polygon(cbind(
c(142.0, 142.0, 143.0, 143.0, 142.0),
c(27.33333, 26.66666, 26.66666, 27.33333, 27.33333)))), "130")
tmp <- SpatialPolygons(Srl = list(poly13, poly14, poly15, poly16,
poly25, poly26, poly27, poly28, poly29,
poly30, poly31, poly32,
poly33, poly34, poly35, poly36,
poly37, poly38, poly39, poly40, poly41,
poly42, poly43, poly44, poly45, poly46, poly47, poly48,
poly49, poly50, poly51,
poly52, poly53,
poly54, poly55, poly56, poly57, poly58,
poly59, poly60, poly61, poly62, poly63, poly64, poly65, poly66, poly67, poly68,
poly69, poly70, poly71, poly72, poly73, poly74, poly75, poly76, poly77, poly78, poly79,
poly80, poly81, poly82, poly83, poly84, poly85, poly86,
poly87, poly88, poly89, poly90, poly91, poly92,
poly93, poly94, poly95, poly96, poly97, poly98,
poly99, poly100, poly101, poly102,
poly103, poly104, poly105, poly106,
poly107, poly108, poly109, poly110, poly111, poly112,
poly113, poly114, poly115, poly116, poly117,
poly118, poly119, poly120, poly121, poly122, poly123,
poly124, poly125, poly126, poly127, poly128, poly129,
poly130, poly131, poly132, poly133, poly134, poly135,
poly136, poly137,
poly141,
poly153, poly154, poly155, poly156, poly157, poly158, poly161, poly162,
poly163, poly164, poly166,
poly170),
pO = 1:130)
SpatialPolygonsDataFrame(tmp, res[1:130, ]) %>% geojson_json(., geometry = "polygon")
# copy then paste to gist
# SpatialPolygonsDataFrame(tmp, res[1:130, ]) %>% geojson_json(.) %>% readOGR(., "OGRGeoJSON") %>% plot(.)
# make mapping data ------------------------------------------------------------
set.seed(100)
res$dummy.data <- rgamma(nrow(res), shape = 5, scale = 20)
jp.map.data <- SpatialPolygonsDataFrame(tmp, res[1:130, ]) %>% geojson_json(.) %>% readOGR(., "OGRGeoJSON")
## ---- plot --------------------------------------------------------------------
library(rgdal)
library(ggplot2)
library(rgeos)
# use abobe map data from: https://gist.github.com/uribo/b09d642351c03dd975aa
url <- "https://gist.githubusercontent.com/uribo/b09d642351c03dd975aa/raw/96b36aee705814b6cf651dcf3a566be0b0f74803/japan_one_twenty_map.topojson"
readOGR(url, "OGRGeoJSON") %>% plot(.)
# ogrInfo(url, "OGRGeoJSON")
# labeling data with ggplot2 ---------------------------------------------------
jp.map <- readOGR(url, "OGRGeoJSON") %>% fortify(., region = "names.one.twenty")
centers <- readOGR(url, "OGRGeoJSON") %>%
gCentroid(., byid = TRUE) %>%
data.frame(., id = jp.map.data@data$names.one.twenty) %>%
cbind.data.frame()
ggplot() +
geom_map(data = jp.map, map = jp.map,
aes(x = long, y = lat, map_id = id),
color = "white", size = 0.5) +
geom_map(data = jp.map.data@data, map = jp.map,
aes(fill = dummy.data, map_id = names.one.twenty)) +
geom_map(data = jp.map.data@data, map = jp.map,
aes(map_id = names.one.twenty),
fill = "#ffffff", alpha = 0, color = "white",
show_guide = FALSE) +
scale_fill_distiller(palette = "RdPu", na.value = "#7f7f7f") +
geom_text(data = centers,
aes(label = id, x = x, y = y), color = "white", size = 2) +
coord_map() +
labs(x = NULL, y = NULL) +
theme_bw() +
theme(panel.border = element_blank())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment