{"id":22323766,"url":"https://github.com/andrepxx/sydney","last_synced_at":"2026-07-01T02:31:49.725Z","repository":{"id":144227126,"uuid":"208504294","full_name":"andrepxx/sydney","owner":"andrepxx","description":"A library for visualizing very large datasets.","archived":false,"fork":false,"pushed_at":"2022-09-27T16:02:49.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-31T09:48:49.410Z","etag":null,"topics":["data-science","golang-library","graphics-library","plotting","visualization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrepxx.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":"2019-09-14T21:10:28.000Z","updated_at":"2022-09-23T08:33:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"369aaa67-f58d-4e0c-8417-699fa4af64aa","html_url":"https://github.com/andrepxx/sydney","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/andrepxx/sydney","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepxx%2Fsydney","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepxx%2Fsydney/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepxx%2Fsydney/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepxx%2Fsydney/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrepxx","download_url":"https://codeload.github.com/andrepxx/sydney/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrepxx%2Fsydney/sbom","scorecard":{"id":193019,"data":{"date":"2025-08-11","repo":{"name":"github.com/andrepxx/sydney","commit":"d90a150eba84867528d1b43b7cb23eb9a0311b77"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T21:11:10.155Z","repository_id":144227126,"created_at":"2025-08-16T21:11:10.155Z","updated_at":"2025-08-16T21:11:10.155Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34990845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data-science","golang-library","graphics-library","plotting","visualization"],"created_at":"2024-12-04T01:11:49.322Z","updated_at":"2026-07-01T02:31:49.699Z","avatar_url":"https://github.com/andrepxx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sydney\n\n*sydney* (note the lowercase *s*) is a high-performance graphics library for Go, specifically designed to render a huge number (hundreds of thousands or millions) of objects quickly and faithfully, without overplotting, oversaturating or otherwise obscuring fine detail that is present in the data. It is therefore well-suited as a plotting library for exploration and visualization of very large datasets.\n\n\n## How to use it.\n\n1. Import the relevant packages.\n\n```golang\nimport (\n\t\"fmt\"\n\t\"github.com/andrepxx/sydney/color\"\n\t\"github.com/andrepxx/sydney/coordinates\"\n\t\"github.com/andrepxx/sydney/scene\"\n\t\"math/rand\"\n\t\"image\"\n\timagecolor \"image/color\"\n\t\"image/draw\"\n\t\"image/png\"\n\t\"os\"\n)\n```\n\n\n2. Generate some data.\n\n```golang\ndata := make([]coordinates.Cartesian, 100000)\n\nfor i := range data {\n\tx := rand.NormFloat64()\n\ty := rand.NormFloat64()\n\tdata[i] = coordinates.CreateCartesian(x, y)\n}\n```\n\n\n3. Create a scene.\n\n```golang\n// scene.Create(resolutionX, resolutionY, minX, maxX, minY, maxY)\nscn := scene.Create(800, 800, -5.0, 5.0, -5.0, 5.0)\n```\n\n\n4. Aggregate (plot) the data points into the scene.\n\n```golang\nscn.Aggregate(data)\n```\n\nYou may call `scn.Aggregate(...)` multiple times to aggregate data in a streaming manner so that you don't have to generate / load all data points in advance and keep them in memory. You may call `scn.Clear()` to clear all data from the scene and re-use the scene object to render new data, as long as your viewport and image dimensions don't change.\n\n\n5. Spread the points to make them larger.\n\n```golang\nscn.Spread(1)\n```\n\n\n6. Create a color mapping and render the data into an image.\n\nA color mapping is responsible for mapping point densities to colors in the image. The default color mapping will map areas with low point densities to dark, cold colors (e. g. dark blue) and areas with high point densities to bright, hot colors (e. g. yellow or white). The mapping will be done in a logarithmic fashion and scale automatically to the highest and lowest densities found in the current scene to make best use of the available dynamic range.\n\n```golang\nmapping := color.DefaultMapping()\nimg, err := scn.Render(mapping)\n\n/*\n * Check if an error occured during rendering.\n */\nif err != nil {\n\tmsg := err.Error()\n\tfmt.Printf(\"Something went wrong: %s\\n\", msg)\n}\n```\n\nSince `color.Mapping` is an interface, you can easily implement your own custom color mapping.\n\n\n7. Draw the data as an overlay on a background image.\n\nThe resulting image will be transparent, so you will probably want to overlay it on some background. We will choose a black background here and draw our rendered image data over it.\n\n```golang\ndim := image.Rect(0, 0, 800, 800)\ntarget := image.NewNRGBA(dim)\n\n/*\n * The background color.\n */\nc := imagecolor.NRGBA{\n\tR: 0,\n\tG: 0,\n\tB: 0,\n\tA: 255,\n}\n\nuniform := image.NewUniform(c)\ndraw.Draw(target, dim, uniform, image.ZP, draw.Over)\ndraw.Draw(target, dim, img, image.ZP, draw.Over)\n```\n\n\n8. Serializing into a PNG file.\n\n```golang\nenc := png.Encoder{\n\tCompressionLevel: png.BestCompression,\n}\n\nfd, err := os.Create(\"output.png\")\n\n/*\n * Check if there was an error creating the file.\n */\nif err != nil {\n\tmsg := err.Error()\n\tfmt.Printf(\"Error creating output file: %s\", msg)\n} else {\n\tenc.Encode(fd, target)\n\tfd.Close()\n}\n```\n\n\n9. Working with geographic data.\n\nSince *sydney* was designed to work with large sets of geographic data, it has inbuilt support for projecting such data into a Cartesian coordinate system. If you have your data in geographic coordinates (longitude, latitude), you may ...\n\n```golang\nimport \"github.com/andrepxx/sydney/projection\"\n```\n\n... and then project your data points from geographic coordinates into Cartesian points on a plane using a map projection (in this case, the Mercator projection) and render them.\n\n```golang\ndata := make([]coordinates.Geographic, 100000)\n// TODO: Fill the data slice.\nnumPoints := len(data)\nprojected := make([]coordinates.Cartesian, numPoints)\nproj := projection.Mercator()\nerr := proj.Forward(projected, data)\n\n/*\n * Check for errors.\n */\nif err != nil {\n\tmsg := err.Error()\n\tfmt.Printf(\"Error during projection: %s\", msg)\n}\n\nscn.Aggregate(projected)\n```\n\nKeep in mind that *sydney* expects longitude and latitude values in radians, not degrees, so you will have to pre-multiply your data with `math.Pi / 180.0` if your values are in degrees.\n\n\n# Generated output\n\n![Generated output](output.png)\n\n\n## Q and A\n\n**Q: Can I see it in action? Is there a real-world application for this?**\n\n**A:** There will be a *location-visualizer* application that makes use of this library to provide interactive views of large sets of location (e. g. GPS) data.\n\n**Q: Why did you call this library *sydney*?**\n\n**A:** Because there is already a graphics library called *cairo*.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrepxx%2Fsydney","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrepxx%2Fsydney","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrepxx%2Fsydney/lists"}