-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
61 volume pipeline #65
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to drill down to within area/discipline/topic
Sounds good!
…On Tue, 14 Mar 2023 at 11:32, emily-bicks ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In dap_aria_mapping/pipeline/app_tables/emergence_table.py
<#65 (comment)>
:
> +from dap_aria_mapping import BUCKET_NAME, logger
+
+if __name__ == "__main__":
+
+ logger.info("Loading patent data")
+ patents_with_topics = get_patent_topics(tax = "cooccur", level = 3)
+
+ logger.info("Transforming patent dictionary to polars df")
+ patents_with_topics_df = pl.DataFrame(
+ pd.DataFrame.from_dict(patents_with_topics, orient='index'
+ ).T.unstack().dropna().reset_index(drop=True, level=1).to_frame().reset_index())
+ patents_with_topics_df.columns = ["id", "topic"]
+
+ logger.info("Loading patent date data")
+ patent_dates = pl.DataFrame(get_patents()).select(
+ ["publication_number", "publication_date"]
Hmm - maybe we should have this conversation on standup?
—
Reply to this email directly, view it on GitHub
<#65 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHDWGHN4EODEYD5TCDGRAE3W4BJLNANCNFSM6AAAAAAVUZ3LXI>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
--
*Karlis Kanders <https://www.nesta.org.uk/team/karlis-kanders/> *(he/him)
Senior Data Foresight Lead
Nesta - Discovery Hub / Data Analytics Practice
--
58 Victoria Embankment
London
EC4Y 0DS
www.nesta.org.uk
<http://www.nesta.org.uk/> | Twitter <http://www.twitter.com/nesta_uk>
| LinkedIn
<http://www.linkedin.com/groups?gid=1868227&goback=%2Egdr_1274367066783_1>
| Facebook
<http://www.facebook.com/pages/NESTA/116788428355432?v=wall&ref=sgm>
If
you no longer want to receive emails from Nesta, send an email to
***@***.*** ***@***.***>. This email and any
attachments are confidential and may be subject to legal privilege. Any
use, copying or disclosure other than by the intended recipient is
unauthorised. If you have received this message in error, please notify
the sender immediately or by email to ***@***.***
***@***.***> and delete this message and any
copies from your computer and network. The views expressed in this
email are those of the author and do not necessarily reflect the views
of Nesta. Nesta is a company limited by guarantee and registered in
England and Wales with company number 7706036 and charity number
1144091. Registered as a charity in Scotland number SC042833.
Registered office: 58 Victoria Embankment, London, EC4Y 0DS.
--
|
ampudia19
reviewed
Mar 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff Emily! Very minor things (mostly me learning Polars & cacheing with non-hashable objects, so feel free to ignore and merge)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Two main modifications in this PR
Pipeline to calculate number of docs per topic/domain/area per year (runs in about 20 minutes):
pipelines/app_tables/emergence_table.py
Builds emergence and alignment charts in horizon scanner
analysis/app/pages/1_Horizon_Scanner
to run app:
streamlit run analysis/app/Home.py
Fixes #61