A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/RamiKrispin/sfo/commit/main below:

Merge pull request #6 from RamiKrispin/data-refresh-03/22 · RamiKrispin/sfo@10dd11a · GitHub

@@ -39,12 +39,10 @@ orca(p, "man/figures/total.svg")

39 39 40 40

<!-- badges: start -->

41 41 42 -

[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/sfo)](https://cran.r-project.org/package=sfo) [![lifecycle](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![GitHub commit](https://img.shields.io/github/last-commit/RamiKrispin/sfo)](https://github.com/RamiKrispin/sfo/commit/main)

42 +

[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/sfo)](https://cran.r-project.org/package=sfo) [![lifecycle](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/mit/) [![GitHub commit](https://img.shields.io/github/last-commit/RamiKrispin/sfo)](https://github.com/RamiKrispin/sfo/commit/main)

43 43 44 44

<!-- badges: end -->

45 - 46 -

The **sfo** package provides summary statistics of the monthly passengers and landing in San Francisco International Airport (SFO) between 2005 and 2020.

47 - 45 +

The **sfo** package summarizes the monthly air passengers and landings at San Francisco International Airport (SFO) between 2005 and 2022.

48 46

Data source: San Francisco data portal - [DataSF API](https://datasf.org/opendata/)

49 47 50 48

<img src="man/figures/total.svg" width="90%"/>

@@ -69,13 +67,13 @@ devtools::install_github("RamiKrispin/sfo", ref = "main")

69 67

The **sfo** package provides the following two datasets:

70 68 71 69

* `sfo_passengers` - air traffic passengers statistics

72 -

* `sfo_stats` - air traffic landing statistics

70 +

* `sfo_stats` - air traffic landings statistics

73 71 74 -

More information about the datasets available on the following [vignette](https://ramikrispin.github.io/sfo/articles/v1_intro.html).

72 +

More information about the datasets is available in the following [vignette](https://ramikrispin.github.io/sfo/articles/v1_intro.html).

75 73 76 74

### Examples

77 75 78 -

The `sfo_passengers` dataset provides a monthly summary of the number of passengers in SFO airport by different categories (such as terminal, geo, type, etc.):

76 +

The `sfo_passengers` dataset provides monthly summary of the number of passengers in SFO airport by different categories (such as terminal, geo, type, etc.):

79 77 80 78

```{r }

81 79

library(sfo)

@@ -85,7 +83,7 @@ data("sfo_passengers")

85 83

head(sfo_passengers)

86 84

```

87 85 88 -

The `sfo_stats` dataset provides a monthly statistics on the air traffic landing at SFO airport:

86 +

The `sfo_stats` dataset provides monthly statistics on the air traffic landing at SFO airport:

89 87 90 88

```{r }

91 89

data("sfo_stats")

@@ -107,7 +105,7 @@ sfo_passengers %>%

107 105

```

108 106 109 107 110 -

The `sankey_ly` function enables us to plot the distribution of a numeric variable by multiple categorical variables. The following example shows the distribution of the total United Airlines passengers during 2019 by terminal, travel type (domestic and international), geo, and travel direction (deplaned, enplaned, and transit):

108 +

The `sankey_ly` function enables us to plot the distribution of a numeric variable by multiple categorical variables. The following example shows the distribution of the total United Airlines passengers during 2019 by a terminal, travel type (domestic and international), geo, and travel direction (deplaned, enplaned, and transit):

111 109 112 110

``` r

113 111

sfo_passengers %>%

@@ -140,11 +138,11 @@ orca(p, "man/figures/sankey.svg")

140 138 141 139

#### Total number of landing

142 140 143 -

The total number of landing in most recent month by `activity_type_code` and `aircraft_manufacturer`:

141 +

The total number of landings during the most recent month by `activity_type_code` and `aircraft_manufacturer`:

144 142 145 143

``` r

146 144

sfo_stats %>%

147 -

filter(activity_period == max(activity_period),

145 +

filter(activity_period == 202212,

148 146

aircraft_manufacturer != "") %>%

149 147

group_by(aircraft_manufacturer) %>%

150 148

summarise(total_landing = sum(landing_count),

@@ -153,13 +151,13 @@ sfo_stats %>%

153 151

plot_ly(labels = ~ aircraft_manufacturer,

154 152

values = ~ total_landing) %>%

155 153

add_pie(hole = 0.6) %>%

156 -

layout(title = "Landing Distribution by Aircraft Manufacturer during Sep 2020")

154 +

layout(title = "Landing Distribution by Aircraft Manufacturer during Dec 2022")

157 155

```

158 156 159 157 160 158

```{r, include=FALSE}

161 159

p <- sfo_stats %>%

162 -

filter(activity_period == max(activity_period),

160 +

filter(activity_period == 202212,

163 161

aircraft_manufacturer != "") %>%

164 162

group_by(aircraft_manufacturer) %>%

165 163

summarise(total_landing = sum(landing_count),

@@ -168,18 +166,18 @@ p <- sfo_stats %>%

168 166

plot_ly(labels = ~ aircraft_manufacturer,

169 167

values = ~ total_landing) %>%

170 168

add_pie(hole = 0.6) %>%

171 -

layout(title = "Landing Distribution by Aircraft Manufacturer During Sep 2020")

169 +

layout(title = "Landing Distribution by Aircraft Manufacturer During Dec 2022")

172 170 173 171

orca(p, "man/figures/manufacturer.svg")

174 172

```

175 173 176 174

<img src="man/figures/manufacturer.svg" width="100%"/>

177 175 178 -

The following Sankey plot demonstrate the distribution of number of landing in SFO by region and aircraft type, manufacturer, and body type during Sep 2020:

176 +

The following Sankey plot demonstrates the distribution of the number of landing in SFO by region and aircraft type, manufacturer, and body type during Dec 2022:

179 177 180 178

``` r

181 179

sfo_stats %>%

182 -

filter(activity_period == max(activity_period)) %>%

180 +

filter(activity_period == 202212) %>%

183 181

group_by(geo_summary, geo_region, landing_aircraft_type, aircraft_manufacturer, aircraft_body_type) %>%

184 182

summarise(total_landing = sum(landing_count),

185 183

groups = "drop") %>%

@@ -188,14 +186,14 @@ sfo_stats %>%

188 186

"aircraft_manufacturer",

189 187

"aircraft_body_type"),

190 188

num_col = "total_landing",

191 -

title = "Landing Summary by Geo Region and Aircraft Type During Sep 2020")

189 +

title = "Landing Summary by Geo Region and Aircraft Type During Dec 2022")

192 190 193 191

```

194 192 195 193 196 194

```{r, include=FALSE}

197 195

p <- sfo_stats %>%

198 -

filter(activity_period == max(activity_period)) %>%

196 +

filter(activity_period == 202212) %>%

199 197

group_by(geo_region, landing_aircraft_type, aircraft_manufacturer, aircraft_body_type) %>%

200 198

summarise(total_landing = sum(landing_count),

201 199

groups = "drop") %>%

@@ -204,7 +202,7 @@ p <- sfo_stats %>%

204 202

"aircraft_manufacturer",

205 203

"aircraft_body_type"),

206 204

num_col = "total_landing",

207 -

title = "Landing Summary by Geo Region and Aircraft Type During Sep 2020")

205 +

title = "Landing Summary by Geo Region and Aircraft Type During Dec 2022")

208 206 209 207

orca(p, "man/figures/landing_sankey.svg")

210 208

```


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4