Skip to content

Commit a919cb5

Browse files
authored
Merge pull request #296 from creativecommons/report-cleanup
Clean-up reports wording and formatting
2 parents 15840a2 + b4a1c21 commit a919cb5

4 files changed

Lines changed: 92 additions & 107 deletions

File tree

scripts/3-report/gcs_report.py

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def gcs_intro(args):
113113

114114
def plot_products(args):
115115
"""
116-
Create plots for CC legal tool product totals and percentages
116+
Create a plot for CC legal tool product totals and percentages
117117
"""
118118
LOGGER.info(plot_products.__doc__.strip())
119119
file_path = shared.path_join(
@@ -152,14 +152,14 @@ def plot_products(args):
152152
SECTION_TITLE,
153153
title,
154154
image_path,
155-
"Plots showing Creative Commons (CC) legal tool product totals and"
155+
"The plot shows Creative Commons (CC) legal tool product totals and"
156156
" percentages.",
157157
)
158158

159159

160160
def plot_tool_status(args):
161161
"""
162-
Create plots for the CC legal tool status totals and percentages
162+
Create a plot for the CC legal tool status totals and percentages
163163
"""
164164
LOGGER.info(plot_tool_status.__doc__.strip())
165165
file_path = shared.path_join(
@@ -196,14 +196,14 @@ def plot_tool_status(args):
196196
SECTION_TITLE,
197197
title,
198198
image_path,
199-
"Plots showing Creative Commons (CC) legal tool status totals and"
199+
"The plot shows Creative Commons (CC) legal tool status totals and"
200200
" percentages.",
201201
)
202202

203203

204204
def plot_latest_tools(args):
205205
"""
206-
Create plots for latest CC legal tool totals and percentages
206+
Create a plot for latest CC legal tool totals and percentages
207207
"""
208208
LOGGER.info(plot_latest_tools.__doc__.strip())
209209
file_path = shared.path_join(
@@ -240,14 +240,14 @@ def plot_latest_tools(args):
240240
SECTION_TITLE,
241241
title,
242242
image_path,
243-
"Plots showing latest Creative Commons (CC) legal tool totals and"
243+
"The plot shows the latest Creative Commons (CC) legal tool totals and"
244244
" percentages.",
245245
)
246246

247247

248248
def plot_prior_tools(args):
249249
"""
250-
Create plots for prior CC legal tool totals and percentages
250+
Create a plot for prior CC legal tool totals and percentages
251251
"""
252252
LOGGER.info(plot_prior_tools.__doc__.strip())
253253
file_path = shared.path_join(
@@ -283,16 +283,15 @@ def plot_prior_tools(args):
283283
SECTION_TITLE,
284284
title,
285285
image_path,
286-
"Plots showing prior Creative Commons (CC) legal tool totals and"
287-
" percentages.",
288-
"The unit names have been normalized (~~`CC BY-ND-NC`~~ =>"
289-
" `CC BY-NC-ND`).",
286+
"The plot shows prior Creative Commons (CC) legal tool totals and"
287+
" percentages. The unit names have been normalized (~~`CC BY-ND-NC`~~"
288+
" => `CC BY-NC-ND`).",
290289
)
291290

292291

293292
def plot_retired_tools(args):
294293
"""
295-
Create plots for retired CC legal tool totals and percentages
294+
Create a plot for retired CC legal tool totals and percentages
296295
"""
297296
LOGGER.info(plot_retired_tools.__doc__.strip())
298297
file_path = shared.path_join(
@@ -330,16 +329,16 @@ def plot_retired_tools(args):
330329
SECTION_TITLE,
331330
title,
332331
image_path,
333-
"Plots showing retired Creative Commons (CC) legal tools total and"
334-
" percentages.",
335-
"For more information on retired legal tools, see [Retired Legal Tools"
336-
" - Creative Commons](https://creativecommons.org/retiredlicenses/).",
332+
"The plot shows retired Creative Commons (CC) legal tools total and"
333+
" percentages. For more information on retired legal tools, see"
334+
" [Retired Legal Tools - Creative Commons]"
335+
"(https://creativecommons.org/retiredlicenses/).",
337336
)
338337

339338

340339
def plot_countries_highest_usage(args):
341340
"""
342-
Create plots for the countries with highest usage of latest tools
341+
Create a plot for the countries with highest usage of latest tools
343342
"""
344343
LOGGER.info(plot_countries_highest_usage.__doc__.strip())
345344
file_path = shared.path_join(
@@ -380,20 +379,20 @@ def plot_countries_highest_usage(args):
380379
SECTION_TITLE,
381380
title,
382381
image_path,
383-
"Plots showing countries with the highest useage of the latest"
382+
"The plot shows countries with the highest useage of the latest"
384383
" Creative Commons (CC) legal tools.",
385384
"The latest tools include Licenses version 4.0 (CC BY 4.0, CC BY-NC"
386385
" 4.0, CC BY-NC-ND 4.0, CC BY-NC-SA 4.0, CC-BY-ND 4.0, CC BY-SA 4.0),"
387386
" CC0 1.0, and the Public Domain Mark (PDM 1.0).\n"
388387
"\n"
389388
f"The complete data set indicates there are a total of {total_count}"
390-
" online works using a latest CC legal tool.",
389+
" online works using one of the latest CC legal tools.",
391390
)
392391

393392

394393
def plot_languages_highest_usage(args):
395394
"""
396-
Create plots for the languages with highest usage of latest tools
395+
Create a plot for the languages with highest usage of latest tools
397396
"""
398397
LOGGER.info(plot_languages_highest_usage.__doc__.strip())
399398
file_path = shared.path_join(
@@ -434,20 +433,20 @@ def plot_languages_highest_usage(args):
434433
SECTION_TITLE,
435434
title,
436435
image_path,
437-
"Plots showing languages with the highest useage of the latest"
436+
"The plot shows the languages with the highest useage of the latest"
438437
" Creative Commons (CC) legal tools.",
439438
"The latest tools include Licenses version 4.0 (CC BY 4.0, CC BY-NC"
440439
" 4.0, CC BY-NC-ND 4.0, CC BY-NC-SA 4.0, CC-BY-ND 4.0, CC BY-SA 4.0),"
441440
" CC0 1.0, and the Public Domain Mark (PDM 1.0).\n"
442441
"\n"
443442
f"The complete data set indicates there are a total of {total_count}"
444-
" online works using a latest CC legal tool.",
443+
" online works using one of the latest CC legal tools.",
445444
)
446445

447446

448447
def plot_free_culture(args):
449448
"""
450-
Create plots for the languages with highest usage of latest tools
449+
Create a plot for the languages with highest usage of latest tools
451450
"""
452451
LOGGER.info(plot_free_culture.__doc__.strip())
453452
file_path = shared.path_join(
@@ -482,7 +481,7 @@ def plot_free_culture(args):
482481
SECTION_TITLE,
483482
title,
484483
image_path,
485-
"Plots showing Approved for Free Cultural Works legal tool usage.",
484+
"The plot shows Approved for Free Cultural Works legal tool usage.",
486485
"[Understanding Free Cultural Works - Creative"
487486
" Commons](https://creativecommons.org/public-domain/freeworks/):\n"
488487
"\n"

scripts/3-report/github_report.py

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -114,44 +114,41 @@ def github_intro(args):
114114
"Overview",
115115
None,
116116
None,
117-
"The GitHub data, below, uses the `total_count`"
118-
" returned by API for search queries of the various legal tools."
117+
"The GitHub data, below, uses the `total_count` returned by the API"
118+
" for search queries of the various legal tools.\n"
119119
"\n"
120-
f"**The results indicate that {cc_total} ({cc_percentage})"
121-
f"** of the {total_repositories} total public repositories"
122-
" on GitHub that use a CC legal tool. Additionally,"
123-
" many more use a non-CC use a Public domain"
124-
" equivalent legal tools.\n"
120+
f"**The results indicate that {cc_total:,} ({cc_percentage})** of the"
121+
f" {total_repositories:,} total public repositories on GitHub use a CC"
122+
" legal tool. Additionally, many more use a non-CC use a Public"
123+
" domain equivalent legal tools. The fetched GitHub data creates a"
124+
" a subtotal that showcases the different level of permission that"
125+
" works are released under.\n"
125126
"\n"
126-
" The GitHub data showcases the different level of"
127-
" rights reserved on repositories We have Public"
128-
" domain which includes works released under CC0, 0BSD and Unlicense"
129-
" meaning developers have waived all their rights to a software."
130-
" Allowing anyone to freely use, modify, and distribute the code"
131-
" without restriction."
132-
" See more at"
127+
"The public-domain-equivalent licenses include 0BSD, CC0, MIT-0 and"
128+
" Unlicense. These licenses allow anyone to freely use, modify, and"
129+
" distribute the code without restriction. See more at"
133130
" [Public-domain-equivalent license]"
134131
"(https://en.wikipedia.org/wiki/Public-domain-equivalent_license).\n"
135-
" While a Permissive category of license contains works"
136-
" under MIT-0 and CC BY 4.0 allows users to"
137-
" reuse the code with some conditions and attribution"
132+
"\n"
133+
"The CC BY 4.0 license is a permissive license that allows users to"
134+
" reuse the code with some conditions and attribution. See more at"
138135
" [Permissive license]"
139-
"(https://en.wikipedia.org/wiki/Permissive_software_license)"
140-
" and Copyleft contains works under CC BY-SA 4.0."
141-
" which requires any derivative works to be licensed"
142-
" under the same terms."
136+
"(https://en.wikipedia.org/wiki/Permissive_software_license).\n"
137+
"\n"
138+
"The CC BY-SA 4.0 license is a copyleft license which requires any"
139+
" derivative works to be licensed under the same terms. See more at"
143140
" [Copyleft](https://en.wikipedia.org/wiki/Copyleft).\n"
144141
"\n"
145-
"Thank you GitHub for providing public API"
146-
" access to repository metadata!",
142+
"Thank you GitHub for providing public API access to repository"
143+
" metadata!",
147144
)
148145

149146

150-
def plot_totals_by_license_type(args):
147+
def plot_distribution_by_license(args):
151148
"""
152-
Create plots showing totals by license type
149+
Create a plot showing the subtotal distribution by license
153150
"""
154-
LOGGER.info(plot_totals_by_license_type.__doc__.strip())
151+
LOGGER.info(plot_distribution_by_license.__doc__.strip())
155152
file_path = shared.path_join(
156153
PATHS["data_2-process"],
157154
"github_totals_by_license.csv",
@@ -161,7 +158,7 @@ def plot_totals_by_license_type(args):
161158
data_label = "Count"
162159
data = shared.open_data_file(LOGGER, file_path, index_col=name_label)
163160
data.sort_values(data_label, ascending=True, inplace=True)
164-
title = "Totals by license type"
161+
title = "Subtotal distribution by license"
165162
plt = plot.combined_plot(
166163
args=args,
167164
data=data,
@@ -186,22 +183,18 @@ def plot_totals_by_license_type(args):
186183
SECTION_TITLE,
187184
title,
188185
image_path,
189-
"Plots showing totals by license type."
190-
" This shows the distribution of different CC license"
191-
" and non CC license used in GitHub repositories."
192-
" Allowing Commons to evaluate how freely softwares on"
193-
" GitHub are being used, modified, and shared"
194-
" and how developers choose to share their works."
195-
" See more at [SPDX License List]"
196-
"(https://spdx.org/licenses/)",
186+
"The plot shows the distribution of the different open content or"
187+
" public-domain-equivalent licenses (0BSD, CC BY 4.0, CC BY-SA 4.0,"
188+
" CC0 1.0, MIT-0, and Unlicense) used in the subtotal of GitHub"
189+
" repositories.",
197190
)
198191

199192

200-
def plot_totals_by_restriction(args):
193+
def plot_distribution_by_restriction(args):
201194
"""
202-
Create plots showing totals by restriction
195+
Create a plot showing the subtotal distribution by restriction
203196
"""
204-
LOGGER.info(plot_totals_by_restriction.__doc__.strip())
197+
LOGGER.info(plot_distribution_by_restriction.__doc__.strip())
205198
file_path = shared.path_join(
206199
PATHS["data_2-process"],
207200
"github_totals_by_restriction.csv",
@@ -211,7 +204,7 @@ def plot_totals_by_restriction(args):
211204
data_label = "Count"
212205
data = shared.open_data_file(LOGGER, file_path, index_col=name_label)
213206
data.sort_values(name_label, ascending=False, inplace=True)
214-
title = "Totals by restriction"
207+
title = "Subtotal distribution by restriction"
215208
plt = plot.combined_plot(
216209
args=args,
217210
data=data,
@@ -235,10 +228,9 @@ def plot_totals_by_restriction(args):
235228
SECTION_TITLE,
236229
title,
237230
image_path,
238-
"Plots showing totals by different levels of restrictions."
239-
" This shows the distribution of Public domain,"
240-
" Permissive, and Copyleft"
241-
" licenses used in GitHub repositories.",
231+
"The plot shows the distribution of the different restrictions"
232+
" (Copyleft, Permissive, Public domain) used in the subtotal of GitHub"
233+
" repositories.",
242234
)
243235

244236

@@ -251,8 +243,8 @@ def main():
251243
)
252244
shared.check_completion_file_exists(args, last_entry)
253245
github_intro(args)
254-
plot_totals_by_license_type(args)
255-
plot_totals_by_restriction(args)
246+
plot_distribution_by_license(args)
247+
plot_distribution_by_restriction(args)
256248

257249
# Add and commit changes
258250
args = shared.git_add_and_commit(

0 commit comments

Comments
 (0)