Moving a List to a Project

I created a list of vascular plants endemic to the Northeastern US and Canada and want to move it to a project without rewriting 100+ species. Is there a way to do this all at once or do I need to do it the long way? Thanks

i wrote something a while back that i think will do this: https://jumear.github.io/stirpy/lab?path=iNat_update_project.ipynb.

here’s what you would do:

  1. click the link above to open up the Jupyter workbook in a web-based JupyterLite instance.
  2. run the first two cells with code in them. the first starts with # load required modules, and the second starts with # define custom functions used for getting data
  3. in the third code cell that begins with # define the parameters needed for your request:
    a. set project_id = 'project-slug' replacing project-slug with the slug of your project
    b. get your JWT by opening https://www.inaturalist.org/users/api_token in your browser while logged into iNaturalist. you’ll get a string that looks something like {"api_token":"j.w.t"}. copy the j.w.t part.
    c. back in the Jupyter workbook, set jwt = 'j.w.t', replacing j.w.t with the value that you copied earlier
    d. run the cell
  4. in the next cell that begins # define the model rules that you want to replicate into your project, comment out (or delete) the sample rule definitions and add your required rule definition, which i think would be source_rules['taxon']['include']['ids'] = await get_taxon_ids_from_list(4512268). then run the cell.
  5. run the next cell that begins # Compare the source rules vs the existing target project rules, and this will give you a summary of the changes that will be applied.
  6. when you’re ready to finalize the changes, run the next cell that begins # Execute the request(s)

the same workbook can also copy rules from another project (instead of from a list), if you wanted to do that instead. (that might help in situations like the one described in https://forum.inaturalist.org/t/duplicate-project/62144/5 .)

1 Like