Git Product home page Git Product logo

Comments (2)

pattyf avatar pattyf commented on June 8, 2024

Hi Irene,
Re: line 261, I have several thoughts on this. First, spatial features != geospatial features and there are some users of the sf package who don't work with geo space. Second, understanding how to construct a geospatial feature is really helpful for debugging problems that occur at a low level. But this example should be more built out by (1) creating a spatial object (2) adding a CRS to it and (3) adding attributes as a simple demonstration.

As for base R vs. dpylr, either works. The dplyr route assumes someone knows R already, but many folks come to R Geo knowing desktop GIS and a tiny bit of R but not the tidyverse.

As for write.csv, I don't know if it can extract the geometry from an sf object and add it to a csv file the way sf_write can. You may be able to do it for points but not more complex geometries and there are reasons one may want to write these geometries to a CSV file. For example if I save a CSV file with complex polygon geometries as WKT plus lots of other attributes then I can read it into excel or google sheets, do some calculations on the numeric columns and then save & import into QGIS. Lke a geojson file, I would only have one file and not a bunch like a shapefile, and a csv file is highly compressible. Anyway there are reasons, but they may be too complex for discussing in this workshop and that's a good reason to cut from the workshop.

from r-geospatial-fundamentals-legacy.

ifarah avatar ifarah commented on June 8, 2024

Hi Patty,

Thanks so much for your comments.

Re: dplyr, I agree. I guess for some other base R seemed to confuse them, but I guess that picking either base R or dplyr is wiser than having both examples all the time and actually learning base R is a good skill to have.

Thanks for clarifying about sf_write and exporting the geometry for more complex geometries. I guess that adding this explanation could be a good idea, because it's an important clarification!

Thanks again for taking the time to respond.

from r-geospatial-fundamentals-legacy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.