Code Monkey home page Code Monkey logo

Comments (3)

erondeau avatar erondeau commented on June 28, 2024

So, after closer examination, I don't believe this is a script issue, but rather reflects a more interesting conundrum surrounding the use of the "region" being appended to the end of the collection name in step 2 (eg. append_region =TRUE in fix_pop_names(). This is a useful feature - allows for quickly identifying regional or CU groupings when organizing a dendrogram - but means that the "drop_pops" file needs to also include the region for a match to be made.

Three potential fixes:

  1. Just leave it as is, and make this clear in the README? You could probably do this region appending easily enough from the "StockCodes" file created by prepare_stockcode_file() in step 2, in excel (or even directly in that script). Excel would be =B2&"_"&C2 then dragging that down. In R, this could be a fourth column that is output to this StockCode file, such as df$collection_repunit <- paste(df$collection, df$repunit, sep="_")

  2. Allow for a string partial match. This I don't like, because there will be situations where you might want to drop "Chilliwack" but not "Chilliwack-summer". We would have to rely on the string being unique, which will be dangerous (99.9% successful, but that 0.1 will cause problems".

  3. Append the region to the filter file, by new script?

  4. ... Suggestions?

from simple_pop_stats.

JanineSupernault avatar JanineSupernault commented on June 28, 2024

@erondeau, may not be the best solution but if I did the fix pop without appending then applied the drop pop filter and went back to fix pop script and did the appending to region?

from simple_pop_stats.

erondeau avatar erondeau commented on June 28, 2024

This is a good idea - although it didn't work as currently written. Still, some version of Janine's suggestion is likely best, and can be written into the Readme. I will follow-up next week on how to implement it!

from simple_pop_stats.

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.