Same as microtask-4, but now using pandas.
NOTE: I have two files in each microtask folder, microtask-#-online.ipynb
which uses elastic projects and microtask-#.ipynb
which uses FOSSASIA projects as data source. If you are checking the code in MyBinder, I suggest you to open microtask-#-online.ipynb
file as you can run the code. If you are opening in GitHub web interface, I suggest you to open microtask-#.ipynb
so that you can see the analysis of 5 repositories.
CSV file: results-fossasia.csv
-
The first step is to get the contents of the repository like the commit/issue/pull_request details using the function defined in the previous microtasks.
-
Then I defined the initial_date which is the date exactly before three months using datetime library.
Reference: https://stackoverflow.com/a/546356/8268998
-
Then I formatted the date according to the suitable format and checked if the commit/issue/pr is within the three months of time and update the counter accordingly. The total counter (commits+issues+pull_requests) is also maintained and all these counters are stored in a dataframe.
-
The data in the dataframe is then written to a csv file and printed as a table using pandas.