diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 1b9b94a..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: hpc-social diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf2aad1..f64e049 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: testing: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup conda environment run: conda create --quiet --name map pytest diff --git a/.github/workflows/update-map.yml b/.github/workflows/update-map.yml index 0b73f36..ea44671 100644 --- a/.github/workflows/update-map.yml +++ b/.github/workflows/update-map.yml @@ -1,17 +1,17 @@ -name: Update hpc.social Map +name: Update Flux Locator Map on: workflow_dispatch: - pull_request: [] - schedule: - - cron: 0 2 * * * + # pull_request: [] + # schedule: + # - cron: 0 2 * * * jobs: build: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Update Map run: | diff --git a/Gemfile b/Gemfile index fc1e8c0..e5ce924 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,9 @@ source 'https://rubygems.org' -gem "github-pages", '193', group: :jekyll_plugins +gem "github-pages" # enable tzinfo-data for local build # gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw] gem 'jekyll-paginate' -gem 'faraday', '0.15.4' +gem 'faraday' +gem 'webrick' diff --git a/README.md b/README.md index a1c31de..8764e08 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# The HPC.social Community Map +# The Flux Framework Center Map -This repository contains static files and workflows to generate the HPC.social map. +These are centers or institutions that reported using Flux. The original list was assembled (primarily through email correspondence) for the R&D 100 award, and the map will be updated with new centers into the future. We currently have automation disabled pending discussion about design. -![assets/img/logo.png](assets/img/logo.png) +![assets/img/map.png](assets/img/map.png) ## How does it work? -The form that is provided [on the site](https://hpc.social/projects/map/) is fed into Google +The form that is provided [on the site](https://flux-framework.org/locator-map/) is fed into Google Sheets, and the workflow to [.github/workflows/update-map.yml](.github/workflows/update-map.yml) is able to parse the sheet for locations and then update the map! In addition to spot checks of the sheet, during the addition we have an automated workflow that checks any provided url for: @@ -79,10 +79,8 @@ $ python scripts/update_map.py ``` This automation runs nightly to update our map. But we aren't perfect, and sometimes -the data going into the form is not perfect! If you see a problem, please [open an issue](https://github.com/hpc-social/map/issues). - +the data going into the form is not perfect! If you see a problem, please [open an issue](https://github.com/flux-framework/locator-map/issues). ## 🎨️ Thanks 🎨️ -The HPC.social map is derived from the [US-RSE Map](https://us-rse.org/usrse-map) which was -also designed and implemented by [@vsoch](https://github.com/vsoch). +The Flux Framework Center map is derived from [the HPC.social map](https://github.com/hpc-social/map), which is derived from the [US-RSE Map](https://us-rse.org/usrse-map), both of which were designed and implemented by [@vsoch](https://github.com/vsoch). diff --git a/_config.yml b/_config.yml index 0ebd2a9..118ee42 100644 --- a/_config.yml +++ b/_config.yml @@ -1,17 +1,17 @@ # --- General options --- # -url: "https://hpc-social.github.io" -baseurl: "/map" +url: "https://flux-framework.org" +baseurl: "/locator-map" title-img: /assets/img/logo.png twitter-img: /assets/img/logo.png mapbox: "pk.eyJ1IjoidnNvY2giLCJhIjoiY2sxdXE4dGZ6MGxveTNibzBqc2E5OXpzbiJ9.OdVyKYmHLhSsk03iQoN1kw" # Name of website -title: HPC.social -github_url: hpc-social/map +title: Flux Locator Map +github_url: flux-framework/locator-map # Short description of your site -description: The HPC.social Community +description: The Flux Framework Locator Map # --- Navigation bar options --- # @@ -21,16 +21,16 @@ avatar: "/assets/img/logo.png" # List of links in the navigation bar navbar-links: - Home: "https://hpc-social.github.io" + Home: "https://flux-framework.org" # --- Background colour/image options --- # # Personalize the colors in your website. Colour values can be any valid CSS colour -navbar-col: "#000" +navbar-col: "#2094f3" navbar-text-col: "#ffffff" navbar-children-col: "#500e3d" -page-col: "#000" +page-col: "#2094f3" link-col: "#31dce4" hover-col: "#31dce4" footer-col: "#F5F5F5" @@ -49,12 +49,12 @@ footer-link-col: "#404040" # Change all these values or delete the ones you don't want. # Important: you must keep the "name" parameter, everything else you can remove author: - name: HPC-social + name: vsoch # Social Network Links social-network-links: - github: hpc-social - twitter: hpc_social + github: flux-framework + twitter: FluxFramework # Select which share links to show in posts share-links-active: @@ -65,7 +65,7 @@ share-links-active: # How to display the link to the website in the footer # Remove this if you don't want a link in the footer -url-pretty: "hpc.social" +url-pretty: "flux-framework" # Output options (more information on Jekyll's site) timezone: "America/New_York" diff --git a/_data/group-locations.csv b/_data/group-locations.csv index 11a1547..4cd2566 100644 --- a/_data/group-locations.csv +++ b/_data/group-locations.csv @@ -1,32 +1,32 @@ address,lat,lng,name,url -"berkeley, california, united states",37.8753497,-122.23963364918777,NERSC,https://www.nersc.gov/ -"edinburgh, united kingdom",55.9533456,-3.1883749,EPCC,https://www.epcc.ed.ac.uk/ -"cambridge, massachusetts, united states",42.3750997,-71.1056157,MIT Office of Research Computing and Data,https://orcd.mit.edu/ -"zagreb, zagreb, croatia",45.84264135,15.962231476593626,University of Zagreb- University Computing Centre- Croatia,https://www.srce.hr/en/ -"lubbock, texas, united states",33.5635206,-101.879336,Texas Tech University High Performance Computing Center,https://www.depts.ttu.edu/hpcc -"sheffield, south yorkshire, united kingdom",53.3806626,-1.4702278,Research and Innovation IT- IT Services- University of Sheffield,https://www.sheffield.ac.uk/it-services -"urbana, illinois, united states",40.1117174,-88.207301,The National Center for Supercomputing Applications,https://ncsa.illinois.edu -"sheffield, south yorkshire, united kingdom",53.3806626,-1.4702278,University of Sheffield - IT Services - Research & Innovation IT team,https://github.com/rcgsheffield -"pittsburgh, pennsylvania, united states",40.4416941,-79.9900861,Pittsburgh Supercomputing Center,https://www.psc.edu/ -"west lafayette, indiana, united states",40.4258686,-86.9080655,Purdue's Rosen Center for Advanced Computing,https://www.rcac.purdue.edu/ -"stanford, california, united states",37.426540700000004,-122.17030545534064,Stanford High Performance Computing Center,https://hpcc.stanford.edu -"san jose, california, united states",37.3361663,-121.890591,Steve Jones,https://www.hpcclusters.com -"stanford, california, united states",37.426540700000004,-122.17030545534064,Stanford Research Computing Center,https://srcc.stanford.edu -"la jolla, california, united states",32.8401623,-117.2740777,Marty Kandes,https://www.sdsc.edu -"blacksburg, virginia, united states",37.2296566,-80.4136767,Virginia Tech Advanced Research Computing,https://www.arc.vt.edu -"st. louis, missouri, united states of america",38.6319657,-90.2428756,Washington University in St. Louis Research Infrastructure Services,https://ris.wustl.edu/ -"cambridge, massachusetts, united states",42.3750997,-71.1056157,Broad Institute of Harvard and MIT,https://www.broadinstitute.org -"birmingham, west midlands, united kingdom",52.4796992,-1.9026911,Advanced Research Computing- University of Birmingham- UK,http://bear.bham.ac.uk -"stanford, california, united states",37.426540700000004,-122.17030545534064,Stanford High Performance Computing Center,https://hpcc.stanford.edu -"ghent, belgium",51.0538286,3.7250121,HPC-UGent,https://www.ugent.be/hpc -"lincoln, nebraska, u.s.",40.725838,-96.591854,Holland Computing Center,https://hcc.unl.edu/ -"brisbane, queensland, australia",-27.4689682,153.0234991,Robert Denham,https://www.jrsrp.org.au/ -"davis, california, united states",38.545379,-121.744583,University of California- Davis,https://hpc.ucdavis.edu -"houston, texas, united states",29.7589382,-95.3676974,Rice University,https://www.rice.edu/ -"hanover, new hampshire, united states",43.703622,-72.288666,Research Computing at Dartmouth College,https://rc.dartmouth.edu/ -"blacksburg, va, united states",37.2296566,-80.4136767,Synergy lab,https://synergy.cs.vt.edu/ -"eau claire, wisconsin, united states",44.811349,-91.4984941,Blugold Center for High Performance Computing,https://hpc.uwec.edu -"philadelphia, pennsylvania, united states of america",39.9527237,-75.1635262,University of Pennsylvania School of Engineering and Applied Science,https://www.seas.upenn.edu/ -"philadelphia, pennsylvania, united states of america",39.9527237,-75.1635262,University of Pennsylvania- School of Engineering and Applied Science,https://www.seas.upenn.edu -"cardiff, wales",51.4816546,-3.1791934,Group,https://www.cardiff.ac.uk/arcca -"st. johns, newfoundland and labrador, canada",56.69228425,-60.93731851587222,OStueker,https://ace-net.ca/ +"livermore, california, united states",37.6820583,-121.768053,Lawrence Livermore National Laboratory,https://computing.llnl.gov/ +"los alamos, new mexico, united states",35.88137,-106.298959,Los Alamos National Laboratory,https://lanl.gov/ +"albuquerque, new mexico, united states",35.0841034,-106.650985,Sandia National Laboratories,https://www.sandia.gov/ +"oak ridge, tennessee, united states",36.0103562,-84.2696449,Oak Ridge National Laboratory,https://www.ornl.gov/ +"berkeley, california, united states",37.8708393,-122.272863,National Energy Research Scientific Computing Center,https://www.nersc.gov +"upton, new york, united states",40.869543,-72.8867697,Brookhaven National Laboratory,https://www.bnl.gov/ +"lemont, illinois, united states",41.6737149,-88.0016263,Argonne National Laboratory,https://www.anl.gov/ +"west milton, new york, united states",43.0375748,-73.9292912,Naval Nuclear Laboratory,https://navalnuclearlab.energy.gov/ +"kobe, japan",34.6932379,135.1943764,RIKEN Center for Computational Science,https://www.r-ccs.riken.jp/en/ +"paris, france",48.8534951,2.3483915,French Alternative Energies and Atomic Energy Commission (CEA),https://www.cea.fr/english +"aachen, germany",50.776351,6.083862,"RWTCH Aachen University, German Research School for Simulation Sciences",https://www.aices.rwth-aachen.de/en/ +"cambridge, massachusetts, united states",42.3655767,-71.1040018,Massachusetts Institute of Technology,https://www.mit.edu/ +"champaign, illinois, united states",40.1164841,-88.2430932,Univeristy of illinois Urbana-Champaign,https://illinois.edu/ +"raleigh, north carolina, united states",35.7803977,-78.6390989,North Carolina State University,https://www.ncsu.edu/ +"salt lake city, utah, united states",40.7596198,-111.886797,University of Utah,https://www.utah.edu/ +"newark, delaware, united states",39.6828358,-75.7515682,University of Delaware,https://www.udel.edu/ +"knoxville, tennessee, united states",35.9603948,-83.9210261,University of Tennessee,https://www.utk.edu/ +"chicago, illinois, united states",41.8755616,-87.6244212,University of Chicago,https://www.uchicago.edu/en +"new brunswick, new jersey, united states",40.4862174,-74.4518173,Rutgers University,https://www.rutgers.edu/ +"tallahassee, florida, united states",30.4380832,-84.2809332,Florida State University,https://www.fsu.edu/ +"maryland, college park, united states",39.0307198,-76.88017863033588,University of Maryland,https://umd.edu/ +"blacksburg, virginia, united states",37.2296566,-80.4136767,Virginia Tech,https://www.vt.edu/ +"eugene, oregon, united states",44.0505054,-123.0950506,University of Oregon,https://www.uoregon.edu/ +"chicago, illinois, united states",41.8755616,-87.6244212,Illinois Institute of Tech,https://www.iit.edu/ +"tuscon, arizona, united states",32.3090726,-111.0827253,University of Arizona,https://www.arizona.edu/ +"mã¼nchen, germany",52.5055795,13.5590615,Technical University Munich,https://www.tum.de/en/ +"yorktown heights, new york, united states",41.2709274,-73.7776336,IBM TJ Watson Research Center,https://research.ibm.com/labs/watson/visitor.shtml +"raleigh, north carolina, united states",35.7803977,-78.6390989,RedHat OpenShift,https://www.redhat.com/en +"houston, texas, united states",29.7589382,-95.3676974,HPE,https://www.hpe.com/ +"portland, oregon, united states",45.5202471,-122.674194,Intel,https://www.intel.com/content/www/us/en/corporate-responsibility/intel-in-oregon.html +"seattle, washington, united states",47.6038321,-122.330062,Amazon Web Services,https://aws.amazon.com/ diff --git a/_data/locations.csv b/_data/locations.csv index ef60c24..862a922 100644 --- a/_data/locations.csv +++ b/_data/locations.csv @@ -1,90 +1,30 @@ address,lat,lng,count,name -"boulder, colorado, united states",40.0154155,-105.270241,1, -"urbana, illinois, united states",40.1117174,-88.207301,2,galen_arnold -"university city, missouri, united states",38.6569083,-90.3103443,1, -"sammamish, washington, united states",47.6088445,-122.0423067,1,Suhaib Khan -"santa clara, california, united states",37.2333253,-121.6846349,1, -"boston, massachusetts, united states",42.3554334,-71.060511,2,Matt V. -"ilmenau, thuringia, germany",50.6867695,10.9142385,1, -"singapore, singapore",1.357107,103.8194992,1,Miguel Dias Costa -"lubbock, texas, usa",33.5635206,-101.879336,1, -"cookeville, tennessee, united states",36.1623886,-85.4997057,1, -"cordoba, cordoba, argentina",-31.4173391,-64.183319,1,Carlos Bederian -"london, united kingdom",51.5073219,-0.1276474,1,John Hearns -"grenoble, france",45.1875602,5.7357819,1, -"durham, united kingdom",54.666667,-1.75,1, -"denver, colorado, united states",39.7392364,-104.984862,1,ajdecon -"rottenburg am neckar, baden-wurttemberg, germany",48.47696,8.9336788,1,Presalesperson at the Edge -"cambridge, massachusetts, united states",42.3750997,-71.1056157,1,James Cuff- Executive Director @ MIT -"los angeles, california, united states",34.0536909,-118.242766,2, -"canberra, australian capital territory, australia",-35.2975906,149.1012676,1, -"melbourne, victoria, australia",-37.8142176,144.9631608,1,Matt -"austin, texas, united states",30.2711286,-97.7436995,2,Joshua Mora -"college station, texas, united states",30.5955289,-96.3071042,1, -"albuquerque, new mexico, united states",35.0841034,-106.650985,2, -"taunton, somerset, united kingdom",51.0147895,-3.1029086,1, -"ottawa, ontario, canada",45.4208777,-75.6901106,1,FelixCLC -"oakland, california, united states",37.8044557,-122.271356,1,Glenn K. Lockwood -"middletown, new york, united states",40.8397222,-73.8316667,1, -"bloomington, indiana, united states",39.1670396,-86.5342881,2, -"redondo beach, california, united states",33.8455911,-118.3886766,1, -"munich, germany",48.1371079,11.5753822,1, -"peoria, arizona, united states",33.5806115,-112.237294,1, -"exeter, united kingdom",50.7255794,-3.5269497,1, -"catania, italy",37.5023612,15.0873718,1, -"erlangen, bavaria, germany",49.5928616,11.0056,1, -"madison, wisconsin, united states",43.074761,-89.3837613,1,Jason Bowen -"york, united kingdom",53.9590555,-1.0815361,1, -"columbia, missouri, united states",38.951883,-92.3337366,1, -"amsterdam, noord-holland, netherlands",52.3727598,4.8936041,1,Martin Hilgeman- HPC Performance Lead at Dell Technologies -"west roxbury, massachusetts, united states",42.2792649,-71.1494972,1, -"regensburg, bavaria, germany",49.0195333,12.0974869,1,Wolfgang Gentzsch -"darmstadt, hesse, germany",49.8851869,8.6736295,1, -"berkeley, california, united states",37.8753497,-122.23963364918777,1, -"golden, colorado, united states",39.7546349,-105.22058,2, -"durham, durham, united kingdom",54.7770139,-1.5756205,1, -"toulouse, 31 - haute-garonne, france",43.6044622,1.4442469,1, -"st austell, cornwall, united kingdom",50.338466,-4.7882104,1, -"thuwal, saudi arabia",22.2833454,39.1128145,1,Alex Moura -"stanford, california, united states",37.426540700000004,-122.17030545534064,1,Ruth Marinshaw -"ithaca, new york, united states",42.43717945,-76.54836230003966,1,Ben Carr -"ann arbor, michigan, united states",42.2681569,-83.7312291,1, -"julich, germany",50.9220931,6.3611015,1,Robert Speck -"utrecht, netherlands",52.080985600000005,5.12768396945229,1, -"blacksburg, virginia, united states",37.2296566,-80.4136767,1,Matthew Brown -"reading, berkshire, united kingdom",51.45200635,-0.9684735493619272,1, -"lexington, kentucky, united states",38.0464066,-84.4970393,1, -"munich, bavaria, germany",48.1371079,11.5753822,2, -"terre haute, indiana, united states",39.4667025,-87.4139119,1,Jeff Layton -"troy, new york, united states",42.7284117,-73.6917878,1, -"nashville, tennessee, usa",36.1622767,-86.7742984,1,Vanderbilt University -"pittsburgh, pennsylvania, usa",40.4416941,-79.9900861,1, "livermore, california, united states",37.6820583,-121.768053,1,Lawrence Livermore National Laboratory -"cambridge, united kingdom",52.2055314,0.1186637,2,Ahmed -"canberra, australia",-35.2975906,149.1012676,1,No -"bergerac, france",44.8534568,0.487531,1, -"bar harbor, maine, united states",44.3876378,-68.2043361,1, -"faro, portugal",37.0162727,-7.9351771,1, -"onna, okinawa, japan",26.493888,127.865372,1, -"ithaca, new york, usa",42.43717945,-76.54836230003966,1,Self -"toronto, canada",43.6534817,-79.3839347,1, -"curitiba, parana, brasil",-25.4295963,-49.2712724,1,Pedro Alves Batista - Madya Research -"zurich, zurich, switzerland",47.3744489,8.5410422,1, -"ditzingen, germany",48.8263983,9.0658446,1,Thomas Schwinge -"columbus, ohio, united states",39.9622601,-83.0007065,1, -"knoxville, tennessee, united states",35.9603948,-83.9210261,1, -"lugano, ticino, switzerland",46.0038279,8.9512134,1, -"baton rouge, la, united states",30.4494155,-91.1869659,1, -"baku, azerbaijan, azerbaijan",40.3699168,49.834199,1, -"garching bei muenchen, bayern, germany",48.2513878,11.6509662,1, -"rock hill, south carolina, united states",34.9248667,-81.0250784,1, -"shanghai, shanghai, china",31.2323437,121.4691024,1,Nobody -"denton, texas, usa",33.1838787,-97.1413417,1, -"weatherford, oklahoma, united states",35.5261633,-98.7075744,1,J Evert -"bayreuth, deutschland",49.9427202,11.5763079,1, -"dublin, ireland",53.3493795,-6.2605593,1,SheriF -"toronto, ontario, canada",43.6534817,-79.3839347,1, -"rochester, mn, united states",44.0234387,-92.4630182,1, -"odessa, missouri, united states",38.9995797,-93.9539663,1,Shane Corder -"hamilton, ontario, canada",43.2560802,-79.8728583,1,Ricardo Barros Lourenco (McMaster University) -"bellevue, washington, united states",47.6144219,-122.192337,1,pharmashawarma +"los alamos, new mexico, united states",35.88137,-106.298959,1,Los Alamos National Laboratory +"albuquerque, new mexico, united states",35.0841034,-106.650985,1,Sandia National Laboratories +"oak ridge, tennessee, united states",36.0103562,-84.2696449,1,Oak Ridge National Laboratory +"berkeley, california, united states",37.8708393,-122.272863,1,National Energy Research Scientific Computing Center +"upton, new york, united states",40.869543,-72.8867697,1,Brookhaven National Laboratory +"lemont, illinois, united states",41.6737149,-88.0016263,1,Argonne National Laboratory +"west milton, new york, united states",43.0375748,-73.9292912,1,Naval Nuclear Laboratory +"kobe, japan",34.6932379,135.1943764,1,RIKEN Center for Computational Science +"paris, france",48.8534951,2.3483915,1,French Alternative Energies and Atomic Energy Commission (CEA) +"aachen, germany",50.776351,6.083862,1,"RWTCH Aachen University, German Research School for Simulation Sciences" +"cambridge, massachusetts, united states",42.3655767,-71.1040018,1,Massachusetts Institute of Technology +"champaign, illinois, united states",40.1164841,-88.2430932,1,Univeristy of illinois Urbana-Champaign +"raleigh, north carolina, united states",35.7803977,-78.6390989,2,RedHat OpenShift|North Carolina State University +"salt lake city, utah, united states",40.7596198,-111.886797,1,University of Utah +"newark, delaware, united states",39.6828358,-75.7515682,1,University of Delaware +"knoxville, tennessee, united states",35.9603948,-83.9210261,1,University of Tennessee +"chicago, illinois, united states",41.8755616,-87.6244212,2,Illinois Institute of Tech|University of Chicago +"new brunswick, new jersey, united states",40.4862174,-74.4518173,1,Rutgers University +"tallahassee, florida, united states",30.4380832,-84.2809332,1,Florida State University +"maryland, college park, united states",39.0307198,-76.88017863033588,1,University of Maryland +"blacksburg, virginia, united states",37.2296566,-80.4136767,1,Virginia Tech +"eugene, oregon, united states",44.0505054,-123.0950506,1,University of Oregon +"tuscon, arizona, united states",32.3090726,-111.0827253,1,University of Arizona +"mã¼nchen, germany",52.5055795,13.5590615,1,Technical University Munich +"yorktown heights, new york, united states",41.2709274,-73.7776336,1,IBM TJ Watson Research Center +"houston, texas, united states",29.7589382,-95.3676974,1,HPE +"portland, oregon, united states",45.5202471,-122.674194,1,Intel +"seattle, washington, united states",47.6038321,-122.330062,1,Amazon Web Services diff --git a/_includes/nav.html b/_includes/nav.html index 513a055..0bfec0c 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -35,9 +35,8 @@ {% endif %} {% endfor %} {% if page.url == "/" %}
  • Table
  • {% else %}
  • Map
  • {% endif %} -
  • Add Entry
  • +
  • Add Entry
  • GitHub
  • -
  • diff --git a/assets/img/favicon.ico b/assets/img/favicon.ico index 6d2c414..ba19264 100644 Binary files a/assets/img/favicon.ico and b/assets/img/favicon.ico differ diff --git a/assets/img/logo.png b/assets/img/logo.png index 82e6f9b..d50aa52 100644 Binary files a/assets/img/logo.png and b/assets/img/logo.png differ diff --git a/assets/img/map.png b/assets/img/map.png new file mode 100644 index 0000000..de9bef8 Binary files /dev/null and b/assets/img/map.png differ diff --git a/favicon.ico b/favicon.ico index 6d2c414..ba19264 100644 Binary files a/favicon.ico and b/favicon.ico differ diff --git a/pages/data.json b/pages/data.json index 7ed4752..60d6eda 100644 --- a/pages/data.json +++ b/pages/data.json @@ -6,15 +6,8 @@ permalink: /api/data.json { "address": "{{ loc.address }}", "count": {{ loc.count }}, - "type": "individual", + "type": "institution", "name": "{{ loc.name }}", - "website": "" - },{% endfor %}{% for loc in site.data.group-locations %} - { - "address": "{{ loc.address }}", - "count": 1, - "type": "group", - "name": "{{ loc.name }}", - "website": "{{ loc.url }}" + "website": "{% if loc.url %}{{ loc.url }}{% endif %}" }{% if forloop.last %}{% else %},{% endif %}{% endfor %} ] diff --git a/pages/map.md b/pages/map.md index 5946985..17ed775 100644 --- a/pages/map.md +++ b/pages/map.md @@ -148,7 +148,7 @@ permalink: / console.log(marker.data) if (marker.data.description != "") { description = '

    ' + - 'people: ' + marker.data.description + + 'institutions: ' + marker.data.description + '

    ' } @@ -192,7 +192,7 @@ permalink: / // create legend: from https://docs.mapbox.com/help/tutorials/choropleth-studio-gl-pt-2/ const legend = document.getElementById('legend'); const colors = ['#1c2e71', '#31dce4'] - const layers = ['Community Members','Centers and Groups']; + const layers = ['Institutions','Clusters']; layers.forEach((layer, i) => { const color = colors[i]; const item = document.createElement('div'); diff --git a/pages/table.md b/pages/table.md index 2efb178..06da411 100644 --- a/pages/table.md +++ b/pages/table.md @@ -13,8 +13,8 @@ permalink: tabular/ color: white; } td { - color: white; - background-color: #333; + color: #333; + background-color: #fff; } thead { background-color: yellow; @@ -33,7 +33,7 @@ thead { Location Type Count - People + Institution Website diff --git a/scripts/update_map.py b/scripts/update_map.py index 3534334..248affe 100644 --- a/scripts/update_map.py +++ b/scripts/update_map.py @@ -1,10 +1,7 @@ #!/usr/bin/env python3 -# Update map will retrieve locations via a csv, and then generate a new yaml file using lookup of schools -# https://docs.google.com/spreadsheets/d/e/2PACX-1vSTOdevfR0mk6QS9FFlKbVxlddg-M8mhhYIebh4sPtCktQvvkdRPY_rjUMR6May82aFWCjQaf915JHF/pub?output=tsv -# requests is required -# Yes, this is a bit spaghetti code. Even I like writing that way every so often! -# Copyright @vsoch, 2022 +# Update map will retrieve locations via a csv, and then generate a new yaml file using lookup +# Copyright @vsoch, 2022-2023 import csv import json @@ -19,7 +16,9 @@ here = os.path.dirname(os.path.abspath(__file__)) scanned_url_file = os.path.join(here, "scanned-urls.txt") -scanner_token = os.environ.get("SCANNER_KEY") +# Disabled for now +# scanner_token = os.environ.get("SCANNER_KEY") +scanner_token = None def load_scanned_urls(): @@ -148,35 +147,43 @@ def is_malicious_url(url): return False +def strip(name): + for strip in [" ", ",", " ", ","]: + name = name.strip(strip) + return name + + def parse_location_line(line): """ Given a location line, parse into a map metadata entry """ # timestamp, state, city, country, individual (blank) or group, name parts = line.split("\t") - state = parts[1].strip() + name = parts[1].strip() city = parts[2].strip() - country = parts[3].strip() + state = parts[3].strip() + country = parts[4].strip() + context = parts[5].strip() + uses = parts[6].strip() - name = None url = None if len(parts) > 6: - url = parts[6].strip() - if len(parts) > 5: - name = parts[5].strip().replace(",", "-") + url = parts[7].strip() # If we have a url and key, check if if url and scanner_token: if is_malicious_url(url): sys.exit(f"Malicious url {url} detected, cancelling update.") + name = strip(name) entry = { "state": state, "city": city, "country": country, - "is_individual": url is None, + "context": context, "url": url, "name": name, + "uses": uses, } address = "" if not city else city @@ -184,10 +191,7 @@ def parse_location_line(line): address += f", {state}" if address else state if country: address += f", {country}" if address else country - address = address.lower() - - for strip in [" ", ",", " ", ","]: - address = address.strip(strip) + address = strip(address.lower()) entry["address"] = address return entry @@ -213,20 +217,21 @@ def get_locations(lines): locations = {x[0]: x[1:] for x in locations} # Create geolocator - geolocator = Nominatim(user_agent="hpc.social") + geolocator = Nominatim(user_agent="flux-framework") # Get lats/long for each location, keep track of missing # This first step just cares about getting latitude and longitude missing = set() entries = [] + for line in lines: entry = parse_location_line(line) + entries.append(entry) address = entry["address"] # This is explicitly to get locations matched to the names if address not in locations and address not in group_locations: - print(f"Looking up {address}") location = get_location(geolocator, address) @@ -251,7 +256,7 @@ def get_google_sheet(): Read tab separated values sheet with locations! """ # A tsv download for just the worksheet with city, state - sheet = "https://docs.google.com/spreadsheets/d/e/2PACX-1vSTOdevfR0mk6QS9FFlKbVxlddg-M8mhhYIebh4sPtCktQvvkdRPY_rjUMR6May82aFWCjQaf915JHF/pub?output=tsv" + sheet = "https://docs.google.com/spreadsheets/d/e/2PACX-1vQuJIHrBgV7Zqvtibl7I5ynFxfCMxDbMntDYIBaHU93u1a2eqKJDweg8VsLDpdQ2Fcci8AfJL5TUuiw/pub?gid=10255536&single=true&output=tsv" # Ensure the response is okay response = requests.get(sheet) @@ -289,9 +294,6 @@ def main(): if entry["address"] not in locations and entry["address"] != "remote": unknown.add(entry["address"]) continue - # Skip group entries - if entry["is_individual"] is False: - continue if entry["address"] not in names: names[entry["address"]] = {"count": 0, "names": set()} names[entry["address"]]["count"] += 1 @@ -309,7 +311,6 @@ def main(): # ["address", "lat", "lng", "count", "name"] updated = [["address", "lat", "lng", "count", "name"]] for address, entry in names.items(): - people = "" if entry["names"]: people = "|".join(list(entry["names"])) diff --git a/tests/test_locations.py b/tests/test_locations.py index 54a4758..f4a885f 100644 --- a/tests/test_locations.py +++ b/tests/test_locations.py @@ -1,18 +1,18 @@ #!/usr/bin/env python -# Author @vsoch, Written February 2020 +# Author @vsoch, Written February 2020, Updated November 2023 # Updated June 2020, removing locations lookup testing (no longer used) # Updated November 2022 for hpc.social # Read in the locations.csv to validate each entry import os import csv + here = os.path.dirname(os.path.abspath(__file__)) def read_rows(filepath, newline="", delim=","): - """read in the data rows of a csv file. - """ + """read in the data rows of a csv file.""" # Read in the entire membership counts with open(filepath, newline=newline) as infile: reader = csv.reader(infile, delimiter=delim) @@ -36,7 +36,7 @@ def test_group_locations(tmp_path): def test_locations(tmp_path): """The locations.csv file is a comma separated file of locations. - Each should have a name (lowercase), latitude, and longitude. + Each should have a name (lowercase), latitude, and longitude. """ filepath = os.path.join(os.path.dirname(here), "_data", "locations.csv") assert os.path.exists(filepath) @@ -49,7 +49,7 @@ def test_locations(tmp_path): assert header[1] == "lat" assert header[2] == "lng" assert header[3] == "count" - assert header[4] == 'name' + assert header[4] == "name" # 2. Check that name is all lowercase print("Checking names, latitudes, longitudes, and counts != 0")