Skip to content

Instantly share code, notes, and snippets.

View PatrickFanella's full-sized avatar

Patrick Fanella PatrickFanella

  • Downers Grove, IL
View GitHub Profile
PK`R�I��
�:�ǽ-ofr20051294.kmlUT �IXƟVux �(#�[s�F҆��W��^��r�Ӗ�����r���K*#aDL V�_�=��X�Z�5�20ծ�A-�A<����cS�tӚ�zp���@W�un�Ճ{o^7O�}����5<
Y��]���b�U�lU׫R��z���,�{��
��'�i��Ug?�+����귺 6�ҍ*�\o��tmP�]���)������u{ژm/m��^�_����T�ϴ���`�w�l��^�Ӡ�]��~�uU�WW�f3�����z]��B��o����?4fe�y� ���)u�*83�t�����"ȍ�b:P}W�M;�=���ntpOrZW�te�Zjx ��t:(�Z��5p}�ִ|�3P�^��͟F6������k��*G�:�լ�wW�-\����Wf��\�ӺɃPD{�??w�z���/��<|����թ����T�'�SA�������ir�:��U o��E}���r͹���^Й��������}=7��[����v��|�᭚��MmQ������e�b������{�Kx>k�������_�g��I����n����̇[�~x?8�e�n�����><� ީҬ���zk?Q���Qt����)�o����ggZ߿�
����G���b��]wi���'� _�[t|�|��E����7U�'s�D]���}�5�> � sZ �Vko@��������G��:�F�*8���j�R��k9�}�^�lx���o����W���X o�����_�b��.J��)����3՗ݱ�ġ��-����Qm��ў*���>�s���~��ӯ�
\
��s��{�5�0��^�>1��0�����l����{�������i=<}b �`#�y,Xx=����g���G���K;Z�S�
�s��D4���;��C{��p��M|��`!�nB�v����T>*rSƗ�Lr���>R��@���wg ^O�`:������޽��:R�,!0�X���T׍=z���0'+<'6�����X�Ʀ}���W�
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>USMIN deposit database</name>
<description>Detailed descriptions of mineral districts, mines, and mineral occurrences.</description>
<!-- Define styles first -->
<Style id="Deposit_normal">
<IconStyle>
<scale>1</scale>
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="Brine_Mine_highlight">
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>https://mrdata.usgs.gov/images/open-pit-32.png</href>
</Icon>
</IconStyle>
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2/">
<Document>
<Style id="Brine_Mine_highlight">
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>https://mrdata.usgs.gov/images/open-pit-32.png</href>
</Icon>
</IconStyle>
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Critical minerals</name>
<description>Source: https://mrdata.usgs.gov/pp1802/</description>
<Placemark>
<ExtendedData>
<Data name="url">
<value>https://mrdata.usgs.gov/pp1802/html/1</value>
</Data>
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Major mineral deposits</name>
<description>Source: https://mrdata.usgs.gov/major-deposits/</description>
<Placemark>
<ExtendedData>
<Data name="url">
<value>https://mrdata.usgs.gov/major-deposits/show-ofr20051294.php?rec_id=325</value>
</Data>
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
-<name>Ports</name>
-<description>Source: https://datacatalog.worldbank.org/search/dataset/0038118/Global---International-Ports</description>
<Placemark>
<ExtendedData>
<Data name="Country"><value>United Arab Emirates</value></Data>
<Data name="Function"><value>1-345---</value></Data>
<Data name="LOCODE"><value>AEAUH</value></Data>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>D3 Org Chart</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
import pandas as pd
import json
from statistics import mean
def create_hierarchy_from_csv(csv_file):
# Read the CSV file
df = pd.read_csv(csv_file)
# Create the hierarchical structure
hierarchy = {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>D3 Org Chart</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/d3-flextree.js"></script>
<style>