{"id":18555396,"url":"https://github.com/bearloga/wmf-cmu-msp","last_synced_at":"2025-10-04T00:13:10.084Z","repository":{"id":146996681,"uuid":"242817419","full_name":"bearloga/wmf-cmu-msp","owner":"bearloga","description":"Scripts for gathering data for CMU MSP Consulting Capstone for the Wikimedia Foundation","archived":false,"fork":false,"pushed_at":"2020-02-28T17:32:40.000Z","size":641,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T13:09:43.776Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","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/bearloga.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":"2020-02-24T18:57:53.000Z","updated_at":"2020-02-28T17:32:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"53137fcf-e7d3-4dad-bc44-d0bffe225a67","html_url":"https://github.com/bearloga/wmf-cmu-msp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bearloga/wmf-cmu-msp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwmf-cmu-msp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwmf-cmu-msp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwmf-cmu-msp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwmf-cmu-msp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bearloga","download_url":"https://codeload.github.com/bearloga/wmf-cmu-msp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwmf-cmu-msp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278245571,"owners_count":25955052,"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","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"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":[],"created_at":"2024-11-06T21:26:25.908Z","updated_at":"2025-10-04T00:13:10.066Z","avatar_url":"https://github.com/bearloga.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traffic data dump\n\n## Scripts\n\n1. [site_matrix.R](site_matrix.R) generates a `language_codes.csv` file which maps wiki language codes to language names\n2. [legacy.R](legacy.R) reads and processes projectcount files from HDFS\n3. [modern.R](modern.R) and [modern2.R](modern2.R) read, process, and combine modern pageview counts from HDFS\n4. [combine.R](combine.R) combines legacy and modern traffic into a single dataset, also produces the plot below\n\n**Note to self**: For continuous processing of files in HDFS, keytab on stat1004 is utilized together with [modern.sh](modern.sh) per instructions in [wikitech:Analytics/Systems/Kerberos/UserGuide](https://wikitech.wikimedia.org/wiki/Analytics/Systems/Kerberos/UserGuide#Run_a_recurrent_job_via_Cron_or_similar_without_kinit_every_day):\n\n```bash\n# mkdir backup-modern \u0026\u0026 chgrp analytics-privatedata-users backup-modern\n# mkdir temp \u0026\u0026 chgrp analytics-privatedata-users test\n# chmod +x modern.sh\nsudo -u analytics-privatedata ./modern.sh\n```\n\n## Data\n\n![Overview of traffic counts](overview.png)\n\n### Metadata and data dictionary\n\nSome info about the dataset:\n\n- daily traffic from 2007-12-09 to 2017-07-31\n- there are 2318 wikis (299 languages, 8 projects)\n- 3 traffic datasets:\n  - [modern pageviews](https://wikitech.wikimedia.org/wiki/Analytics/Pageviews) (available from 2015-04-01 to 2017-07-31)\n  - [projectcounts-raw](https://wikitech.wikimedia.org/wiki/Analytics/Archive/Data/Pagecounts-raw) (available from 2007-12-09 to 2016-08-05)\n  - [projectcounts-all-sites](https://wikitech.wikimedia.org/wiki/Analytics/Archive/Data/Pagecounts-all-sites) (available from 2014-09-23 to 2016-08-05)\n- where possible I included mobile traffic (in `*_mobile` columns)\n  - for projectcounts we have mobile traffic for *wikipedia only*\n  - for modern pageviews we have mobile traffic for *all wikis*\n- `code` has 1:1 relationship with `language`\n\n### Reading into R\n\n```R\n# install.packages(\"tidyverse\")\ntraffic \u003c- readr::read_csv(\"traffic.csv.gz\", col_types = \"Dcccciiiiii\")\n```\n\n## Google Knowledge Graph\n\n- Google's [Knowledge Graph](https://en.wikipedia.org/wiki/Knowledge_Graph)'s US launch was announced on 16 May 2012 on [Google's blog](https://googleblog.blogspot.com/2012/05/introducing-knowledge-graph-things-not.html)\n- Expanded to Spanish, French, German, Portuguese, Japanese, Russian, and Italian on 4 December 2012 according to [CNET](https://www.cnet.com/news/how-google-is-taking-the-knowledge-graph-global/)\n- Expansion to Bengali announced on 29 March 2017 on [Google's India blog](https://india.googleblog.com/2017/03/making-it-easier-to-search-in-bengali.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearloga%2Fwmf-cmu-msp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbearloga%2Fwmf-cmu-msp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearloga%2Fwmf-cmu-msp/lists"}