{"id":27307433,"url":"https://github.com/ukcoderj/runearby","last_synced_at":"2025-04-12T04:09:06.133Z","repository":{"id":98401025,"uuid":"369234511","full_name":"ukcoderj/runearby","owner":"ukcoderj","description":"This project looks at handling postcode/ and location data","archived":false,"fork":false,"pushed_at":"2021-08-03T15:06:30.000Z","size":81575,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T04:08:51.455Z","etag":null,"topics":["csharp","google-maps","google-maps-api","location"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ukcoderj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-05-20T14:22:21.000Z","updated_at":"2021-08-03T15:07:13.000Z","dependencies_parsed_at":"2023-05-11T12:00:42.375Z","dependency_job_id":null,"html_url":"https://github.com/ukcoderj/runearby","commit_stats":null,"previous_names":["ukcoderj/runearby"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukcoderj%2Frunearby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukcoderj%2Frunearby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukcoderj%2Frunearby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukcoderj%2Frunearby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ukcoderj","download_url":"https://codeload.github.com/ukcoderj/runearby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514225,"owners_count":21116903,"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":["csharp","google-maps","google-maps-api","location"],"created_at":"2025-04-12T04:09:05.681Z","updated_at":"2025-04-12T04:09:06.112Z","avatar_url":"https://github.com/ukcoderj.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# R U Nearby\n\nThis project looks at handling postcode/ and location data. It has some globally applicable methods and some stuff relating to UK Postcodes.\n\n# Conventions\n\n- Where converted, map points will be referenced as Latitude (Y axis, North-South)/Longitude (X axis, East-West) in line with this [article](https://stackoverflow.com/questions/18636564/lat-long-or-long-lat).\n- Also, Google use Lat Long, so it will make that lookup easier.\n\n\nInitial data for UK does not include NI.   \n\n# Functions\n\n## Global -\u003e VanillaWebPages / gmaps-draw-circles.html\n\nFully interactive Google Map, where you can set a starting location + a radius via click or data input. You can then edit that information.\n\nThis will enable someone to set a location and a radius around that location. The data is output to plain JavaScript variables. No jQuery or Frameworks used :innocent: . \n\nYou must add your own Google Maps API Key in 2 places.\n\nThis page also includes Google Geocode, which can convert a postcode/ zip code/ address into coordinates.\n\n## Global -\u003e GlobalVendorRadiusCheck.cs -\u003e GetVendorsWhoCanVisitCustomer\n\nAssumes vendors have marked their location and a radius they are willing to travel using the gmaps-draw-circles.html. This will take a persons co-ordinates and see which vendors could visit. This does not have island etc exclusions as it assumes the vendor would have marked the radius as they want it.\n\nThis example uses dummy UK data, but is interfaced and DI'd so could be swapped out for something else.\n\n## Global -\u003e GlobalVendorRadiusCheck.cs -\u003e GetVendorsCustomerCanVisit\n\nAssumes a customer has given their coordinates and a radius they are willing to travel. This will look for all vendors within the radius the customer has specified.\n\nThis example uses dummy UK data, but is interfaced and DI'd so could be swapped out for something else.\n\n## UK -\u003e FindPostcodesInRadiusKm\n\nGiven a postcode, what other postcodes are within a specified radius (options to exclude Islands and Crossing the Briston Channel / River Severn).\n\n## UK -\u003e GetClosestPostcodeToCoordinate\n\nGiven a set of coordinates, what is the nearest postcode?\n\n\n# Process For Setting Up From Fresh OS Map Data.\n\n1. Get [CodePointOpen](https://osdatahub.os.uk/downloads/open/CodePointOpen) data and put it in {root}\\Demo\\CoreLookup\\Data\\UK\\CodePointOpen2020\\Data\\CSV. There will be a `.csv` file for each postcode with Eastings/Northings data.\n\n2. `IOSMapConverter` has a method ***`Convert_OS_CodePointOpen_Data_To_Usable_LatLong_Data()`*** which is currently called from CoreLookup\\Main.cs (commented out). This will do the following, which will be output to CoreLookup\\Data\\UK\\CodePointOpen2020\\Data_Processed_LatLong:\n\n- Convert each postcode file to a new file with data: Postcode|lat|long\n- Merge all the csv files to one big file of all postcodes (see 'Merged\\uk_postcodes_lat_long_full.csv').\n- Take the 'Merged' data and simplify this down to 'Area + District' data (e.g. PO4 8RA -\u003e PO4). It will take the average coordinates of all the same 'Area+District' postcodes to provide new data e.g. \"PO4\",50.790176,-1.062084 (see 'Merged\\uk_postcodes_lat_long_area_district_only.csv').\n\n\n## Testing\n\nThe project contains unit tests using xUnit and Moq.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukcoderj%2Frunearby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fukcoderj%2Frunearby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukcoderj%2Frunearby/lists"}