Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submission 454, Petitpierre/di Lenardo/Rappo #18

Merged
merged 4 commits into from
Aug 20, 2024
Merged

Conversation

mtwente
Copy link
Contributor

@mtwente mtwente commented Aug 19, 2024

Pull request

Proposed changes

Co-authored-by: Rémi Petitpierre [email protected]
Co-authored-by: Isabella di Lenardo [email protected]
Co-authored-by: Lucas Rappo [email protected]

Types of changes

  • New feature (non-breaking change which adds functionality).
  • Enhancement (non-breaking change which enhances functionality)
  • Bug Fix (non-breaking change which fixes an issue).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist

  • I have read the README document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have mentioned all co-authors in the PR description as Co-authored-by: Name <[email protected]>.

Summary by CodeRabbit

  • New Features

    • Introduced a configuration file for a manuscript project using the Quarto framework, structuring content for academic publication.
    • Launched a comprehensive study on the automation of vectorization of historical cadastral plans, detailing methodology and findings.
    • Added a bibliography featuring key references in cadastral computing and historical data analysis.
  • Chores

    • Created a requirements.txt file listing essential libraries for project dependencies, improving setup and environment management.

Co-Authored-By: Rémi Petitpierre <[email protected]>
Copy link
Contributor

coderabbitai bot commented Aug 19, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces a manuscript project using Quarto, centering on the automation of vectorization for historical cadastral plans in Switzerland. It includes an index file that details the research methodology and findings, a bibliography to support the study, and a requirements file for necessary dependencies. These additions enhance the project’s structure and accessibility, facilitating efficient research and analysis of land ownership dynamics over time.

Changes

Files Change Summary
submissions/454/_quarto.yml New configuration file for manuscript project, defining structure and output format (HTML).
submissions/454/index.qmd Introduced comprehensive study on the automation of vectorization of historical cadastral plans using neural networks.
submissions/454/references.bib New bibliography file with diverse entries supporting cadastral computing and historical data analysis.
submissions/454/requirements.txt New file specifying project dependencies: matplotlib, numpy, and pandas with versions.

Poem

🐰 In fields of data, I hop and play,
With maps and charts, I find my way.
Vectorize the past, oh what a sight,
Cadastral wonders, shining bright!
With each new file, my heart takes flight,
A tale of land, in digital light! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mtwente mtwente changed the title Submission 454, Pétitpierre/di Lenardo/Rappo Submission 454, Petitpierre/di Lenardo/Rappo Aug 19, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
submissions/454/index.qmd (1)

105-125: Consider removing unused imports.

The import statement for tqdm is used, but json is not utilized in the provided code. Consider removing it if it's not needed.

-import shapefile, tqdm, cv2, json
+import shapefile, tqdm, cv2
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ca413bc and caff7c9.

Files ignored due to path filters (10)
  • submissions/454/images/center_2020.svg is excluded by !**/*.svg
  • submissions/454/images/center_berney_v2.svg is excluded by !**/*.svg
  • submissions/454/images/center_melotte_v2.svg is excluded by !**/*.svg
  • submissions/454/images/center_renove.svg is excluded by !**/*.svg
  • submissions/454/images/owners_chart.svg is excluded by !**/*.svg
  • submissions/454/images/persistence_1727_1831_light.svg is excluded by !**/*.svg
  • submissions/454/images/persistence_1831_1888_light.svg is excluded by !**/*.svg
  • submissions/454/images/persistence_1888_2020_light.svg is excluded by !**/*.svg
  • submissions/454/images/prelaz_renove.svg is excluded by !**/*.svg
  • submissions/454/images/segmentation.svg is excluded by !**/*.svg
Files selected for processing (4)
  • submissions/454/_quarto.yml (1 hunks)
  • submissions/454/index.qmd (1 hunks)
  • submissions/454/references.bib (1 hunks)
  • submissions/454/requirements.txt (1 hunks)
Files skipped from review due to trivial changes (3)
  • submissions/454/_quarto.yml
  • submissions/454/references.bib
  • submissions/454/requirements.txt
Additional comments not posted (17)
submissions/454/index.qmd (17)

1-34: Metadata is well-structured and complete.

The metadata section includes all necessary information such as submission ID, title, authors, keywords, and bibliography. Ensure that the ORCID IDs and email addresses are accurate.


36-100: Narrative sections are clear and well-organized.

The narrative provides a comprehensive overview of the research, data collection, and analysis. It is well-supported by references and figures. Ensure that all references are correctly formatted and accessible.


129-159: Function createIndex handles invalid geometries well.

The function correctly skips null or empty geometries and attempts to fix invalid ones. It returns an updated GeoDataFrame and index. Ensure that the handling of invalid geometries aligns with the overall data processing strategy.


161-189: Function matchParcels efficiently identifies geometry matches.

The function uses bounding box overlap to identify potential matches and calculates overlap ratios. Ensure that the overlap threshold aligns with the research objectives.


191-203: Function reverseMatches correctly reverses matching relations.

The function builds a reverse mapping of matches efficiently. Ensure that this reverse mapping is used appropriately in subsequent analysis.


205-215: Function create_polygons handles invalid geometries appropriately.

The function attempts to fix invalid geometries and filters out small polygons. Ensure that the area threshold aligns with the research objectives.


217-223: Function overlap_percentage handles exceptions effectively.

The function calculates overlap percentages and handles exceptions gracefully. Ensure that the exception handling aligns with the overall error management strategy.


225-243: Function calculate_angles accurately computes turning functions.

The function calculates angles and normalizes the turning function. Ensure that the calculations align with the intended geometric analysis.


246-278: Function compare_polygons effectively compares polygon shapes.

The function computes the minimum area between turning functions for comparison. Ensure that the comparison method aligns with the research objectives.


280-314: Function create_image generates images from polygon data.

The function processes pixels and assigns intensity based on turning scores. Ensure that the image generation aligns with the visualization needs of the project.


316-353: Function computeDynamics effectively computes fusion dynamics.

The function processes one-to-one and many-to-one matches to compute dynamics. Ensure that the methodology aligns with the research objectives.


355-375: Function convert_multipolygon_to_polygon handles conversion appropriately.

The function fills gaps and shrinks polygons back after conversion. Ensure that the conversion process aligns with the data processing requirements.


377-407: Function compute_legend generates a color palette and legend.

The function calculates colors based on weights and generates a legend image. Ensure that the color scheme aligns with the visualization goals.


411-418: Data loading and filtering is correctly implemented.

The code loads shapefiles and filters data based on specified classes. Ensure that the file paths and filtering criteria align with the data processing needs.


422-430: Geometry matching is efficiently implemented.

The code creates indices and matches geometries between datasets. Ensure that the matching logic aligns with the research objectives.


434-443: Persistence detection and data preparation are accurate.

The code computes dynamics and prepares data for visualization. Ensure that the calculations align with the research objectives.


447-469: Persistence plot generation is correctly implemented.

The code generates persistence plots and saves images in different modes. Ensure that the visualization aligns with the project's goals.

Copy link
Contributor

@maehr maehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtwente Thanks for adding submission 454. I am not sure whether the inline code is the best solution for our audience and for the later pdf compilation. We should discuss this tomorrow.

@maehr
Copy link
Contributor

maehr commented Aug 20, 2024

@RPetitpierre @lucasrappo Thank you very much for your submission. We decided to comment out your code section for the moment. Please provide us with the missing shape files in the data folder and link the code to the relevant sections in the text if possible (as for example in https://digihistch24.github.io/book-of-abstracts/submissions/462/). Please also add the programming language and code-fold instructions to your code blocks as shown below

#| code-fold: true
import shapefile, tqdm, cv2, json
import numpy as np
import pandas as pd
...

We really appreciate that you provide code and we would love to render it on our platform as a superb example of portable code.

Best
Moritz

@maehr maehr merged commit a467d3a into digihistch24:main Aug 20, 2024
3 checks passed
@RPetitpierre
Copy link
Contributor

Dear Moritz @maehr,

Thank you for your message and sorry for the late reply. I was on holidays with no access to my email until Monday. I also found a minor but nasty bug in the code which took me a bit of time to fix.

The dynamic figure computation is not very adapted in this case, since the code takes a bit over an hour to run. Alternatively, I suggest to use a smaller data sample, which already greatly helps to understand the methodology and provides an exemplar result, covering just a neighborhood.

I updated the code according to your suggestions. I also updated the other data file (requirements, data, images) to match the generated sample result.

Don't hesitate to write me if you need anything else from my side, and thank you for all the work on organizing this conference, I am looking forward!

Best,

Remi

@maehr
Copy link
Contributor

maehr commented Aug 28, 2024

Dear Moritz @maehr,

Thank you for your message and sorry for the late reply. I was on holidays with no access to my email until Monday. I also found a minor but nasty bug in the code which took me a bit of time to fix.

The dynamic figure computation is not very adapted in this case, since the code takes a bit over an hour to run. Alternatively, I suggest to use a smaller data sample, which already greatly helps to understand the methodology and provides an exemplar result, covering just a neighborhood.

I updated the code according to your suggestions. I also updated the other data file (requirements, data, images) to match the generated sample result.

Don't hesitate to write me if you need anything else from my side, and thank you for all the work on organizing this conference, I am looking forward!

Best,

Remi

Thank you very much. It doesn't matter if it takes long to run, we could try the whole data set. Quarto allows for freezing to safe compute. @mtwente Can you please take a look at the update?

@mtwente mtwente deleted the 454 branch September 7, 2024 16:37
This was referenced Sep 9, 2024
@coderabbitai coderabbitai bot mentioned this pull request Nov 15, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants