2

How to make a list of all dog breeds with pictures and names

like this

enter image description here

I tried:

EntityValue[
Take[EntityList[EntityClass["DogBreed", All]], 3], "Image"]

but there is an error message

enter image description here

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
vito
  • 8,958
  • 1
  • 25
  • 67
  • The error is saying that the network call to Wolfram's servers timed-out. Check your internet connection and try again. – Edmund Apr 13 '16 at 17:11
  • @Edmund I checked, there is no problem about internet connection – vito Apr 13 '16 at 17:25
  • The code works for me in version 10.3 of Mma. It is a network error. Have you tried again since? If so and it still is not working then perhaps someone else will have an idea. – Edmund Apr 13 '16 at 18:13

1 Answers1

3
$Version

(*  "10.4.0 for Mac OS X x86 (64-bit) (February 26, 2016)"  *)

Grid[
 Partition[
  Column[#, Alignment -> Center, Frame -> All] & /@
   EntityValue[
    Take[
     EntityList[EntityClass["DogBreed", All]],
     9],
    {"Name", "Image"}],
  3],
 Alignment -> Top]

enter image description here

EDIT: To show all, pull a "page" at a time.

imagesPerPage = 15;

total = EntityList[EntityClass["DogBreed", All]] // Length

(*  376  *)

pages = Ceiling[total/imagesPerPage]

(*  26  *)

Table[
  Grid[
   Partition[
    Column[#, Alignment -> Center, Frame -> All] & /@
     EntityValue[
      Take[
       EntityList[EntityClass["DogBreed", All]],
       (n - 1)*imagesPerPage + 1 ;; Min[n*imagesPerPage, total]],
      {"Name", "Image"}],
    3, 3, {1, 1}, ""],
   Alignment -> Top],
  {n, pages}] // Column
Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198