wikilake v0.4

0

Monthly downloads

0th

Percentile

Scrape Lake Metadata Tables from Wikipedia

Scrape lake metadata tables from Wikipedia <http://www.wikipedia.org>.

Readme

wikilake

Project Status: Active - The project has reached a stable, usable state and is being actively developed. CRAN\_Status\_Badge Travis-CI Build Status CRAN RStudio mirror downloads

The wikilake package provides functions to scrape the metadata tables from lake pages on Wikipedia.

Installation

Stable release from CRAN

install.packages("wikilake")

Development version

devtools::install_github("jsta/wikilake")

Usage

library(wikilake)
#> Loading required package: maps
# metadata only
lake_wiki("Lake Mendota")
#> Retrieving data from: https://en.wikipedia.org/wiki/Lake_Mendota
#>           Name                             Location Primary inflows
#> 1 Lake Mendota Dane County, Wisconsin,United States    Yahara River
#>   Primary outflows Catchment area Basin countries Surface area Max. depth
#> 1     Yahara River       562 km^2   United States   9740 acres       25 m
#>   Residence time Shore length1 Surface elevation
#> 1      4.5 years       34.8 km             259 m
#>                                Frozen     Lat      Lon
#> 1 December 20 (average freezing date) 43.1066 -89.4247

# pretty printing metadata
knitr::kable(tidyr::gather(lake_wiki("Lake Mendota")))
#> Retrieving data from: https://en.wikipedia.org/wiki/Lake_Mendota
key value
Name Lake Mendota
Location Dane County, Wisconsin,United States
Primary inflows Yahara River
Primary outflows Yahara River
Catchment area 562
Basin countries United States
Surface area 9740
Max. depth 25
Residence time 4.5
Shore length1 34.8
Surface elevation 259
Frozen December 20 (average freezing date)
Lat 43.1066
Lon -89.4247
# metadata + map
lake_wiki("Gull Lake (Michigan)", map = TRUE)
#> Retrieving data from: https://en.wikipedia.org/wiki/Gull_Lake_(Michigan)

#>        Name                                            Location
#> 1 Gull Lake Kalamazoo / Barry counties, Michigan, United States
#>   Primary outflows Basin countries Surface area Max. depth
#> 1   Gull Creek [1]   United States       8 km^2       34 m
#>   Surface elevation    Lat     Lon
#> 1             268 m 42.399 -85.411
lake_wiki("Gull Lake (Michigan)", map = TRUE, "usa")
#> Retrieving data from: https://en.wikipedia.org/wiki/Gull_Lake_(Michigan)

#>        Name                                            Location
#> 1 Gull Lake Kalamazoo / Barry counties, Michigan, United States
#>   Primary outflows Basin countries Surface area Max. depth
#> 1   Gull Creek [1]   United States       8 km^2       34 m
#>   Surface elevation    Lat     Lon
#> 1             268 m 42.399 -85.411
lake_wiki("Lake Nipigon", map = TRUE, regions = "Canada")
#> Retrieving data from: https://en.wikipedia.org/wiki/Lake_Nipigon

#>           Name Location Primary outflows Catchment area Basin countries
#> 1 Lake Nipigon  Ontario    Nipigon River     25400 km^2          Canada
#>   Surface area Average depth Max. depth Water volume Shore length1
#> 1    4848 km^2        54.9 m      165 m     248 km^3       1044 km
#>   Surface elevation   Lat   Lon
#> 1             260 m 49.83 -88.5
lake_wiki("Cass Lake (Michigan)", map = TRUE, "state", region = "Michigan")
#> Retrieving data from: https://en.wikipedia.org/wiki/Cass_Lake_(Michigan)

#>        Name                 Location Basin countries Surface area
#> 1 Cass Lake Oakland County, Michigan   United States   1280 acres
#>   Max. depth Surface elevation    Lat     Lon
#> 1       37 m             283 m 42.606 -83.365

Functions in wikilake

Name Description
dms2dd dms2dd
get_lake_wiki get_lake_wiki
wikilake-package Scrape Wikipedia lakes metadata
lake_wiki lake_wiki
map_lake_wiki map_lake_wiki
tidy_lake_df tidy_lake_df
milakes Michigan Lakes
No Results!

Vignettes of wikilake

Name
scrape_michigan_lakes.Rmd
No Results!

Last month downloads

Details

URL https://github.com/jsta/wikilake
BugReports https://github.com/jsta/wikilake/issues
License GPL (>= 2)
Encoding UTF-8
LazyData true
RoxygenNote 6.0.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2018-06-07 17:19:00 UTC; jose
Repository CRAN
Date/Publication 2018-06-07 17:56:40 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/wikilake)](http://www.rdocumentation.org/packages/wikilake)