{"id":23396390,"url":"https://github.com/mneedham/uk-charts-neo4j","last_synced_at":"2025-04-08T17:32:35.614Z","repository":{"id":52299409,"uuid":"231541073","full_name":"mneedham/uk-charts-neo4j","owner":"mneedham","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-08T03:23:22.000Z","size":414,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T13:50:18.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/mneedham.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2020-01-03T08:01:37.000Z","updated_at":"2020-02-01T11:16:54.000Z","dependencies_parsed_at":"2023-01-24T08:31:34.092Z","dependency_job_id":null,"html_url":"https://github.com/mneedham/uk-charts-neo4j","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mneedham%2Fuk-charts-neo4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mneedham%2Fuk-charts-neo4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mneedham%2Fuk-charts-neo4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mneedham%2Fuk-charts-neo4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mneedham","download_url":"https://codeload.github.com/mneedham/uk-charts-neo4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247892309,"owners_count":21013682,"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":[],"created_at":"2024-12-22T07:35:21.454Z","updated_at":"2025-04-08T17:32:35.582Z","avatar_url":"https://github.com/mneedham.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Exploring the UK Charts with Neo4j\n\nThe code in this repository goes with the \u003c\u003e blog post.\n\n== Downloading and scraping charts\n\nIf you want to download the different charts, you can do this by running the following script:\n\n[source, bash]\n----\npython scripts/download.py\n----\n\nThe HTML page for each chart will be written into files in the `raw/charts` directory.\n\nWe now need to call the Spotify API to pull in the full list of collaborating artists for each track.\nI've written a blog post explaining how to https://markhneedham.com/blog/2020/01/02/spotify-api-making-my-first-call/[create a Spotify application and get the corresponding credentials^].\nOnce we've skimmed that blog post, let's create a file called `.env` and populate it with our Spotify application credentials:\n\n_.env_\n[source, bash]\n----\nexport CLIENT_ID=\"\u003cour-client-id\u003e\"\nexport CLIENT_SECRET=\"\u003cour-client-secret\u003e\"\n----\n\nWe can then run the following command to add these values as environment variables:\n\n[source,bash]\n----\nsource .env\n----\n\nNow let's execute the following script to pull down the collaborating artists:\n\n[source, bash]\n----\npython scripts/download_songs_spotify.py\n----\n\nThis script writes its results into the `raw/songs` directory.\n\nAnd finally, let's run the following script, which will create a JSON document per chart entry in `import/items.json`:\n\n[source,bash]\n----\npython scripts/scrape.py\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmneedham%2Fuk-charts-neo4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmneedham%2Fuk-charts-neo4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmneedham%2Fuk-charts-neo4j/lists"}