{"id":26296099,"url":"https://github.com/rohancyberops/periodic-table","last_synced_at":"2025-03-15T04:16:58.299Z","repository":{"id":276654569,"uuid":"929882672","full_name":"RohanCyberOps/Periodic-Table","owner":"RohanCyberOps","description":"To build an interactive and visually appealing graphical representation of the Periodic Table of the Elements using a Collection View. The data will be fetched from our elements endpoint and stored in Core Data. We'll also create a dynamic cell layout using a separate nib file.","archived":false,"fork":false,"pushed_at":"2025-02-25T15:36:53.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T20:57:18.582Z","etag":null,"topics":["actinides","hydrogen","iphone","lanthanides","monochrome","periodic-table","periodic-table-of-elements","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RohanCyberOps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-09T16:16:25.000Z","updated_at":"2025-02-25T15:36:56.000Z","dependencies_parsed_at":"2025-02-09T17:28:49.102Z","dependency_job_id":"434bc264-4d90-4a4c-8615-d4824997d042","html_url":"https://github.com/RohanCyberOps/Periodic-Table","commit_stats":null,"previous_names":["rohancyberops/periodic-table"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FPeriodic-Table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FPeriodic-Table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FPeriodic-Table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FPeriodic-Table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RohanCyberOps","download_url":"https://codeload.github.com/RohanCyberOps/Periodic-Table/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681042,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actinides","hydrogen","iphone","lanthanides","monochrome","periodic-table","periodic-table-of-elements","swift"],"created_at":"2025-03-15T04:16:57.787Z","updated_at":"2025-03-15T04:16:58.292Z","avatar_url":"https://github.com/RohanCyberOps.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":" \n\n---\n\n# Periodic Collection View of the Elements  \n\n## Objective  \nTo build an interactive and visually appealing graphical representation of the **Periodic Table of the Elements** using a **Collection View**. The data will be fetched from our elements endpoint and stored in **Core Data**. We'll also create a dynamic cell layout using a separate nib file.  \n\n## Mockup  \n![PToE](http://www.visionlearning.com/images/figure-images/52-a.jpg)  \n\nWe'll start with a **monochrome** version, including elements **57 and 89** in the main table while temporarily ignoring the rest of the **Lanthanides and Actinides**.  \n\n## Theme Song  \n[Tom Lehrer's Elements](https://www.youtube.com/watch?v=zGM-wSKFBpo)  \n\n[Also fun!](https://www.youtube.com/watch?v=v1TfPDlA1xE) - A cute discovery from related videos.  \n\n---  \n## Steps to Follow  \n\n### 1. Project Setup  \n- **Fork and clone** the repository.  \n- Create a project named **PeriodicTable**.  \n- Modify the storyboard to feature a **Collection View** embedded in a **Navigation Controller**.  \n\n### 2. Building the UI  \n- Create a `UICollectionViewCell` subclass with an **associated XIB file**.  \n- Register the class in your collection view:  \n```swift\n// Register cell classes\nself.collectionView!.register(UINib(nibName:\"ElementCollectionViewCell\", bundle: nil), forCellWithReuseIdentifier: reuseIdentifier)\n```  \n- Create a **custom view** named `ElementView.swift`.  \n- Create an associated nib file `ElementView.xib`.  \n- Add the custom view to your collection view cell.  \n- Integrate labels for **element symbol** and **atomic number**, and connect them.  \n- Test the collection view using sample data:  \n```swift\nlet data = [(\"H\", 1), (\"He\", 2), (\"Li\", 3)]\n```  \n\n### 3. Data Model  \n- Create a **Data Model** file.  \n- Define an entity `Element` with attributes:  \n  - `symbol` (String)  \n  - `name` (String)  \n  - `number` (Integer, **not optional \u0026 indexed**)  \n  - `group` (Integer)  \n  - `weight` (Double)  \n- Add a **unique constraint** on `number` to prevent duplicate entries.  \n\n### 4. Data Integration  \n- Import `DataController.swift` from the **CoreArticles** project.  \n- Create `Element+JSON.swift` (for JSON parsing).  \n- Fetch data using:  \n```swift\nhttps://api.fieldbook.com/v1/5859ad86d53164030048bae2/elements\n```  \n- Integrate `DataController` in **AppDelegate**.  \n- Initialize `FetchedResultsController` (reference from **CoreArticles** table view controller).  \n\n### 5. Enhancing Display  \n- Start with all elements in a **single section**.  \n- Then, group elements by **periodic group** and **sort by group \u0026 number**.  \n- Optimize the layout to balance the **periodic table structure**.  \n\n**Excited to see this come to life!** Let’s make it **engaging, informative, and user-friendly**!  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohancyberops%2Fperiodic-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohancyberops%2Fperiodic-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohancyberops%2Fperiodic-table/lists"}