Skip to content

Commit c2abb93

Browse files
committed
Update Analysis-1.md
1 parent 66e99cf commit c2abb93

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

docs/_analysis/Analysis-1.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,30 @@ To clean this data, we will use Riot's static JSON data source (Data Dragon) to
4141

4242
![flatten](/assets/images/tft1/flatten.png)
4343

44-
<pre> '''#units
44+
{% highlight ruby %}
45+
#units
4546
with open("tft-champion-minus.json") as json_file:
4647
json_data = json.load(json_file)
4748

4849
df_unit = pd.DataFrame([
4950
[value["id"], value["name"]] for value in json_data.values()
50-
],columns=["id","name"])''' </pre>
51+
],columns=["id","name"])
52+
{% endhighlight %}
5153

5254

5355
After exporting these as csv files, we imported them into MySQL for querying to merge and clean the tables.
5456

55-
<pre> ```select * from df_augments; ``` </pre>
57+
{% highlight ruby %}
58+
select * from df_augments;
59+
{% endhighlight %}
5660

5761
![uncleaned](/assets/images/tft1/uncleaned.png)
5862

59-
<pre> ```### Cleaned Augments
63+
{% highlight ruby %}
64+
### Cleaned Augments
6065
select match_number, participant_placement, name, CASE WHEN da.participant_placement = 1 THEN 1 ELSE 0 END as First
61-
from df_augments da left join df_augment_static das on da.participant_augments = das.id;``` </pre>
66+
from df_augments da left join df_augment_static das on da.participant_augments = das.id;
67+
{% endhighlight %}
6268

6369
![cleaned](/assets/images/tft1/cleaned.png)
6470

0 commit comments

Comments
 (0)