-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* World's Fair data * Accept submission --------- Co-authored-by: jonthegeek <[email protected]>
- Loading branch information
1 parent
70858ad
commit c179ea0
Showing
7 changed files
with
206 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
title: World's Fairs | ||
article: | ||
title: World's fair (Wikipedia) | ||
url: https://en.wikipedia.org/wiki/World%27s_fair | ||
data_source: | ||
title: List of world expositions (Wikipedia) | ||
url: https://en.wikipedia.org/wiki/List_of_world_expositions | ||
images: | ||
- file: seattle_stamp.png | ||
alt: A United States postage stamp commemorating the Seattle World's Fair in 1962. The stamp has a face value of 4 cents. The stamp depicts the Space Needle, with a monorail train swooping out of the structure and seeming to run off of the stamp. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# World's Fairs | ||
|
||
We're in Seattle this week for [posit::conf](https://posit.co/conference/), so we're exploring [World's Fairs](https://en.wikipedia.org/wiki/World%27s_fair)! | ||
|
||
> A world's fair, also known as a universal exhibition or an expo, is a large global exhibition designed to showcase the achievements of nations. These exhibitions vary in character and are held in different parts of the world at a specific site for a period of time, typically between three and six months. | ||
The data was scraped from [Wikipedia's list of world expositions](https://en.wikipedia.org/wiki/List_of_world_expositions). | ||
|
||
Does the length of a Fair depend on the month in which the fair begins? | ||
How has the cost per month changed over time? | ||
How about the cost per visitor? | ||
|
||
## The Data | ||
|
||
```r | ||
# Option 1: tidytuesdayR package | ||
## install.packages("tidytuesdayR") | ||
|
||
tuesdata <- tidytuesdayR::tt_load('2024-08-13') | ||
## OR | ||
tuesdata <- tidytuesdayR::tt_load(2024, week = 33) | ||
|
||
worlds_fairs <- tuesdata$worlds_fairs | ||
|
||
# Option 2: Read directly from GitHub | ||
|
||
worlds_fairs <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-08-13/worlds_fairs.csv') | ||
``` | ||
|
||
## How to Participate | ||
|
||
- [Explore the data](https://r4ds.hadley.nz/), watching out for interesting relationships. We would like to emphasize that you should not draw conclusions about **causation** in the data. There are various moderating variables that affect all data, many of which might not have been captured in these datasets. As such, our suggestion is to use the data provided to practice your data tidying and plotting techniques, and to consider for yourself what nuances might underlie these relationships. | ||
- Create a visualization, a model, a [shiny app](https://shiny.posit.co/), or some other piece of data-science-related output, using R or another programming language. | ||
- [Share your output and the code used to generate it](../../../sharing.md) on social media with the #TidyTuesday hashtag. | ||
|
||
### Data Dictionary | ||
|
||
# `worlds_fairs.csv` | ||
|
||
|variable |class |description | | ||
|:-------------------|:---------|:-------------------| | ||
|start_month |integer |Month in which the fair began | | ||
|start_year |integer |Year in which the fair began | | ||
|end_month |integer |Month in which the fair ended | | ||
|end_year |integer |Year in which the fair ended | | ||
|name_of_exposition |character |Name used to describe the fair | | ||
|country |character |Country in which the fair was held | | ||
|city |character |City in which the fair was held | | ||
|category |character |Whether the fair was a "World Expo" ("Bureau International des Expositions (BIE)-registered exhibitions that take place every five years and last up to 6 months; All exhibitions in this category which took place before 1928 were subsequently recognized by the BIE") or a "Specialised Expo" ("BIE-International Recognised exhibitions that take place between two World Expos and last up to 3 months; This definition was adopted after 1988; prior to that, some longer running ones, including 1988 Brisbane, were classified as Specialised Expos")| | ||
|theme |character |The stated theme of the fair | | ||
|notables |character |Notable buildings, inventions, or events at the fair | | ||
|visitors |double |Number of visitors in millions | | ||
|cost |double |Cost in millions of USD (or millions of another currency, as noted in exceptions); exceptions: Brussels International Exposition (1935) and Brussels World's Fair (1958) are in BEF, Paris International Exposition (1937) is in FRF, Expo '67 (1967) is in CAD, Expo '86 (1986) is listed as having a "311 CAD deficit", Expo '88 (1988) is in AUD, Expo 2000 (2000) is in DEM | | ||
|area |double |Area of the fair in hectares | | ||
|attending_countries |integer |Number of countries which officially attended | | ||
|
||
### Cleaning Script | ||
|
||
```r | ||
library(tidyverse) | ||
library(rvest) | ||
library(polite) | ||
library(janitor) | ||
|
||
session <- polite::bow( | ||
"https://en.wikipedia.org/wiki/List_of_world_expositions", | ||
user_agent = "TidyTuesday (https://tidytues.day, [email protected])", | ||
delay = 0 | ||
) | ||
|
||
worlds_fair_tables <- | ||
session |> | ||
polite::scrape() |> | ||
rvest::html_table() | ||
|
||
worlds_fairs <- | ||
worlds_fair_tables[[2]] |> | ||
janitor::clean_names() |> | ||
dplyr::rename( | ||
country = "country_2", | ||
city = "city_2", | ||
theme = "theme_3", | ||
visitors = "visitorsin_millions_4", | ||
cost = "costin_millions_usd_unless_specified", | ||
area = "area_ha", | ||
attending_countries = "attendingcountries" | ||
) |> | ||
tidyr::separate_wider_delim( | ||
"dates", | ||
" – ", | ||
names = c("start", "end") | ||
) |> | ||
tidyr::separate_wider_delim( | ||
c("start", "end"), | ||
"/", | ||
names = c("month", "year"), | ||
names_sep = "_" | ||
) |> | ||
dplyr::mutate( | ||
dplyr::across( | ||
dplyr::everything(), | ||
\(x) { | ||
stringr::str_remove_all(x, "\\[\\d+\\]") |> | ||
stringr::str_squish() | ||
} | ||
), | ||
dplyr::across( | ||
c("start_month", "start_year", "end_month", "end_year", "attending_countries"), | ||
as.integer | ||
), | ||
notables = stringr::str_replace_all(notables, "([a-z])([A-Z])", "\\1, \\2"), | ||
visitors = as.double(visitors), | ||
# One expo has two costs, we'll use the first one | ||
cost = dplyr::case_when( | ||
name_of_exposition == "Expo 2010" ~ "4200", | ||
.default = cost | ||
) |> | ||
stringr::str_remove_all("[^0-9]*") |> | ||
as.double(), | ||
area = as.double(area) | ||
) | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
start_month,start_year,end_month,end_year,name_of_exposition,country,city,category,theme,notables,visitors,cost,area,attending_countries | ||
4,1851,10,1851,The Great Exhibition,United Kingdom,London,World Expo,Industry of all Nations,The Crystal Palace,6,165,10,25 | ||
5,1855,11,1855,Exposition Universelle / Paris International,France,Paris,World Expo,"Agriculture, Industry and Arts","Palais d'Industrie, Bordeaux Wine classification",5,2,15,25 | ||
5,1862,11,1862,International Exhibition,United Kingdom,London,World Expo,Industry and Arts,,6,2,15,39 | ||
4,1867,11,1867,Exposition Universelle / Paris International,France,Paris,World Expo,"Agriculture, Industry and Arts",Champ de Mars,15,45,69,42 | ||
5,1873,10,1873,Weltausstellung 1873 Wien / Austrian International Exposition,Austria-Hungary,Vienna,World Expo,Culture and Education,Rotunde,7.25,95,233,35 | ||
5,1876,11,1876,Centennial Exposition,United States,Philadelphia,World Expo,"Arts, Manufactures and Products of the Soil and Mine","Centennial Arboretum, Telephone, Heinz Ketchup",10,8,115,35 | ||
5,1878,11,1878,Exposition Universelle / Paris International Exposition,France,Paris,World Expo,New Technologies,"Statue of Liberty, Telephone, Braille",16,11,75,36 | ||
10,1880,4,1881,Melbourne International Exhibition,Colony of Victoria,Melbourne,World Expo,"Arts, Manufacturing, Agriculture and Industrial Products of all Nations",Royal Exhibition Buildings & Carlton Gardens,1.3,16,25,33 | ||
4,1888,12,1888,Exposición Universal de Barcelona (1888),Spain,Barcelona,World Expo,Fine and Industrial Art,"Arc de Triomf, Columbus Monument",2.3,17,47,30 | ||
5,1889,10,1889,Exposition Universelle / Paris International Exposition,France,Paris,World Expo,French Revolution,"Eiffel Tower, Annie Oakley",32,3,96,35 | ||
5,1893,10,1893,World's Columbian Exposition,United States,Chicago,World Expo,Discovery of America,"Midway Plaisance, Fine Arts Building, Fluorescent lamp, Ferris wheel",27.5,27,279,19 | ||
5,1897,11,1897,Brussels International Exposition,Belgium,Brussels,World Expo,Modern Life,,7.8,NA,132,27 | ||
4,1900,11,1900,Paris International,France,Paris,World Expo,19th Century: an overview,"Motion Pictures, Escalator, Summer Olympics",50.8,1875,120,58 | ||
4,1904,12,1904,Louisiana Purchase,United States,St. Louis,World Expo,Louisiana Purchase,"Forest Park, Palace of Fine Art, Vulcan statue, In conjunction with Summer Olympics",19.69,315,515,63 | ||
4,1905,11,1905,Liège International (1905),Belgium,Liège,World Expo,Commemoration of the 75th anniversary of independence,,7,29,70,31 | ||
4,1906,11,1906,Milan International,Italy,Milan,World Expo,Transport,Electric Tramways,10,26,100,25 | ||
4,1910,11,1910,Brussels International Exhibition,Belgium,Brussels,World Expo,"Works of Art and Science, Agricultural and Industrial Products of All Nations",,13,35,90,26 | ||
4,1911,11,1911,Esposizione internazionale dell'industria e del lavoro,Italy,Turin,World Expo,Exposition of Industry and Labor,,7,NA,100,30 | ||
4,1913,11,1913,Exposition universelle et international / Ghent International Exposition,Belgium,Ghent,World Expo,"Peace, Industry and Arts",Gent-Sint-Pieters railway station,9.5,33,130,24 | ||
2,1915,12,1915,Panama–Pacific International Exposition,United States,San Francisco,World Expo,Inauguration of the Panama Canal,"Tower of Jewels, Palace of Fine Arts",19,258,254,32 | ||
5,1929,1,1930,Barcelona International Exposition,Spain,Barcelona,World Expo,"Arts, Industry and Sport","Barcelona Pavilion, Palau Nacional, Montjuïc Stadium",5.8,25,118,29 | ||
5,1933,10,1934,Century of Progress,United States,Chicago,World Expo,The interdependence among Industry and scientific research,"Sky Ride, Graf Zeppelin, Homes of Tomorrow, First MLB All Star Game",38.8,429,170,19 | ||
4,1935,11,1935,Brussels International Exposition,Belgium,Brussels,World Expo,Transports,,20,197,152,30 | ||
5,1936,6,1936,ILIS 1936,Sweden,Stockholm,Specialised Expo,Aviation,Stockholm Bromma Airport,NA,NA,0.5,8 | ||
5,1937,11,1937,Exposition Internationale des Arts et Techniques dans la Vie Moderne / Paris International Exposition,France,Paris,World Expo,Arts and Technology in modern life,Arc de Triomphe,31,1400,105,44 | ||
5,1938,5,1938,Second International Aeronautic Exhibition,Finland,Helsinki,Specialised Expo,Aerospace,Malmi Airterminal,NA,NA,0.08,25 | ||
4,1939,10,1940,New York World's Fair,United States,New York City,World Expo,Building The World of Tomorrow,"Flushing Park, Bell Labs' Voder, Magna Carta1st World Science Fiction Convention",45,500,54,NA | ||
5,1939,9,1939,Exposition internationale de l'eau (1939),Belgium,Liège,Specialised Expo,Art of Water,Albert Canal,NA,NA,50,8 | ||
7,1947,8,1947,International Exhibition on Urbanism and Housing,France,Paris,Specialised Expo,Urbanism and Housing,Immeubles d’Etat,NA,NA,6.35,14 | ||
7,1949,8,1949,Universal Sport Exhibition (1949),Sweden,Stockholm,Specialised Expo,Sport and physical culture,Pehr Henrik Ling,NA,NA,NA,37 | ||
9,1949,10,1949,The International Exhibition of Rural Habitat in Lyon,France,Lyon,Specialised Expo,Rural Habitat,Foire de Lyon,NA,NA,110,NA | ||
12,1949,6,1950,Exposition internationale du bicentenaire de Port-au-Prince,Haiti,Port-au-Prince,World Expo,The festival of Peace,Gulf of Gonâve,NA,NA,24,15 | ||
4,1951,5,1951,The International Textile Exhibition,France,Lille,Specialised Expo,Textile,Textile,1.5,NA,15,22 | ||
7,1953,10,1953,EA 53,Italy,Rome,Specialised Expo,Agriculture,"Esposizione Universale Roma, Palazzo della Civiltà Italiana",1.7,NA,12,NA | ||
9,1953,10,1953,Conquest of the Desert (exhibition),Israel,Jerusalem,Specialised Expo,Conquest of the Desert,,NA,NA,4.6,13 | ||
5,1954,10,1954,The International Exhibition of Navigation (1954),Italy,Naples,Specialised Expo,Navigation,,NA,NA,100,25 | ||
5,1955,6,1955,The International Expo of Sport (1955),Italy,Turin,Specialised Expo,Sport,,NA,NA,NA,11 | ||
6,1955,8,1955,Helsingborg Exhibition 1955,Sweden,Helsingborg,Specialised Expo,Modern Man in the Environment,,NA,NA,NA,10 | ||
5,1956,6,1956,Exhibition of Citriculture,Israel,Beit Dagan,Specialised Expo,Citrus,,NA,NA,55,NA | ||
7,1957,9,1957,Interbau,West Germany,West Berlin,Specialised Expo,Reconstruction of Hansa District,Hansaviertel,1,NA,53,13 | ||
7,1958,9,1958,Brussels World's Fair,Belgium,Brussels,World Expo,A World View: A New Humanism,"Heysel, Atomium",41,2500,200,42 | ||
5,1961,10,1961,Expo 61,Italy,Turin,Specialised Expo,Celebration of centennial of Italian unity,Palazzo del Lavoro,5,NA,50,19 | ||
4,1962,10,1962,Century 21 Exposition,United States,Seattle,World Expo,Man in the Space Age,"Seattle Center, Space Needle, Seattle Monorail",9.6,47,30,24 | ||
6,1965,10,1965,IVA 65,West Germany,Munich,Specialised Expo,Transport,E03,3.2,NA,50.2,36 | ||
4,1967,10,1967,Expo '67,Canada,Montreal,World Expo,Man and His World,"Canadian Centennial, IMAXMontreal Metro, Habitat '67Montreal Biosphère",50.3,431,365,62 | ||
4,1968,10,1968,HemisFair '68,United States,San Antonio,Specialised Expo,Confluence of Civilizations in the Americas,"Tower of the Americas, Institute of Texan Cultures, Hemis, Fair Arena",6.4,156,37.64,23 | ||
3,1970,9,1970,Expo '70,Japan,Osaka,World Expo,Progress and Harmony for Mankind,"Tower of the Sun, Moon rock, Electric Cars",64.2,30,329.82,75 | ||
8,1971,9,1971,Expo 71,Hungary,Budapest,Specialised Expo,The Hunt through the World,International Council for Game and Wildlife Conservation (CIC),1.9,NA,35,52 | ||
5,1974,11,1974,Expo '74,United States,Spokane,Specialised Expo,Celebrating Tomorrow's Fresh New Environment,IMAX,5.6,784,41,10 | ||
7,1975,1,1976,Expo '75,Japan,Okinawa,Specialised Expo,The Sea We would like to See,Okinawa Churaumi Aquarium,3.48,NA,100,35 | ||
6,1981,7,1981,Expo 81,Bulgaria,Plovdiv,Specialised Expo,Hunting,International Fair Plovdiv,NA,NA,NA,NA | ||
5,1982,10,1982,1982 World's Fair,United States,Knoxville,Specialised Expo,Energy Turns the World,Sunsphere,11,42,30,16 | ||
5,1984,11,1984,1984 World's Fair,United States,New Orleans,Specialised Expo,The World of Rivers– Fresh Water as a source of life,Convention Center,7.35,350,33.99,15 | ||
3,1985,9,1985,"Expo 85 (Tsukuba, Japan)",Japan,Tsukuba,Specialised Expo,Dwellings and Surroundings – Science and Technology for Man at Home,HSSTJumbotron,20.3,NA,100,48 | ||
11,1985,11,1985,"Expo 85 (Plovdiv, Bulgaria)",Bulgaria,Plovdiv,Specialised Expo,Inventions,International Fair Plovdiv,1,NA,5.8,73 | ||
5,1986,10,1986,Expo '86,Canada,Vancouver,Specialised Expo,Transportation and Communication: World in Motion - World in Touch,"Science World, Skytrain, BC Place, Canada Place",22.11,311,70,55 | ||
4,1988,10,1988,Expo '88,Australia,Brisbane,Specialised Expo,Leisure in the Age of Technology,"Sunsails, Nepal Peace Pagoda, Skyneedle",18.5,625,40,36 | ||
6,1991,7,1991,Expo 91,Bulgaria,Plovdiv,Specialised Expo,The activity of young people in the service of a World of Peace,World Intellectual Property Organization,NA,NA,NA,8 | ||
4,1992,10,1992,Expo '92,Spain,Seville,World Expo,The Era of Discovery,Puente del Alamillo,41.8,NA,215,108 | ||
5,1992,8,1992,Expo Colombo '92,Italy,Genoa,Specialised Expo,"Christopher Columbus, The Ship and the Sea",Aquarium of Genoa,0.8,NA,6,54 | ||
8,1993,11,1993,Expo '93,South Korea,Daejeon,Specialised Expo,The Challenge of a New Road of Development,"Expo Science Park, Daejeon Museum of Art",14.5,NA,90.1,141 | ||
5,1998,9,1998,Expo '98,Portugal,Lisbon,Specialised Expo,The Oceans: A Heritage for the Future,"Pavilhão Atlântico, Lisbon Oceanarium, Pavilion of Portugal",10.1,NA,50,143 | ||
6,2000,10,2000,Expo 2000,Germany,Hanover,World Expo,"Man, Nature, Technology",Hannover Principles,18.1,3400,160,155 | ||
3,2005,9,2005,Expo 2005,Japan,Aichi,World Expo,Nature's Wisdom,"Satsuki and Mei's House, ASIMOThe Frozen Mammoth",22.04,NA,173,121 | ||
6,2008,9,2008,Expo 2008,Spain,Zaragoza,Specialised Expo,Water and Sustainable development,"Bridge Pavilion, Water Tower",5.65,NA,25,108 | ||
5,2010,10,2010,Expo 2010,People's Republic of China,Shanghai,World Expo,"Better City, Better Life","Expo Axis, Oriental Crown (Currently China Art Museum, Shanghai)",73.08,4200,523,192 | ||
5,2012,8,2012,Expo 2012,South Korea,Yeosu,Specialised Expo,The Living Ocean and Coast,The Big-OThe Sky Tower,8.2,1769,25,103 | ||
5,2015,10,2015,Expo 2015,Italy,Milan,World Expo,"Feeding the planet, Energy for life",The Tree of Life,21.5,NA,110,145 | ||
6,2017,9,2017,Expo 2017,Kazakhstan,Astana,Specialised Expo,Future Energy,The Nur Alem Sphere,4.1,NA,25,115 | ||
10,2021,3,2022,Expo 2020,United Arab Emirates,Dubai,World Expo,"Connecting Minds, Creating the Future",Al Wasl Plaza,24.103,NA,438,192 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters