Análisis de los números de la Maratón de Chicago del 2015
La Maratón de Chicago del 11 de octubre de 2015 contó con 45.000 corredores. Más de 37.000 completaron la carrera, y los detalles del rendimiento de cada corredor fueron registrados cuidadosamente. Explore y visualice las características de los corredores y su rendimiento usando un almacén de entidades personalizado que contenga estos datos.
Cargue un almacén de entidades de la maratón desde un ResourceObject.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_180.png)
marathonEntityStore = ResourceData[
ResourceObject[
Association[
"Name" -> "2015 Chicago Marathon Data",
"UUID" -> "7dc77972-cfc3-48dc-8d08-0292c6d2a929",
"ResourceType" -> "DataResource", "Version" -> "1.0.0",
"Description" -> "2015 Chicago Marathon participant data",
"ContentSize" -> Quantity[1990.2215919999999`, "Megabytes"],
"ContentElements" -> {"Content"}]]]
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_129.png)
Registre el almacén para esta sesión.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_181.png)
PrependTo[$EntityStores, marathonEntityStore];
Extraiga el número total de corredores y, usando una clase de entidades implícitamente definida, extraiga el número de participantes femeninos y masculinos.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_182.png)
EntityValue["ChicagoMarathon2015", "EntityCount"]
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_130.png)
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_183.png)
Table[EntityValue[
EntityClass["ChicagoMarathon2015", "Gender" -> gender],
"EntityCount"], {gender, {Entity["Gender", "Male"],
Entity["Gender", "Female"]}}]
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_131.png)
Seleccione cinco corredores al azar.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_184.png)
RandomEntity["ChicagoMarathon2015", 5]
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_132.png)
Vea las propiedades almacenadas de un corredor en particular.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_185.png)
Entity["ChicagoMarathon2015", "Runner145"]["PropertyAssociation"]
Extraiga la contabilidad de las nacionalidades de los corredores y cree una tabla con las nacionalidades más comunes.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_186.png)
nationalityTallies =
Reverse[SortBy[
Tally[EntityValue["ChicagoMarathon2015",
EntityProperty["ChicagoMarathon2015", "Country"]]], Last]];
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_134.png)
Visualice las rutas geodésicas de todos los países de origen hasta Chicago.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_188.png)
With[{chicago =
Entity["City", {"Chicago", "Illinois", "UnitedStates"}]},
GeoGraphics[{Darker[Green],
GeoPath[{chicago, #} & /@ nationalityTallies[[All, 1]],
"Geodesic"]},
GeoRange -> "World",
GeoProjection -> "Robinson",
GeoCenter -> chicago]]
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_135.png)
Construya un mapa de calor de los EE.UU. que muestre las ubicaciones de los participantes estadounidenses.
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_136.png)
Encuentre los números de los corredores por la variación de la media de división.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_193.png)
allkm = Table[
Normal[allTimeSplits[[i]][2 ;;, "Time"]], {i,
Length[allTimeSplits]}];
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_194.png)
allsplitbins = DeleteMissing[Transpose[allkm], 2];
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_195.png)
meanall = Table[N[Mean[allsplitbins[[i]]]], {i, Length[allsplitbins]}]
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_137.png)
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_196.png)
marathondistances = (allTimeSplits[[1]])[All, "Split"] // Normal
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_138.png)
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_197.png)
differencesall = Table[{marathondistances[[i + 1]],
allsplitbins[[i]] - meanall[[i]]},
{i, Length[allsplitbins]}];
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_198.png)
allHistograms =
Histogram[#2, {60}, PlotLabel -> NumberForm[#1, {3, 1}]] & @@@
differencesall;
Genere histogramas para cada división.
![Click for copyable input](assets.es/running-the-numbers-on-the-2015-chicago-marathon/In_199.png)
Grid[Partition[allHistograms, UpTo[3]]]
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_139.png)
Grafique una distribución de núcleo alisada de las diferencias entre las divisiones de los corredores y las medias.
![](assets.es/running-the-numbers-on-the-2015-chicago-marathon/O_140.png)