Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Conversation

karthik
Copy link
Contributor

@karthik karthik commented Feb 15, 2015

The mapbox map on gists is nice and looks great fullscreen. This function takes an input gist_id object and one geojson file from that set and generates the fullscreen map id.

@sckott, try the example below and let me know what you think before merging.

devtools::install_github("ropensci/gistr@geojson")
library(ecoengine)
library(gistr)
x <- ee_observations(genus = "vulpes")
ee_map(x, dest = "~/Desktop")
gist_id <- gist_create(files = "~/Desktop/temp.geojson", browse = FALSE)
gistr_map(file = "temp.geojson", gist_id)

The mapbox map on gists is nice and looks great fullscreen. This function takes an input gist_id object and one geojson file from that set and generates the fullscreen map id.
@sckott
Copy link
Contributor

sckott commented Feb 15, 2015

Just started reviewing :)

:octocat: Sent from GH.

@karthik
Copy link
Contributor Author

karthik commented Feb 15, 2015

Try again if it fails, fixed a tiny bug in the latest commit.

@sckott
Copy link
Contributor

sckott commented Feb 15, 2015

@karthik

  • all fxns are gist_*, but this one is gistr_..., mind changing to gist_ instead, or good reason for gistr?
  • The footer of the map doesn't seem to link to the raw file, although it seems to intend to, here temp.geojson links to https://gist.githubusercontent.com//sckott/raw, which 404s. I imagine it should link to the gist itself?
  • Do you mind if we just use base R so we don't need to introduce new pkg deps stringr (strsplit() instead) and assertthat (stopifnot()) - or do you think the fxns from those pkgs are significantly better? These pkgs aren't that heavy, so not a huge deal, but just thought i'd ask.

@karthik
Copy link
Contributor Author

karthik commented Feb 15, 2015

  • Fixed fn names
  • Footer wasn't designed to link to anything. will look into it.
  • Removed stringr but left assert_that since it is considered better practice than stopifnot.

@karthik
Copy link
Contributor Author

karthik commented Feb 15, 2015

  • I can't fix the footer because github automatically adds it. I guess they never expected someone would pull such a usecase! 😉

@sckott
Copy link
Contributor

sckott commented Feb 15, 2015

  • thx on fxn name
  • okay on assertthat
  • okay, sounds good on footer

@sckott
Copy link
Contributor

sckott commented Feb 15, 2015

@karthik in #' @param gist_object An object generated by \code{gist_id} do you mean gist_create() ?

sckott added a commit that referenced this pull request Feb 15, 2015
Added a new function called gist_map
@sckott sckott merged commit 072afce into master Feb 15, 2015
@karthik karthik deleted the geojson branch February 17, 2015 11:35
@sckott sckott added this to the v0.2 milestone Apr 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants