How to create burst detection files from MySQL

Here are the steps to generate a burst.in file that can be processed by the burst detection code in Java.

PowerPoint

D:\Research\Papers\Journals\2014\PNAS-PLOS-JASIST-ISSI\Structural Variation of Transformative Patents [Autosaved].pptx

Create two auxiliary tables in MySQL

Create two tables before using the sql script below.

TABLE 1: patent_citations_per_year

patent_idyearcitations
367034419761
358365919763

SQL script:

CREATE TABLE patent_citations_per_year SELECT cite_to_patent_id as patent_id, cite_from_patent_gyr as year, count(*) as citations FROM patent_citations GROUP BY cited_patent_id, year ORDER BY year;
It took 18min on my W530 laptop.

TABLE 2: patent_total_citations

patent_idtotal_citations
46832023139
46831952735

generate burst.header and burst.body with sql

generate burst.in from mysql

Output Format

year uniq yearID

SQL Script

# need to adjust the beginning year, e.g. 1976
# need to adjust the ending year, e.g. 2014
use comets;
select concat_ws(' ', '#', year, count(*), year-1976) from patent_citations_per_year where year < 2014 group by year order by year
into outfile 'D:/research/papers/journals/2014/PNAS-PLOS-JASIST-ISSI/sql/burst_in_header' lines terminated by '\n';
select concat_ws(' ', year-1976, patent_id, citations) from patent_citations_per_year where year < 2014
into outfile 'D:/research/papers/journals/2014/PNAS-PLOS-JASIST-ISSI/sql/burst_in_body' lines terminated by '\n';
copy burst_in_header+burst_in_body burst.in
copy burst.in to D://CiteSpaceIII
run java with edu.drexel.citespace.terms.Burst as the main class (BurstDetection)