Commit Graph

9 Commits

Author SHA1 Message Date
Benjamin Mako Hill
38fdd07b39 changes to a bunch of the wikipedia view code
- Renamed the articles.txt to something more specific

Changes to both scripts:

- Updated filenames to match the new standard
- Reworked the logging code so that it can write to stderr by
  default. Because we can only call logging.basicConfig() once, this
  eneded up being a bigger changes.
- Caused scripts to output git commits and export to track which code
  produced which dataset.
- Caused programs to take files instead of directories as
  output (allows us to run programs more than once a day).

Changes to the wikipedia_views/scripts/fetch_daily_views.py:

- Change output that it outputs a sequence of JSON dictionaries (one
  per line) as per the standard we agreed to and which is what
  Twitter, Github, and other dumps do. Previous behavior was to create
  output a single JSON list object.
- A number of other small changes and tweaks throughout.
2020-04-01 07:15:12 -07:00
Benjamin Mako Hill
72bf7bcd37 stop writing writing header to one-column list
This feels like it's asking for trouble. Description of the contents
of the list is in the filename.
2020-03-31 08:35:23 -07:00
Kaylea Champion
4226b45b97 adds a scraper to update the articles file 2020-03-28 23:46:48 -07:00
Kaylea Champion
c7af46f8fb adds in new logging capability 2020-03-28 18:46:35 -07:00
f5ac92330c Merge branch 'kaylea/master' of github.com:CommunityDataScienceCollective/COVID-19_Digital_Observatory into kaylea/master 2020-03-28 14:13:26 -07:00
ee91df4c04 Read the whole input file before making api calls 2020-03-28 14:12:17 -07:00
24e5590836 Read the whole input file before making api calls 2020-03-28 14:09:28 -07:00
49c3203d78 A few suggestions for the python script:
- using format strings (f-strings) is a nice way in python to build
strings using variables.
- you can read and process a file in one pass if you iterate over the
open file itself instead of reading it into a variable and then
looping
- i had to change your strip code when i stopped using csv reader
- my python linter and auto-formater hate non-indendent comments
- i added a few lines to print cases where we don't get Ok responses.
2020-03-27 20:43:29 -07:00
c54d8ba28a Reorganize wikipedia views subproject into subpackage. 2020-03-27 20:13:11 -07:00